Balanced Paranthesis

I tried solving the question,but only 2 of my test cases pass while the other two did not.
Please help me bug my code
LINK : https://ide.codingblocks.com/s/312202

I have resolved the error. Thankyou.

Consider a case (}
Output must be No but your code gives output as Yes.