{"raw_statement":[{"iden":"problem statement","content":"Tak performed the following action $N$ times: rolling two dice. The result of the $i$\\-th roll is $D_{i,1}$ and $D_{i,2}$.\nCheck if doublets occurred at least three times in a row. Specifically, check if there exists at lease one $i$ such that $D_{i,1}=D_{i,2}$, $D_{i+1,1}=D_{i+1,2}$ and $D_{i+2,1}=D_{i+2,2}$ hold."},{"iden":"constraints","content":"*   $3 \\leq N \\leq 100$\n*   $1\\leq D_{i,j} \\leq 6$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$D_{1,1}$ $D_{1,2}$\n$\\vdots$\n$D_{N,1}$ $D_{N,2}$"},{"iden":"sample input 1","content":"5\n1 2\n6 6\n4 4\n3 3\n3 2"},{"iden":"sample output 1","content":"Yes\n\nFrom the second roll to the fourth roll, three doublets occurred in a row."},{"iden":"sample input 2","content":"5\n1 1\n2 2\n3 4\n5 5\n6 6"},{"iden":"sample output 2","content":"No"},{"iden":"sample input 3","content":"6\n1 1\n2 2\n3 3\n4 4\n5 5\n6 6"},{"iden":"sample output 3","content":"Yes"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}