A warehouse inventory tool encodes each container's nesting layout as a string made up only of the six bracket characters (, ), [, ], {, }. The layout is balanced when every opening bracket has a matching closing bracket of the same kind and the pairs are properly nested: the most recently opened bracket must always be the next one closed. Brackets of different kinds may never match each other (for example ( can only be closed by )).
Determine whether the given string is balanced.
Input format
A single line: the bracket string. It contains only the characters ()[]{} and no whitespace.
Output format
Print YES if the string is balanced, otherwise print NO.
Constraints
- 1 <= length of the string <= 200
- The string contains only the characters
(,),[,],{,}.