{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"You are given a string consisting of parentheses () and []. A string of this type is said to be correct:\n\n(a) if it is the empty string\n(b) if A and B are correct, AB is correct,\n(c) if A is correct, (A) and [A] are correct.\n\nWrite a program that takes a sequence of strings of this type and checks their correctness. Your program can assume that the maximum string length is 128.\n"}},{"title":"Input","value":{"format":"MD","content":"The file contains a positive integer n and a sequence of n strings of parentheses ‘()’ and ‘[]’, one string a line."}},{"title":"Output","value":{"format":"MD","content":"A sequence of ‘Yes’ or ‘No’ on the output file."}},{"title":"Sample Input","value":{"format":"MD","content":"```\n3\n([])\n(([()])))\n([()[]()])()\n```"}},{"title":"Sample Output","value":{"format":"MD","content":"```\nYes\nNo\nYes\n```"}}]}