Given a string of balanced expression, find if it contains a redundant parenthesis or not. A set of parentheses is redundant if the same sub-expression is surrounded by unnecessary or multiple brackets. Print "Yes" if redundant else "No".
The first line of input contains an integer T denoting the number of test cases. The next line T contains an expression. The expression contains all characters and ^, *, /, +, -.
For each test case, in a new line, print YES or NO if the expression is redundant or not.
T = 1
(a+b) is surrounded by extra (), which is of no need.
T = 1
here there is no extra bracket.