CODU considers string as a good string if it is balanced with stars. A string is considered as balanced with stars if string contains
balanced brackets and between every pair of bracket i.e. between opening and closing brackets, there are at least 2 stars(*) present.
CODU knows how to check whether a string is balanced or not but this time he needs to keep a track of stars too. He decided to
write a program to check whether a string is good or not. But CODU is not as good in programming as you are, so he decided to
take help from you. Will you help him for this task? You need to print Yes and number of balanced pair if string satisfies following
conditions(string is good if it satisfies following 2 conditions):
- The string is balanced with respect to all brackets.
- Between every pair of bracket there is at least two stars.
However if string doesn’t satisfies above conditions then print No and number of balanced pair in string as an output.
String has balanced brackets and also satisfies 2nd condition. So the output is Yes with count of balanced pair which is 4.
In this case string is not balanced. So the output is No with the count of balanced pair as 1.