Write a program that reads a sequence of words with curly brackets and parentheses, and for each one prints if the curly brackets and the parentheses close correctly.
Input is a sequence of words consisting of |’[’|, |’]’|, |’(’| and |’)’|.
For each word, print “yes” or “no”
depending on if the curly brackets and the parentheses close correctly
or not.
Input
[]([]()) (([])() []( (([]))
Output
yes no no yes