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
Input is a sequence of words consisting of |’[’|, |’]’|, |’(’| and |’)’|.
Output
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