Given a sequence of opening (
() and closing (
)) parentheses you will have to determine if it is a valid one.
A sequence of parentheses is considered valid if every opened parenthesis has a closing parenthesis appearing after it. And, there are no unpaired parenthesis in the sequence.
The input will contain a string of opening and closing parentheses. The string will be no longer than 25 characters.
Yes if the input string contains a valid sequence of parentheses. Otherwise, print