Carpenters' Language

아직 제출이 없습니다시간 제한1초메모리 제한512 MB

문제

International Carpenters Professionals Company (ICPC) is a top construction company with a lot of expert carpenters. What makes ICPC a top company is their original language.

The syntax of the language is simply given in CFG as follows:

S -> SS | (S) | )S( | ε

In other words, a right parenthesis can be closed by a left parenthesis and a left parenthesis can be closed by a right parenthesis in this language.

Alex, a grad student mastering linguistics, decided to study ICPC's language. As a first step of the study, he needs to judge whether a text is well-formed in the language or not. Then, he asked you, a great programmer, to write a program for the judgement.

Alex's request is as follows: You have an empty string S in the beginning, and construct longer string by inserting a sequence of '(' or ')' into the string. You will receive qq queries, each of which consists of three elements (p,c,n)(p, c, n), where pp is the position to insert, nn is the number of characters to insert and cc is either '(' or ')', the character to insert. For each query, your program should insert cc repeated by nn times into the pp-th position of S from the beginning. Also it should output, after performing each insert operation, "Yes" if S is in the language and "No" if S is not in the language.

Please help Alex to support his study, otherwise he will fail to graduate the college.

입력

The first line contains one integer qq (1q1051 \leq q \leq 10^5) indicating the number of queries, follows qq lines of three elements, p_ip\_i, c_ic\_i, n_in\_i, separated by a single space (1iq1 \leq i \leq q, c_i=(or)c\_i = '(' or ')', 0p_i0 \leq p\_i \leq length of S before ii-th query, 1n2201 \leq n \leq 2^{20}). It is guaranteed that all the queries in the input are valid.

출력

For each query, output "Yes" if S is in the language and "No" if S is not in the language.