A string consisting of parentheses , and square brackets , is given. A bracket expression is considered correct if the following conditions are satisfied:
The string is empty;
If expressions and are correct, then their concatenation is also correct;
If expression is correct, then and are also correct.
Write a program that determines whether a given bracket expression is correct. The length of each string does not exceed characters.
The first line contains the number of test cases . Each of the following lines contains a bracket expression consisting only of the characters , , , .
For each test case, print Yes if the expression is correct, and No otherwise, each on a separate line.
Example 1