node_ids
listlengths 4
1.4k
| edge_index
listlengths 1
2.22k
| text
listlengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
14,
4,
13,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
12,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
19,
21
],
[
12,
22
],
[
22,
23
],
[
23,
24
],
[
12,
25
],
[
26,
26
],
[
26,
27
],
[
27,
28
],
[
29,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
30,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
29,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
45,
47
],
[
42,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
49,
55
],
[
29,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
57,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
64,
70
],
[
27,
71
],
[
71,
72
],
[
11,
73
],
[
73,
74
],
[
9,
75
],
[
75,
76
],
[
7,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
79,
88
],
[
88,
89
],
[
88,
90
],
[
79,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
93,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
106,
112
],
[
112,
113
],
[
113,
114
],
[
105,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
79,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
124,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
77,
140
],
[
140,
141
]
]
| [
"import java.util.*;\nimport java.io.*;\nclass Main {\n static boolean isPossible(int[][] a) {\n for(int i = 2; i<a.length; i++) {\n if(a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]) return true;\n }\n return false;\n }\n public static void main (String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[][] a = new int[n][2];\n for(int i = 0; i<n; i++) {\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }\n if(isPossible(a)) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main {\n static boolean isPossible(int[][] a) {\n for(int i = 2; i<a.length; i++) {\n if(a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]) return true;\n }\n return false;\n }\n public static void main (String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[][] a = new int[n][2];\n for(int i = 0; i<n; i++) {\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }\n if(isPossible(a)) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"Main",
"static boolean isPossible(int[][] a) {\n for(int i = 2; i<a.length; i++) {\n if(a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]) return true;\n }\n return false;\n }",
"isPossible",
"{\n for(int i = 2; i<a.length; i++) {\n if(a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]) return true;\n }\n return false;\n }",
"for(int i = 2; i<a.length; i++) {\n if(a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]) return true;\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i<a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"{\n if(a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]) return true;\n }",
"{\n if(a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]) return true;\n }",
"if(a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]) return true;",
"a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]",
"a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]",
"a[i][0]==a[i][1]",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"a[i-1][0]==a[i-1][1]",
"a[i-1][0]",
"a[i-1]",
"a",
"i-1",
"i",
"1",
"0",
"a[i-1][1]",
"a[i-1]",
"a",
"i-1",
"i",
"1",
"1",
"a[i-2][0]==a[i-2][1]",
"a[i-2][0]",
"a[i-2]",
"a",
"i-2",
"i",
"2",
"0",
"a[i-2][1]",
"a[i-2]",
"a",
"i-2",
"i",
"2",
"1",
"return true;",
"true",
"return false;",
"false",
"int[][] a",
"a",
"public static void main (String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[][] a = new int[n][2];\n for(int i = 0; i<n; i++) {\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }\n if(isPossible(a)) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[][] a = new int[n][2];\n for(int i = 0; i<n; i++) {\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }\n if(isPossible(a)) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] a = new int[n][2];",
"a",
"new int[n][2]",
"n",
"2",
"for(int i = 0; i<n; i++) {\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }",
"{\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }",
"a[i][0] = sc.nextInt()",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a[i][1] = sc.nextInt()",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(isPossible(a)) System.out.println(\"Yes\");\n else System.out.println(\"No\");",
"isPossible(a)",
"isPossible",
"a",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.util.*;
import java.io.*;
class Main {
static boolean isPossible(int[][] a) {
for(int i = 2; i<a.length; i++) {
if(a[i][0]==a[i][1] && a[i-1][0]==a[i-1][1] && a[i-2][0]==a[i-2][1]) return true;
}
return false;
}
public static void main (String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[][] a = new int[n][2];
for(int i = 0; i<n; i++) {
a[i][0] = sc.nextInt();
a[i][1] = sc.nextInt();
}
if(isPossible(a)) System.out.println("Yes");
else System.out.println("No");
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
40,
13,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
13,
17,
3,
14,
2,
13,
17,
4,
18,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
76,
8
],
[
76,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
35,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
59,
64
],
[
11,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
9,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
]
]
| [
"import java.util.*;\nimport static java.lang.System.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(in);\n int n = sc.nextInt();\n int ren = 0;\n for(int i=0; i<n; i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a == b) ren++;\n else ren = 0;\n\n if(ren == 3){\n out.println(\"Yes\");\n break;\n }\n }\n if(ren != 3) out.println(\"No\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import static java.lang.System.*;",
"import static java.lang.System.*;",
"import static java.lang.System.*;",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(in);\n int n = sc.nextInt();\n int ren = 0;\n for(int i=0; i<n; i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a == b) ren++;\n else ren = 0;\n\n if(ren == 3){\n out.println(\"Yes\");\n break;\n }\n }\n if(ren != 3) out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(in);\n int n = sc.nextInt();\n int ren = 0;\n for(int i=0; i<n; i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a == b) ren++;\n else ren = 0;\n\n if(ren == 3){\n out.println(\"Yes\");\n break;\n }\n }\n if(ren != 3) out.println(\"No\");\n }",
"main",
"{\n Scanner sc = new Scanner(in);\n int n = sc.nextInt();\n int ren = 0;\n for(int i=0; i<n; i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a == b) ren++;\n else ren = 0;\n\n if(ren == 3){\n out.println(\"Yes\");\n break;\n }\n }\n if(ren != 3) out.println(\"No\");\n }",
"Scanner sc = new Scanner(in);",
"sc",
"new Scanner(in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ren = 0;",
"ren",
"0",
"for(int i=0; i<n; i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a == b) ren++;\n else ren = 0;\n\n if(ren == 3){\n out.println(\"Yes\");\n break;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a == b) ren++;\n else ren = 0;\n\n if(ren == 3){\n out.println(\"Yes\");\n break;\n }\n }",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a == b) ren++;\n else ren = 0;\n\n if(ren == 3){\n out.println(\"Yes\");\n break;\n }\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a == b) ren++;\n else ren = 0;",
"a == b",
"a",
"b",
"ren++",
"ren",
"ren = 0",
"ren",
"0",
"if(ren == 3){\n out.println(\"Yes\");\n break;\n }",
"ren == 3",
"ren",
"3",
"{\n out.println(\"Yes\");\n break;\n }",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"break;",
"if(ren != 3) out.println(\"No\");",
"ren != 3",
"ren",
"3",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(in);\n int n = sc.nextInt();\n int ren = 0;\n for(int i=0; i<n; i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a == b) ren++;\n else ren = 0;\n\n if(ren == 3){\n out.println(\"Yes\");\n break;\n }\n }\n if(ren != 3) out.println(\"No\");\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(in);\n int n = sc.nextInt();\n int ren = 0;\n for(int i=0; i<n; i++){\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a == b) ren++;\n else ren = 0;\n\n if(ren == 3){\n out.println(\"Yes\");\n break;\n }\n }\n if(ren != 3) out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.*;
import static java.lang.System.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(in);
int n = sc.nextInt();
int ren = 0;
for(int i=0; i<n; i++){
int a = sc.nextInt();
int b = sc.nextInt();
if(a == b) ren++;
else ren = 0;
if(ren == 3){
out.println("Yes");
break;
}
}
if(ren != 3) out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
86,
5
],
[
86,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
46,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
65,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
6,
83
],
[
83,
84
],
[
0,
85
],
[
85,
86
],
[
85,
87
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint hako=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tif(a==b) {\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans=0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(hako==1) {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint hako=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tif(a==b) {\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans=0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(hako==1) {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tint ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint hako=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tif(a==b) {\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans=0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(hako==1) {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\t}",
"main",
"{\n\t\tint ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint hako=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tif(a==b) {\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans=0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(hako==1) {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\t}",
"int ans = 0;",
"ans",
"0",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int hako=0;",
"hako",
"0",
"for(int i=0;i<n;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tif(a==b) {\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans=0;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tif(a==b) {\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans=0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tif(a==b) {\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans=0;\n\t\t\t}\n\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a==b) {\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans=0;\n\t\t\t}",
"a==b",
"a",
"b",
"{\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}",
"ans++",
"ans",
"if(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}",
"ans==3",
"ans",
"3",
"{\n\t\t\t\t\thako=1;\n\t\t\t\t}",
"hako=1",
"hako",
"1",
"{\n\t\t\t\tans=0;\n\t\t\t}",
"ans=0",
"ans",
"0",
"if(hako==1) {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.print(\"No\");\n\t\t}",
"hako==1",
"hako",
"1",
"{\n\t\t\tSystem.out.print(\"Yes\");\n\t\t}",
"System.out.print(\"Yes\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.print(\"No\");\n\t\t}",
"System.out.print(\"No\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint hako=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tif(a==b) {\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans=0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(hako==1) {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tint ans = 0;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint hako=0;\n\t\t\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tif(a==b) {\n\t\t\t\tans++;\n\t\t\t\tif(ans==3){\n\t\t\t\t\thako=1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tans=0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(hako==1) {\n\t\t\tSystem.out.print(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.print(\"No\");\n\t\t}\n\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int ans = 0;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int hako=0;
for(int i=0;i<n;i++) {
int a = sc.nextInt();
int b = sc.nextInt();
if(a==b) {
ans++;
if(ans==3){
hako=1;
}
}
else {
ans=0;
}
}
if(hako==1) {
System.out.print("Yes");
}
else {
System.out.print("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
3,
14,
2,
18,
13,
13,
18,
13,
13,
30,
40,
13,
9,
0,
13,
17,
14,
2,
13,
17,
4,
18,
13,
17,
4,
18,
13,
17,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
229,
11
],
[
229,
12
],
[
12,
13
],
[
12,
14
],
[
229,
15
],
[
15,
16
],
[
15,
17
],
[
229,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
21,
31
],
[
31,
32
],
[
32,
33
],
[
21,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
18,
42
],
[
42,
43
],
[
229,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
46,
56
],
[
56,
57
],
[
56,
58
],
[
46,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
60,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
72,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
46,
87
],
[
87,
88
],
[
87,
89
],
[
46,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
90,
98
],
[
98,
99
],
[
99,
100
],
[
90,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
102,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
114,
115
],
[
114,
116
],
[
109,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
102,
121
],
[
121,
122
],
[
121,
123
],
[
46,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
124,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
46,
136
],
[
136,
137
],
[
137,
138
],
[
44,
139
],
[
139,
140
],
[
229,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
141,
145
],
[
145,
146
],
[
141,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
141,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
156,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
166,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
155,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
141,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
184,
187
],
[
187,
188
],
[
141,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
193,
196
],
[
196,
197
],
[
141,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
202,
205
],
[
205,
206
],
[
141,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
209,
213
],
[
213,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
213,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
209,
226
],
[
226,
227
],
[
0,
228
],
[
228,
229
],
[
228,
230
]
]
| [
"import java.io.*;\nimport java.util.*;\nimport java.math.*;\n \npublic class Main{ \n static class Fast{\n public BufferedReader br;\n public StringTokenizer st;\n \n public Fast(){\n br =new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next(){\n while(st==null || !st.hasMoreTokens()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n throw new RuntimeException(e);\n }\n \n }\n return st.nextToken();\n }\n int nextInt(){\n return Integer.parseInt(next());\n }\n \n long nextLong(){\n return Long.parseLong(next());\n }\n \n double nextDouble(){\n return Double.parseDouble(next());\n }\n\n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n \n } \n \n static Fast f=new Fast();\n static PrintWriter out = new PrintWriter(System.out);\n\n\n static void readArray(int a[]) \n {\n \n for (int i=0;i<a.length;i++ ) a[i]=f.nextInt();\n \n }\n \n \n \n public static void main(String[] args)throws Exception{\n //StringTokenizer st;//! @ % & * () _ {} # ~ : < > ? \"\" | ^\n \n \n //StringBuilder res=new StringBuilder();\n\n int n=f.nextInt();\n \n \n // while(t-->0){\n int d1[]=new int[n];\n int d2[]=new int[n];\n for (int i=0;i<n ;i++ ) {\n d1[i]=f.nextInt();\n d2[i]=f.nextInt();\n }\n \n int count=0;\n for (int i=0;i<n ;i++ ) {\n if (count==3) {\n break;\n }\n\n if (d1[i]==d2[i]) {\n count++;\n continue;\n }\n\n count=0;\n\n }\n\n \n // }\n if (count==3)\n out.println(\"Yes\");\n else \n out.println(\"No\");\n\n \n \n\n out.close();\n \n}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main{ \n static class Fast{\n public BufferedReader br;\n public StringTokenizer st;\n \n public Fast(){\n br =new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next(){\n while(st==null || !st.hasMoreTokens()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n throw new RuntimeException(e);\n }\n \n }\n return st.nextToken();\n }\n int nextInt(){\n return Integer.parseInt(next());\n }\n \n long nextLong(){\n return Long.parseLong(next());\n }\n \n double nextDouble(){\n return Double.parseDouble(next());\n }\n\n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n \n } \n \n static Fast f=new Fast();\n static PrintWriter out = new PrintWriter(System.out);\n\n\n static void readArray(int a[]) \n {\n \n for (int i=0;i<a.length;i++ ) a[i]=f.nextInt();\n \n }\n \n \n \n public static void main(String[] args)throws Exception{\n //StringTokenizer st;//! @ % & * () _ {} # ~ : < > ? \"\" | ^\n \n \n //StringBuilder res=new StringBuilder();\n\n int n=f.nextInt();\n \n \n // while(t-->0){\n int d1[]=new int[n];\n int d2[]=new int[n];\n for (int i=0;i<n ;i++ ) {\n d1[i]=f.nextInt();\n d2[i]=f.nextInt();\n }\n \n int count=0;\n for (int i=0;i<n ;i++ ) {\n if (count==3) {\n break;\n }\n\n if (d1[i]==d2[i]) {\n count++;\n continue;\n }\n\n count=0;\n\n }\n\n \n // }\n if (count==3)\n out.println(\"Yes\");\n else \n out.println(\"No\");\n\n \n \n\n out.close();\n \n}\n}",
"Main",
"static Fast f=new Fast();",
"f",
"new Fast()",
"static PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"static void readArray(int a[]) \n {\n \n for (int i=0;i<a.length;i++ ) a[i]=f.nextInt();\n \n }",
"readArray",
"{\n \n for (int i=0;i<a.length;i++ ) a[i]=f.nextInt();\n \n }",
"for (int i=0;i<a.length;i++ ) a[i]=f.nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"a[i]=f.nextInt();",
"a[i]=f.nextInt()",
"a[i]",
"a",
"i",
"f.nextInt()",
"f.nextInt",
"f",
"int a[]",
"a",
"public static void main(String[] args)throws Exception{\n //StringTokenizer st;//! @ % & * () _ {} # ~ : < > ? \"\" | ^\n \n \n //StringBuilder res=new StringBuilder();\n\n int n=f.nextInt();\n \n \n // while(t-->0){\n int d1[]=new int[n];\n int d2[]=new int[n];\n for (int i=0;i<n ;i++ ) {\n d1[i]=f.nextInt();\n d2[i]=f.nextInt();\n }\n \n int count=0;\n for (int i=0;i<n ;i++ ) {\n if (count==3) {\n break;\n }\n\n if (d1[i]==d2[i]) {\n count++;\n continue;\n }\n\n count=0;\n\n }\n\n \n // }\n if (count==3)\n out.println(\"Yes\");\n else \n out.println(\"No\");\n\n \n \n\n out.close();\n \n}",
"main",
"{\n //StringTokenizer st;//! @ % & * () _ {} # ~ : < > ? \"\" | ^\n \n \n //StringBuilder res=new StringBuilder();\n\n int n=f.nextInt();\n \n \n // while(t-->0){\n int d1[]=new int[n];\n int d2[]=new int[n];\n for (int i=0;i<n ;i++ ) {\n d1[i]=f.nextInt();\n d2[i]=f.nextInt();\n }\n \n int count=0;\n for (int i=0;i<n ;i++ ) {\n if (count==3) {\n break;\n }\n\n if (d1[i]==d2[i]) {\n count++;\n continue;\n }\n\n count=0;\n\n }\n\n \n // }\n if (count==3)\n out.println(\"Yes\");\n else \n out.println(\"No\");\n\n \n \n\n out.close();\n \n}",
"int n=f.nextInt();",
"n",
"f.nextInt()",
"f.nextInt",
"f",
"int d1[]=new int[n];",
"d1",
"new int[n]",
"n",
"int d2[]=new int[n];",
"d2",
"new int[n]",
"n",
"for (int i=0;i<n ;i++ ) {\n d1[i]=f.nextInt();\n d2[i]=f.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n d1[i]=f.nextInt();\n d2[i]=f.nextInt();\n }",
"{\n d1[i]=f.nextInt();\n d2[i]=f.nextInt();\n }",
"d1[i]=f.nextInt()",
"d1[i]",
"d1",
"i",
"f.nextInt()",
"f.nextInt",
"f",
"d2[i]=f.nextInt()",
"d2[i]",
"d2",
"i",
"f.nextInt()",
"f.nextInt",
"f",
"int count=0;",
"count",
"0",
"for (int i=0;i<n ;i++ ) {\n if (count==3) {\n break;\n }\n\n if (d1[i]==d2[i]) {\n count++;\n continue;\n }\n\n count=0;\n\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (count==3) {\n break;\n }\n\n if (d1[i]==d2[i]) {\n count++;\n continue;\n }\n\n count=0;\n\n }",
"{\n if (count==3) {\n break;\n }\n\n if (d1[i]==d2[i]) {\n count++;\n continue;\n }\n\n count=0;\n\n }",
"if (count==3) {\n break;\n }",
"count==3",
"count",
"3",
"{\n break;\n }",
"break;",
"if (d1[i]==d2[i]) {\n count++;\n continue;\n }",
"d1[i]==d2[i]",
"d1[i]",
"d1",
"i",
"d2[i]",
"d2",
"i",
"{\n count++;\n continue;\n }",
"count++",
"count",
"continue;",
"count=0",
"count",
"0",
"if (count==3)\n out.println(\"Yes\");\n else \n out.println(\"No\");",
"count==3",
"count",
"3",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class Fast{\n public BufferedReader br;\n public StringTokenizer st;\n \n public Fast(){\n br =new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next(){\n while(st==null || !st.hasMoreTokens()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n throw new RuntimeException(e);\n }\n \n }\n return st.nextToken();\n }\n int nextInt(){\n return Integer.parseInt(next());\n }\n \n long nextLong(){\n return Long.parseLong(next());\n }\n \n double nextDouble(){\n return Double.parseDouble(next());\n }\n\n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n \n }",
"Fast",
"public BufferedReader br;",
"br",
"public StringTokenizer st;",
"st",
"public Fast(){\n br =new BufferedReader(new InputStreamReader(System.in));\n }",
"Fast",
"{\n br =new BufferedReader(new InputStreamReader(System.in));\n }",
"br =new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next(){\n while(st==null || !st.hasMoreTokens()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n throw new RuntimeException(e);\n }\n \n }\n return st.nextToken();\n }",
"next",
"{\n while(st==null || !st.hasMoreTokens()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n throw new RuntimeException(e);\n }\n \n }\n return st.nextToken();\n }",
"while(st==null || !st.hasMoreTokens()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n throw new RuntimeException(e);\n }\n \n }",
"st==null || !st.hasMoreTokens()",
"st==null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"{\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n throw new RuntimeException(e);\n }\n \n }",
"try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n throw new RuntimeException(e);\n }",
"catch(IOException e){\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n st=new StringTokenizer(br.readLine());\n }",
"st=new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt(){\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong(){\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble(){\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n }",
"nextLine",
"{ \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n }",
"String str = \"\";",
"str",
"\"\"",
"try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n }",
"catch (IOException e) \n { \n e.printStackTrace(); \n }",
"IOException e",
"{ \n e.printStackTrace(); \n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \n str = br.readLine(); \n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main{ \n static class Fast{\n public BufferedReader br;\n public StringTokenizer st;\n \n public Fast(){\n br =new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next(){\n while(st==null || !st.hasMoreTokens()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n throw new RuntimeException(e);\n }\n \n }\n return st.nextToken();\n }\n int nextInt(){\n return Integer.parseInt(next());\n }\n \n long nextLong(){\n return Long.parseLong(next());\n }\n \n double nextDouble(){\n return Double.parseDouble(next());\n }\n\n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n \n } \n \n static Fast f=new Fast();\n static PrintWriter out = new PrintWriter(System.out);\n\n\n static void readArray(int a[]) \n {\n \n for (int i=0;i<a.length;i++ ) a[i]=f.nextInt();\n \n }\n \n \n \n public static void main(String[] args)throws Exception{\n //StringTokenizer st;//! @ % & * () _ {} # ~ : < > ? \"\" | ^\n \n \n //StringBuilder res=new StringBuilder();\n\n int n=f.nextInt();\n \n \n // while(t-->0){\n int d1[]=new int[n];\n int d2[]=new int[n];\n for (int i=0;i<n ;i++ ) {\n d1[i]=f.nextInt();\n d2[i]=f.nextInt();\n }\n \n int count=0;\n for (int i=0;i<n ;i++ ) {\n if (count==3) {\n break;\n }\n\n if (d1[i]==d2[i]) {\n count++;\n continue;\n }\n\n count=0;\n\n }\n\n \n // }\n if (count==3)\n out.println(\"Yes\");\n else \n out.println(\"No\");\n\n \n \n\n out.close();\n \n}\n}",
"public class Main{ \n static class Fast{\n public BufferedReader br;\n public StringTokenizer st;\n \n public Fast(){\n br =new BufferedReader(new InputStreamReader(System.in));\n }\n \n String next(){\n while(st==null || !st.hasMoreTokens()){\n try{\n st=new StringTokenizer(br.readLine());\n }\n catch(IOException e){\n throw new RuntimeException(e);\n }\n \n }\n return st.nextToken();\n }\n int nextInt(){\n return Integer.parseInt(next());\n }\n \n long nextLong(){\n return Long.parseLong(next());\n }\n \n double nextDouble(){\n return Double.parseDouble(next());\n }\n\n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n \n } \n \n static Fast f=new Fast();\n static PrintWriter out = new PrintWriter(System.out);\n\n\n static void readArray(int a[]) \n {\n \n for (int i=0;i<a.length;i++ ) a[i]=f.nextInt();\n \n }\n \n \n \n public static void main(String[] args)throws Exception{\n //StringTokenizer st;//! @ % & * () _ {} # ~ : < > ? \"\" | ^\n \n \n //StringBuilder res=new StringBuilder();\n\n int n=f.nextInt();\n \n \n // while(t-->0){\n int d1[]=new int[n];\n int d2[]=new int[n];\n for (int i=0;i<n ;i++ ) {\n d1[i]=f.nextInt();\n d2[i]=f.nextInt();\n }\n \n int count=0;\n for (int i=0;i<n ;i++ ) {\n if (count==3) {\n break;\n }\n\n if (d1[i]==d2[i]) {\n count++;\n continue;\n }\n\n count=0;\n\n }\n\n \n // }\n if (count==3)\n out.println(\"Yes\");\n else \n out.println(\"No\");\n\n \n \n\n out.close();\n \n}\n}",
"Main"
]
| import java.io.*;
import java.util.*;
import java.math.*;
public class Main{
static class Fast{
public BufferedReader br;
public StringTokenizer st;
public Fast(){
br =new BufferedReader(new InputStreamReader(System.in));
}
String next(){
while(st==null || !st.hasMoreTokens()){
try{
st=new StringTokenizer(br.readLine());
}
catch(IOException e){
throw new RuntimeException(e);
}
}
return st.nextToken();
}
int nextInt(){
return Integer.parseInt(next());
}
long nextLong(){
return Long.parseLong(next());
}
double nextDouble(){
return Double.parseDouble(next());
}
String nextLine()
{
String str = "";
try
{
str = br.readLine();
}
catch (IOException e)
{
e.printStackTrace();
}
return str;
}
}
static Fast f=new Fast();
static PrintWriter out = new PrintWriter(System.out);
static void readArray(int a[])
{
for (int i=0;i<a.length;i++ ) a[i]=f.nextInt();
}
public static void main(String[] args)throws Exception{
//StringTokenizer st;//! @ % & * () _ {} # ~ : < > ? "" | ^
//StringBuilder res=new StringBuilder();
int n=f.nextInt();
// while(t-->0){
int d1[]=new int[n];
int d2[]=new int[n];
for (int i=0;i<n ;i++ ) {
d1[i]=f.nextInt();
d2[i]=f.nextInt();
}
int count=0;
for (int i=0;i<n ;i++ ) {
if (count==3) {
break;
}
if (d1[i]==d2[i]) {
count++;
continue;
}
count=0;
}
// }
if (count==3)
out.println("Yes");
else
out.println("No");
out.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
40,
13,
14,
2,
13,
17,
0,
13,
17,
30,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
215,
20
],
[
215,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
23,
32
],
[
32,
33
],
[
32,
34
],
[
23,
37
],
[
37,
38
],
[
37,
39
],
[
23,
40
],
[
40,
41
],
[
40,
42
],
[
23,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
48,
49
],
[
48,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
55,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
65,
71
],
[
71,
72
],
[
72,
73
],
[
55,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
74,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
93,
95
],
[
74,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
97,
105
],
[
105,
106
],
[
105,
107
],
[
23,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
108,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
21,
124
],
[
124,
125
],
[
215,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
126,
130
],
[
130,
131
],
[
126,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
126,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
141,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
151,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
140,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
126,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
170,
173
],
[
173,
174
],
[
126,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
179,
182
],
[
182,
183
],
[
126,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
188,
191
],
[
191,
192
],
[
126,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
195,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
199,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
195,
212
],
[
212,
213
],
[
0,
214
],
[
214,
215
],
[
214,
216
]
]
| [
"\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\nimport java.util.StringTokenizer;\nimport java.util.*;\npublic class Main {\n\t\n\t\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tFastScanner fs = new FastScanner();\n\t\tint n = fs.nextInt();\n\t\tint d[][]=new int[n][2];\n\t\tint c=0;\n\t\tint flag=0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\td[i][0]=fs.nextInt();\n\t\t\td[i][1]=fs.nextInt();\n\t\t\tif(d[i][0]==d[i][1])\n\t\t\t\t{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif(flag==1)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}\n\t\n\t\n\t\n\tstatic class FastScanner \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n }\n\t\n\t\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\t\n\t\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tFastScanner fs = new FastScanner();\n\t\tint n = fs.nextInt();\n\t\tint d[][]=new int[n][2];\n\t\tint c=0;\n\t\tint flag=0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\td[i][0]=fs.nextInt();\n\t\t\td[i][1]=fs.nextInt();\n\t\t\tif(d[i][0]==d[i][1])\n\t\t\t\t{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif(flag==1)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}\n\t\n\t\n\t\n\tstatic class FastScanner \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n }\n\t\n\t\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\tFastScanner fs = new FastScanner();\n\t\tint n = fs.nextInt();\n\t\tint d[][]=new int[n][2];\n\t\tint c=0;\n\t\tint flag=0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\td[i][0]=fs.nextInt();\n\t\t\td[i][1]=fs.nextInt();\n\t\t\tif(d[i][0]==d[i][1])\n\t\t\t\t{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif(flag==1)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\t\n\t\tFastScanner fs = new FastScanner();\n\t\tint n = fs.nextInt();\n\t\tint d[][]=new int[n][2];\n\t\tint c=0;\n\t\tint flag=0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\td[i][0]=fs.nextInt();\n\t\t\td[i][1]=fs.nextInt();\n\t\t\tif(d[i][0]==d[i][1])\n\t\t\t\t{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif(flag==1)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}",
"FastScanner fs = new FastScanner();",
"fs",
"new FastScanner()",
"int n = fs.nextInt();",
"n",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int d[][]=new int[n][2];",
"d",
"new int[n][2]",
"n",
"2",
"int c=0;",
"c",
"0",
"int flag=0;",
"flag",
"0",
"for(int i=0;i<n;i++)\n\t\t{\n\t\t\td[i][0]=fs.nextInt();\n\t\t\td[i][1]=fs.nextInt();\n\t\t\tif(d[i][0]==d[i][1])\n\t\t\t\t{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}\n\t\t\t\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\td[i][0]=fs.nextInt();\n\t\t\td[i][1]=fs.nextInt();\n\t\t\tif(d[i][0]==d[i][1])\n\t\t\t\t{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}\n\t\t\t\n\t\t}",
"{\n\t\t\td[i][0]=fs.nextInt();\n\t\t\td[i][1]=fs.nextInt();\n\t\t\tif(d[i][0]==d[i][1])\n\t\t\t\t{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}\n\t\t\t\n\t\t}",
"d[i][0]=fs.nextInt()",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"fs.nextInt()",
"fs.nextInt",
"fs",
"d[i][1]=fs.nextInt()",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"fs.nextInt()",
"fs.nextInt",
"fs",
"if(d[i][0]==d[i][1])\n\t\t\t\t{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}",
"d[i][0]==d[i][1]",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}",
"c++",
"c",
"if(c==3)\n\t\t\t\t\t\tflag=1;",
"c==3",
"c",
"3",
"flag=1",
"flag",
"1",
"{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}",
"if(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;",
"c==3",
"c",
"3",
"{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}",
"flag=1",
"flag",
"1",
"c=0",
"c",
"0",
"if(flag==1)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");",
"flag==1",
"flag",
"1",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"static class FastScanner \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n }",
"FastScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastScanner() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n }",
"FastScanner",
"{ \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n }",
"br = new BufferedReader(new\n InputStreamReader(System.in))",
"br",
"new BufferedReader(new\n InputStreamReader(System.in))",
"String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }",
"next",
"{ \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n }",
"while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{ \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n }",
"try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n }",
"catch (IOException e) \n { \n e.printStackTrace(); \n }",
"IOException e",
"{ \n e.printStackTrace(); \n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \n st = new StringTokenizer(br.readLine()); \n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() \n { \n return Integer.parseInt(next()); \n }",
"nextInt",
"{ \n return Integer.parseInt(next()); \n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() \n { \n return Long.parseLong(next()); \n }",
"nextLong",
"{ \n return Long.parseLong(next()); \n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() \n { \n return Double.parseDouble(next()); \n }",
"nextDouble",
"{ \n return Double.parseDouble(next()); \n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n }",
"nextLine",
"{ \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n }",
"String str = \"\";",
"str",
"\"\"",
"try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n }",
"catch (IOException e) \n { \n e.printStackTrace(); \n }",
"IOException e",
"{ \n e.printStackTrace(); \n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \n str = br.readLine(); \n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n\t\n\t\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tFastScanner fs = new FastScanner();\n\t\tint n = fs.nextInt();\n\t\tint d[][]=new int[n][2];\n\t\tint c=0;\n\t\tint flag=0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\td[i][0]=fs.nextInt();\n\t\t\td[i][1]=fs.nextInt();\n\t\t\tif(d[i][0]==d[i][1])\n\t\t\t\t{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif(flag==1)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}\n\t\n\t\n\t\n\tstatic class FastScanner \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n }\n\t\n\t\n\n}",
"public class Main {\n\t\n\t\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tFastScanner fs = new FastScanner();\n\t\tint n = fs.nextInt();\n\t\tint d[][]=new int[n][2];\n\t\tint c=0;\n\t\tint flag=0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\td[i][0]=fs.nextInt();\n\t\t\td[i][1]=fs.nextInt();\n\t\t\tif(d[i][0]==d[i][1])\n\t\t\t\t{\n\t\t\t\t\tc++;\n\t\t\t\t\tif(c==3)\n\t\t\t\t\t\tflag=1;\n\t\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(c==3)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag=1;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tc=0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tif(flag==1)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}\n\t\n\t\n\t\n\tstatic class FastScanner \n { \n BufferedReader br; \n StringTokenizer st; \n \n public FastScanner() \n { \n br = new BufferedReader(new\n InputStreamReader(System.in)); \n } \n \n String next() \n { \n while (st == null || !st.hasMoreElements()) \n { \n try\n { \n st = new StringTokenizer(br.readLine()); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n } \n return st.nextToken(); \n } \n \n int nextInt() \n { \n return Integer.parseInt(next()); \n } \n \n long nextLong() \n { \n return Long.parseLong(next()); \n } \n \n double nextDouble() \n { \n return Double.parseDouble(next()); \n } \n \n String nextLine() \n { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n } \n }\n\t\n\t\n\n}",
"Main"
]
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.StringTokenizer;
import java.util.*;
public class Main {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int n = fs.nextInt();
int d[][]=new int[n][2];
int c=0;
int flag=0;
for(int i=0;i<n;i++)
{
d[i][0]=fs.nextInt();
d[i][1]=fs.nextInt();
if(d[i][0]==d[i][1])
{
c++;
if(c==3)
flag=1;
}
else
{
if(c==3)
{
flag=1;
}
else
c=0;
}
}
if(flag==1)
System.out.println("Yes");
else
System.out.println("No");
}
static class FastScanner
{
BufferedReader br;
StringTokenizer st;
public FastScanner()
{
br = new BufferedReader(new
InputStreamReader(System.in));
}
String next()
{
while (st == null || !st.hasMoreElements())
{
try
{
st = new StringTokenizer(br.readLine());
}
catch (IOException e)
{
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt()
{
return Integer.parseInt(next());
}
long nextLong()
{
return Long.parseLong(next());
}
double nextDouble()
{
return Double.parseDouble(next());
}
String nextLine()
{
String str = "";
try
{
str = br.readLine();
}
catch (IOException e)
{
e.printStackTrace();
}
return str;
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
18,
13,
13,
18,
13,
13,
14,
2,
2,
13,
13,
13,
30,
0,
13,
17,
3,
0,
13,
13,
0,
13,
13,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
120,
5
],
[
120,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
28,
30
],
[
8,
31
],
[
31,
32
],
[
31,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
83,
85
],
[
76,
86
],
[
86,
87
],
[
88,
88
],
[
88,
89
],
[
88,
90
],
[
88,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
76,
97
],
[
97,
98
],
[
97,
99
],
[
76,
100
],
[
100,
101
],
[
100,
102
],
[
8,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
103,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
6,
117
],
[
117,
118
],
[
0,
119
],
[
119,
120
],
[
119,
121
]
]
| [
"import java.util.*;\n\npublic class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint times=sc.nextInt();\n Integer[] data1=new Integer[times];\n Integer[] data2=new Integer[times];\n boolean one=false;\n boolean two=false;\n \tboolean now=false;\n \tboolean result=false;\n for(int i=0;i<times;i++){\n data1[i]=sc.nextInt();\n data2[i]=sc.nextInt();\n }\n for(int i=0;i<times;i++){\n now=(data1[i]==data2[i]);\n if(one&&two&&now){\n result=true;\n\t\t\tbreak;\n }\n\t two=one;\n\t one=now;\n }\n\n if(result)System.out.println(\"Yes\");\n else System.out.println(\"No\");\n\t}\n\t\n\t\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint times=sc.nextInt();\n Integer[] data1=new Integer[times];\n Integer[] data2=new Integer[times];\n boolean one=false;\n boolean two=false;\n \tboolean now=false;\n \tboolean result=false;\n for(int i=0;i<times;i++){\n data1[i]=sc.nextInt();\n data2[i]=sc.nextInt();\n }\n for(int i=0;i<times;i++){\n now=(data1[i]==data2[i]);\n if(one&&two&&now){\n result=true;\n\t\t\tbreak;\n }\n\t two=one;\n\t one=now;\n }\n\n if(result)System.out.println(\"Yes\");\n else System.out.println(\"No\");\n\t}\n\t\n\t\n}",
"Main",
"public static void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint times=sc.nextInt();\n Integer[] data1=new Integer[times];\n Integer[] data2=new Integer[times];\n boolean one=false;\n boolean two=false;\n \tboolean now=false;\n \tboolean result=false;\n for(int i=0;i<times;i++){\n data1[i]=sc.nextInt();\n data2[i]=sc.nextInt();\n }\n for(int i=0;i<times;i++){\n now=(data1[i]==data2[i]);\n if(one&&two&&now){\n result=true;\n\t\t\tbreak;\n }\n\t two=one;\n\t one=now;\n }\n\n if(result)System.out.println(\"Yes\");\n else System.out.println(\"No\");\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint times=sc.nextInt();\n Integer[] data1=new Integer[times];\n Integer[] data2=new Integer[times];\n boolean one=false;\n boolean two=false;\n \tboolean now=false;\n \tboolean result=false;\n for(int i=0;i<times;i++){\n data1[i]=sc.nextInt();\n data2[i]=sc.nextInt();\n }\n for(int i=0;i<times;i++){\n now=(data1[i]==data2[i]);\n if(one&&two&&now){\n result=true;\n\t\t\tbreak;\n }\n\t two=one;\n\t one=now;\n }\n\n if(result)System.out.println(\"Yes\");\n else System.out.println(\"No\");\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int times=sc.nextInt();",
"times",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Integer[] data1=new Integer[times];",
"data1",
"new Integer[times]",
"times",
"Integer[] data2=new Integer[times];",
"data2",
"new Integer[times]",
"times",
"boolean one=false;",
"one",
"false",
"boolean two=false;",
"two",
"false",
"boolean now=false;",
"now",
"false",
"boolean result=false;",
"result",
"false",
"for(int i=0;i<times;i++){\n data1[i]=sc.nextInt();\n data2[i]=sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<times",
"i",
"times",
"i++",
"i++",
"i",
"{\n data1[i]=sc.nextInt();\n data2[i]=sc.nextInt();\n }",
"{\n data1[i]=sc.nextInt();\n data2[i]=sc.nextInt();\n }",
"data1[i]=sc.nextInt()",
"data1[i]",
"data1",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"data2[i]=sc.nextInt()",
"data2[i]",
"data2",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<times;i++){\n now=(data1[i]==data2[i]);\n if(one&&two&&now){\n result=true;\n\t\t\tbreak;\n }\n\t two=one;\n\t one=now;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<times",
"i",
"times",
"i++",
"i++",
"i",
"{\n now=(data1[i]==data2[i]);\n if(one&&two&&now){\n result=true;\n\t\t\tbreak;\n }\n\t two=one;\n\t one=now;\n }",
"{\n now=(data1[i]==data2[i]);\n if(one&&two&&now){\n result=true;\n\t\t\tbreak;\n }\n\t two=one;\n\t one=now;\n }",
"now=(data1[i]==data2[i])",
"now",
"(data1[i]==data2[i])",
"data1[i]",
"data1",
"i",
"data2[i]",
"data2",
"i",
"if(one&&two&&now){\n result=true;\n\t\t\tbreak;\n }",
"one&&two&&now",
"one&&two&&now",
"one",
"two",
"now",
"{\n result=true;\n\t\t\tbreak;\n }",
"result=true",
"result",
"true",
"break;",
"two=one",
"two",
"one",
"one=now",
"one",
"now",
"if(result)System.out.println(\"Yes\");\n else System.out.println(\"No\");",
"result",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint times=sc.nextInt();\n Integer[] data1=new Integer[times];\n Integer[] data2=new Integer[times];\n boolean one=false;\n boolean two=false;\n \tboolean now=false;\n \tboolean result=false;\n for(int i=0;i<times;i++){\n data1[i]=sc.nextInt();\n data2[i]=sc.nextInt();\n }\n for(int i=0;i<times;i++){\n now=(data1[i]==data2[i]);\n if(one&&two&&now){\n result=true;\n\t\t\tbreak;\n }\n\t two=one;\n\t one=now;\n }\n\n if(result)System.out.println(\"Yes\");\n else System.out.println(\"No\");\n\t}\n\t\n\t\n}",
"public class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc=new Scanner(System.in);\n\t\tint times=sc.nextInt();\n Integer[] data1=new Integer[times];\n Integer[] data2=new Integer[times];\n boolean one=false;\n boolean two=false;\n \tboolean now=false;\n \tboolean result=false;\n for(int i=0;i<times;i++){\n data1[i]=sc.nextInt();\n data2[i]=sc.nextInt();\n }\n for(int i=0;i<times;i++){\n now=(data1[i]==data2[i]);\n if(one&&two&&now){\n result=true;\n\t\t\tbreak;\n }\n\t two=one;\n\t one=now;\n }\n\n if(result)System.out.println(\"Yes\");\n else System.out.println(\"No\");\n\t}\n\t\n\t\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String args[]){
Scanner sc=new Scanner(System.in);
int times=sc.nextInt();
Integer[] data1=new Integer[times];
Integer[] data2=new Integer[times];
boolean one=false;
boolean two=false;
boolean now=false;
boolean result=false;
for(int i=0;i<times;i++){
data1[i]=sc.nextInt();
data2[i]=sc.nextInt();
}
for(int i=0;i<times;i++){
now=(data1[i]==data2[i]);
if(one&&two&&now){
result=true;
break;
}
two=one;
one=now;
}
if(result)System.out.println("Yes");
else System.out.println("No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
40,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
169,
5
],
[
169,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
10,
24
],
[
24,
25
],
[
24,
26
],
[
10,
28
],
[
28,
29
],
[
28,
30
],
[
10,
31
],
[
31,
32
],
[
31,
33
],
[
10,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
46,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
46,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
65,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
10,
82
],
[
82,
83
],
[
82,
84
],
[
10,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
85,
95
],
[
95,
96
],
[
96,
97
],
[
85,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
103,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
102,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
114,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
122,
128
],
[
102,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
130,
136
],
[
129,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
140,
142
],
[
137,
143
],
[
100,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
10,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
153,
158
],
[
148,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
160,
165
],
[
6,
166
],
[
166,
167
],
[
0,
168
],
[
168,
169
],
[
168,
170
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[]args) {\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\n\t\t\tint N = scan.nextInt();\n\t\t\tint[][]D = new int[N][2];\n\t\t\tint[]che = new int[N];\n\n\n\t\t\tint count = 0;\n\t\t\tint renzoku = 0;\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint ok = 0;\n\n\t\t\tfor(int i = 0;i<N-2;i++) {\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(ok==1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\n\n\n\n\t\t}\n\n\n\t}\n\n\n\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[]args) {\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\n\t\t\tint N = scan.nextInt();\n\t\t\tint[][]D = new int[N][2];\n\t\t\tint[]che = new int[N];\n\n\n\t\t\tint count = 0;\n\t\t\tint renzoku = 0;\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint ok = 0;\n\n\t\t\tfor(int i = 0;i<N-2;i++) {\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(ok==1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\n\n\n\n\t\t}\n\n\n\t}\n\n\n\n\n}",
"Main",
"public static void main(String[]args) {\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\n\t\t\tint N = scan.nextInt();\n\t\t\tint[][]D = new int[N][2];\n\t\t\tint[]che = new int[N];\n\n\n\t\t\tint count = 0;\n\t\t\tint renzoku = 0;\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint ok = 0;\n\n\t\t\tfor(int i = 0;i<N-2;i++) {\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(ok==1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\n\n\n\n\t\t}\n\n\n\t}",
"main",
"{\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\n\t\t\tint N = scan.nextInt();\n\t\t\tint[][]D = new int[N][2];\n\t\t\tint[]che = new int[N];\n\n\n\t\t\tint count = 0;\n\t\t\tint renzoku = 0;\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint ok = 0;\n\n\t\t\tfor(int i = 0;i<N-2;i++) {\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(ok==1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\n\n\n\n\t\t}\n\n\n\t}",
"try(Scanner scan = new Scanner(System.in)){\n\n\t\t\tint N = scan.nextInt();\n\t\t\tint[][]D = new int[N][2];\n\t\t\tint[]che = new int[N];\n\n\n\t\t\tint count = 0;\n\t\t\tint renzoku = 0;\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint ok = 0;\n\n\t\t\tfor(int i = 0;i<N-2;i++) {\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(ok==1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\n\n\n\n\t\t}",
"{\n\n\t\t\tint N = scan.nextInt();\n\t\t\tint[][]D = new int[N][2];\n\t\t\tint[]che = new int[N];\n\n\n\t\t\tint count = 0;\n\t\t\tint renzoku = 0;\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint ok = 0;\n\n\t\t\tfor(int i = 0;i<N-2;i++) {\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(ok==1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\n\n\n\n\t\t}",
"Scanner scan = new Scanner(System.in)",
"Scanner scan = new Scanner(System.in)",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[][]D = new int[N][2];",
"D",
"new int[N][2]",
"N",
"2",
"int[]che = new int[N];",
"che",
"new int[N]",
"N",
"int count = 0;",
"count",
"0",
"int renzoku = 0;",
"renzoku",
"0",
"for(int i = 0;i<N;i++) {\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}",
"D[i][0] = scan.nextInt()",
"D[i][0]",
"D[i]",
"D",
"i",
"0",
"scan.nextInt()",
"scan.nextInt",
"scan",
"D[i][1] = scan.nextInt()",
"D[i][1]",
"D[i]",
"D",
"i",
"1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}",
"D[i][0]==D[i][1]",
"D[i][0]",
"D[i]",
"D",
"i",
"0",
"D[i][1]",
"D[i]",
"D",
"i",
"1",
"{\n\t\t\t\t\tche[i]++;\n\t\t\t\t}",
"che[i]++",
"che[i]",
"che",
"i",
"int ok = 0;",
"ok",
"0",
"for(int i = 0;i<N-2;i++) {\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<N-2",
"i",
"N-2",
"N",
"2",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}",
"if(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}",
"D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]",
"D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]",
"D[i][0]==D[i][1]",
"D[i][0]",
"D[i]",
"D",
"i",
"0",
"D[i][1]",
"D[i]",
"D",
"i",
"1",
"D[i+1][0]==D[i+1][1]",
"D[i+1][0]",
"D[i+1]",
"D",
"i+1",
"i",
"1",
"0",
"D[i+1][1]",
"D[i+1]",
"D",
"i+1",
"i",
"1",
"1",
"D[i+2][0]==D[i+2][1]",
"D[i+2][0]",
"D[i+2]",
"D",
"i+2",
"i",
"2",
"0",
"D[i+2][1]",
"D[i+2]",
"D",
"i+2",
"i",
"2",
"1",
"{\n\t\t\t\t\tok=1;\n\t\t\t\t}",
"ok=1",
"ok",
"1",
"if(ok==1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}",
"ok==1",
"ok",
"1",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[]args",
"args",
"public class Main {\n\tpublic static void main(String[]args) {\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\n\t\t\tint N = scan.nextInt();\n\t\t\tint[][]D = new int[N][2];\n\t\t\tint[]che = new int[N];\n\n\n\t\t\tint count = 0;\n\t\t\tint renzoku = 0;\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint ok = 0;\n\n\t\t\tfor(int i = 0;i<N-2;i++) {\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(ok==1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\n\n\n\n\t\t}\n\n\n\t}\n\n\n\n\n}",
"public class Main {\n\tpublic static void main(String[]args) {\n\t\ttry(Scanner scan = new Scanner(System.in)){\n\n\t\t\tint N = scan.nextInt();\n\t\t\tint[][]D = new int[N][2];\n\t\t\tint[]che = new int[N];\n\n\n\t\t\tint count = 0;\n\t\t\tint renzoku = 0;\n\t\t\tfor(int i = 0;i<N;i++) {\n\t\t\t\tD[i][0] = scan.nextInt();\n\t\t\t\tD[i][1] = scan.nextInt();\n\n\t\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\t\tche[i]++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint ok = 0;\n\n\t\t\tfor(int i = 0;i<N-2;i++) {\n\t\t\t\tif(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {\n\t\t\t\t\tok=1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(ok==1) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t}else {\n\t\t\t\tSystem.out.println(\"No\");\n\t\t\t}\n\n\n\n\n\t\t}\n\n\n\t}\n\n\n\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[]args) {
try(Scanner scan = new Scanner(System.in)){
int N = scan.nextInt();
int[][]D = new int[N][2];
int[]che = new int[N];
int count = 0;
int renzoku = 0;
for(int i = 0;i<N;i++) {
D[i][0] = scan.nextInt();
D[i][1] = scan.nextInt();
if(D[i][0]==D[i][1]) {
che[i]++;
}
}
int ok = 0;
for(int i = 0;i<N-2;i++) {
if(D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]) {
ok=1;
}
}
if(ok==1) {
System.out.println("Yes");
}else {
System.out.println("No");
}
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
4,
18,
13,
30,
40,
13,
0,
18,
13,
13,
17,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
13,
2,
13,
17,
17,
30,
40,
13,
0,
18,
13,
2,
13,
17,
17,
14,
2,
4,
18,
13,
4,
18,
13,
30,
40,
13,
0,
18,
13,
2,
13,
17,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
12,
13,
30,
4,
18,
20,
23,
13,
6,
13,
41,
13,
41,
13,
20,
12,
13,
30,
0,
13,
20,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
14,
40,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
14,
4,
18,
13,
30,
29,
17,
30,
41,
13,
4,
18,
13,
42,
2,
2,
13,
17,
2,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
29,
17,
30,
0,
13,
20,
29,
17,
6,
13,
41,
13,
41,
13,
20,
12,
13,
30,
0,
13,
20,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
289,
11
],
[
289,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
14,
29
],
[
29,
30
],
[
29,
31
],
[
14,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
14,
62
],
[
62,
63
],
[
62,
64
],
[
14,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
14,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
73,
83
],
[
83,
84
],
[
84,
85
],
[
73,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
89,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
99,
105
],
[
87,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
107,
111
],
[
111,
112
],
[
112,
113
],
[
106,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
117,
123
],
[
87,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
14,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
135,
138
],
[
132,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
140,
143
],
[
14,
144
],
[
144,
145
],
[
145,
146
],
[
289,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
147,
153
],
[
153,
154
],
[
289,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
155,
159
],
[
159,
160
],
[
159,
161
],
[
155,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
155,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
168,
174
],
[
174,
175
],
[
155,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
179,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
178,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
155,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
196,
199
],
[
199,
200
],
[
155,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
206,
207
],
[
204,
208
],
[
208,
209
],
[
209,
210
],
[
204,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
214,
215
],
[
215,
216
],
[
211,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
218,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
222,
226
],
[
217,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
211,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
233,
237
],
[
237,
238
],
[
238,
239
],
[
233,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
240,
244
],
[
244,
245
],
[
289,
246
],
[
246,
247
],
[
246,
248
],
[
248,
249
],
[
246,
250
],
[
250,
251
],
[
250,
252
],
[
246,
253
],
[
253,
254
],
[
253,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
246,
259
],
[
259,
260
],
[
259,
261
],
[
261,
262
],
[
262,
263
],
[
262,
264
],
[
259,
265
],
[
265,
266
],
[
246,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
270,
271
],
[
271,
272
],
[
270,
273
],
[
267,
274
],
[
274,
275
],
[
246,
276
],
[
276,
277
],
[
276,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
279,
282
],
[
282,
283
],
[
283,
284
],
[
278,
285
],
[
285,
286
],
[
286,
287
],
[
0,
288
],
[
288,
289
],
[
288,
290
]
]
| [
"import java.io.*;\nimport java.util.*;\n\nimport static java.lang.Math.*;\n\npublic class Main {\n class Reader {\n BufferedReader in;\n\n Reader() throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n }\n\n Reader(String name) throws IOException {\n in = new BufferedReader(new FileReader(name));\n }\n\n StringTokenizer tokin = new StringTokenizer(\"\");\n\n String next() throws IOException {\n if (!tokin.hasMoreTokens()) {\n tokin = new StringTokenizer(in.readLine());\n }\n return tokin.nextToken();\n }\n\n int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n boolean hasNext() throws IOException {\n if (tokin.hasMoreTokens()) {\n return true;\n } else {\n String s = in.readLine();\n while (s != null && s.length() == 0) {\n s = in.readLine();\n }\n if (s == null) {\n return false;\n } else {\n tokin = new StringTokenizer(s);\n return true;\n }\n }\n }\n }\n\n class Writer {\n PrintWriter cout;\n\n Writer() throws IOException {\n cout = new PrintWriter(System.out);\n }\n\n Writer(String name) throws IOException {\n cout = new PrintWriter(new FileWriter(name));\n }\n\n StringBuilder out = new StringBuilder();\n\n void print(Object a) {\n out.append(a);\n }\n\n void close() {\n cout.print(out.toString());\n cout.close();\n }\n }\n\n void run() throws Exception {\n Reader in = new Reader();\n Writer out = new Writer();\n int n = in.nextInt();\n int d = 0;\n boolean dd[] = new boolean[3];\n for (int i = 0; i < 3; i++) {\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i] = true;\n }\n }\n boolean must = false;\n if (d == 3) {\n must = true;\n }\n for (int i = 0; i < n - 3; i++) {\n if (dd[i % 3] == true) {\n d--;\n dd[i % 3] = false;\n }\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i % 3] = true;\n }\n if (d == 3) {\n must = true;\n }\n }\n if (must) {\n out.print(\"Yes\");\n } else {\n out.print(\"No\");\n }\n out.close();\n }\n\n public static void main(String[] args) throws Exception {\n new Main().run();\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"public class Main {\n class Reader {\n BufferedReader in;\n\n Reader() throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n }\n\n Reader(String name) throws IOException {\n in = new BufferedReader(new FileReader(name));\n }\n\n StringTokenizer tokin = new StringTokenizer(\"\");\n\n String next() throws IOException {\n if (!tokin.hasMoreTokens()) {\n tokin = new StringTokenizer(in.readLine());\n }\n return tokin.nextToken();\n }\n\n int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n boolean hasNext() throws IOException {\n if (tokin.hasMoreTokens()) {\n return true;\n } else {\n String s = in.readLine();\n while (s != null && s.length() == 0) {\n s = in.readLine();\n }\n if (s == null) {\n return false;\n } else {\n tokin = new StringTokenizer(s);\n return true;\n }\n }\n }\n }\n\n class Writer {\n PrintWriter cout;\n\n Writer() throws IOException {\n cout = new PrintWriter(System.out);\n }\n\n Writer(String name) throws IOException {\n cout = new PrintWriter(new FileWriter(name));\n }\n\n StringBuilder out = new StringBuilder();\n\n void print(Object a) {\n out.append(a);\n }\n\n void close() {\n cout.print(out.toString());\n cout.close();\n }\n }\n\n void run() throws Exception {\n Reader in = new Reader();\n Writer out = new Writer();\n int n = in.nextInt();\n int d = 0;\n boolean dd[] = new boolean[3];\n for (int i = 0; i < 3; i++) {\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i] = true;\n }\n }\n boolean must = false;\n if (d == 3) {\n must = true;\n }\n for (int i = 0; i < n - 3; i++) {\n if (dd[i % 3] == true) {\n d--;\n dd[i % 3] = false;\n }\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i % 3] = true;\n }\n if (d == 3) {\n must = true;\n }\n }\n if (must) {\n out.print(\"Yes\");\n } else {\n out.print(\"No\");\n }\n out.close();\n }\n\n public static void main(String[] args) throws Exception {\n new Main().run();\n }\n}",
"Main",
"void run() throws Exception {\n Reader in = new Reader();\n Writer out = new Writer();\n int n = in.nextInt();\n int d = 0;\n boolean dd[] = new boolean[3];\n for (int i = 0; i < 3; i++) {\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i] = true;\n }\n }\n boolean must = false;\n if (d == 3) {\n must = true;\n }\n for (int i = 0; i < n - 3; i++) {\n if (dd[i % 3] == true) {\n d--;\n dd[i % 3] = false;\n }\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i % 3] = true;\n }\n if (d == 3) {\n must = true;\n }\n }\n if (must) {\n out.print(\"Yes\");\n } else {\n out.print(\"No\");\n }\n out.close();\n }",
"run",
"{\n Reader in = new Reader();\n Writer out = new Writer();\n int n = in.nextInt();\n int d = 0;\n boolean dd[] = new boolean[3];\n for (int i = 0; i < 3; i++) {\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i] = true;\n }\n }\n boolean must = false;\n if (d == 3) {\n must = true;\n }\n for (int i = 0; i < n - 3; i++) {\n if (dd[i % 3] == true) {\n d--;\n dd[i % 3] = false;\n }\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i % 3] = true;\n }\n if (d == 3) {\n must = true;\n }\n }\n if (must) {\n out.print(\"Yes\");\n } else {\n out.print(\"No\");\n }\n out.close();\n }",
"Reader in = new Reader();",
"in",
"new Reader()",
"Writer out = new Writer();",
"out",
"new Writer()",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int d = 0;",
"d",
"0",
"boolean dd[] = new boolean[3];",
"dd",
"new boolean[3]",
"3",
"for (int i = 0; i < 3; i++) {\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i] = true;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 3",
"i",
"3",
"i++",
"i++",
"i",
"{\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i] = true;\n }\n }",
"{\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i] = true;\n }\n }",
"if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i] = true;\n }",
"in.nextInt() == in.nextInt()",
"in.nextInt()",
"in.nextInt",
"in",
"in.nextInt()",
"in.nextInt",
"in",
"{\n d++;\n dd[i] = true;\n }",
"d++",
"d",
"dd[i] = true",
"dd[i]",
"dd",
"i",
"true",
"boolean must = false;",
"must",
"false",
"if (d == 3) {\n must = true;\n }",
"d == 3",
"d",
"3",
"{\n must = true;\n }",
"must = true",
"must",
"true",
"for (int i = 0; i < n - 3; i++) {\n if (dd[i % 3] == true) {\n d--;\n dd[i % 3] = false;\n }\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i % 3] = true;\n }\n if (d == 3) {\n must = true;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n - 3",
"i",
"n - 3",
"n",
"3",
"i++",
"i++",
"i",
"{\n if (dd[i % 3] == true) {\n d--;\n dd[i % 3] = false;\n }\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i % 3] = true;\n }\n if (d == 3) {\n must = true;\n }\n }",
"{\n if (dd[i % 3] == true) {\n d--;\n dd[i % 3] = false;\n }\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i % 3] = true;\n }\n if (d == 3) {\n must = true;\n }\n }",
"if (dd[i % 3] == true) {\n d--;\n dd[i % 3] = false;\n }",
"dd[i % 3] == true",
"dd[i % 3]",
"dd",
"i % 3",
"i",
"3",
"true",
"{\n d--;\n dd[i % 3] = false;\n }",
"d--",
"d",
"dd[i % 3] = false",
"dd[i % 3]",
"dd",
"i % 3",
"i",
"3",
"false",
"if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i % 3] = true;\n }",
"in.nextInt() == in.nextInt()",
"in.nextInt()",
"in.nextInt",
"in",
"in.nextInt()",
"in.nextInt",
"in",
"{\n d++;\n dd[i % 3] = true;\n }",
"d++",
"d",
"dd[i % 3] = true",
"dd[i % 3]",
"dd",
"i % 3",
"i",
"3",
"true",
"if (d == 3) {\n must = true;\n }",
"d == 3",
"d",
"3",
"{\n must = true;\n }",
"must = true",
"must",
"true",
"if (must) {\n out.print(\"Yes\");\n } else {\n out.print(\"No\");\n }",
"must",
"{\n out.print(\"Yes\");\n }",
"out.print(\"Yes\")",
"out.print",
"out",
"\"Yes\"",
"{\n out.print(\"No\");\n }",
"out.print(\"No\")",
"out.print",
"out",
"\"No\"",
"out.close()",
"out.close",
"out",
"public static void main(String[] args) throws Exception {\n new Main().run();\n }",
"main",
"{\n new Main().run();\n }",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"class Reader {\n BufferedReader in;\n\n Reader() throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n }\n\n Reader(String name) throws IOException {\n in = new BufferedReader(new FileReader(name));\n }\n\n StringTokenizer tokin = new StringTokenizer(\"\");\n\n String next() throws IOException {\n if (!tokin.hasMoreTokens()) {\n tokin = new StringTokenizer(in.readLine());\n }\n return tokin.nextToken();\n }\n\n int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n boolean hasNext() throws IOException {\n if (tokin.hasMoreTokens()) {\n return true;\n } else {\n String s = in.readLine();\n while (s != null && s.length() == 0) {\n s = in.readLine();\n }\n if (s == null) {\n return false;\n } else {\n tokin = new StringTokenizer(s);\n return true;\n }\n }\n }\n }",
"Reader",
"BufferedReader in;",
"in",
"StringTokenizer tokin = new StringTokenizer(\"\");",
"tokin",
"new StringTokenizer(\"\")",
"Reader() throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n }",
"Reader",
"{\n in = new BufferedReader(new InputStreamReader(System.in));\n }",
"in = new BufferedReader(new InputStreamReader(System.in))",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"Reader(String name) throws IOException {\n in = new BufferedReader(new FileReader(name));\n }",
"Reader",
"{\n in = new BufferedReader(new FileReader(name));\n }",
"in = new BufferedReader(new FileReader(name))",
"in",
"new BufferedReader(new FileReader(name))",
"String name",
"name",
"String next() throws IOException {\n if (!tokin.hasMoreTokens()) {\n tokin = new StringTokenizer(in.readLine());\n }\n return tokin.nextToken();\n }",
"next",
"{\n if (!tokin.hasMoreTokens()) {\n tokin = new StringTokenizer(in.readLine());\n }\n return tokin.nextToken();\n }",
"if (!tokin.hasMoreTokens()) {\n tokin = new StringTokenizer(in.readLine());\n }",
"!tokin.hasMoreTokens()",
"tokin.hasMoreTokens()",
"tokin.hasMoreTokens",
"tokin",
"{\n tokin = new StringTokenizer(in.readLine());\n }",
"tokin = new StringTokenizer(in.readLine())",
"tokin",
"new StringTokenizer(in.readLine())",
"return tokin.nextToken();",
"tokin.nextToken()",
"tokin.nextToken",
"tokin",
"int nextInt() throws IOException {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"boolean hasNext() throws IOException {\n if (tokin.hasMoreTokens()) {\n return true;\n } else {\n String s = in.readLine();\n while (s != null && s.length() == 0) {\n s = in.readLine();\n }\n if (s == null) {\n return false;\n } else {\n tokin = new StringTokenizer(s);\n return true;\n }\n }\n }",
"hasNext",
"{\n if (tokin.hasMoreTokens()) {\n return true;\n } else {\n String s = in.readLine();\n while (s != null && s.length() == 0) {\n s = in.readLine();\n }\n if (s == null) {\n return false;\n } else {\n tokin = new StringTokenizer(s);\n return true;\n }\n }\n }",
"if (tokin.hasMoreTokens()) {\n return true;\n } else {\n String s = in.readLine();\n while (s != null && s.length() == 0) {\n s = in.readLine();\n }\n if (s == null) {\n return false;\n } else {\n tokin = new StringTokenizer(s);\n return true;\n }\n }",
"tokin.hasMoreTokens()",
"tokin.hasMoreTokens",
"tokin",
"{\n return true;\n }",
"return true;",
"true",
"{\n String s = in.readLine();\n while (s != null && s.length() == 0) {\n s = in.readLine();\n }\n if (s == null) {\n return false;\n } else {\n tokin = new StringTokenizer(s);\n return true;\n }\n }",
"String s = in.readLine();",
"s",
"in.readLine()",
"in.readLine",
"in",
"while (s != null && s.length() == 0) {\n s = in.readLine();\n }",
"s != null && s.length() == 0",
"s != null",
"s",
"null",
"s.length() == 0",
"s.length()",
"s.length",
"s",
"0",
"{\n s = in.readLine();\n }",
"s = in.readLine()",
"s",
"in.readLine()",
"in.readLine",
"in",
"if (s == null) {\n return false;\n } else {\n tokin = new StringTokenizer(s);\n return true;\n }",
"s == null",
"s",
"null",
"{\n return false;\n }",
"return false;",
"false",
"{\n tokin = new StringTokenizer(s);\n return true;\n }",
"tokin = new StringTokenizer(s)",
"tokin",
"new StringTokenizer(s)",
"return true;",
"true",
"class Writer {\n PrintWriter cout;\n\n Writer() throws IOException {\n cout = new PrintWriter(System.out);\n }\n\n Writer(String name) throws IOException {\n cout = new PrintWriter(new FileWriter(name));\n }\n\n StringBuilder out = new StringBuilder();\n\n void print(Object a) {\n out.append(a);\n }\n\n void close() {\n cout.print(out.toString());\n cout.close();\n }\n }",
"Writer",
"PrintWriter cout;",
"cout",
"StringBuilder out = new StringBuilder();",
"out",
"new StringBuilder()",
"Writer() throws IOException {\n cout = new PrintWriter(System.out);\n }",
"Writer",
"{\n cout = new PrintWriter(System.out);\n }",
"cout = new PrintWriter(System.out)",
"cout",
"new PrintWriter(System.out)",
"Writer(String name) throws IOException {\n cout = new PrintWriter(new FileWriter(name));\n }",
"Writer",
"{\n cout = new PrintWriter(new FileWriter(name));\n }",
"cout = new PrintWriter(new FileWriter(name))",
"cout",
"new PrintWriter(new FileWriter(name))",
"String name",
"name",
"void print(Object a) {\n out.append(a);\n }",
"print",
"{\n out.append(a);\n }",
"out.append(a)",
"out.append",
"out",
"a",
"Object a",
"a",
"void close() {\n cout.print(out.toString());\n cout.close();\n }",
"close",
"{\n cout.print(out.toString());\n cout.close();\n }",
"cout.print(out.toString())",
"cout.print",
"cout",
"out.toString()",
"out.toString",
"out",
"cout.close()",
"cout.close",
"cout",
"public class Main {\n class Reader {\n BufferedReader in;\n\n Reader() throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n }\n\n Reader(String name) throws IOException {\n in = new BufferedReader(new FileReader(name));\n }\n\n StringTokenizer tokin = new StringTokenizer(\"\");\n\n String next() throws IOException {\n if (!tokin.hasMoreTokens()) {\n tokin = new StringTokenizer(in.readLine());\n }\n return tokin.nextToken();\n }\n\n int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n boolean hasNext() throws IOException {\n if (tokin.hasMoreTokens()) {\n return true;\n } else {\n String s = in.readLine();\n while (s != null && s.length() == 0) {\n s = in.readLine();\n }\n if (s == null) {\n return false;\n } else {\n tokin = new StringTokenizer(s);\n return true;\n }\n }\n }\n }\n\n class Writer {\n PrintWriter cout;\n\n Writer() throws IOException {\n cout = new PrintWriter(System.out);\n }\n\n Writer(String name) throws IOException {\n cout = new PrintWriter(new FileWriter(name));\n }\n\n StringBuilder out = new StringBuilder();\n\n void print(Object a) {\n out.append(a);\n }\n\n void close() {\n cout.print(out.toString());\n cout.close();\n }\n }\n\n void run() throws Exception {\n Reader in = new Reader();\n Writer out = new Writer();\n int n = in.nextInt();\n int d = 0;\n boolean dd[] = new boolean[3];\n for (int i = 0; i < 3; i++) {\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i] = true;\n }\n }\n boolean must = false;\n if (d == 3) {\n must = true;\n }\n for (int i = 0; i < n - 3; i++) {\n if (dd[i % 3] == true) {\n d--;\n dd[i % 3] = false;\n }\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i % 3] = true;\n }\n if (d == 3) {\n must = true;\n }\n }\n if (must) {\n out.print(\"Yes\");\n } else {\n out.print(\"No\");\n }\n out.close();\n }\n\n public static void main(String[] args) throws Exception {\n new Main().run();\n }\n}",
"public class Main {\n class Reader {\n BufferedReader in;\n\n Reader() throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n }\n\n Reader(String name) throws IOException {\n in = new BufferedReader(new FileReader(name));\n }\n\n StringTokenizer tokin = new StringTokenizer(\"\");\n\n String next() throws IOException {\n if (!tokin.hasMoreTokens()) {\n tokin = new StringTokenizer(in.readLine());\n }\n return tokin.nextToken();\n }\n\n int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n boolean hasNext() throws IOException {\n if (tokin.hasMoreTokens()) {\n return true;\n } else {\n String s = in.readLine();\n while (s != null && s.length() == 0) {\n s = in.readLine();\n }\n if (s == null) {\n return false;\n } else {\n tokin = new StringTokenizer(s);\n return true;\n }\n }\n }\n }\n\n class Writer {\n PrintWriter cout;\n\n Writer() throws IOException {\n cout = new PrintWriter(System.out);\n }\n\n Writer(String name) throws IOException {\n cout = new PrintWriter(new FileWriter(name));\n }\n\n StringBuilder out = new StringBuilder();\n\n void print(Object a) {\n out.append(a);\n }\n\n void close() {\n cout.print(out.toString());\n cout.close();\n }\n }\n\n void run() throws Exception {\n Reader in = new Reader();\n Writer out = new Writer();\n int n = in.nextInt();\n int d = 0;\n boolean dd[] = new boolean[3];\n for (int i = 0; i < 3; i++) {\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i] = true;\n }\n }\n boolean must = false;\n if (d == 3) {\n must = true;\n }\n for (int i = 0; i < n - 3; i++) {\n if (dd[i % 3] == true) {\n d--;\n dd[i % 3] = false;\n }\n if (in.nextInt() == in.nextInt()) {\n d++;\n dd[i % 3] = true;\n }\n if (d == 3) {\n must = true;\n }\n }\n if (must) {\n out.print(\"Yes\");\n } else {\n out.print(\"No\");\n }\n out.close();\n }\n\n public static void main(String[] args) throws Exception {\n new Main().run();\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
import static java.lang.Math.*;
public class Main {
class Reader {
BufferedReader in;
Reader() throws IOException {
in = new BufferedReader(new InputStreamReader(System.in));
}
Reader(String name) throws IOException {
in = new BufferedReader(new FileReader(name));
}
StringTokenizer tokin = new StringTokenizer("");
String next() throws IOException {
if (!tokin.hasMoreTokens()) {
tokin = new StringTokenizer(in.readLine());
}
return tokin.nextToken();
}
int nextInt() throws IOException {
return Integer.parseInt(next());
}
boolean hasNext() throws IOException {
if (tokin.hasMoreTokens()) {
return true;
} else {
String s = in.readLine();
while (s != null && s.length() == 0) {
s = in.readLine();
}
if (s == null) {
return false;
} else {
tokin = new StringTokenizer(s);
return true;
}
}
}
}
class Writer {
PrintWriter cout;
Writer() throws IOException {
cout = new PrintWriter(System.out);
}
Writer(String name) throws IOException {
cout = new PrintWriter(new FileWriter(name));
}
StringBuilder out = new StringBuilder();
void print(Object a) {
out.append(a);
}
void close() {
cout.print(out.toString());
cout.close();
}
}
void run() throws Exception {
Reader in = new Reader();
Writer out = new Writer();
int n = in.nextInt();
int d = 0;
boolean dd[] = new boolean[3];
for (int i = 0; i < 3; i++) {
if (in.nextInt() == in.nextInt()) {
d++;
dd[i] = true;
}
}
boolean must = false;
if (d == 3) {
must = true;
}
for (int i = 0; i < n - 3; i++) {
if (dd[i % 3] == true) {
d--;
dd[i % 3] = false;
}
if (in.nextInt() == in.nextInt()) {
d++;
dd[i % 3] = true;
}
if (d == 3) {
must = true;
}
}
if (must) {
out.print("Yes");
} else {
out.print("No");
}
out.close();
}
public static void main(String[] args) throws Exception {
new Main().run();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
2,
13,
17,
40,
13,
30,
4,
18,
18,
13,
13,
17,
0,
13,
17,
14,
40,
13,
4,
18,
18,
13,
13,
17,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
173,
8
],
[
173,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
11,
29
],
[
29,
30
],
[
29,
31
],
[
11,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
32,
37
],
[
37,
38
],
[
37,
39
],
[
32,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
55,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
44,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
66,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
73,
80
],
[
80,
81
],
[
80,
82
],
[
11,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
9,
92
],
[
92,
93
],
[
173,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
105,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
110,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
104,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
94,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
132,
133
],
[
94,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
141,
146
],
[
146,
147
],
[
146,
148
],
[
141,
149
],
[
149,
150
],
[
150,
151
],
[
141,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
157,
158
],
[
136,
159
],
[
159,
160
],
[
134,
161
],
[
161,
162
],
[
94,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
170,
171
],
[
0,
172
],
[
172,
173
],
[
172,
174
]
]
| [
"import java.util.*;\nimport java.io.*;\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tFastScanner in=new FastScanner();\n\t\tint n=in.nextInt();\n\t\tHashMap<Integer, Integer> hmap1=new HashMap<>();\n\t\tHashMap<Integer, Integer> hmap2=new HashMap<>();\n\t\tboolean chk=false;\n\t\tint ctr=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint x=in.nextInt();\n\t\t\tint y=in.nextInt();\n\t\t\tif(x==y) {\n\t\t\t\tctr++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tctr=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(ctr==3 && !chk) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}\n\t\t}\n\t\tif(!chk)\n\t\tSystem.out.println(\"No\");\n\t}\n\n\t///////////////////////////\n\tstatic class FastScanner {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tint[] nextArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tFastScanner in=new FastScanner();\n\t\tint n=in.nextInt();\n\t\tHashMap<Integer, Integer> hmap1=new HashMap<>();\n\t\tHashMap<Integer, Integer> hmap2=new HashMap<>();\n\t\tboolean chk=false;\n\t\tint ctr=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint x=in.nextInt();\n\t\t\tint y=in.nextInt();\n\t\t\tif(x==y) {\n\t\t\t\tctr++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tctr=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(ctr==3 && !chk) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}\n\t\t}\n\t\tif(!chk)\n\t\tSystem.out.println(\"No\");\n\t}\n\n\t///////////////////////////\n\tstatic class FastScanner {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tint[] nextArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tFastScanner in=new FastScanner();\n\t\tint n=in.nextInt();\n\t\tHashMap<Integer, Integer> hmap1=new HashMap<>();\n\t\tHashMap<Integer, Integer> hmap2=new HashMap<>();\n\t\tboolean chk=false;\n\t\tint ctr=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint x=in.nextInt();\n\t\t\tint y=in.nextInt();\n\t\t\tif(x==y) {\n\t\t\t\tctr++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tctr=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(ctr==3 && !chk) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}\n\t\t}\n\t\tif(!chk)\n\t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\tFastScanner in=new FastScanner();\n\t\tint n=in.nextInt();\n\t\tHashMap<Integer, Integer> hmap1=new HashMap<>();\n\t\tHashMap<Integer, Integer> hmap2=new HashMap<>();\n\t\tboolean chk=false;\n\t\tint ctr=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint x=in.nextInt();\n\t\t\tint y=in.nextInt();\n\t\t\tif(x==y) {\n\t\t\t\tctr++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tctr=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(ctr==3 && !chk) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}\n\t\t}\n\t\tif(!chk)\n\t\tSystem.out.println(\"No\");\n\t}",
"FastScanner in=new FastScanner();",
"in",
"new FastScanner()",
"int n=in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"HashMap<Integer, Integer> hmap1=new HashMap<>();",
"hmap1",
"new HashMap<>()",
"HashMap<Integer, Integer> hmap2=new HashMap<>();",
"hmap2",
"new HashMap<>()",
"boolean chk=false;",
"chk",
"false",
"int ctr=0;",
"ctr",
"0",
"for(int i=0;i<n;i++) {\n\t\t\tint x=in.nextInt();\n\t\t\tint y=in.nextInt();\n\t\t\tif(x==y) {\n\t\t\t\tctr++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tctr=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(ctr==3 && !chk) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint x=in.nextInt();\n\t\t\tint y=in.nextInt();\n\t\t\tif(x==y) {\n\t\t\t\tctr++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tctr=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(ctr==3 && !chk) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint x=in.nextInt();\n\t\t\tint y=in.nextInt();\n\t\t\tif(x==y) {\n\t\t\t\tctr++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tctr=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(ctr==3 && !chk) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}\n\t\t}",
"int x=in.nextInt();",
"x",
"in.nextInt()",
"in.nextInt",
"in",
"int y=in.nextInt();",
"y",
"in.nextInt()",
"in.nextInt",
"in",
"if(x==y) {\n\t\t\t\tctr++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tctr=0;\n\t\t\t}",
"x==y",
"x",
"y",
"{\n\t\t\t\tctr++;\n\t\t\t}",
"ctr++",
"ctr",
"{\n\t\t\t\tctr=0;\n\t\t\t}",
"ctr=0",
"ctr",
"0",
"if(ctr==3 && !chk) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}",
"ctr==3 && !chk",
"ctr==3",
"ctr",
"3",
"!chk",
"chk",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"chk=true",
"chk",
"true",
"if(!chk)\n\t\tSystem.out.println(\"No\");",
"!chk",
"chk",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args",
"static class FastScanner {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tint[] nextArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}",
"FastScanner",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st = new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"while (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"int[] nextArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}",
"nextArray",
"{\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextInt();",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tFastScanner in=new FastScanner();\n\t\tint n=in.nextInt();\n\t\tHashMap<Integer, Integer> hmap1=new HashMap<>();\n\t\tHashMap<Integer, Integer> hmap2=new HashMap<>();\n\t\tboolean chk=false;\n\t\tint ctr=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint x=in.nextInt();\n\t\t\tint y=in.nextInt();\n\t\t\tif(x==y) {\n\t\t\t\tctr++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tctr=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(ctr==3 && !chk) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}\n\t\t}\n\t\tif(!chk)\n\t\tSystem.out.println(\"No\");\n\t}\n\n\t///////////////////////////\n\tstatic class FastScanner {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tint[] nextArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tFastScanner in=new FastScanner();\n\t\tint n=in.nextInt();\n\t\tHashMap<Integer, Integer> hmap1=new HashMap<>();\n\t\tHashMap<Integer, Integer> hmap2=new HashMap<>();\n\t\tboolean chk=false;\n\t\tint ctr=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint x=in.nextInt();\n\t\t\tint y=in.nextInt();\n\t\t\tif(x==y) {\n\t\t\t\tctr++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tctr=0;\n\t\t\t}\n\t\t\t\n\t\t\tif(ctr==3 && !chk) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tchk=true;\n\t\t\t}\n\t\t}\n\t\tif(!chk)\n\t\tSystem.out.println(\"No\");\n\t}\n\n\t///////////////////////////\n\tstatic class FastScanner {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tint[] nextArray(int n) {\n\t\t\tint[] a = new int[n];\n\t\t\tfor (int i = 0; i < n; i++)\n\t\t\t\ta[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String args[]) {
FastScanner in=new FastScanner();
int n=in.nextInt();
HashMap<Integer, Integer> hmap1=new HashMap<>();
HashMap<Integer, Integer> hmap2=new HashMap<>();
boolean chk=false;
int ctr=0;
for(int i=0;i<n;i++) {
int x=in.nextInt();
int y=in.nextInt();
if(x==y) {
ctr++;
}
else {
ctr=0;
}
if(ctr==3 && !chk) {
System.out.println("Yes");
chk=true;
}
}
if(!chk)
System.out.println("No");
}
///////////////////////////
static class FastScanner {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer("");
String next() {
while (!st.hasMoreTokens())
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
int[] nextArray(int n) {
int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = nextInt();
return a;
}
long nextLong() {
return Long.parseLong(next());
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
14,
2,
18,
13,
13,
18,
13,
13,
30,
40,
13,
30,
14,
2,
13,
13,
0,
13,
13,
0,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
106,
8
],
[
106,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
24
],
[
24,
25
],
[
24,
26
],
[
11,
28
],
[
28,
29
],
[
28,
30
],
[
11,
31
],
[
31,
32
],
[
31,
33
],
[
11,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
46,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
77,
79
],
[
72,
80
],
[
80,
81
],
[
80,
82
],
[
11,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
83,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
9,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
]
| [
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] x = new int[N];\n\t\tint[] y = new int[N];\n\t\tint maxc = 0;\n\t\tint c = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tx[i] = sc.nextInt();\n\t\t\ty[i] = sc.nextInt();\n\t\t\tif (x[i] == y[i]) {\n\t\t\t\tc++;\n\t\t\t} else {\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}\n\t\t}\n\t\tif (maxc >= 3 || c >= 3)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] x = new int[N];\n\t\tint[] y = new int[N];\n\t\tint maxc = 0;\n\t\tint c = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tx[i] = sc.nextInt();\n\t\t\ty[i] = sc.nextInt();\n\t\t\tif (x[i] == y[i]) {\n\t\t\t\tc++;\n\t\t\t} else {\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}\n\t\t}\n\t\tif (maxc >= 3 || c >= 3)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] x = new int[N];\n\t\tint[] y = new int[N];\n\t\tint maxc = 0;\n\t\tint c = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tx[i] = sc.nextInt();\n\t\t\ty[i] = sc.nextInt();\n\t\t\tif (x[i] == y[i]) {\n\t\t\t\tc++;\n\t\t\t} else {\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}\n\t\t}\n\t\tif (maxc >= 3 || c >= 3)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] x = new int[N];\n\t\tint[] y = new int[N];\n\t\tint maxc = 0;\n\t\tint c = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tx[i] = sc.nextInt();\n\t\t\ty[i] = sc.nextInt();\n\t\t\tif (x[i] == y[i]) {\n\t\t\t\tc++;\n\t\t\t} else {\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}\n\t\t}\n\t\tif (maxc >= 3 || c >= 3)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] x = new int[N];",
"x",
"new int[N]",
"N",
"int[] y = new int[N];",
"y",
"new int[N]",
"N",
"int maxc = 0;",
"maxc",
"0",
"int c = 0;",
"c",
"0",
"for (int i = 0; i < N; i++) {\n\t\t\tx[i] = sc.nextInt();\n\t\t\ty[i] = sc.nextInt();\n\t\t\tif (x[i] == y[i]) {\n\t\t\t\tc++;\n\t\t\t} else {\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tx[i] = sc.nextInt();\n\t\t\ty[i] = sc.nextInt();\n\t\t\tif (x[i] == y[i]) {\n\t\t\t\tc++;\n\t\t\t} else {\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tx[i] = sc.nextInt();\n\t\t\ty[i] = sc.nextInt();\n\t\t\tif (x[i] == y[i]) {\n\t\t\t\tc++;\n\t\t\t} else {\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}\n\t\t}",
"x[i] = sc.nextInt()",
"x[i]",
"x",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"y[i] = sc.nextInt()",
"y[i]",
"y",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (x[i] == y[i]) {\n\t\t\t\tc++;\n\t\t\t} else {\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}",
"x[i] == y[i]",
"x[i]",
"x",
"i",
"y[i]",
"y",
"i",
"{\n\t\t\t\tc++;\n\t\t\t}",
"c++",
"c",
"{\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}",
"if (c > maxc)\n\t\t\t\t\tmaxc = c;",
"c > maxc",
"c",
"maxc",
"maxc = c",
"maxc",
"c",
"c = 0",
"c",
"0",
"if (maxc >= 3 || c >= 3)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");",
"maxc >= 3 || c >= 3",
"maxc >= 3",
"maxc",
"3",
"c >= 3",
"c",
"3",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] x = new int[N];\n\t\tint[] y = new int[N];\n\t\tint maxc = 0;\n\t\tint c = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tx[i] = sc.nextInt();\n\t\t\ty[i] = sc.nextInt();\n\t\t\tif (x[i] == y[i]) {\n\t\t\t\tc++;\n\t\t\t} else {\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}\n\t\t}\n\t\tif (maxc >= 3 || c >= 3)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\t\tint[] x = new int[N];\n\t\tint[] y = new int[N];\n\t\tint maxc = 0;\n\t\tint c = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tx[i] = sc.nextInt();\n\t\t\ty[i] = sc.nextInt();\n\t\t\tif (x[i] == y[i]) {\n\t\t\t\tc++;\n\t\t\t} else {\n\t\t\t\tif (c > maxc)\n\t\t\t\t\tmaxc = c;\n\t\t\t\tc = 0;\n\t\t\t}\n\t\t}\n\t\tif (maxc >= 3 || c >= 3)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[] x = new int[N];
int[] y = new int[N];
int maxc = 0;
int c = 0;
for (int i = 0; i < N; i++) {
x[i] = sc.nextInt();
y[i] = sc.nextInt();
if (x[i] == y[i]) {
c++;
} else {
if (c > maxc)
maxc = c;
c = 0;
}
}
if (maxc >= 3 || c >= 3)
System.out.println("Yes");
else
System.out.println("No");
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
0,
13,
17,
0,
13,
17,
4,
18,
13,
8,
2,
4,
18,
13,
17,
17,
13,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
17,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
34,
35
],
[
34,
36
],
[
0,
37
],
[
37,
38
],
[
37,
39
],
[
0,
40
],
[
40,
41
],
[
40,
42
],
[
0,
43
],
[
43,
44
],
[
43,
45
],
[
0,
46
],
[
46,
47
],
[
46,
48
],
[
0,
49
],
[
49,
50
],
[
49,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
],
[
0,
55
],
[
229,
56
],
[
229,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
59,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
59,
70
],
[
70,
71
],
[
70,
72
],
[
59,
73
],
[
73,
74
],
[
73,
75
],
[
59,
76
],
[
76,
77
],
[
76,
78
],
[
59,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
79,
83
],
[
79,
84
],
[
59,
85
],
[
85,
86
],
[
86,
87
],
[
57,
88
],
[
88,
89
],
[
229,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
97,
103
],
[
103,
104
],
[
103,
105
],
[
97,
106
],
[
106,
107
],
[
106,
108
],
[
97,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
114,
115
],
[
114,
116
],
[
109,
117
],
[
117,
118
],
[
118,
119
],
[
109,
120
],
[
121,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
121,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
121,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
143,
144
],
[
143,
145
],
[
132,
146
],
[
146,
147
],
[
146,
148
],
[
97,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
153,
157
],
[
152,
158
],
[
152,
159
],
[
95,
160
],
[
160,
161
],
[
95,
162
],
[
162,
163
],
[
95,
164
],
[
164,
165
],
[
229,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
166,
170
],
[
170,
171
],
[
166,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
174,
178
],
[
178,
179
],
[
178,
180
],
[
172,
181
],
[
181,
182
],
[
166,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
186,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
200,
201
],
[
196,
202
],
[
202,
203
],
[
203,
204
],
[
203,
205
],
[
185,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
166,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
214,
217
],
[
217,
218
],
[
166,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
223,
226
],
[
226,
227
],
[
0,
228
],
[
228,
229
],
[
228,
230
]
]
| [
"\nimport java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.math.BigInteger;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Random;\nimport java.util.Set;\nimport java.util.StringTokenizer;\nimport java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.InputStream;\n\n\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskT solver = new TaskT();\n solver.solve(1, in, out);\n out.close();\n }\n \n \n\n static class TaskT {\n \tstatic int counter = 0;\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n\n \tint N = in.nextInt();\n \tint cnt = 0; \n \tString ans = \"\";\n \tfor(int i = 0; i < N; i++){\n \t\tint Di1 = in.nextInt();\n \t\tint Di2 = in.nextInt();\n \t\t\n \t\tif(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;\n \t}\n \t\n \tout.print(ans.length() == 0? \"No\": ans);\n }\n \n \n \n \n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n }\n}\n",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Map;",
"Map",
"java.util",
"import java.util.Random;",
"Random",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskT solver = new TaskT();\n solver.solve(1, in, out);\n out.close();\n }\n \n \n\n static class TaskT {\n \tstatic int counter = 0;\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n\n \tint N = in.nextInt();\n \tint cnt = 0; \n \tString ans = \"\";\n \tfor(int i = 0; i < N; i++){\n \t\tint Di1 = in.nextInt();\n \t\tint Di2 = in.nextInt();\n \t\t\n \t\tif(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;\n \t}\n \t\n \tout.print(ans.length() == 0? \"No\": ans);\n }\n \n \n \n \n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskT solver = new TaskT();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskT solver = new TaskT();\n solver.solve(1, in, out);\n out.close();\n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"InputReader in = new InputReader(inputStream);",
"in",
"new InputReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"TaskT solver = new TaskT();",
"solver",
"new TaskT()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class TaskT {\n \tstatic int counter = 0;\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n\n \tint N = in.nextInt();\n \tint cnt = 0; \n \tString ans = \"\";\n \tfor(int i = 0; i < N; i++){\n \t\tint Di1 = in.nextInt();\n \t\tint Di2 = in.nextInt();\n \t\t\n \t\tif(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;\n \t}\n \t\n \tout.print(ans.length() == 0? \"No\": ans);\n }\n \n \n \n \n\n }",
"TaskT",
"static int counter = 0;",
"counter",
"0",
"public void solve(int testNumber, InputReader in, PrintWriter out) {\n\n \tint N = in.nextInt();\n \tint cnt = 0; \n \tString ans = \"\";\n \tfor(int i = 0; i < N; i++){\n \t\tint Di1 = in.nextInt();\n \t\tint Di2 = in.nextInt();\n \t\t\n \t\tif(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;\n \t}\n \t\n \tout.print(ans.length() == 0? \"No\": ans);\n }",
"solve",
"{\n\n \tint N = in.nextInt();\n \tint cnt = 0; \n \tString ans = \"\";\n \tfor(int i = 0; i < N; i++){\n \t\tint Di1 = in.nextInt();\n \t\tint Di2 = in.nextInt();\n \t\t\n \t\tif(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;\n \t}\n \t\n \tout.print(ans.length() == 0? \"No\": ans);\n }",
"int N = in.nextInt();",
"N",
"in.nextInt()",
"in.nextInt",
"in",
"int cnt = 0;",
"cnt",
"0",
"String ans = \"\";",
"ans",
"\"\"",
"for(int i = 0; i < N; i++){\n \t\tint Di1 = in.nextInt();\n \t\tint Di2 = in.nextInt();\n \t\t\n \t\tif(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;\n \t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \t\tint Di1 = in.nextInt();\n \t\tint Di2 = in.nextInt();\n \t\t\n \t\tif(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;\n \t}",
"{\n \t\tint Di1 = in.nextInt();\n \t\tint Di2 = in.nextInt();\n \t\t\n \t\tif(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;\n \t}",
"int Di1 = in.nextInt();",
"Di1",
"in.nextInt()",
"in.nextInt",
"in",
"int Di2 = in.nextInt();",
"Di2",
"in.nextInt()",
"in.nextInt",
"in",
"if(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;",
"Di1 == Di2",
"Di1",
"Di2",
"{\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}",
"cnt ++",
"cnt",
"if(cnt == 3)\n \t\t\t\tans = \"Yes\";",
"cnt == 3",
"cnt",
"3",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"cnt = 0",
"cnt",
"0",
"out.print(ans.length() == 0? \"No\": ans)",
"out.print",
"out",
"ans.length() == 0? \"No\": ans",
"ans.length() == 0",
"ans.length()",
"ans.length",
"ans",
"0",
"\"No\"",
"ans",
"int testNumber",
"testNumber",
"InputReader in",
"in",
"PrintWriter out",
"out",
"static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n }",
"InputReader",
"public BufferedReader reader;",
"reader",
"public StringTokenizer tokenizer;",
"tokenizer",
"public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }",
"InputReader",
"{\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }",
"reader = new BufferedReader(new InputStreamReader(stream), 32768)",
"reader",
"new BufferedReader(new InputStreamReader(stream), 32768)",
"tokenizer = null",
"tokenizer",
"null",
"InputStream stream",
"stream",
"public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"next",
"{\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n tokenizer = new StringTokenizer(reader.readLine());\n }",
"tokenizer = new StringTokenizer(reader.readLine())",
"tokenizer",
"new StringTokenizer(reader.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"public int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskT solver = new TaskT();\n solver.solve(1, in, out);\n out.close();\n }\n \n \n\n static class TaskT {\n \tstatic int counter = 0;\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n\n \tint N = in.nextInt();\n \tint cnt = 0; \n \tString ans = \"\";\n \tfor(int i = 0; i < N; i++){\n \t\tint Di1 = in.nextInt();\n \t\tint Di2 = in.nextInt();\n \t\t\n \t\tif(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;\n \t}\n \t\n \tout.print(ans.length() == 0? \"No\": ans);\n }\n \n \n \n \n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n InputReader in = new InputReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n TaskT solver = new TaskT();\n solver.solve(1, in, out);\n out.close();\n }\n \n \n\n static class TaskT {\n \tstatic int counter = 0;\n public void solve(int testNumber, InputReader in, PrintWriter out) {\n\n \tint N = in.nextInt();\n \tint cnt = 0; \n \tString ans = \"\";\n \tfor(int i = 0; i < N; i++){\n \t\tint Di1 = in.nextInt();\n \t\tint Di2 = in.nextInt();\n \t\t\n \t\tif(Di1 == Di2){\n \t\t\tcnt ++;\n \t\t\tif(cnt == 3)\n \t\t\t\tans = \"Yes\";\n \t\t\t\t\n \t\t}\n \t\telse\n \t\t\tcnt = 0;\n \t}\n \t\n \tout.print(ans.length() == 0? \"No\": ans);\n }\n \n \n \n \n\n }\n\n static class InputReader {\n public BufferedReader reader;\n public StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n public String next() {\n while (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n \n public long nextLong() {\n return Long.parseLong(next());\n }\n }\n}",
"Main"
]
|
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
TaskT solver = new TaskT();
solver.solve(1, in, out);
out.close();
}
static class TaskT {
static int counter = 0;
public void solve(int testNumber, InputReader in, PrintWriter out) {
int N = in.nextInt();
int cnt = 0;
String ans = "";
for(int i = 0; i < N; i++){
int Di1 = in.nextInt();
int Di2 = in.nextInt();
if(Di1 == Di2){
cnt ++;
if(cnt == 3)
ans = "Yes";
}
else
cnt = 0;
}
out.print(ans.length() == 0? "No": ans);
}
}
static class InputReader {
public BufferedReader reader;
public StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
public long nextLong() {
return Long.parseLong(next());
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
13,
30,
29,
41,
13,
2,
2,
13,
13,
17,
4,
13,
13,
13,
13,
4,
13,
13,
2,
13,
17,
13,
4,
13,
13,
13,
13,
2,
13,
17,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
2,
2,
13,
13,
17,
41,
13,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
40,
13,
9,
14,
2,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
40,
13,
9,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
40,
13,
9,
0,
18,
13,
13,
18,
13,
13,
40,
13,
11,
1,
41,
13,
17,
41,
13,
13,
2,
13,
18,
13,
13,
1,
40,
13,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
13,
23,
13,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
29,
41,
13,
2,
2,
13,
13,
17,
4,
13,
13,
13,
13,
4,
13,
13,
2,
13,
17,
13,
4,
13,
13,
13,
13,
2,
13,
17,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
2,
2,
13,
13,
17,
41,
13,
13,
41,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
40,
13,
9,
14,
2,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
40,
13,
9,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
40,
13,
9,
0,
18,
13,
13,
18,
13,
13,
40,
13,
11,
1,
41,
13,
17,
41,
13,
13,
2,
13,
18,
13,
13,
1,
40,
13,
40,
13,
30,
30,
0,
18,
13,
13,
18,
13,
13,
23,
13,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
18,
13,
13,
12,
13,
30,
14,
2,
13,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
37,
20,
29,
2,
13,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
42,
2,
40,
4,
13,
13,
2,
13,
17,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
37,
20,
14,
2,
13,
17,
30,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
2,
13,
17,
13,
0,
13,
4,
13,
37,
20,
29,
2,
13,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
29,
17,
29,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
750,
8
],
[
750,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
25,
28
],
[
25,
29
],
[
11,
30
],
[
30,
31
],
[
30,
32
],
[
30,
33
],
[
33,
34
],
[
33,
35
],
[
30,
36
],
[
11,
37
],
[
37,
38
],
[
37,
39
],
[
37,
40
],
[
37,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
9,
46
],
[
46,
47
],
[
9,
48
],
[
48,
49
],
[
9,
50
],
[
50,
51
],
[
750,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
54,
63
],
[
63,
64
],
[
63,
65
],
[
54,
66
],
[
66,
67
],
[
66,
68
],
[
54,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
69,
79
],
[
79,
80
],
[
80,
81
],
[
69,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
93,
95
],
[
88,
96
],
[
96,
97
],
[
88,
98
],
[
83,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
108,
110
],
[
103,
111
],
[
111,
112
],
[
103,
113
],
[
83,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
119,
120
],
[
119,
121
],
[
114,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
127,
129
],
[
122,
130
],
[
130,
131
],
[
122,
132
],
[
83,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
137,
138
],
[
137,
139
],
[
83,
140
],
[
140,
141
],
[
54,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
147,
148
],
[
147,
149
],
[
142,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
152,
154
],
[
142,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
158,
159
],
[
142,
160
],
[
161,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
162,
166
],
[
166,
167
],
[
166,
168
],
[
52,
169
],
[
169,
170
],
[
52,
171
],
[
171,
172
],
[
52,
173
],
[
173,
174
],
[
52,
175
],
[
175,
176
],
[
52,
177
],
[
177,
178
],
[
750,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
181,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
190,
194
],
[
181,
195
],
[
195,
196
],
[
195,
197
],
[
195,
198
],
[
195,
199
],
[
181,
200
],
[
200,
201
],
[
200,
202
],
[
200,
203
],
[
203,
204
],
[
203,
205
],
[
200,
206
],
[
181,
207
],
[
207,
208
],
[
207,
209
],
[
207,
210
],
[
207,
211
],
[
207,
212
],
[
212,
213
],
[
212,
214
],
[
207,
215
],
[
179,
216
],
[
216,
217
],
[
179,
218
],
[
218,
219
],
[
179,
220
],
[
220,
221
],
[
750,
222
],
[
222,
223
],
[
222,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
228,
232
],
[
224,
233
],
[
233,
234
],
[
233,
235
],
[
224,
236
],
[
236,
237
],
[
236,
238
],
[
224,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
239,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
246,
248
],
[
239,
249
],
[
249,
250
],
[
250,
251
],
[
239,
252
],
[
253,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
255,
257
],
[
254,
258
],
[
258,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
259,
263
],
[
263,
264
],
[
263,
265
],
[
258,
266
],
[
266,
267
],
[
258,
268
],
[
253,
269
],
[
269,
270
],
[
270,
271
],
[
270,
272
],
[
269,
273
],
[
273,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
274,
278
],
[
278,
279
],
[
278,
280
],
[
273,
281
],
[
281,
282
],
[
273,
283
],
[
253,
284
],
[
284,
285
],
[
285,
286
],
[
286,
287
],
[
286,
288
],
[
285,
289
],
[
289,
290
],
[
289,
291
],
[
284,
292
],
[
292,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
293,
297
],
[
297,
298
],
[
297,
299
],
[
292,
300
],
[
300,
301
],
[
292,
302
],
[
253,
303
],
[
303,
304
],
[
304,
305
],
[
304,
306
],
[
303,
307
],
[
307,
308
],
[
307,
309
],
[
253,
310
],
[
310,
311
],
[
224,
312
],
[
312,
313
],
[
313,
314
],
[
314,
315
],
[
314,
316
],
[
313,
317
],
[
317,
318
],
[
317,
319
],
[
312,
320
],
[
320,
321
],
[
320,
322
],
[
322,
323
],
[
322,
324
],
[
312,
325
],
[
325,
326
],
[
326,
327
],
[
325,
328
],
[
328,
329
],
[
312,
330
],
[
331,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
332,
336
],
[
336,
337
],
[
336,
338
],
[
222,
339
],
[
339,
340
],
[
222,
341
],
[
341,
342
],
[
222,
343
],
[
343,
344
],
[
222,
345
],
[
345,
346
],
[
222,
347
],
[
347,
348
],
[
750,
349
],
[
349,
350
],
[
349,
351
],
[
351,
352
],
[
352,
353
],
[
352,
354
],
[
351,
355
],
[
355,
356
],
[
355,
357
],
[
351,
358
],
[
358,
359
],
[
358,
360
],
[
351,
361
],
[
361,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
361,
366
],
[
366,
367
],
[
366,
368
],
[
361,
369
],
[
369,
370
],
[
370,
371
],
[
361,
372
],
[
373,
373
],
[
373,
374
],
[
374,
375
],
[
374,
376
],
[
376,
377
],
[
377,
378
],
[
373,
379
],
[
379,
380
],
[
379,
381
],
[
373,
382
],
[
382,
383
],
[
382,
384
],
[
373,
385
],
[
385,
386
],
[
386,
387
],
[
387,
388
],
[
387,
389
],
[
385,
390
],
[
390,
391
],
[
390,
392
],
[
385,
393
],
[
393,
394
],
[
394,
395
],
[
385,
396
],
[
397,
397
],
[
397,
398
],
[
398,
399
],
[
398,
400
],
[
400,
401
],
[
401,
402
],
[
397,
403
],
[
403,
404
],
[
403,
405
],
[
405,
406
],
[
406,
407
],
[
397,
408
],
[
408,
409
],
[
409,
410
],
[
409,
411
],
[
408,
412
],
[
412,
413
],
[
413,
414
],
[
408,
415
],
[
415,
416
],
[
416,
417
],
[
416,
418
],
[
397,
419
],
[
419,
420
],
[
420,
421
],
[
420,
422
],
[
419,
423
],
[
423,
424
],
[
424,
425
],
[
424,
426
],
[
373,
427
],
[
427,
428
],
[
427,
429
],
[
429,
430
],
[
430,
431
],
[
431,
432
],
[
430,
433
],
[
427,
434
],
[
434,
435
],
[
435,
436
],
[
436,
437
],
[
435,
438
],
[
351,
439
],
[
439,
440
],
[
440,
441
],
[
441,
442
],
[
441,
443
],
[
439,
444
],
[
349,
445
],
[
445,
446
],
[
750,
447
],
[
447,
448
],
[
447,
449
],
[
449,
450
],
[
449,
451
],
[
447,
453
],
[
453,
454
],
[
447,
455
],
[
455,
456
],
[
447,
457
],
[
457,
458
],
[
447,
459
],
[
459,
460
],
[
459,
461
],
[
461,
462
],
[
462,
463
],
[
462,
464
],
[
464,
465
],
[
464,
466
],
[
447,
467
],
[
467,
468
],
[
467,
469
],
[
469,
470
],
[
470,
471
],
[
471,
472
],
[
471,
473
],
[
470,
474
],
[
474,
475
],
[
469,
476
],
[
476,
477
],
[
477,
478
],
[
477,
479
],
[
476,
480
],
[
480,
481
],
[
481,
482
],
[
481,
483
],
[
480,
484
],
[
484,
485
],
[
484,
486
],
[
486,
487
],
[
487,
488
],
[
486,
489
],
[
480,
490
],
[
490,
491
],
[
491,
492
],
[
491,
493
],
[
490,
494
],
[
494,
495
],
[
495,
496
],
[
469,
497
],
[
497,
498
],
[
498,
499
],
[
498,
500
],
[
500,
501
],
[
447,
502
],
[
502,
503
],
[
502,
504
],
[
504,
505
],
[
505,
506
],
[
505,
507
],
[
504,
508
],
[
508,
509
],
[
508,
510
],
[
510,
511
],
[
504,
512
],
[
512,
513
],
[
513,
514
],
[
513,
515
],
[
512,
516
],
[
516,
517
],
[
516,
518
],
[
518,
519
],
[
504,
520
],
[
520,
521
],
[
520,
522
],
[
504,
523
],
[
523,
524
],
[
524,
525
],
[
524,
526
],
[
523,
527
],
[
527,
528
],
[
528,
529
],
[
528,
530
],
[
530,
531
],
[
527,
532
],
[
532,
533
],
[
532,
534
],
[
534,
535
],
[
504,
536
],
[
536,
537
],
[
537,
538
],
[
538,
539
],
[
538,
540
],
[
536,
541
],
[
541,
542
],
[
542,
543
],
[
543,
544
],
[
544,
545
],
[
544,
546
],
[
543,
547
],
[
547,
548
],
[
547,
549
],
[
542,
550
],
[
550,
551
],
[
551,
552
],
[
551,
553
],
[
550,
554
],
[
554,
555
],
[
554,
556
],
[
556,
557
],
[
556,
558
],
[
550,
559
],
[
559,
560
],
[
559,
561
],
[
561,
562
],
[
542,
563
],
[
563,
564
],
[
504,
565
],
[
565,
566
],
[
566,
567
],
[
566,
568
],
[
447,
569
],
[
569,
570
],
[
569,
571
],
[
571,
572
],
[
572,
573
],
[
572,
574
],
[
571,
575
],
[
575,
576
],
[
575,
577
],
[
577,
578
],
[
571,
579
],
[
579,
580
],
[
580,
581
],
[
580,
582
],
[
579,
583
],
[
583,
584
],
[
583,
585
],
[
585,
586
],
[
571,
587
],
[
587,
588
],
[
587,
589
],
[
571,
590
],
[
590,
591
],
[
591,
592
],
[
591,
593
],
[
590,
594
],
[
594,
595
],
[
595,
596
],
[
595,
597
],
[
597,
598
],
[
594,
599
],
[
599,
600
],
[
599,
601
],
[
601,
602
],
[
571,
603
],
[
603,
604
],
[
604,
605
],
[
605,
606
],
[
606,
607
],
[
606,
608
],
[
604,
609
],
[
609,
610
],
[
609,
611
],
[
603,
612
],
[
612,
613
],
[
613,
614
],
[
614,
615
],
[
615,
616
],
[
615,
617
],
[
614,
618
],
[
618,
619
],
[
618,
620
],
[
613,
621
],
[
621,
622
],
[
622,
623
],
[
622,
624
],
[
621,
625
],
[
625,
626
],
[
625,
627
],
[
627,
628
],
[
627,
629
],
[
621,
630
],
[
630,
631
],
[
630,
632
],
[
632,
633
],
[
613,
634
],
[
634,
635
],
[
571,
636
],
[
636,
637
],
[
637,
638
],
[
637,
639
],
[
636,
640
],
[
640,
641
],
[
641,
642
],
[
641,
643
],
[
643,
644
],
[
640,
645
],
[
645,
646
],
[
645,
647
],
[
640,
648
],
[
648,
649
],
[
649,
650
],
[
650,
651
],
[
650,
652
],
[
648,
653
],
[
653,
654
],
[
654,
655
],
[
655,
656
],
[
656,
657
],
[
656,
658
],
[
655,
659
],
[
659,
660
],
[
659,
661
],
[
654,
662
],
[
662,
663
],
[
663,
664
],
[
663,
665
],
[
662,
666
],
[
666,
667
],
[
666,
668
],
[
668,
669
],
[
669,
670
],
[
669,
671
],
[
668,
672
],
[
662,
673
],
[
673,
674
],
[
673,
675
],
[
675,
676
],
[
654,
677
],
[
677,
678
],
[
571,
679
],
[
679,
680
],
[
680,
681
],
[
680,
682
],
[
447,
683
],
[
683,
684
],
[
683,
685
],
[
685,
686
],
[
686,
687
],
[
686,
688
],
[
685,
689
],
[
689,
690
],
[
689,
691
],
[
691,
692
],
[
685,
693
],
[
693,
694
],
[
694,
695
],
[
694,
696
],
[
693,
697
],
[
697,
698
],
[
697,
699
],
[
699,
700
],
[
685,
701
],
[
701,
702
],
[
702,
703
],
[
703,
704
],
[
703,
705
],
[
701,
706
],
[
706,
707
],
[
707,
708
],
[
708,
709
],
[
707,
710
],
[
706,
711
],
[
711,
712
],
[
711,
713
],
[
713,
714
],
[
685,
715
],
[
715,
716
],
[
716,
717
],
[
717,
718
],
[
447,
719
],
[
719,
720
],
[
719,
721
],
[
721,
722
],
[
722,
723
],
[
726,
724
],
[
736,
725
],
[
733,
726
],
[
726,
727
],
[
727,
728
],
[
727,
729
],
[
726,
730
],
[
730,
731
],
[
730,
732
],
[
733,
733
],
[
733,
734
],
[
733,
735
],
[
736,
736
],
[
736,
737
],
[
736,
738
],
[
726,
739
],
[
739,
740
],
[
739,
741
],
[
741,
742
],
[
722,
743
],
[
743,
744
],
[
721,
745
],
[
745,
746
],
[
719,
747
],
[
747,
748
],
[
0,
749
],
[
749,
750
],
[
749,
751
]
]
| [
"import java.util.*;\nimport java.io.*;\npublic class Main {\n static class Scan {\n private byte[] buf=new byte[1024];\n private int index;\n private InputStream in;\n private int total;\n public Scan()\n {\n in=System.in;\n }\n public int scan()throws IOException\n {\n if(total<0)\n throw new InputMismatchException();\n if(index>=total)\n {\n index=0;\n total=in.read(buf);\n if(total<=0)\n return -1;\n }\n return buf[index++];\n }\n public int scanInt()throws IOException\n {\n int integer=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n integer*=10;\n integer+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n return neg*integer;\n }\n public double scanDouble()throws IOException\n {\n double doub=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n)&&n!='.')\n {\n if(n>='0'&&n<='9')\n {\n doub*=10;\n doub+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n if(n=='.')\n {\n n=scan();\n double temp=1;\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }\n }\n return doub*neg;\n }\n public String scanString()throws IOException\n {\n StringBuilder sb=new StringBuilder();\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n while(!isWhiteSpace(n))\n {\n sb.append((char)n);\n n=scan();\n }\n return sb.toString();\n }\n private boolean isWhiteSpace(int n)\n {\n if(n==' '||n=='\\n'||n=='\\r'||n=='\\t'||n==-1)\n return true;\n return false;\n }\n }\n \n public static void sort(int arr[],int l,int r) { //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }\n public static void merge(int arr[],int l1,int r1,int l2,int r2) {\n int tmp[]=new int[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }\n \n public static void sort(long arr[],int l,int r) { //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }\n public static void merge(long arr[],int l1,int r1,int l2,int r2) {\n long tmp[]=new long[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }\n \n public static void main(String args[]) throws IOException {\n Scan input=new Scan();\n StringBuilder ans=new StringBuilder(\"\");\n int test=1;\n// test=input.scanInt();\n for(int tt=1;tt<=test;tt++) {\n int n=input.scanInt();\n int cnt=0;\n boolean is_pos=false;\n for(int i=0;i<n;i++) {\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }\n if(is_pos) {\n ans.append(\"Yes\\n\");\n }\n else {\n ans.append(\"No\\n\");\n }\n }\n System.out.println(ans);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n static class Scan {\n private byte[] buf=new byte[1024];\n private int index;\n private InputStream in;\n private int total;\n public Scan()\n {\n in=System.in;\n }\n public int scan()throws IOException\n {\n if(total<0)\n throw new InputMismatchException();\n if(index>=total)\n {\n index=0;\n total=in.read(buf);\n if(total<=0)\n return -1;\n }\n return buf[index++];\n }\n public int scanInt()throws IOException\n {\n int integer=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n integer*=10;\n integer+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n return neg*integer;\n }\n public double scanDouble()throws IOException\n {\n double doub=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n)&&n!='.')\n {\n if(n>='0'&&n<='9')\n {\n doub*=10;\n doub+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n if(n=='.')\n {\n n=scan();\n double temp=1;\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }\n }\n return doub*neg;\n }\n public String scanString()throws IOException\n {\n StringBuilder sb=new StringBuilder();\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n while(!isWhiteSpace(n))\n {\n sb.append((char)n);\n n=scan();\n }\n return sb.toString();\n }\n private boolean isWhiteSpace(int n)\n {\n if(n==' '||n=='\\n'||n=='\\r'||n=='\\t'||n==-1)\n return true;\n return false;\n }\n }\n \n public static void sort(int arr[],int l,int r) { //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }\n public static void merge(int arr[],int l1,int r1,int l2,int r2) {\n int tmp[]=new int[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }\n \n public static void sort(long arr[],int l,int r) { //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }\n public static void merge(long arr[],int l1,int r1,int l2,int r2) {\n long tmp[]=new long[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }\n \n public static void main(String args[]) throws IOException {\n Scan input=new Scan();\n StringBuilder ans=new StringBuilder(\"\");\n int test=1;\n// test=input.scanInt();\n for(int tt=1;tt<=test;tt++) {\n int n=input.scanInt();\n int cnt=0;\n boolean is_pos=false;\n for(int i=0;i<n;i++) {\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }\n if(is_pos) {\n ans.append(\"Yes\\n\");\n }\n else {\n ans.append(\"No\\n\");\n }\n }\n System.out.println(ans);\n }\n}",
"Main",
"public static void sort(int arr[],int l,int r) { //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }",
"sort",
"{ //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }",
"if(l==r) {\n return;\n }",
"l==r",
"l",
"r",
"{\n return;\n }",
"return;",
"int mid=(l+r)/2;",
"mid",
"(l+r)/2",
"(l+r)",
"l",
"r",
"2",
"sort(arr,l,mid)",
"sort",
"arr",
"l",
"mid",
"sort(arr,mid+1,r)",
"sort",
"arr",
"mid+1",
"mid",
"1",
"r",
"merge(arr,l,mid,mid+1,r)",
"merge",
"arr",
"l",
"mid",
"mid+1",
"mid",
"1",
"r",
"int arr[]",
"arr",
"int l",
"l",
"int r",
"r",
"public static void merge(int arr[],int l1,int r1,int l2,int r2) {\n int tmp[]=new int[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }",
"merge",
"{\n int tmp[]=new int[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }",
"int tmp[]=new int[r2-l1+1];",
"tmp",
"new int[r2-l1+1]",
"r2-l1+1",
"r2-l1",
"r2",
"l1",
"1",
"int indx1=l1",
"indx1",
"l1",
"indx2=l2;",
"indx2",
"l2",
"for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<tmp.length",
"i",
"tmp.length",
"tmp",
"tmp.length",
"i++",
"i++",
"i",
"{\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }",
"{\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }",
"if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }",
"indx1>r1",
"indx1",
"r1",
"{\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }",
"tmp[i]=arr[indx2]",
"tmp[i]",
"tmp",
"i",
"arr[indx2]",
"arr",
"indx2",
"indx2++",
"indx2",
"continue;",
"if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }",
"indx2>r2",
"indx2",
"r2",
"{\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }",
"tmp[i]=arr[indx1]",
"tmp[i]",
"tmp",
"i",
"arr[indx1]",
"arr",
"indx1",
"indx1++",
"indx1",
"continue;",
"if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }",
"arr[indx1]<arr[indx2]",
"arr[indx1]",
"arr",
"indx1",
"arr[indx2]",
"arr",
"indx2",
"{\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }",
"tmp[i]=arr[indx1]",
"tmp[i]",
"tmp",
"i",
"arr[indx1]",
"arr",
"indx1",
"indx1++",
"indx1",
"continue;",
"tmp[i]=arr[indx2]",
"tmp[i]",
"tmp",
"i",
"arr[indx2]",
"arr",
"indx2",
"indx2++",
"indx2",
"for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }",
"int i=0,j=l1;",
"int i=0",
"i",
"0",
"j=l1;",
"j",
"l1",
"i<tmp.length",
"i",
"tmp.length",
"tmp",
"tmp.length",
"i++,j++",
"i++",
"i",
"j++",
"j",
"{\n arr[j]=tmp[i];\n }",
"{\n arr[j]=tmp[i];\n }",
"arr[j]=tmp[i]",
"arr[j]",
"arr",
"j",
"tmp[i]",
"tmp",
"i",
"int arr[]",
"arr",
"int l1",
"l1",
"int r1",
"r1",
"int l2",
"l2",
"int r2",
"r2",
"public static void sort(long arr[],int l,int r) { //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }",
"sort",
"{ //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }",
"if(l==r) {\n return;\n }",
"l==r",
"l",
"r",
"{\n return;\n }",
"return;",
"int mid=(l+r)/2;",
"mid",
"(l+r)/2",
"(l+r)",
"l",
"r",
"2",
"sort(arr,l,mid)",
"sort",
"arr",
"l",
"mid",
"sort(arr,mid+1,r)",
"sort",
"arr",
"mid+1",
"mid",
"1",
"r",
"merge(arr,l,mid,mid+1,r)",
"merge",
"arr",
"l",
"mid",
"mid+1",
"mid",
"1",
"r",
"long arr[]",
"arr",
"int l",
"l",
"int r",
"r",
"public static void merge(long arr[],int l1,int r1,int l2,int r2) {\n long tmp[]=new long[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }",
"merge",
"{\n long tmp[]=new long[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }",
"long tmp[]=new long[r2-l1+1];",
"tmp",
"new long[r2-l1+1]",
"r2-l1+1",
"r2-l1",
"r2",
"l1",
"1",
"int indx1=l1",
"indx1",
"l1",
"indx2=l2;",
"indx2",
"l2",
"for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<tmp.length",
"i",
"tmp.length",
"tmp",
"tmp.length",
"i++",
"i++",
"i",
"{\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }",
"{\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }",
"if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }",
"indx1>r1",
"indx1",
"r1",
"{\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }",
"tmp[i]=arr[indx2]",
"tmp[i]",
"tmp",
"i",
"arr[indx2]",
"arr",
"indx2",
"indx2++",
"indx2",
"continue;",
"if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }",
"indx2>r2",
"indx2",
"r2",
"{\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }",
"tmp[i]=arr[indx1]",
"tmp[i]",
"tmp",
"i",
"arr[indx1]",
"arr",
"indx1",
"indx1++",
"indx1",
"continue;",
"if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }",
"arr[indx1]<arr[indx2]",
"arr[indx1]",
"arr",
"indx1",
"arr[indx2]",
"arr",
"indx2",
"{\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }",
"tmp[i]=arr[indx1]",
"tmp[i]",
"tmp",
"i",
"arr[indx1]",
"arr",
"indx1",
"indx1++",
"indx1",
"continue;",
"tmp[i]=arr[indx2]",
"tmp[i]",
"tmp",
"i",
"arr[indx2]",
"arr",
"indx2",
"indx2++",
"indx2",
"for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }",
"int i=0,j=l1;",
"int i=0",
"i",
"0",
"j=l1;",
"j",
"l1",
"i<tmp.length",
"i",
"tmp.length",
"tmp",
"tmp.length",
"i++,j++",
"i++",
"i",
"j++",
"j",
"{\n arr[j]=tmp[i];\n }",
"{\n arr[j]=tmp[i];\n }",
"arr[j]=tmp[i]",
"arr[j]",
"arr",
"j",
"tmp[i]",
"tmp",
"i",
"long arr[]",
"arr",
"int l1",
"l1",
"int r1",
"r1",
"int l2",
"l2",
"int r2",
"r2",
"public static void main(String args[]) throws IOException {\n Scan input=new Scan();\n StringBuilder ans=new StringBuilder(\"\");\n int test=1;\n// test=input.scanInt();\n for(int tt=1;tt<=test;tt++) {\n int n=input.scanInt();\n int cnt=0;\n boolean is_pos=false;\n for(int i=0;i<n;i++) {\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }\n if(is_pos) {\n ans.append(\"Yes\\n\");\n }\n else {\n ans.append(\"No\\n\");\n }\n }\n System.out.println(ans);\n }",
"main",
"{\n Scan input=new Scan();\n StringBuilder ans=new StringBuilder(\"\");\n int test=1;\n// test=input.scanInt();\n for(int tt=1;tt<=test;tt++) {\n int n=input.scanInt();\n int cnt=0;\n boolean is_pos=false;\n for(int i=0;i<n;i++) {\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }\n if(is_pos) {\n ans.append(\"Yes\\n\");\n }\n else {\n ans.append(\"No\\n\");\n }\n }\n System.out.println(ans);\n }",
"Scan input=new Scan();",
"input",
"new Scan()",
"StringBuilder ans=new StringBuilder(\"\");",
"ans",
"new StringBuilder(\"\")",
"int test=1;",
"test",
"1",
"for(int tt=1;tt<=test;tt++) {\n int n=input.scanInt();\n int cnt=0;\n boolean is_pos=false;\n for(int i=0;i<n;i++) {\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }\n if(is_pos) {\n ans.append(\"Yes\\n\");\n }\n else {\n ans.append(\"No\\n\");\n }\n }",
"int tt=1;",
"int tt=1;",
"tt",
"1",
"tt<=test",
"tt",
"test",
"tt++",
"tt++",
"tt",
"{\n int n=input.scanInt();\n int cnt=0;\n boolean is_pos=false;\n for(int i=0;i<n;i++) {\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }\n if(is_pos) {\n ans.append(\"Yes\\n\");\n }\n else {\n ans.append(\"No\\n\");\n }\n }",
"{\n int n=input.scanInt();\n int cnt=0;\n boolean is_pos=false;\n for(int i=0;i<n;i++) {\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }\n if(is_pos) {\n ans.append(\"Yes\\n\");\n }\n else {\n ans.append(\"No\\n\");\n }\n }",
"int n=input.scanInt();",
"n",
"input.scanInt()",
"input.scanInt",
"input",
"int cnt=0;",
"cnt",
"0",
"boolean is_pos=false;",
"is_pos",
"false",
"for(int i=0;i<n;i++) {\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }",
"{\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }",
"int a=input.scanInt();",
"a",
"input.scanInt()",
"input.scanInt",
"input",
"int b=input.scanInt();",
"b",
"input.scanInt()",
"input.scanInt",
"input",
"if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }",
"a==b",
"a",
"b",
"{\n cnt++;\n }",
"cnt++",
"cnt",
"{\n cnt=0;\n }",
"cnt=0",
"cnt",
"0",
"if(cnt>=3) {\n is_pos=true;\n }",
"cnt>=3",
"cnt",
"3",
"{\n is_pos=true;\n }",
"is_pos=true",
"is_pos",
"true",
"if(is_pos) {\n ans.append(\"Yes\\n\");\n }\n else {\n ans.append(\"No\\n\");\n }",
"is_pos",
"{\n ans.append(\"Yes\\n\");\n }",
"ans.append(\"Yes\\n\")",
"ans.append",
"ans",
"\"Yes\\n\"",
"{\n ans.append(\"No\\n\");\n }",
"ans.append(\"No\\n\")",
"ans.append",
"ans",
"\"No\\n\"",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String args[]",
"args",
"static class Scan {\n private byte[] buf=new byte[1024];\n private int index;\n private InputStream in;\n private int total;\n public Scan()\n {\n in=System.in;\n }\n public int scan()throws IOException\n {\n if(total<0)\n throw new InputMismatchException();\n if(index>=total)\n {\n index=0;\n total=in.read(buf);\n if(total<=0)\n return -1;\n }\n return buf[index++];\n }\n public int scanInt()throws IOException\n {\n int integer=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n integer*=10;\n integer+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n return neg*integer;\n }\n public double scanDouble()throws IOException\n {\n double doub=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n)&&n!='.')\n {\n if(n>='0'&&n<='9')\n {\n doub*=10;\n doub+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n if(n=='.')\n {\n n=scan();\n double temp=1;\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }\n }\n return doub*neg;\n }\n public String scanString()throws IOException\n {\n StringBuilder sb=new StringBuilder();\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n while(!isWhiteSpace(n))\n {\n sb.append((char)n);\n n=scan();\n }\n return sb.toString();\n }\n private boolean isWhiteSpace(int n)\n {\n if(n==' '||n=='\\n'||n=='\\r'||n=='\\t'||n==-1)\n return true;\n return false;\n }\n }",
"Scan",
"private byte[] buf=new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int index;",
"index",
"private InputStream in;",
"in",
"private int total;",
"total",
"public Scan()\n {\n in=System.in;\n }",
"Scan",
"{\n in=System.in;\n }",
"in=System.in",
"in",
"System.in",
"System",
"System.in",
"public int scan()throws IOException\n {\n if(total<0)\n throw new InputMismatchException();\n if(index>=total)\n {\n index=0;\n total=in.read(buf);\n if(total<=0)\n return -1;\n }\n return buf[index++];\n }",
"scan",
"{\n if(total<0)\n throw new InputMismatchException();\n if(index>=total)\n {\n index=0;\n total=in.read(buf);\n if(total<=0)\n return -1;\n }\n return buf[index++];\n }",
"if(total<0)\n throw new InputMismatchException();",
"total<0",
"total",
"0",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if(index>=total)\n {\n index=0;\n total=in.read(buf);\n if(total<=0)\n return -1;\n }",
"index>=total",
"index",
"total",
"{\n index=0;\n total=in.read(buf);\n if(total<=0)\n return -1;\n }",
"index=0",
"index",
"0",
"total=in.read(buf)",
"total",
"in.read(buf)",
"in.read",
"in",
"buf",
"if(total<=0)\n return -1;",
"total<=0",
"total",
"0",
"return -1;",
"-1",
"1",
"return buf[index++];",
"buf[index++]",
"buf",
"index++",
"index",
"public int scanInt()throws IOException\n {\n int integer=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n integer*=10;\n integer+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n return neg*integer;\n }",
"scanInt",
"{\n int integer=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n integer*=10;\n integer+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n return neg*integer;\n }",
"int integer=0;",
"integer",
"0",
"int n=scan();",
"n",
"scan()",
"scan",
"while(isWhiteSpace(n))\n n=scan();",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"n=scan()",
"n",
"scan()",
"scan",
"int neg=1;",
"neg",
"1",
"if(n=='-')\n {\n neg=-1;\n n=scan();\n }",
"n=='-'",
"n",
"'-'",
"{\n neg=-1;\n n=scan();\n }",
"neg=-1",
"neg",
"-1",
"1",
"n=scan()",
"n",
"scan()",
"scan",
"while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n integer*=10;\n integer+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }",
"!isWhiteSpace(n)",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"{\n if(n>='0'&&n<='9')\n {\n integer*=10;\n integer+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }",
"if(n>='0'&&n<='9')\n {\n integer*=10;\n integer+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();",
"n>='0'&&n<='9'",
"n>='0'",
"n",
"'0'",
"n<='9'",
"n",
"'9'",
"{\n integer*=10;\n integer+=n-'0';\n n=scan();\n }",
"integer*=10",
"integer",
"10",
"integer+=n-'0'",
"integer",
"n-'0'",
"n",
"'0'",
"n=scan()",
"n",
"scan()",
"scan",
"throw new InputMismatchException();",
"new InputMismatchException()",
"return neg*integer;",
"neg*integer",
"neg",
"integer",
"public double scanDouble()throws IOException\n {\n double doub=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n)&&n!='.')\n {\n if(n>='0'&&n<='9')\n {\n doub*=10;\n doub+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n if(n=='.')\n {\n n=scan();\n double temp=1;\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }\n }\n return doub*neg;\n }",
"scanDouble",
"{\n double doub=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n)&&n!='.')\n {\n if(n>='0'&&n<='9')\n {\n doub*=10;\n doub+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n if(n=='.')\n {\n n=scan();\n double temp=1;\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }\n }\n return doub*neg;\n }",
"double doub=0;",
"doub",
"0",
"int n=scan();",
"n",
"scan()",
"scan",
"while(isWhiteSpace(n))\n n=scan();",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"n=scan()",
"n",
"scan()",
"scan",
"int neg=1;",
"neg",
"1",
"if(n=='-')\n {\n neg=-1;\n n=scan();\n }",
"n=='-'",
"n",
"'-'",
"{\n neg=-1;\n n=scan();\n }",
"neg=-1",
"neg",
"-1",
"1",
"n=scan()",
"n",
"scan()",
"scan",
"while(!isWhiteSpace(n)&&n!='.')\n {\n if(n>='0'&&n<='9')\n {\n doub*=10;\n doub+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }",
"!isWhiteSpace(n)&&n!='.'",
"!isWhiteSpace(n)",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"n!='.'",
"n",
"'.'",
"{\n if(n>='0'&&n<='9')\n {\n doub*=10;\n doub+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }",
"if(n>='0'&&n<='9')\n {\n doub*=10;\n doub+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();",
"n>='0'&&n<='9'",
"n>='0'",
"n",
"'0'",
"n<='9'",
"n",
"'9'",
"{\n doub*=10;\n doub+=n-'0';\n n=scan();\n }",
"doub*=10",
"doub",
"10",
"doub+=n-'0'",
"doub",
"n-'0'",
"n",
"'0'",
"n=scan()",
"n",
"scan()",
"scan",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if(n=='.')\n {\n n=scan();\n double temp=1;\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }\n }",
"n=='.'",
"n",
"'.'",
"{\n n=scan();\n double temp=1;\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }\n }",
"n=scan()",
"n",
"scan()",
"scan",
"double temp=1;",
"temp",
"1",
"while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }",
"!isWhiteSpace(n)",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"{\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }",
"if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();",
"n>='0'&&n<='9'",
"n>='0'",
"n",
"'0'",
"n<='9'",
"n",
"'9'",
"{\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }",
"temp/=10",
"temp",
"10",
"doub+=(n-'0')*temp",
"doub",
"(n-'0')*temp",
"(n-'0')",
"n",
"'0'",
"temp",
"n=scan()",
"n",
"scan()",
"scan",
"throw new InputMismatchException();",
"new InputMismatchException()",
"return doub*neg;",
"doub*neg",
"doub",
"neg",
"public String scanString()throws IOException\n {\n StringBuilder sb=new StringBuilder();\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n while(!isWhiteSpace(n))\n {\n sb.append((char)n);\n n=scan();\n }\n return sb.toString();\n }",
"scanString",
"{\n StringBuilder sb=new StringBuilder();\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n while(!isWhiteSpace(n))\n {\n sb.append((char)n);\n n=scan();\n }\n return sb.toString();\n }",
"StringBuilder sb=new StringBuilder();",
"sb",
"new StringBuilder()",
"int n=scan();",
"n",
"scan()",
"scan",
"while(isWhiteSpace(n))\n n=scan();",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"n=scan()",
"n",
"scan()",
"scan",
"while(!isWhiteSpace(n))\n {\n sb.append((char)n);\n n=scan();\n }",
"!isWhiteSpace(n)",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"{\n sb.append((char)n);\n n=scan();\n }",
"sb.append((char)n)",
"sb.append",
"sb",
"(char)n",
"n=scan()",
"n",
"scan()",
"scan",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"private boolean isWhiteSpace(int n)\n {\n if(n==' '||n=='\\n'||n=='\\r'||n=='\\t'||n==-1)\n return true;\n return false;\n }",
"isWhiteSpace",
"{\n if(n==' '||n=='\\n'||n=='\\r'||n=='\\t'||n==-1)\n return true;\n return false;\n }",
"if(n==' '||n=='\\n'||n=='\\r'||n=='\\t'||n==-1)\n return true;",
"n==' '||n=='\\n'||n=='\\r'||n=='\\t'||n==-1",
"n=='\\t'",
"n=='\\r'",
"n==' '||n=='\\n'||n=='\\r'||n=='\\t'||n==-1",
"n==' '",
"n",
"' '",
"n=='\\n'",
"n",
"'\\n'",
"n=='\\r'",
"n",
"'\\r'",
"n=='\\t'",
"n",
"'\\t'",
"n==-1",
"n",
"-1",
"1",
"return true;",
"true",
"return false;",
"false",
"int n",
"n",
"public class Main {\n static class Scan {\n private byte[] buf=new byte[1024];\n private int index;\n private InputStream in;\n private int total;\n public Scan()\n {\n in=System.in;\n }\n public int scan()throws IOException\n {\n if(total<0)\n throw new InputMismatchException();\n if(index>=total)\n {\n index=0;\n total=in.read(buf);\n if(total<=0)\n return -1;\n }\n return buf[index++];\n }\n public int scanInt()throws IOException\n {\n int integer=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n integer*=10;\n integer+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n return neg*integer;\n }\n public double scanDouble()throws IOException\n {\n double doub=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n)&&n!='.')\n {\n if(n>='0'&&n<='9')\n {\n doub*=10;\n doub+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n if(n=='.')\n {\n n=scan();\n double temp=1;\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }\n }\n return doub*neg;\n }\n public String scanString()throws IOException\n {\n StringBuilder sb=new StringBuilder();\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n while(!isWhiteSpace(n))\n {\n sb.append((char)n);\n n=scan();\n }\n return sb.toString();\n }\n private boolean isWhiteSpace(int n)\n {\n if(n==' '||n=='\\n'||n=='\\r'||n=='\\t'||n==-1)\n return true;\n return false;\n }\n }\n \n public static void sort(int arr[],int l,int r) { //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }\n public static void merge(int arr[],int l1,int r1,int l2,int r2) {\n int tmp[]=new int[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }\n \n public static void sort(long arr[],int l,int r) { //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }\n public static void merge(long arr[],int l1,int r1,int l2,int r2) {\n long tmp[]=new long[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }\n \n public static void main(String args[]) throws IOException {\n Scan input=new Scan();\n StringBuilder ans=new StringBuilder(\"\");\n int test=1;\n// test=input.scanInt();\n for(int tt=1;tt<=test;tt++) {\n int n=input.scanInt();\n int cnt=0;\n boolean is_pos=false;\n for(int i=0;i<n;i++) {\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }\n if(is_pos) {\n ans.append(\"Yes\\n\");\n }\n else {\n ans.append(\"No\\n\");\n }\n }\n System.out.println(ans);\n }\n}",
"public class Main {\n static class Scan {\n private byte[] buf=new byte[1024];\n private int index;\n private InputStream in;\n private int total;\n public Scan()\n {\n in=System.in;\n }\n public int scan()throws IOException\n {\n if(total<0)\n throw new InputMismatchException();\n if(index>=total)\n {\n index=0;\n total=in.read(buf);\n if(total<=0)\n return -1;\n }\n return buf[index++];\n }\n public int scanInt()throws IOException\n {\n int integer=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n integer*=10;\n integer+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n return neg*integer;\n }\n public double scanDouble()throws IOException\n {\n double doub=0;\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n int neg=1;\n if(n=='-')\n {\n neg=-1;\n n=scan();\n }\n while(!isWhiteSpace(n)&&n!='.')\n {\n if(n>='0'&&n<='9')\n {\n doub*=10;\n doub+=n-'0';\n n=scan();\n }\n else throw new InputMismatchException();\n }\n if(n=='.')\n {\n n=scan();\n double temp=1;\n while(!isWhiteSpace(n))\n {\n if(n>='0'&&n<='9')\n {\n temp/=10;\n doub+=(n-'0')*temp;\n n=scan();\n }\n else throw new InputMismatchException();\n }\n }\n return doub*neg;\n }\n public String scanString()throws IOException\n {\n StringBuilder sb=new StringBuilder();\n int n=scan();\n while(isWhiteSpace(n))\n n=scan();\n while(!isWhiteSpace(n))\n {\n sb.append((char)n);\n n=scan();\n }\n return sb.toString();\n }\n private boolean isWhiteSpace(int n)\n {\n if(n==' '||n=='\\n'||n=='\\r'||n=='\\t'||n==-1)\n return true;\n return false;\n }\n }\n \n public static void sort(int arr[],int l,int r) { //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }\n public static void merge(int arr[],int l1,int r1,int l2,int r2) {\n int tmp[]=new int[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }\n \n public static void sort(long arr[],int l,int r) { //sort(arr,0,n-1);\n if(l==r) {\n return;\n }\n int mid=(l+r)/2;\n sort(arr,l,mid);\n sort(arr,mid+1,r);\n merge(arr,l,mid,mid+1,r);\n }\n public static void merge(long arr[],int l1,int r1,int l2,int r2) {\n long tmp[]=new long[r2-l1+1];\n int indx1=l1,indx2=l2;\n //sorting the two halves using a tmp array\n for(int i=0;i<tmp.length;i++) {\n if(indx1>r1) {\n tmp[i]=arr[indx2];\n indx2++;\n continue;\n }\n if(indx2>r2) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n if(arr[indx1]<arr[indx2]) {\n tmp[i]=arr[indx1];\n indx1++;\n continue;\n }\n tmp[i]=arr[indx2];\n indx2++;\n }\n //Copying the elements of tmp into the main array\n for(int i=0,j=l1;i<tmp.length;i++,j++) {\n arr[j]=tmp[i];\n }\n }\n \n public static void main(String args[]) throws IOException {\n Scan input=new Scan();\n StringBuilder ans=new StringBuilder(\"\");\n int test=1;\n// test=input.scanInt();\n for(int tt=1;tt<=test;tt++) {\n int n=input.scanInt();\n int cnt=0;\n boolean is_pos=false;\n for(int i=0;i<n;i++) {\n int a=input.scanInt();\n int b=input.scanInt();\n if(a==b) {\n cnt++;\n }\n else {\n cnt=0;\n }\n if(cnt>=3) {\n is_pos=true;\n }\n }\n if(is_pos) {\n ans.append(\"Yes\\n\");\n }\n else {\n ans.append(\"No\\n\");\n }\n }\n System.out.println(ans);\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
static class Scan {
private byte[] buf=new byte[1024];
private int index;
private InputStream in;
private int total;
public Scan()
{
in=System.in;
}
public int scan()throws IOException
{
if(total<0)
throw new InputMismatchException();
if(index>=total)
{
index=0;
total=in.read(buf);
if(total<=0)
return -1;
}
return buf[index++];
}
public int scanInt()throws IOException
{
int integer=0;
int n=scan();
while(isWhiteSpace(n))
n=scan();
int neg=1;
if(n=='-')
{
neg=-1;
n=scan();
}
while(!isWhiteSpace(n))
{
if(n>='0'&&n<='9')
{
integer*=10;
integer+=n-'0';
n=scan();
}
else throw new InputMismatchException();
}
return neg*integer;
}
public double scanDouble()throws IOException
{
double doub=0;
int n=scan();
while(isWhiteSpace(n))
n=scan();
int neg=1;
if(n=='-')
{
neg=-1;
n=scan();
}
while(!isWhiteSpace(n)&&n!='.')
{
if(n>='0'&&n<='9')
{
doub*=10;
doub+=n-'0';
n=scan();
}
else throw new InputMismatchException();
}
if(n=='.')
{
n=scan();
double temp=1;
while(!isWhiteSpace(n))
{
if(n>='0'&&n<='9')
{
temp/=10;
doub+=(n-'0')*temp;
n=scan();
}
else throw new InputMismatchException();
}
}
return doub*neg;
}
public String scanString()throws IOException
{
StringBuilder sb=new StringBuilder();
int n=scan();
while(isWhiteSpace(n))
n=scan();
while(!isWhiteSpace(n))
{
sb.append((char)n);
n=scan();
}
return sb.toString();
}
private boolean isWhiteSpace(int n)
{
if(n==' '||n=='\n'||n=='\r'||n=='\t'||n==-1)
return true;
return false;
}
}
public static void sort(int arr[],int l,int r) { //sort(arr,0,n-1);
if(l==r) {
return;
}
int mid=(l+r)/2;
sort(arr,l,mid);
sort(arr,mid+1,r);
merge(arr,l,mid,mid+1,r);
}
public static void merge(int arr[],int l1,int r1,int l2,int r2) {
int tmp[]=new int[r2-l1+1];
int indx1=l1,indx2=l2;
//sorting the two halves using a tmp array
for(int i=0;i<tmp.length;i++) {
if(indx1>r1) {
tmp[i]=arr[indx2];
indx2++;
continue;
}
if(indx2>r2) {
tmp[i]=arr[indx1];
indx1++;
continue;
}
if(arr[indx1]<arr[indx2]) {
tmp[i]=arr[indx1];
indx1++;
continue;
}
tmp[i]=arr[indx2];
indx2++;
}
//Copying the elements of tmp into the main array
for(int i=0,j=l1;i<tmp.length;i++,j++) {
arr[j]=tmp[i];
}
}
public static void sort(long arr[],int l,int r) { //sort(arr,0,n-1);
if(l==r) {
return;
}
int mid=(l+r)/2;
sort(arr,l,mid);
sort(arr,mid+1,r);
merge(arr,l,mid,mid+1,r);
}
public static void merge(long arr[],int l1,int r1,int l2,int r2) {
long tmp[]=new long[r2-l1+1];
int indx1=l1,indx2=l2;
//sorting the two halves using a tmp array
for(int i=0;i<tmp.length;i++) {
if(indx1>r1) {
tmp[i]=arr[indx2];
indx2++;
continue;
}
if(indx2>r2) {
tmp[i]=arr[indx1];
indx1++;
continue;
}
if(arr[indx1]<arr[indx2]) {
tmp[i]=arr[indx1];
indx1++;
continue;
}
tmp[i]=arr[indx2];
indx2++;
}
//Copying the elements of tmp into the main array
for(int i=0,j=l1;i<tmp.length;i++,j++) {
arr[j]=tmp[i];
}
}
public static void main(String args[]) throws IOException {
Scan input=new Scan();
StringBuilder ans=new StringBuilder("");
int test=1;
// test=input.scanInt();
for(int tt=1;tt<=test;tt++) {
int n=input.scanInt();
int cnt=0;
boolean is_pos=false;
for(int i=0;i<n;i++) {
int a=input.scanInt();
int b=input.scanInt();
if(a==b) {
cnt++;
}
else {
cnt=0;
}
if(cnt>=3) {
is_pos=true;
}
}
if(is_pos) {
ans.append("Yes\n");
}
else {
ans.append("No\n");
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
89,
5
],
[
89,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
35,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
35,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
59,
63
],
[
50,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
68,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
6,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
]
| [
"\nimport java.util.Scanner;\n\n/**\n * Created by enpingkuang on 2020/9/19 7:53 下午\n */\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int ans = 0;\n int tmp = 0;\n for(int i = 0;i<n;i++){\n int x,y;\n x = scanner.nextInt();\n y = scanner.nextInt();\n if(x == y){\n tmp++;\n ans = Math.max(ans,tmp);\n }else{\n tmp = 0;\n }\n }\n if(ans >= 3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int ans = 0;\n int tmp = 0;\n for(int i = 0;i<n;i++){\n int x,y;\n x = scanner.nextInt();\n y = scanner.nextInt();\n if(x == y){\n tmp++;\n ans = Math.max(ans,tmp);\n }else{\n tmp = 0;\n }\n }\n if(ans >= 3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int ans = 0;\n int tmp = 0;\n for(int i = 0;i<n;i++){\n int x,y;\n x = scanner.nextInt();\n y = scanner.nextInt();\n if(x == y){\n tmp++;\n ans = Math.max(ans,tmp);\n }else{\n tmp = 0;\n }\n }\n if(ans >= 3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int ans = 0;\n int tmp = 0;\n for(int i = 0;i<n;i++){\n int x,y;\n x = scanner.nextInt();\n y = scanner.nextInt();\n if(x == y){\n tmp++;\n ans = Math.max(ans,tmp);\n }else{\n tmp = 0;\n }\n }\n if(ans >= 3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int ans = 0;",
"ans",
"0",
"int tmp = 0;",
"tmp",
"0",
"for(int i = 0;i<n;i++){\n int x,y;\n x = scanner.nextInt();\n y = scanner.nextInt();\n if(x == y){\n tmp++;\n ans = Math.max(ans,tmp);\n }else{\n tmp = 0;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int x,y;\n x = scanner.nextInt();\n y = scanner.nextInt();\n if(x == y){\n tmp++;\n ans = Math.max(ans,tmp);\n }else{\n tmp = 0;\n }\n }",
"{\n int x,y;\n x = scanner.nextInt();\n y = scanner.nextInt();\n if(x == y){\n tmp++;\n ans = Math.max(ans,tmp);\n }else{\n tmp = 0;\n }\n }",
"int x",
"x",
"y;",
"y",
"x = scanner.nextInt()",
"x",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"y = scanner.nextInt()",
"y",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if(x == y){\n tmp++;\n ans = Math.max(ans,tmp);\n }else{\n tmp = 0;\n }",
"x == y",
"x",
"y",
"{\n tmp++;\n ans = Math.max(ans,tmp);\n }",
"tmp++",
"tmp",
"ans = Math.max(ans,tmp)",
"ans",
"Math.max(ans,tmp)",
"Math.max",
"Math",
"ans",
"tmp",
"{\n tmp = 0;\n }",
"tmp = 0",
"tmp",
"0",
"if(ans >= 3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"ans >= 3",
"ans",
"3",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int ans = 0;\n int tmp = 0;\n for(int i = 0;i<n;i++){\n int x,y;\n x = scanner.nextInt();\n y = scanner.nextInt();\n if(x == y){\n tmp++;\n ans = Math.max(ans,tmp);\n }else{\n tmp = 0;\n }\n }\n if(ans >= 3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n int n = scanner.nextInt();\n int ans = 0;\n int tmp = 0;\n for(int i = 0;i<n;i++){\n int x,y;\n x = scanner.nextInt();\n y = scanner.nextInt();\n if(x == y){\n tmp++;\n ans = Math.max(ans,tmp);\n }else{\n tmp = 0;\n }\n }\n if(ans >= 3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
|
import java.util.Scanner;
/**
* Created by enpingkuang on 2020/9/19 7:53 下午
*/
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
int ans = 0;
int tmp = 0;
for(int i = 0;i<n;i++){
int x,y;
x = scanner.nextInt();
y = scanner.nextInt();
if(x == y){
tmp++;
ans = Math.max(ans,tmp);
}else{
tmp = 0;
}
}
if(ans >= 3){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
41,
13,
4,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
20,
41,
13,
4,
13,
4,
18,
13,
41,
13,
4,
13,
4,
18,
13,
14,
2,
13,
13,
40,
13,
14,
2,
13,
17,
0,
13,
17,
14,
2,
13,
17,
4,
18,
13,
17,
4,
18,
13,
17,
4,
18,
13,
23,
13,
12,
13,
30,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
97,
11
],
[
97,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
14,
30
],
[
30,
31
],
[
30,
32
],
[
14,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
45,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
45,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
73,
75
],
[
14,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
76,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
14,
88
],
[
88,
89
],
[
89,
90
],
[
12,
91
],
[
91,
92
],
[
97,
93
],
[
93,
94
],
[
93,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
]
| [
"import java.io.*;\nimport java.util.*;\n\nimport static java.lang.Integer.*;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st;\n int t = parseInt(in.readLine());\n int cnt = 0;\n for (int i = 0; i < t; i++) {\n st = new StringTokenizer(in.readLine());\n int D1 = parseInt(st.nextToken()), D2 = parseInt(st.nextToken());\n if (D1 == D2) cnt++;\n else if (cnt < 3) cnt = 0;\n\n }\n if (cnt >= 3) pw.println(\"Yes\");\n else pw.println(\"No\");\n pw.close();\n }\n\n static void solve() {\n\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import static java.lang.Integer.*;",
"import static java.lang.Integer.*;",
"import static java.lang.Integer.*;",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st;\n int t = parseInt(in.readLine());\n int cnt = 0;\n for (int i = 0; i < t; i++) {\n st = new StringTokenizer(in.readLine());\n int D1 = parseInt(st.nextToken()), D2 = parseInt(st.nextToken());\n if (D1 == D2) cnt++;\n else if (cnt < 3) cnt = 0;\n\n }\n if (cnt >= 3) pw.println(\"Yes\");\n else pw.println(\"No\");\n pw.close();\n }\n\n static void solve() {\n\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st;\n int t = parseInt(in.readLine());\n int cnt = 0;\n for (int i = 0; i < t; i++) {\n st = new StringTokenizer(in.readLine());\n int D1 = parseInt(st.nextToken()), D2 = parseInt(st.nextToken());\n if (D1 == D2) cnt++;\n else if (cnt < 3) cnt = 0;\n\n }\n if (cnt >= 3) pw.println(\"Yes\");\n else pw.println(\"No\");\n pw.close();\n }",
"main",
"{\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st;\n int t = parseInt(in.readLine());\n int cnt = 0;\n for (int i = 0; i < t; i++) {\n st = new StringTokenizer(in.readLine());\n int D1 = parseInt(st.nextToken()), D2 = parseInt(st.nextToken());\n if (D1 == D2) cnt++;\n else if (cnt < 3) cnt = 0;\n\n }\n if (cnt >= 3) pw.println(\"Yes\");\n else pw.println(\"No\");\n pw.close();\n }",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"StringTokenizer st;",
"st",
"int t = parseInt(in.readLine());",
"t",
"parseInt(in.readLine())",
"parseInt",
"in.readLine()",
"in.readLine",
"in",
"int cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < t; i++) {\n st = new StringTokenizer(in.readLine());\n int D1 = parseInt(st.nextToken()), D2 = parseInt(st.nextToken());\n if (D1 == D2) cnt++;\n else if (cnt < 3) cnt = 0;\n\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < t",
"i",
"t",
"i++",
"i++",
"i",
"{\n st = new StringTokenizer(in.readLine());\n int D1 = parseInt(st.nextToken()), D2 = parseInt(st.nextToken());\n if (D1 == D2) cnt++;\n else if (cnt < 3) cnt = 0;\n\n }",
"{\n st = new StringTokenizer(in.readLine());\n int D1 = parseInt(st.nextToken()), D2 = parseInt(st.nextToken());\n if (D1 == D2) cnt++;\n else if (cnt < 3) cnt = 0;\n\n }",
"st = new StringTokenizer(in.readLine())",
"st",
"new StringTokenizer(in.readLine())",
"int D1 = parseInt(st.nextToken())",
"D1",
"parseInt(st.nextToken())",
"parseInt",
"st.nextToken()",
"st.nextToken",
"st",
"D2 = parseInt(st.nextToken());",
"D2",
"parseInt(st.nextToken())",
"parseInt",
"st.nextToken()",
"st.nextToken",
"st",
"if (D1 == D2) cnt++;\n else if (cnt < 3) cnt = 0;",
"D1 == D2",
"D1",
"D2",
"cnt++",
"cnt",
"if (cnt < 3) cnt = 0;",
"cnt < 3",
"cnt",
"3",
"cnt = 0",
"cnt",
"0",
"if (cnt >= 3) pw.println(\"Yes\");\n else pw.println(\"No\");",
"cnt >= 3",
"cnt",
"3",
"pw.println(\"Yes\")",
"pw.println",
"pw",
"\"Yes\"",
"pw.println(\"No\")",
"pw.println",
"pw",
"\"No\"",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"static void solve() {\n\n }",
"solve",
"{\n\n }",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st;\n int t = parseInt(in.readLine());\n int cnt = 0;\n for (int i = 0; i < t; i++) {\n st = new StringTokenizer(in.readLine());\n int D1 = parseInt(st.nextToken()), D2 = parseInt(st.nextToken());\n if (D1 == D2) cnt++;\n else if (cnt < 3) cnt = 0;\n\n }\n if (cnt >= 3) pw.println(\"Yes\");\n else pw.println(\"No\");\n pw.close();\n }\n\n static void solve() {\n\n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st;\n int t = parseInt(in.readLine());\n int cnt = 0;\n for (int i = 0; i < t; i++) {\n st = new StringTokenizer(in.readLine());\n int D1 = parseInt(st.nextToken()), D2 = parseInt(st.nextToken());\n if (D1 == D2) cnt++;\n else if (cnt < 3) cnt = 0;\n\n }\n if (cnt >= 3) pw.println(\"Yes\");\n else pw.println(\"No\");\n pw.close();\n }\n\n static void solve() {\n\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
import static java.lang.Integer.*;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(System.out);
StringTokenizer st;
int t = parseInt(in.readLine());
int cnt = 0;
for (int i = 0; i < t; i++) {
st = new StringTokenizer(in.readLine());
int D1 = parseInt(st.nextToken()), D2 = parseInt(st.nextToken());
if (D1 == D2) cnt++;
else if (cnt < 3) cnt = 0;
}
if (cnt >= 3) pw.println("Yes");
else pw.println("No");
pw.close();
}
static void solve() {
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
30,
0,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
21,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
49,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
59,
65
],
[
65,
66
],
[
66,
67
],
[
26,
68
],
[
68,
69
],
[
68,
70
],
[
26,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
71,
81
],
[
81,
82
],
[
82,
83
],
[
71,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
88,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
89,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
88,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
101,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
88,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
116,
122
],
[
115,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
126,
128
],
[
123,
129
],
[
86,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
26,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
138,
143
],
[
134,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
144,
149
],
[
12,
150
],
[
150,
151
]
]
| [
"import java.util.*;\nimport java.lang.*;\nimport java.io.*;\n class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t Scanner sc=new Scanner(System.in);\n\t // BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t int t=1;\n\t // t=sc.nextInt();\n\t //int t=Integer.parseInt(br.readLine());\n\t while(--t>=0){\n\t int n=sc.nextInt();\n\t int a[][]=new int[n][2];\n\t for(int i=0;i<n;i++){\n\t a[i][0]=sc.nextInt();\n\t a[i][1]=sc.nextInt();\n\t }\n\t int k=0;\n\t for(int i=0;i<n-2;i++){\n\t if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){\n\t k=1;\n\t }\n\t \n\t }\n\t if(k==1)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t \n\t }\n\t \n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t Scanner sc=new Scanner(System.in);\n\t // BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t int t=1;\n\t // t=sc.nextInt();\n\t //int t=Integer.parseInt(br.readLine());\n\t while(--t>=0){\n\t int n=sc.nextInt();\n\t int a[][]=new int[n][2];\n\t for(int i=0;i<n;i++){\n\t a[i][0]=sc.nextInt();\n\t a[i][1]=sc.nextInt();\n\t }\n\t int k=0;\n\t for(int i=0;i<n-2;i++){\n\t if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){\n\t k=1;\n\t }\n\t \n\t }\n\t if(k==1)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t \n\t }\n\t \n\t}\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t Scanner sc=new Scanner(System.in);\n\t // BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t int t=1;\n\t // t=sc.nextInt();\n\t //int t=Integer.parseInt(br.readLine());\n\t while(--t>=0){\n\t int n=sc.nextInt();\n\t int a[][]=new int[n][2];\n\t for(int i=0;i<n;i++){\n\t a[i][0]=sc.nextInt();\n\t a[i][1]=sc.nextInt();\n\t }\n\t int k=0;\n\t for(int i=0;i<n-2;i++){\n\t if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){\n\t k=1;\n\t }\n\t \n\t }\n\t if(k==1)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t \n\t }\n\t \n\t}",
"main",
"{\n\t Scanner sc=new Scanner(System.in);\n\t // BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t int t=1;\n\t // t=sc.nextInt();\n\t //int t=Integer.parseInt(br.readLine());\n\t while(--t>=0){\n\t int n=sc.nextInt();\n\t int a[][]=new int[n][2];\n\t for(int i=0;i<n;i++){\n\t a[i][0]=sc.nextInt();\n\t a[i][1]=sc.nextInt();\n\t }\n\t int k=0;\n\t for(int i=0;i<n-2;i++){\n\t if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){\n\t k=1;\n\t }\n\t \n\t }\n\t if(k==1)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t \n\t }\n\t \n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int t=1;",
"t",
"1",
"while(--t>=0){\n\t int n=sc.nextInt();\n\t int a[][]=new int[n][2];\n\t for(int i=0;i<n;i++){\n\t a[i][0]=sc.nextInt();\n\t a[i][1]=sc.nextInt();\n\t }\n\t int k=0;\n\t for(int i=0;i<n-2;i++){\n\t if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){\n\t k=1;\n\t }\n\t \n\t }\n\t if(k==1)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t \n\t }",
"--t>=0",
"--t",
"t",
"0",
"{\n\t int n=sc.nextInt();\n\t int a[][]=new int[n][2];\n\t for(int i=0;i<n;i++){\n\t a[i][0]=sc.nextInt();\n\t a[i][1]=sc.nextInt();\n\t }\n\t int k=0;\n\t for(int i=0;i<n-2;i++){\n\t if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){\n\t k=1;\n\t }\n\t \n\t }\n\t if(k==1)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t \n\t }",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a[][]=new int[n][2];",
"a",
"new int[n][2]",
"n",
"2",
"for(int i=0;i<n;i++){\n\t a[i][0]=sc.nextInt();\n\t a[i][1]=sc.nextInt();\n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t a[i][0]=sc.nextInt();\n\t a[i][1]=sc.nextInt();\n\t }",
"{\n\t a[i][0]=sc.nextInt();\n\t a[i][1]=sc.nextInt();\n\t }",
"a[i][0]=sc.nextInt()",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a[i][1]=sc.nextInt()",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int k=0;",
"k",
"0",
"for(int i=0;i<n-2;i++){\n\t if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){\n\t k=1;\n\t }\n\t \n\t }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n-2",
"i",
"n-2",
"n",
"2",
"i++",
"i++",
"i",
"{\n\t if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){\n\t k=1;\n\t }\n\t \n\t }",
"{\n\t if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){\n\t k=1;\n\t }\n\t \n\t }",
"if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){\n\t k=1;\n\t }",
"a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]",
"a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]",
"a[i][0]==a[i][1]",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"a[i+1][0]==a[i+1][1]",
"a[i+1][0]",
"a[i+1]",
"a",
"i+1",
"i",
"1",
"0",
"a[i+1][1]",
"a[i+1]",
"a",
"i+1",
"i",
"1",
"1",
"a[i+2][0]==a[i+2][1]",
"a[i+2][0]",
"a[i+2]",
"a",
"i+2",
"i",
"2",
"0",
"a[i+2][1]",
"a[i+2]",
"a",
"i+2",
"i",
"2",
"1",
"{\n\t k=1;\n\t }",
"k=1",
"k",
"1",
"if(k==1)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");",
"k==1",
"k",
"1",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc=new Scanner(System.in);
// BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int t=1;
// t=sc.nextInt();
//int t=Integer.parseInt(br.readLine());
while(--t>=0){
int n=sc.nextInt();
int a[][]=new int[n][2];
for(int i=0;i<n;i++){
a[i][0]=sc.nextInt();
a[i][1]=sc.nextInt();
}
int k=0;
for(int i=0;i<n-2;i++){
if(a[i][0]==a[i][1]&&a[i+1][0]==a[i+1][1]&&a[i+2][0]==a[i+2][1]){
k=1;
}
}
if(k==1)
System.out.println("Yes");
else
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
41,
13,
20,
0,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
3,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
103,
11
],
[
103,
12
],
[
12,
13
],
[
103,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
16,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
28,
29
],
[
29,
30
],
[
16,
31
],
[
31,
32
],
[
31,
33
],
[
16,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
46,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
46,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
67,
68
],
[
46,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
69,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
16,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
80,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
16,
94
],
[
94,
95
],
[
95,
96
],
[
16,
97
],
[
97,
98
],
[
98,
99
],
[
14,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
]
| [
"import java.io.BufferedOutputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\npublic class Main {\n public static PrintWriter out;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n out = new PrintWriter(new BufferedOutputStream(System.out));\n int n = Integer.parseInt(sc.next());\n int zoromeCount = 0;\n for (int i = 0; i < n; i++) {\n if (zoromeCount >= 3) {\n break;\n }\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n zoromeCount++;\n } else {\n zoromeCount = 0;\n }\n }\n if (zoromeCount >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n sc.close();\n out.close();\n }\n\n}",
"import java.io.BufferedOutputStream;",
"BufferedOutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static PrintWriter out;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n out = new PrintWriter(new BufferedOutputStream(System.out));\n int n = Integer.parseInt(sc.next());\n int zoromeCount = 0;\n for (int i = 0; i < n; i++) {\n if (zoromeCount >= 3) {\n break;\n }\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n zoromeCount++;\n } else {\n zoromeCount = 0;\n }\n }\n if (zoromeCount >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n sc.close();\n out.close();\n }\n\n}",
"Main",
"public static PrintWriter out;",
"out",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n out = new PrintWriter(new BufferedOutputStream(System.out));\n int n = Integer.parseInt(sc.next());\n int zoromeCount = 0;\n for (int i = 0; i < n; i++) {\n if (zoromeCount >= 3) {\n break;\n }\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n zoromeCount++;\n } else {\n zoromeCount = 0;\n }\n }\n if (zoromeCount >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n sc.close();\n out.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n out = new PrintWriter(new BufferedOutputStream(System.out));\n int n = Integer.parseInt(sc.next());\n int zoromeCount = 0;\n for (int i = 0; i < n; i++) {\n if (zoromeCount >= 3) {\n break;\n }\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n zoromeCount++;\n } else {\n zoromeCount = 0;\n }\n }\n if (zoromeCount >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n sc.close();\n out.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"out = new PrintWriter(new BufferedOutputStream(System.out))",
"out",
"new PrintWriter(new BufferedOutputStream(System.out))",
"int n = Integer.parseInt(sc.next());",
"n",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int zoromeCount = 0;",
"zoromeCount",
"0",
"for (int i = 0; i < n; i++) {\n if (zoromeCount >= 3) {\n break;\n }\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n zoromeCount++;\n } else {\n zoromeCount = 0;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (zoromeCount >= 3) {\n break;\n }\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n zoromeCount++;\n } else {\n zoromeCount = 0;\n }\n }",
"{\n if (zoromeCount >= 3) {\n break;\n }\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n zoromeCount++;\n } else {\n zoromeCount = 0;\n }\n }",
"if (zoromeCount >= 3) {\n break;\n }",
"zoromeCount >= 3",
"zoromeCount",
"3",
"{\n break;\n }",
"break;",
"int d1 = Integer.parseInt(sc.next());",
"d1",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int d2 = Integer.parseInt(sc.next());",
"d2",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"if (d1 == d2) {\n zoromeCount++;\n } else {\n zoromeCount = 0;\n }",
"d1 == d2",
"d1",
"d2",
"{\n zoromeCount++;\n }",
"zoromeCount++",
"zoromeCount",
"{\n zoromeCount = 0;\n }",
"zoromeCount = 0",
"zoromeCount",
"0",
"if (zoromeCount >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }",
"zoromeCount >= 3",
"zoromeCount",
"3",
"{\n out.println(\"Yes\");\n }",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"{\n out.println(\"No\");\n }",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"sc.close()",
"sc.close",
"sc",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"public class Main {\n public static PrintWriter out;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n out = new PrintWriter(new BufferedOutputStream(System.out));\n int n = Integer.parseInt(sc.next());\n int zoromeCount = 0;\n for (int i = 0; i < n; i++) {\n if (zoromeCount >= 3) {\n break;\n }\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n zoromeCount++;\n } else {\n zoromeCount = 0;\n }\n }\n if (zoromeCount >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n sc.close();\n out.close();\n }\n\n}",
"public class Main {\n public static PrintWriter out;\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n out = new PrintWriter(new BufferedOutputStream(System.out));\n int n = Integer.parseInt(sc.next());\n int zoromeCount = 0;\n for (int i = 0; i < n; i++) {\n if (zoromeCount >= 3) {\n break;\n }\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n zoromeCount++;\n } else {\n zoromeCount = 0;\n }\n }\n if (zoromeCount >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n sc.close();\n out.close();\n }\n\n}",
"Main"
]
| import java.io.BufferedOutputStream;
import java.io.PrintWriter;
import java.util.Scanner;
public class Main {
public static PrintWriter out;
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
out = new PrintWriter(new BufferedOutputStream(System.out));
int n = Integer.parseInt(sc.next());
int zoromeCount = 0;
for (int i = 0; i < n; i++) {
if (zoromeCount >= 3) {
break;
}
int d1 = Integer.parseInt(sc.next());
int d2 = Integer.parseInt(sc.next());
if (d1 == d2) {
zoromeCount++;
} else {
zoromeCount = 0;
}
}
if (zoromeCount >= 3) {
out.println("Yes");
} else {
out.println("No");
}
sc.close();
out.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
0,
13,
17,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
11,
1,
0,
13,
4,
13,
2,
13,
17,
1,
0,
13,
4,
13,
30,
41,
13,
20,
11,
1,
2,
13,
17,
1,
0,
13,
4,
13,
30,
30,
4,
18,
13,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
41,
13,
17,
11,
1,
0,
13,
4,
13,
2,
13,
17,
1,
0,
13,
4,
13,
30,
41,
13,
2,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
4,
13,
11,
1,
2,
2,
13,
17,
2,
13,
17,
1,
0,
13,
4,
13,
30,
30,
0,
13,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
29,
8,
13,
40,
13,
13,
12,
13,
30,
41,
13,
41,
13,
17,
11,
1,
0,
13,
4,
13,
2,
13,
17,
1,
0,
13,
4,
13,
30,
41,
13,
2,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
4,
13,
11,
1,
2,
2,
13,
17,
2,
13,
17,
1,
0,
13,
4,
13,
30,
30,
0,
13,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
29,
8,
13,
40,
13,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
349,
11
],
[
349,
12
],
[
12,
13
],
[
12,
14
],
[
349,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
24,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
29,
35
],
[
35,
36
],
[
35,
37
],
[
29,
38
],
[
38,
39
],
[
38,
40
],
[
29,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
53,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
64,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
53,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
29,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
83,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
17,
95
],
[
95,
96
],
[
96,
97
],
[
17,
98
],
[
98,
99
],
[
99,
100
],
[
15,
101
],
[
101,
102
],
[
349,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
103,
109
],
[
109,
110
],
[
103,
111
],
[
111,
112
],
[
103,
113
],
[
113,
114
],
[
103,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
115,
121
],
[
121,
122
],
[
103,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
130,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
125,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
103,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
158,
164
],
[
164,
165
],
[
164,
166
],
[
158,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
158,
172
],
[
155,
173
],
[
173,
174
],
[
173,
175
],
[
155,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
178,
180
],
[
176,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
176,
186
],
[
187,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
188,
191
],
[
155,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
103,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
198,
201
],
[
201,
202
],
[
201,
203
],
[
198,
204
],
[
204,
205
],
[
205,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
204,
210
],
[
210,
211
],
[
210,
212
],
[
204,
213
],
[
213,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
204,
218
],
[
198,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
221,
223
],
[
198,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
226,
228
],
[
225,
229
],
[
229,
230
],
[
229,
231
],
[
224,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
235,
236
],
[
198,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
239,
243
],
[
243,
244
],
[
243,
245
],
[
237,
246
],
[
246,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
237,
251
],
[
252,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
256,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
256,
260
],
[
260,
261
],
[
260,
262
],
[
256,
263
],
[
263,
264
],
[
263,
265
],
[
198,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
267,
271
],
[
103,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
275,
276
],
[
274,
277
],
[
277,
278
],
[
277,
279
],
[
274,
280
],
[
280,
281
],
[
281,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
280,
286
],
[
286,
287
],
[
286,
288
],
[
280,
289
],
[
289,
290
],
[
290,
291
],
[
290,
292
],
[
292,
293
],
[
280,
294
],
[
274,
295
],
[
295,
296
],
[
295,
297
],
[
297,
298
],
[
297,
299
],
[
274,
300
],
[
300,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
301,
305
],
[
305,
306
],
[
305,
307
],
[
300,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
274,
313
],
[
313,
314
],
[
313,
315
],
[
315,
316
],
[
316,
317
],
[
316,
318
],
[
315,
319
],
[
319,
320
],
[
319,
321
],
[
313,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
325,
326
],
[
313,
327
],
[
328,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
332,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
332,
336
],
[
336,
337
],
[
336,
338
],
[
332,
339
],
[
339,
340
],
[
339,
341
],
[
274,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
345,
346
],
[
343,
347
],
[
0,
348
],
[
348,
349
],
[
348,
350
]
]
| [
"//package com.company;\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n//****Use Integer Wrapper Class for Arrays.sort()****\npublic class Main {\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));\n public static void main(String[] Args)throws Exception{\n FastReader scan=new FastReader(System.in);\n int t=1;\n// t=scan.nextInt();\n while(t-->0){\n int n=scan.nextInt();\n int c=0;\n boolean flag=false;\n for(int i=0;i<n;i++){\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }\n if(flag){\n out.println(\"Yes\");\n }else{\n out.println(\"No\");\n }\n }\n out.flush();\n out.close();\n }\n static class FastReader {\n\n byte[] buf = new byte[2048];\n int index, total;\n InputStream in;\n\n FastReader(InputStream is) {\n in = is;\n }\n\n int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0) {\n return -1;\n }\n }\n return buf[index++];\n }\n\n String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan()) ;\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan()) {\n sb.append((char) c);\n }\n return sb.toString();\n }\n\n int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }\n long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));\n public static void main(String[] Args)throws Exception{\n FastReader scan=new FastReader(System.in);\n int t=1;\n// t=scan.nextInt();\n while(t-->0){\n int n=scan.nextInt();\n int c=0;\n boolean flag=false;\n for(int i=0;i<n;i++){\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }\n if(flag){\n out.println(\"Yes\");\n }else{\n out.println(\"No\");\n }\n }\n out.flush();\n out.close();\n }\n static class FastReader {\n\n byte[] buf = new byte[2048];\n int index, total;\n InputStream in;\n\n FastReader(InputStream is) {\n in = is;\n }\n\n int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0) {\n return -1;\n }\n }\n return buf[index++];\n }\n\n String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan()) ;\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan()) {\n sb.append((char) c);\n }\n return sb.toString();\n }\n\n int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }\n long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }\n }\n}",
"Main",
"static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));",
"out",
"new PrintWriter(new OutputStreamWriter(System.out))",
"public static void main(String[] Args)throws Exception{\n FastReader scan=new FastReader(System.in);\n int t=1;\n// t=scan.nextInt();\n while(t-->0){\n int n=scan.nextInt();\n int c=0;\n boolean flag=false;\n for(int i=0;i<n;i++){\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }\n if(flag){\n out.println(\"Yes\");\n }else{\n out.println(\"No\");\n }\n }\n out.flush();\n out.close();\n }",
"main",
"{\n FastReader scan=new FastReader(System.in);\n int t=1;\n// t=scan.nextInt();\n while(t-->0){\n int n=scan.nextInt();\n int c=0;\n boolean flag=false;\n for(int i=0;i<n;i++){\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }\n if(flag){\n out.println(\"Yes\");\n }else{\n out.println(\"No\");\n }\n }\n out.flush();\n out.close();\n }",
"FastReader scan=new FastReader(System.in);",
"scan",
"new FastReader(System.in)",
"int t=1;",
"t",
"1",
"while(t-->0){\n int n=scan.nextInt();\n int c=0;\n boolean flag=false;\n for(int i=0;i<n;i++){\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }\n if(flag){\n out.println(\"Yes\");\n }else{\n out.println(\"No\");\n }\n }",
"t-->0",
"t--",
"t",
"0",
"{\n int n=scan.nextInt();\n int c=0;\n boolean flag=false;\n for(int i=0;i<n;i++){\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }\n if(flag){\n out.println(\"Yes\");\n }else{\n out.println(\"No\");\n }\n }",
"int n=scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int c=0;",
"c",
"0",
"boolean flag=false;",
"flag",
"false",
"for(int i=0;i<n;i++){\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }",
"{\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }",
"int d1=scan.nextInt();",
"d1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int d2=scan.nextInt();",
"d2",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(d1==d2){\n c++;\n }else{\n c=0;\n }",
"d1==d2",
"d1",
"d2",
"{\n c++;\n }",
"c++",
"c",
"{\n c=0;\n }",
"c=0",
"c",
"0",
"if(c==3){\n flag=true;\n }",
"c==3",
"c",
"3",
"{\n flag=true;\n }",
"flag=true",
"flag",
"true",
"if(flag){\n out.println(\"Yes\");\n }else{\n out.println(\"No\");\n }",
"flag",
"{\n out.println(\"Yes\");\n }",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"{\n out.println(\"No\");\n }",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"out.flush()",
"out.flush",
"out",
"out.close()",
"out.close",
"out",
"String[] Args",
"Args",
"static class FastReader {\n\n byte[] buf = new byte[2048];\n int index, total;\n InputStream in;\n\n FastReader(InputStream is) {\n in = is;\n }\n\n int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0) {\n return -1;\n }\n }\n return buf[index++];\n }\n\n String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan()) ;\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan()) {\n sb.append((char) c);\n }\n return sb.toString();\n }\n\n int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }\n long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }\n }",
"FastReader",
"byte[] buf = new byte[2048];",
"buf",
"new byte[2048]",
"2048",
"int index",
"index",
"total;",
"total",
"InputStream in;",
"in",
"FastReader(InputStream is) {\n in = is;\n }",
"FastReader",
"{\n in = is;\n }",
"in = is",
"in",
"is",
"InputStream is",
"is",
"int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0) {\n return -1;\n }\n }\n return buf[index++];\n }",
"scan",
"{\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0) {\n return -1;\n }\n }\n return buf[index++];\n }",
"if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0) {\n return -1;\n }\n }",
"index >= total",
"index",
"total",
"{\n index = 0;\n total = in.read(buf);\n if (total <= 0) {\n return -1;\n }\n }",
"index = 0",
"index",
"0",
"total = in.read(buf)",
"total",
"in.read(buf)",
"in.read",
"in",
"buf",
"if (total <= 0) {\n return -1;\n }",
"total <= 0",
"total",
"0",
"{\n return -1;\n }",
"return -1;",
"-1",
"1",
"return buf[index++];",
"buf[index++]",
"buf",
"index++",
"index",
"String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan()) ;\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan()) {\n sb.append((char) c);\n }\n return sb.toString();\n }",
"next",
"{\n int c;\n for (c = scan(); c <= 32; c = scan()) ;\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan()) {\n sb.append((char) c);\n }\n return sb.toString();\n }",
"int c;",
"c",
"for (c = scan(); c <= 32; c = scan()) ;",
"c = scan();",
"c = scan()",
"c",
"scan()",
"scan",
"c <= 32",
"c",
"32",
"c = scan()",
"c = scan()",
"c",
"scan()",
"scan",
";",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"for (; c > 32; c = scan()) {\n sb.append((char) c);\n }",
";",
"c > 32",
"c",
"32",
"c = scan()",
"c = scan()",
"c",
"scan()",
"scan",
"{\n sb.append((char) c);\n }",
"{\n sb.append((char) c);\n }",
"sb.append((char) c)",
"sb.append",
"sb",
"(char) c",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }",
"nextInt",
"{\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }",
"int c",
"c",
"val = 0;",
"val",
"0",
"for (c = scan(); c <= 32; c = scan()) ;",
"c = scan();",
"c = scan()",
"c",
"scan()",
"scan",
"c <= 32",
"c",
"32",
"c = scan()",
"c = scan()",
"c",
"scan()",
"scan",
";",
"boolean neg = c == '-';",
"neg",
"c == '-'",
"c",
"'-'",
"if (c == '-' || c == '+') {\n c = scan();\n }",
"c == '-' || c == '+'",
"c == '-'",
"c",
"'-'",
"c == '+'",
"c",
"'+'",
"{\n c = scan();\n }",
"c = scan()",
"c",
"scan()",
"scan",
"for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }",
";",
"c >= '0' && c <= '9'",
"c >= '0'",
"c",
"'0'",
"c <= '9'",
"c",
"'9'",
"c = scan()",
"c = scan()",
"c",
"scan()",
"scan",
"{\n val = (val << 3) + (val << 1) + (c & 15);\n }",
"{\n val = (val << 3) + (val << 1) + (c & 15);\n }",
"val = (val << 3) + (val << 1) + (c & 15)",
"val",
"(val << 3) + (val << 1) + (c & 15)",
"(val << 3) + (val << 1) + (c & 15)",
"(val << 3)",
"val",
"3",
"(val << 1)",
"val",
"1",
"(c & 15)",
"c",
"15",
"return neg ? -val : val;",
"neg ? -val : val",
"neg",
"-val",
"val",
"val",
"long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }",
"nextLong",
"{\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }",
"int c;",
"c",
"long val = 0;",
"val",
"0",
"for (c = scan(); c <= 32; c = scan()) ;",
"c = scan();",
"c = scan()",
"c",
"scan()",
"scan",
"c <= 32",
"c",
"32",
"c = scan()",
"c = scan()",
"c",
"scan()",
"scan",
";",
"boolean neg = c == '-';",
"neg",
"c == '-'",
"c",
"'-'",
"if (c == '-' || c == '+') {\n c = scan();\n }",
"c == '-' || c == '+'",
"c == '-'",
"c",
"'-'",
"c == '+'",
"c",
"'+'",
"{\n c = scan();\n }",
"c = scan()",
"c",
"scan()",
"scan",
"for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }",
";",
"c >= '0' && c <= '9'",
"c >= '0'",
"c",
"'0'",
"c <= '9'",
"c",
"'9'",
"c = scan()",
"c = scan()",
"c",
"scan()",
"scan",
"{\n val = (val << 3) + (val << 1) + (c & 15);\n }",
"{\n val = (val << 3) + (val << 1) + (c & 15);\n }",
"val = (val << 3) + (val << 1) + (c & 15)",
"val",
"(val << 3) + (val << 1) + (c & 15)",
"(val << 3) + (val << 1) + (c & 15)",
"(val << 3)",
"val",
"3",
"(val << 1)",
"val",
"1",
"(c & 15)",
"c",
"15",
"return neg ? -val : val;",
"neg ? -val : val",
"neg",
"-val",
"val",
"val",
"public class Main {\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));\n public static void main(String[] Args)throws Exception{\n FastReader scan=new FastReader(System.in);\n int t=1;\n// t=scan.nextInt();\n while(t-->0){\n int n=scan.nextInt();\n int c=0;\n boolean flag=false;\n for(int i=0;i<n;i++){\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }\n if(flag){\n out.println(\"Yes\");\n }else{\n out.println(\"No\");\n }\n }\n out.flush();\n out.close();\n }\n static class FastReader {\n\n byte[] buf = new byte[2048];\n int index, total;\n InputStream in;\n\n FastReader(InputStream is) {\n in = is;\n }\n\n int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0) {\n return -1;\n }\n }\n return buf[index++];\n }\n\n String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan()) ;\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan()) {\n sb.append((char) c);\n }\n return sb.toString();\n }\n\n int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }\n long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }\n }\n}",
"public class Main {\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));\n public static void main(String[] Args)throws Exception{\n FastReader scan=new FastReader(System.in);\n int t=1;\n// t=scan.nextInt();\n while(t-->0){\n int n=scan.nextInt();\n int c=0;\n boolean flag=false;\n for(int i=0;i<n;i++){\n int d1=scan.nextInt();\n int d2=scan.nextInt();\n if(d1==d2){\n c++;\n }else{\n c=0;\n }\n if(c==3){\n flag=true;\n }\n }\n if(flag){\n out.println(\"Yes\");\n }else{\n out.println(\"No\");\n }\n }\n out.flush();\n out.close();\n }\n static class FastReader {\n\n byte[] buf = new byte[2048];\n int index, total;\n InputStream in;\n\n FastReader(InputStream is) {\n in = is;\n }\n\n int scan() throws IOException {\n if (index >= total) {\n index = 0;\n total = in.read(buf);\n if (total <= 0) {\n return -1;\n }\n }\n return buf[index++];\n }\n\n String next() throws IOException {\n int c;\n for (c = scan(); c <= 32; c = scan()) ;\n StringBuilder sb = new StringBuilder();\n for (; c > 32; c = scan()) {\n sb.append((char) c);\n }\n return sb.toString();\n }\n\n int nextInt() throws IOException {\n int c, val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }\n long nextLong() throws IOException {\n int c;\n long val = 0;\n for (c = scan(); c <= 32; c = scan()) ;\n boolean neg = c == '-';\n if (c == '-' || c == '+') {\n c = scan();\n }\n for (; c >= '0' && c <= '9'; c = scan()) {\n val = (val << 3) + (val << 1) + (c & 15);\n }\n return neg ? -val : val;\n }\n }\n}",
"Main"
]
| //package com.company;
import java.util.*;
import java.lang.*;
import java.io.*;
//****Use Integer Wrapper Class for Arrays.sort()****
public class Main {
static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
public static void main(String[] Args)throws Exception{
FastReader scan=new FastReader(System.in);
int t=1;
// t=scan.nextInt();
while(t-->0){
int n=scan.nextInt();
int c=0;
boolean flag=false;
for(int i=0;i<n;i++){
int d1=scan.nextInt();
int d2=scan.nextInt();
if(d1==d2){
c++;
}else{
c=0;
}
if(c==3){
flag=true;
}
}
if(flag){
out.println("Yes");
}else{
out.println("No");
}
}
out.flush();
out.close();
}
static class FastReader {
byte[] buf = new byte[2048];
int index, total;
InputStream in;
FastReader(InputStream is) {
in = is;
}
int scan() throws IOException {
if (index >= total) {
index = 0;
total = in.read(buf);
if (total <= 0) {
return -1;
}
}
return buf[index++];
}
String next() throws IOException {
int c;
for (c = scan(); c <= 32; c = scan()) ;
StringBuilder sb = new StringBuilder();
for (; c > 32; c = scan()) {
sb.append((char) c);
}
return sb.toString();
}
int nextInt() throws IOException {
int c, val = 0;
for (c = scan(); c <= 32; c = scan()) ;
boolean neg = c == '-';
if (c == '-' || c == '+') {
c = scan();
}
for (; c >= '0' && c <= '9'; c = scan()) {
val = (val << 3) + (val << 1) + (c & 15);
}
return neg ? -val : val;
}
long nextLong() throws IOException {
int c;
long val = 0;
for (c = scan(); c <= 32; c = scan()) ;
boolean neg = c == '-';
if (c == '-' || c == '+') {
c = scan();
}
for (; c >= '0' && c <= '9'; c = scan()) {
val = (val << 3) + (val << 1) + (c & 15);
}
return neg ? -val : val;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
17,
13,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
17,
1,
0,
13,
2,
13,
40,
13,
30,
30,
0,
13,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
13,
2,
13,
18,
13,
13,
1,
0,
13,
2,
13,
40,
13,
30,
30,
0,
18,
13,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
17,
12,
13,
30,
0,
13,
20,
13,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
0,
18,
13,
13,
17,
23,
13,
12,
13,
30,
14,
2,
18,
13,
13,
13,
29,
13,
29,
0,
18,
13,
13,
4,
13,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
41,
13,
4,
13,
13,
14,
2,
13,
13,
29,
0,
18,
13,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
13,
4,
18,
13,
13,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
41,
13,
4,
13,
13,
29,
2,
13,
13,
23,
13,
23,
13,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
13,
29,
4,
13,
2,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
2,
13,
13,
17,
2,
13,
13,
2,
2,
13,
13,
17,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
17,
30,
41,
13,
2,
2,
13,
13,
13,
29,
4,
13,
13,
2,
13,
17,
30,
29,
2,
2,
13,
4,
13,
13,
2,
13,
17,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
29,
17,
30,
41,
13,
4,
18,
13,
14,
2,
13,
17,
30,
29,
17,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
6,
13,
12,
13,
23,
13,
23,
13,
23,
13,
6,
13,
12,
13,
30,
23,
13,
23,
13,
23,
13,
13,
6,
13,
12,
13,
30,
23,
13,
23,
13,
23,
13,
13,
6,
13,
12,
13,
30,
23,
13,
23,
13,
23,
13,
13,
6,
13,
12,
13,
30,
23,
13,
23,
13,
23,
13,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
30,
0,
13,
17,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
13,
6,
13,
12,
13,
30,
41,
13,
4,
18,
13,
14,
4,
18,
13,
17,
30,
0,
13,
17,
30,
0,
13,
17,
4,
18,
13,
13,
23,
13,
23,
13,
23,
13,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
597,
23
],
[
597,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
26,
28
],
[
597,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
34,
36
],
[
31,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
31,
42
],
[
42,
43
],
[
42,
44
],
[
31,
45
],
[
45,
46
],
[
45,
47
],
[
31,
48
],
[
48,
49
],
[
48,
50
],
[
31,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
51,
55
],
[
51,
56
],
[
31,
57
],
[
57,
58
],
[
58,
59
],
[
29,
60
],
[
60,
61
],
[
597,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
72,
73
],
[
72,
74
],
[
66,
75
],
[
75,
76
],
[
62,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
83,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
79,
105
],
[
105,
106
],
[
77,
107
],
[
107,
108
],
[
62,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
112,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
112,
129
],
[
130,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
109,
136
],
[
136,
137
],
[
109,
138
],
[
138,
139
],
[
597,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
140,
144
],
[
144,
145
],
[
140,
146
],
[
146,
147
],
[
146,
148
],
[
140,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
151,
156
],
[
156,
157
],
[
156,
158
],
[
151,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
160,
165
],
[
165,
166
],
[
165,
167
],
[
160,
168
],
[
168,
169
],
[
169,
170
],
[
160,
171
],
[
172,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
172,
178
],
[
178,
179
],
[
179,
180
],
[
179,
181
],
[
178,
182
],
[
149,
183
],
[
183,
184
],
[
140,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
189,
193
],
[
188,
194
],
[
194,
195
],
[
187,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
197,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
203,
205
],
[
185,
206
],
[
206,
207
],
[
140,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
213,
215
],
[
210,
216
],
[
216,
217
],
[
216,
218
],
[
218,
219
],
[
218,
220
],
[
210,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
221,
225
],
[
210,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
226,
230
],
[
210,
231
],
[
231,
232
],
[
232,
233
],
[
232,
234
],
[
231,
235
],
[
235,
236
],
[
235,
237
],
[
210,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
240,
243
],
[
240,
244
],
[
244,
245
],
[
244,
246
],
[
208,
247
],
[
247,
248
],
[
208,
249
],
[
249,
250
],
[
140,
251
],
[
251,
252
],
[
251,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
256,
258
],
[
253,
259
],
[
259,
260
],
[
259,
261
],
[
261,
262
],
[
261,
263
],
[
253,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
251,
268
],
[
268,
269
],
[
251,
270
],
[
270,
271
],
[
597,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
277,
278
],
[
278,
279
],
[
278,
280
],
[
277,
281
],
[
281,
282
],
[
282,
283
],
[
276,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
287,
288
],
[
287,
289
],
[
285,
290
],
[
274,
291
],
[
291,
292
],
[
274,
293
],
[
293,
294
],
[
272,
295
],
[
295,
296
],
[
295,
297
],
[
297,
298
],
[
298,
299
],
[
299,
300
],
[
300,
301
],
[
301,
302
],
[
301,
303
],
[
300,
304
],
[
299,
305
],
[
305,
306
],
[
305,
307
],
[
299,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
308,
312
],
[
295,
313
],
[
313,
314
],
[
295,
315
],
[
315,
316
],
[
272,
317
],
[
317,
318
],
[
317,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
320,
324
],
[
324,
325
],
[
325,
326
],
[
319,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
328,
332
],
[
327,
333
],
[
333,
334
],
[
334,
335
],
[
334,
336
],
[
336,
337
],
[
337,
338
],
[
337,
339
],
[
336,
340
],
[
333,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
342,
345
],
[
345,
346
],
[
345,
347
],
[
327,
348
],
[
348,
349
],
[
349,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
353,
355
],
[
353,
356
],
[
356,
357
],
[
356,
358
],
[
350,
359
],
[
317,
360
],
[
360,
361
],
[
317,
362
],
[
362,
363
],
[
597,
364
],
[
364,
365
],
[
364,
366
],
[
366,
367
],
[
364,
368
],
[
368,
369
],
[
364,
370
],
[
370,
371
],
[
370,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
370,
376
],
[
376,
377
],
[
364,
378
],
[
378,
379
],
[
378,
380
],
[
380,
381
],
[
381,
382
],
[
382,
383
],
[
383,
384
],
[
383,
385
],
[
382,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
381,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
392,
394
],
[
394,
395
],
[
395,
396
],
[
391,
397
],
[
397,
398
],
[
398,
399
],
[
398,
400
],
[
400,
401
],
[
401,
402
],
[
397,
403
],
[
403,
404
],
[
404,
405
],
[
404,
406
],
[
403,
407
],
[
407,
408
],
[
408,
409
],
[
397,
410
],
[
410,
411
],
[
410,
412
],
[
380,
413
],
[
413,
414
],
[
414,
415
],
[
415,
416
],
[
364,
417
],
[
417,
418
],
[
417,
419
],
[
419,
420
],
[
420,
421
],
[
421,
422
],
[
422,
423
],
[
421,
424
],
[
424,
425
],
[
364,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
429,
430
],
[
430,
431
],
[
431,
432
],
[
430,
433
],
[
433,
434
],
[
597,
435
],
[
435,
436
],
[
435,
437
],
[
437,
438
],
[
437,
439
],
[
439,
440
],
[
437,
441
],
[
441,
442
],
[
437,
443
],
[
443,
444
],
[
597,
445
],
[
445,
446
],
[
445,
447
],
[
447,
448
],
[
447,
449
],
[
447,
450
],
[
450,
451
],
[
447,
452
],
[
452,
453
],
[
447,
454
],
[
454,
455
],
[
445,
456
],
[
597,
457
],
[
457,
458
],
[
457,
459
],
[
459,
460
],
[
459,
461
],
[
459,
462
],
[
462,
463
],
[
459,
464
],
[
464,
465
],
[
459,
466
],
[
466,
467
],
[
457,
468
],
[
597,
469
],
[
469,
470
],
[
469,
471
],
[
471,
472
],
[
471,
473
],
[
471,
474
],
[
474,
475
],
[
471,
476
],
[
476,
477
],
[
471,
478
],
[
478,
479
],
[
469,
480
],
[
597,
481
],
[
481,
482
],
[
481,
483
],
[
483,
484
],
[
483,
485
],
[
483,
486
],
[
486,
487
],
[
483,
488
],
[
488,
489
],
[
483,
490
],
[
490,
491
],
[
481,
492
],
[
597,
493
],
[
493,
494
],
[
493,
495
],
[
495,
496
],
[
495,
497
],
[
497,
498
],
[
498,
499
],
[
498,
500
],
[
500,
501
],
[
501,
502
],
[
497,
503
],
[
503,
504
],
[
503,
505
],
[
497,
506
],
[
506,
507
],
[
506,
508
],
[
497,
509
],
[
509,
510
],
[
510,
511
],
[
511,
512
],
[
511,
513
],
[
509,
514
],
[
514,
515
],
[
514,
516
],
[
509,
517
],
[
517,
518
],
[
518,
519
],
[
509,
520
],
[
521,
521
],
[
521,
522
],
[
522,
523
],
[
522,
524
],
[
524,
525
],
[
525,
526
],
[
521,
527
],
[
527,
528
],
[
527,
529
],
[
529,
530
],
[
530,
531
],
[
521,
532
],
[
532,
533
],
[
533,
534
],
[
533,
535
],
[
532,
536
],
[
536,
537
],
[
537,
538
],
[
536,
539
],
[
539,
540
],
[
540,
541
],
[
540,
542
],
[
539,
543
],
[
543,
544
],
[
544,
545
],
[
544,
546
],
[
532,
547
],
[
547,
548
],
[
548,
549
],
[
548,
550
],
[
497,
551
],
[
551,
552
],
[
552,
553
],
[
551,
554
],
[
495,
555
],
[
555,
556
],
[
495,
557
],
[
557,
558
],
[
495,
559
],
[
559,
560
],
[
493,
561
],
[
597,
562
],
[
562,
563
],
[
562,
564
],
[
564,
565
],
[
564,
566
],
[
566,
567
],
[
567,
568
],
[
567,
569
],
[
569,
570
],
[
570,
571
],
[
566,
572
],
[
572,
573
],
[
573,
574
],
[
574,
575
],
[
573,
576
],
[
572,
577
],
[
577,
578
],
[
578,
579
],
[
578,
580
],
[
572,
581
],
[
581,
582
],
[
582,
583
],
[
582,
584
],
[
566,
585
],
[
585,
586
],
[
586,
587
],
[
585,
588
],
[
564,
589
],
[
589,
590
],
[
564,
591
],
[
591,
592
],
[
564,
593
],
[
593,
594
],
[
562,
595
],
[
0,
596
],
[
596,
597
],
[
596,
598
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\n\npublic class Main\n{\n\tstatic int MOD = (int) 1e9 + 7;\n\t\n\tstatic class FenwickTree\n\t{\n\t\t// bit[1] ~ bit[n]\n\t\tlong[] bit; // = new long[n+1];\n\t\t\n\t\tpublic FenwickTree(int n)\n\t\t{\n\t\t\tbit = new long[n+1];\n\t\t}\n\t\t\n\t\t// bit[1] + ... + bit[r]\n\t\tlong sum(int r)\n\t\t{\n\t\t\tlong s = 0;\n\t\t\tfor( int i=r; i>0; i-=(i & -i) )\n\t\t\t{\n\t\t\t\ts += bit[i];\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t\t\n\t\tvoid add(int idx, int x)\n\t\t{\n\t\t\tfor( int i=idx; i<bit.length; i+=(i & -i) )\n\t\t\t{\n\t\t\t\tbit[i] += x;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic class UnionFind\n\t{\n\t\tint[] par;\n\t\tint[] n_nodes;\n\t\tint max = 1;\n\t\t\n\t\tpublic UnionFind(int n)\n\t\t{\n\t\t\tpar = new int[n];\n\t\t\tn_nodes = new int[n];\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tpar[i] = i;\n\t\t\t\tn_nodes[i] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint root(int x)\n\t\t{\n\t\t\tif( par[x] == x ) return x;\n\t\t\treturn par[x] = root(par[x]);\n\t\t}\n\t\t\n\t\tvoid unite(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\tif( rx == ry ) return;\n\t\t\tpar[rx] = ry;\n\t\t\tn_nodes[ry] += n_nodes[rx];\n\t\t\tmax = Math.max(max, n_nodes[ry]);\n\t\t}\n\t\t\n\t\tboolean same(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\treturn rx == ry;\n\t\t}\n\t}\n\t\n\tstatic class Calc\n\t{\n\t\tstatic int gcd(int a, int b)\n\t\t{\n\t\t\tif( a == 0 )\n\t\t\t{\n\t\t\t\treturn b;\n\t\t\t}\n\t\t\treturn gcd(b%a, a);\n\t\t}\n\t\t\n\t\tstatic int ceilInt(int a, int b)\n\t\t{\n\t\t\treturn (a%b==0 ? a/b : a/b+1);\n\t\t}\n\n\t\tstatic long power(long x, int n)\n\t\t{\n\t\t\tif( n == 0 )\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif( n % 2 == 0 )\n\t\t\t{\n\t\t\t\tlong X = (x * x) % MOD;\n\t\t\t\treturn power(X, n/2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (x * power(x, n-1)) % MOD;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tstatic class MyScanner\n\t{\n\t\tprivate BufferedReader in;\n\t\tprivate StringTokenizer st;\n\t\t\n\t\tpublic MyScanner(InputStream stream)\n\t\t{\n\t\t\tin = new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\t\n\t\tpublic String next()\n\t\t{\n\t\t\twhile( st == null || !st.hasMoreTokens() )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}\n\t\t\t\tcatch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt()\n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\t\n\tstatic interface Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out);\n\t}\n\t\n\tstatic class F implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\n\tstatic class E implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\n\tstatic class D implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\t\n\tstatic class C implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\t\n\tstatic class B implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tint n = in.nextInt();\n\t\t\tint cnt = 0;\n\t\t\tString judge = \"No\";\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tif( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(judge);\n\t\t}\n\t}\n\n\tstatic class A implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tString s = in.next();\n\t\t\tif( s.endsWith(\"s\") )\n\t\t\t{\n\t\t\t\ts += \"es\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ts += \"s\";\n\t\t\t}\n\t\t\tout.println(s);\n\t\t}\n\t}\n\t\n\tpublic static void main(String[] args)\n\t{\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tSolver solver = new B();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main\n{\n\tstatic int MOD = (int) 1e9 + 7;\n\t\n\tstatic class FenwickTree\n\t{\n\t\t// bit[1] ~ bit[n]\n\t\tlong[] bit; // = new long[n+1];\n\t\t\n\t\tpublic FenwickTree(int n)\n\t\t{\n\t\t\tbit = new long[n+1];\n\t\t}\n\t\t\n\t\t// bit[1] + ... + bit[r]\n\t\tlong sum(int r)\n\t\t{\n\t\t\tlong s = 0;\n\t\t\tfor( int i=r; i>0; i-=(i & -i) )\n\t\t\t{\n\t\t\t\ts += bit[i];\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t\t\n\t\tvoid add(int idx, int x)\n\t\t{\n\t\t\tfor( int i=idx; i<bit.length; i+=(i & -i) )\n\t\t\t{\n\t\t\t\tbit[i] += x;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic class UnionFind\n\t{\n\t\tint[] par;\n\t\tint[] n_nodes;\n\t\tint max = 1;\n\t\t\n\t\tpublic UnionFind(int n)\n\t\t{\n\t\t\tpar = new int[n];\n\t\t\tn_nodes = new int[n];\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tpar[i] = i;\n\t\t\t\tn_nodes[i] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint root(int x)\n\t\t{\n\t\t\tif( par[x] == x ) return x;\n\t\t\treturn par[x] = root(par[x]);\n\t\t}\n\t\t\n\t\tvoid unite(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\tif( rx == ry ) return;\n\t\t\tpar[rx] = ry;\n\t\t\tn_nodes[ry] += n_nodes[rx];\n\t\t\tmax = Math.max(max, n_nodes[ry]);\n\t\t}\n\t\t\n\t\tboolean same(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\treturn rx == ry;\n\t\t}\n\t}\n\t\n\tstatic class Calc\n\t{\n\t\tstatic int gcd(int a, int b)\n\t\t{\n\t\t\tif( a == 0 )\n\t\t\t{\n\t\t\t\treturn b;\n\t\t\t}\n\t\t\treturn gcd(b%a, a);\n\t\t}\n\t\t\n\t\tstatic int ceilInt(int a, int b)\n\t\t{\n\t\t\treturn (a%b==0 ? a/b : a/b+1);\n\t\t}\n\n\t\tstatic long power(long x, int n)\n\t\t{\n\t\t\tif( n == 0 )\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif( n % 2 == 0 )\n\t\t\t{\n\t\t\t\tlong X = (x * x) % MOD;\n\t\t\t\treturn power(X, n/2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (x * power(x, n-1)) % MOD;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tstatic class MyScanner\n\t{\n\t\tprivate BufferedReader in;\n\t\tprivate StringTokenizer st;\n\t\t\n\t\tpublic MyScanner(InputStream stream)\n\t\t{\n\t\t\tin = new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\t\n\t\tpublic String next()\n\t\t{\n\t\t\twhile( st == null || !st.hasMoreTokens() )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}\n\t\t\t\tcatch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt()\n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\t\n\tstatic interface Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out);\n\t}\n\t\n\tstatic class F implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\n\tstatic class E implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\n\tstatic class D implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\t\n\tstatic class C implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\t\n\tstatic class B implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tint n = in.nextInt();\n\t\t\tint cnt = 0;\n\t\t\tString judge = \"No\";\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tif( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(judge);\n\t\t}\n\t}\n\n\tstatic class A implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tString s = in.next();\n\t\t\tif( s.endsWith(\"s\") )\n\t\t\t{\n\t\t\t\ts += \"es\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ts += \"s\";\n\t\t\t}\n\t\t\tout.println(s);\n\t\t}\n\t}\n\t\n\tpublic static void main(String[] args)\n\t{\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tSolver solver = new B();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}\n}",
"Main",
"static int MOD = (int) 1e9 + 7;",
"MOD",
"(int) 1e9 + 7",
"(int) 1e9",
"7",
"public static void main(String[] args)\n\t{\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tSolver solver = new B();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}",
"main",
"{\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tSolver solver = new B();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"MyScanner in = new MyScanner(inputStream);",
"in",
"new MyScanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"Solver solver = new B();",
"solver",
"new B()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class FenwickTree\n\t{\n\t\t// bit[1] ~ bit[n]\n\t\tlong[] bit; // = new long[n+1];\n\t\t\n\t\tpublic FenwickTree(int n)\n\t\t{\n\t\t\tbit = new long[n+1];\n\t\t}\n\t\t\n\t\t// bit[1] + ... + bit[r]\n\t\tlong sum(int r)\n\t\t{\n\t\t\tlong s = 0;\n\t\t\tfor( int i=r; i>0; i-=(i & -i) )\n\t\t\t{\n\t\t\t\ts += bit[i];\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t\t\n\t\tvoid add(int idx, int x)\n\t\t{\n\t\t\tfor( int i=idx; i<bit.length; i+=(i & -i) )\n\t\t\t{\n\t\t\t\tbit[i] += x;\n\t\t\t}\n\t\t}\n\t}",
"FenwickTree",
"// bit[1] ~ bit[n]\n\t\tlong[] bit; // = new long[n+1];",
"bit",
"public FenwickTree(int n)\n\t\t{\n\t\t\tbit = new long[n+1];\n\t\t}",
"FenwickTree",
"{\n\t\t\tbit = new long[n+1];\n\t\t}",
"bit = new long[n+1]",
"bit",
"new long[n+1]",
"n+1",
"n",
"1",
"int n",
"n",
"// bit[1] + ... + bit[r]\n\t\tlong sum(int r)\n\t\t{\n\t\t\tlong s = 0;\n\t\t\tfor( int i=r; i>0; i-=(i & -i) )\n\t\t\t{\n\t\t\t\ts += bit[i];\n\t\t\t}\n\t\t\treturn s;\n\t\t}",
"sum",
"{\n\t\t\tlong s = 0;\n\t\t\tfor( int i=r; i>0; i-=(i & -i) )\n\t\t\t{\n\t\t\t\ts += bit[i];\n\t\t\t}\n\t\t\treturn s;\n\t\t}",
"long s = 0;",
"s",
"0",
"for( int i=r; i>0; i-=(i & -i) )\n\t\t\t{\n\t\t\t\ts += bit[i];\n\t\t\t}",
"int i=r;",
"int i=r;",
"i",
"r",
"i>0",
"i",
"0",
"i-=(i & -i)",
"i-=(i & -i)",
"i",
"(i & -i)",
"i",
"-i",
"i",
"{\n\t\t\t\ts += bit[i];\n\t\t\t}",
"{\n\t\t\t\ts += bit[i];\n\t\t\t}",
"s += bit[i]",
"s",
"bit[i]",
"bit",
"i",
"return s;",
"s",
"int r",
"r",
"void add(int idx, int x)\n\t\t{\n\t\t\tfor( int i=idx; i<bit.length; i+=(i & -i) )\n\t\t\t{\n\t\t\t\tbit[i] += x;\n\t\t\t}\n\t\t}",
"add",
"{\n\t\t\tfor( int i=idx; i<bit.length; i+=(i & -i) )\n\t\t\t{\n\t\t\t\tbit[i] += x;\n\t\t\t}\n\t\t}",
"for( int i=idx; i<bit.length; i+=(i & -i) )\n\t\t\t{\n\t\t\t\tbit[i] += x;\n\t\t\t}",
"int i=idx;",
"int i=idx;",
"i",
"idx",
"i<bit.length",
"i",
"bit.length",
"bit",
"bit.length",
"i+=(i & -i)",
"i+=(i & -i)",
"i",
"(i & -i)",
"i",
"-i",
"i",
"{\n\t\t\t\tbit[i] += x;\n\t\t\t}",
"{\n\t\t\t\tbit[i] += x;\n\t\t\t}",
"bit[i] += x",
"bit[i]",
"bit",
"i",
"x",
"int idx",
"idx",
"int x",
"x",
"static class UnionFind\n\t{\n\t\tint[] par;\n\t\tint[] n_nodes;\n\t\tint max = 1;\n\t\t\n\t\tpublic UnionFind(int n)\n\t\t{\n\t\t\tpar = new int[n];\n\t\t\tn_nodes = new int[n];\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tpar[i] = i;\n\t\t\t\tn_nodes[i] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint root(int x)\n\t\t{\n\t\t\tif( par[x] == x ) return x;\n\t\t\treturn par[x] = root(par[x]);\n\t\t}\n\t\t\n\t\tvoid unite(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\tif( rx == ry ) return;\n\t\t\tpar[rx] = ry;\n\t\t\tn_nodes[ry] += n_nodes[rx];\n\t\t\tmax = Math.max(max, n_nodes[ry]);\n\t\t}\n\t\t\n\t\tboolean same(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\treturn rx == ry;\n\t\t}\n\t}",
"UnionFind",
"int[] par;",
"par",
"int[] n_nodes;",
"n_nodes",
"int max = 1;",
"max",
"1",
"public UnionFind(int n)\n\t\t{\n\t\t\tpar = new int[n];\n\t\t\tn_nodes = new int[n];\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tpar[i] = i;\n\t\t\t\tn_nodes[i] = 1;\n\t\t\t}\n\t\t}",
"UnionFind",
"{\n\t\t\tpar = new int[n];\n\t\t\tn_nodes = new int[n];\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tpar[i] = i;\n\t\t\t\tn_nodes[i] = 1;\n\t\t\t}\n\t\t}",
"par = new int[n]",
"par",
"new int[n]",
"n",
"n_nodes = new int[n]",
"n_nodes",
"new int[n]",
"n",
"for( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tpar[i] = i;\n\t\t\t\tn_nodes[i] = 1;\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tpar[i] = i;\n\t\t\t\tn_nodes[i] = 1;\n\t\t\t}",
"{\n\t\t\t\tpar[i] = i;\n\t\t\t\tn_nodes[i] = 1;\n\t\t\t}",
"par[i] = i",
"par[i]",
"par",
"i",
"i",
"n_nodes[i] = 1",
"n_nodes[i]",
"n_nodes",
"i",
"1",
"int n",
"n",
"int root(int x)\n\t\t{\n\t\t\tif( par[x] == x ) return x;\n\t\t\treturn par[x] = root(par[x]);\n\t\t}",
"root",
"{\n\t\t\tif( par[x] == x ) return x;\n\t\t\treturn par[x] = root(par[x]);\n\t\t}",
"if( par[x] == x ) return x;",
"par[x] == x",
"par[x]",
"par",
"x",
"x",
"return x;",
"x",
"return par[x] = root(par[x]);",
"par[x] = root(par[x])",
"par[x]",
"par",
"x",
"root(par[x])",
"root",
"par[x]",
"par",
"x",
"int x",
"x",
"void unite(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\tif( rx == ry ) return;\n\t\t\tpar[rx] = ry;\n\t\t\tn_nodes[ry] += n_nodes[rx];\n\t\t\tmax = Math.max(max, n_nodes[ry]);\n\t\t}",
"unite",
"{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\tif( rx == ry ) return;\n\t\t\tpar[rx] = ry;\n\t\t\tn_nodes[ry] += n_nodes[rx];\n\t\t\tmax = Math.max(max, n_nodes[ry]);\n\t\t}",
"int rx = root(x);",
"rx",
"root(x)",
"root",
"x",
"int ry = root(y);",
"ry",
"root(y)",
"root",
"y",
"if( rx == ry ) return;",
"rx == ry",
"rx",
"ry",
"return;",
"par[rx] = ry",
"par[rx]",
"par",
"rx",
"ry",
"n_nodes[ry] += n_nodes[rx]",
"n_nodes[ry]",
"n_nodes",
"ry",
"n_nodes[rx]",
"n_nodes",
"rx",
"max = Math.max(max, n_nodes[ry])",
"max",
"Math.max(max, n_nodes[ry])",
"Math.max",
"Math",
"max",
"n_nodes[ry]",
"n_nodes",
"ry",
"int x",
"x",
"int y",
"y",
"boolean same(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\treturn rx == ry;\n\t\t}",
"same",
"{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\treturn rx == ry;\n\t\t}",
"int rx = root(x);",
"rx",
"root(x)",
"root",
"x",
"int ry = root(y);",
"ry",
"root(y)",
"root",
"y",
"return rx == ry;",
"rx == ry",
"rx",
"ry",
"int x",
"x",
"int y",
"y",
"static class Calc\n\t{\n\t\tstatic int gcd(int a, int b)\n\t\t{\n\t\t\tif( a == 0 )\n\t\t\t{\n\t\t\t\treturn b;\n\t\t\t}\n\t\t\treturn gcd(b%a, a);\n\t\t}\n\t\t\n\t\tstatic int ceilInt(int a, int b)\n\t\t{\n\t\t\treturn (a%b==0 ? a/b : a/b+1);\n\t\t}\n\n\t\tstatic long power(long x, int n)\n\t\t{\n\t\t\tif( n == 0 )\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif( n % 2 == 0 )\n\t\t\t{\n\t\t\t\tlong X = (x * x) % MOD;\n\t\t\t\treturn power(X, n/2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (x * power(x, n-1)) % MOD;\n\t\t\t}\n\t\t}\n\t}",
"Calc",
"static int gcd(int a, int b)\n\t\t{\n\t\t\tif( a == 0 )\n\t\t\t{\n\t\t\t\treturn b;\n\t\t\t}\n\t\t\treturn gcd(b%a, a);\n\t\t}",
"gcd",
"{\n\t\t\tif( a == 0 )\n\t\t\t{\n\t\t\t\treturn b;\n\t\t\t}\n\t\t\treturn gcd(b%a, a);\n\t\t}",
"if( a == 0 )\n\t\t\t{\n\t\t\t\treturn b;\n\t\t\t}",
"a == 0",
"a",
"0",
"{\n\t\t\t\treturn b;\n\t\t\t}",
"return b;",
"b",
"return gcd(b%a, a);",
"gcd(b%a, a)",
"gcd",
"b%a",
"b",
"a",
"a",
"int a",
"a",
"int b",
"b",
"static int ceilInt(int a, int b)\n\t\t{\n\t\t\treturn (a%b==0 ? a/b : a/b+1);\n\t\t}",
"ceilInt",
"{\n\t\t\treturn (a%b==0 ? a/b : a/b+1);\n\t\t}",
"return (a%b==0 ? a/b : a/b+1);",
"(a%b==0 ? a/b : a/b+1)",
"a%b==0",
"a%b",
"a",
"b",
"0",
"a/b",
"a",
"b",
"a/b+1",
"a/b",
"a",
"b",
"1",
"int a",
"a",
"int b",
"b",
"static long power(long x, int n)\n\t\t{\n\t\t\tif( n == 0 )\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif( n % 2 == 0 )\n\t\t\t{\n\t\t\t\tlong X = (x * x) % MOD;\n\t\t\t\treturn power(X, n/2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (x * power(x, n-1)) % MOD;\n\t\t\t}\n\t\t}",
"power",
"{\n\t\t\tif( n == 0 )\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif( n % 2 == 0 )\n\t\t\t{\n\t\t\t\tlong X = (x * x) % MOD;\n\t\t\t\treturn power(X, n/2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (x * power(x, n-1)) % MOD;\n\t\t\t}\n\t\t}",
"if( n == 0 )\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}",
"n == 0",
"n",
"0",
"{\n\t\t\t\treturn 1;\n\t\t\t}",
"return 1;",
"1",
"if( n % 2 == 0 )\n\t\t\t{\n\t\t\t\tlong X = (x * x) % MOD;\n\t\t\t\treturn power(X, n/2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (x * power(x, n-1)) % MOD;\n\t\t\t}",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"{\n\t\t\t\tlong X = (x * x) % MOD;\n\t\t\t\treturn power(X, n/2);\n\t\t\t}",
"long X = (x * x) % MOD;",
"X",
"(x * x) % MOD",
"(x * x)",
"x",
"x",
"MOD",
"return power(X, n/2);",
"power(X, n/2)",
"power",
"X",
"n/2",
"n",
"2",
"{\n\t\t\t\treturn (x * power(x, n-1)) % MOD;\n\t\t\t}",
"return (x * power(x, n-1)) % MOD;",
"(x * power(x, n-1)) % MOD",
"(x * power(x, n-1))",
"x",
"power(x, n-1)",
"power",
"x",
"n-1",
"n",
"1",
"MOD",
"long x",
"x",
"int n",
"n",
"static class MyScanner\n\t{\n\t\tprivate BufferedReader in;\n\t\tprivate StringTokenizer st;\n\t\t\n\t\tpublic MyScanner(InputStream stream)\n\t\t{\n\t\t\tin = new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\t\n\t\tpublic String next()\n\t\t{\n\t\t\twhile( st == null || !st.hasMoreTokens() )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}\n\t\t\t\tcatch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt()\n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}",
"MyScanner",
"private BufferedReader in;",
"in",
"private StringTokenizer st;",
"st",
"public MyScanner(InputStream stream)\n\t\t{\n\t\t\tin = new BufferedReader(new InputStreamReader(stream));\n\t\t}",
"MyScanner",
"{\n\t\t\tin = new BufferedReader(new InputStreamReader(stream));\n\t\t}",
"in = new BufferedReader(new InputStreamReader(stream))",
"in",
"new BufferedReader(new InputStreamReader(stream))",
"InputStream stream",
"stream",
"public String next()\n\t\t{\n\t\t\twhile( st == null || !st.hasMoreTokens() )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}\n\t\t\t\tcatch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile( st == null || !st.hasMoreTokens() )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}\n\t\t\t\tcatch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"while( st == null || !st.hasMoreTokens() )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}\n\t\t\t\tcatch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}\n\t\t\t\tcatch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}",
"try\n\t\t\t\t{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}\n\t\t\t\tcatch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}",
"catch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\treturn null;\n\t\t\t\t}",
"return null;",
"null",
"{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}",
"String rl = in.readLine();",
"rl",
"in.readLine()",
"in.readLine",
"in",
"if( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}",
"rl == null",
"rl",
"null",
"{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}",
"return null;",
"null",
"st = new StringTokenizer(rl)",
"st",
"new StringTokenizer(rl)",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int nextInt()\n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"static interface Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out);\n\t}",
"Solver",
"public void solve(int testNumber, MyScanner in, PrintWriter out);",
"solve",
"int testNumber",
"testNumber",
"MyScanner in",
"in",
"PrintWriter out",
"out",
"static class F implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}",
"F",
"public void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}",
"solve",
"{\n\t\t}",
"int testNumber",
"testNumber",
"MyScanner in",
"in",
"PrintWriter out",
"out",
"Solver",
"static class E implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}",
"E",
"public void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}",
"solve",
"{\n\t\t}",
"int testNumber",
"testNumber",
"MyScanner in",
"in",
"PrintWriter out",
"out",
"Solver",
"static class D implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}",
"D",
"public void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}",
"solve",
"{\n\t\t}",
"int testNumber",
"testNumber",
"MyScanner in",
"in",
"PrintWriter out",
"out",
"Solver",
"static class C implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}",
"C",
"public void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}",
"solve",
"{\n\t\t}",
"int testNumber",
"testNumber",
"MyScanner in",
"in",
"PrintWriter out",
"out",
"Solver",
"static class B implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tint n = in.nextInt();\n\t\t\tint cnt = 0;\n\t\t\tString judge = \"No\";\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tif( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(judge);\n\t\t}\n\t}",
"B",
"public void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tint n = in.nextInt();\n\t\t\tint cnt = 0;\n\t\t\tString judge = \"No\";\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tif( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(judge);\n\t\t}",
"solve",
"{\n\t\t\tint n = in.nextInt();\n\t\t\tint cnt = 0;\n\t\t\tString judge = \"No\";\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tif( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(judge);\n\t\t}",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int cnt = 0;",
"cnt",
"0",
"String judge = \"No\";",
"judge",
"\"No\"",
"for( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tif( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tif( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tif( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t}",
"int a = in.nextInt();",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"int b = in.nextInt();",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"if( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}",
"a == b",
"a",
"b",
"{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}",
"cnt++",
"cnt",
"if( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}",
"cnt == 3",
"cnt",
"3",
"{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}",
"judge = \"Yes\"",
"judge",
"\"Yes\"",
"{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}",
"cnt = 0",
"cnt",
"0",
"out.println(judge)",
"out.println",
"out",
"judge",
"int testNumber",
"testNumber",
"MyScanner in",
"in",
"PrintWriter out",
"out",
"Solver",
"static class A implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tString s = in.next();\n\t\t\tif( s.endsWith(\"s\") )\n\t\t\t{\n\t\t\t\ts += \"es\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ts += \"s\";\n\t\t\t}\n\t\t\tout.println(s);\n\t\t}\n\t}",
"A",
"public void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tString s = in.next();\n\t\t\tif( s.endsWith(\"s\") )\n\t\t\t{\n\t\t\t\ts += \"es\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ts += \"s\";\n\t\t\t}\n\t\t\tout.println(s);\n\t\t}",
"solve",
"{\n\t\t\tString s = in.next();\n\t\t\tif( s.endsWith(\"s\") )\n\t\t\t{\n\t\t\t\ts += \"es\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ts += \"s\";\n\t\t\t}\n\t\t\tout.println(s);\n\t\t}",
"String s = in.next();",
"s",
"in.next()",
"in.next",
"in",
"if( s.endsWith(\"s\") )\n\t\t\t{\n\t\t\t\ts += \"es\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ts += \"s\";\n\t\t\t}",
"s.endsWith(\"s\")",
"s.endsWith",
"s",
"\"s\"",
"{\n\t\t\t\ts += \"es\";\n\t\t\t}",
"s += \"es\"",
"s",
"\"es\"",
"{\n\t\t\t\ts += \"s\";\n\t\t\t}",
"s += \"s\"",
"s",
"\"s\"",
"out.println(s)",
"out.println",
"out",
"s",
"int testNumber",
"testNumber",
"MyScanner in",
"in",
"PrintWriter out",
"out",
"Solver",
"public class Main\n{\n\tstatic int MOD = (int) 1e9 + 7;\n\t\n\tstatic class FenwickTree\n\t{\n\t\t// bit[1] ~ bit[n]\n\t\tlong[] bit; // = new long[n+1];\n\t\t\n\t\tpublic FenwickTree(int n)\n\t\t{\n\t\t\tbit = new long[n+1];\n\t\t}\n\t\t\n\t\t// bit[1] + ... + bit[r]\n\t\tlong sum(int r)\n\t\t{\n\t\t\tlong s = 0;\n\t\t\tfor( int i=r; i>0; i-=(i & -i) )\n\t\t\t{\n\t\t\t\ts += bit[i];\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t\t\n\t\tvoid add(int idx, int x)\n\t\t{\n\t\t\tfor( int i=idx; i<bit.length; i+=(i & -i) )\n\t\t\t{\n\t\t\t\tbit[i] += x;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic class UnionFind\n\t{\n\t\tint[] par;\n\t\tint[] n_nodes;\n\t\tint max = 1;\n\t\t\n\t\tpublic UnionFind(int n)\n\t\t{\n\t\t\tpar = new int[n];\n\t\t\tn_nodes = new int[n];\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tpar[i] = i;\n\t\t\t\tn_nodes[i] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint root(int x)\n\t\t{\n\t\t\tif( par[x] == x ) return x;\n\t\t\treturn par[x] = root(par[x]);\n\t\t}\n\t\t\n\t\tvoid unite(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\tif( rx == ry ) return;\n\t\t\tpar[rx] = ry;\n\t\t\tn_nodes[ry] += n_nodes[rx];\n\t\t\tmax = Math.max(max, n_nodes[ry]);\n\t\t}\n\t\t\n\t\tboolean same(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\treturn rx == ry;\n\t\t}\n\t}\n\t\n\tstatic class Calc\n\t{\n\t\tstatic int gcd(int a, int b)\n\t\t{\n\t\t\tif( a == 0 )\n\t\t\t{\n\t\t\t\treturn b;\n\t\t\t}\n\t\t\treturn gcd(b%a, a);\n\t\t}\n\t\t\n\t\tstatic int ceilInt(int a, int b)\n\t\t{\n\t\t\treturn (a%b==0 ? a/b : a/b+1);\n\t\t}\n\n\t\tstatic long power(long x, int n)\n\t\t{\n\t\t\tif( n == 0 )\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif( n % 2 == 0 )\n\t\t\t{\n\t\t\t\tlong X = (x * x) % MOD;\n\t\t\t\treturn power(X, n/2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (x * power(x, n-1)) % MOD;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tstatic class MyScanner\n\t{\n\t\tprivate BufferedReader in;\n\t\tprivate StringTokenizer st;\n\t\t\n\t\tpublic MyScanner(InputStream stream)\n\t\t{\n\t\t\tin = new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\t\n\t\tpublic String next()\n\t\t{\n\t\t\twhile( st == null || !st.hasMoreTokens() )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}\n\t\t\t\tcatch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt()\n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\t\n\tstatic interface Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out);\n\t}\n\t\n\tstatic class F implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\n\tstatic class E implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\n\tstatic class D implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\t\n\tstatic class C implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\t\n\tstatic class B implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tint n = in.nextInt();\n\t\t\tint cnt = 0;\n\t\t\tString judge = \"No\";\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tif( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(judge);\n\t\t}\n\t}\n\n\tstatic class A implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tString s = in.next();\n\t\t\tif( s.endsWith(\"s\") )\n\t\t\t{\n\t\t\t\ts += \"es\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ts += \"s\";\n\t\t\t}\n\t\t\tout.println(s);\n\t\t}\n\t}\n\t\n\tpublic static void main(String[] args)\n\t{\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tSolver solver = new B();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}\n}",
"public class Main\n{\n\tstatic int MOD = (int) 1e9 + 7;\n\t\n\tstatic class FenwickTree\n\t{\n\t\t// bit[1] ~ bit[n]\n\t\tlong[] bit; // = new long[n+1];\n\t\t\n\t\tpublic FenwickTree(int n)\n\t\t{\n\t\t\tbit = new long[n+1];\n\t\t}\n\t\t\n\t\t// bit[1] + ... + bit[r]\n\t\tlong sum(int r)\n\t\t{\n\t\t\tlong s = 0;\n\t\t\tfor( int i=r; i>0; i-=(i & -i) )\n\t\t\t{\n\t\t\t\ts += bit[i];\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t\t\n\t\tvoid add(int idx, int x)\n\t\t{\n\t\t\tfor( int i=idx; i<bit.length; i+=(i & -i) )\n\t\t\t{\n\t\t\t\tbit[i] += x;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic class UnionFind\n\t{\n\t\tint[] par;\n\t\tint[] n_nodes;\n\t\tint max = 1;\n\t\t\n\t\tpublic UnionFind(int n)\n\t\t{\n\t\t\tpar = new int[n];\n\t\t\tn_nodes = new int[n];\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tpar[i] = i;\n\t\t\t\tn_nodes[i] = 1;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint root(int x)\n\t\t{\n\t\t\tif( par[x] == x ) return x;\n\t\t\treturn par[x] = root(par[x]);\n\t\t}\n\t\t\n\t\tvoid unite(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\tif( rx == ry ) return;\n\t\t\tpar[rx] = ry;\n\t\t\tn_nodes[ry] += n_nodes[rx];\n\t\t\tmax = Math.max(max, n_nodes[ry]);\n\t\t}\n\t\t\n\t\tboolean same(int x, int y)\n\t\t{\n\t\t\tint rx = root(x);\n\t\t\tint ry = root(y);\n\t\t\treturn rx == ry;\n\t\t}\n\t}\n\t\n\tstatic class Calc\n\t{\n\t\tstatic int gcd(int a, int b)\n\t\t{\n\t\t\tif( a == 0 )\n\t\t\t{\n\t\t\t\treturn b;\n\t\t\t}\n\t\t\treturn gcd(b%a, a);\n\t\t}\n\t\t\n\t\tstatic int ceilInt(int a, int b)\n\t\t{\n\t\t\treturn (a%b==0 ? a/b : a/b+1);\n\t\t}\n\n\t\tstatic long power(long x, int n)\n\t\t{\n\t\t\tif( n == 0 )\n\t\t\t{\n\t\t\t\treturn 1;\n\t\t\t}\n\n\t\t\tif( n % 2 == 0 )\n\t\t\t{\n\t\t\t\tlong X = (x * x) % MOD;\n\t\t\t\treturn power(X, n/2);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn (x * power(x, n-1)) % MOD;\n\t\t\t}\n\t\t}\n\t}\n\t\n\tstatic class MyScanner\n\t{\n\t\tprivate BufferedReader in;\n\t\tprivate StringTokenizer st;\n\t\t\n\t\tpublic MyScanner(InputStream stream)\n\t\t{\n\t\t\tin = new BufferedReader(new InputStreamReader(stream));\n\t\t}\n\t\t\n\t\tpublic String next()\n\t\t{\n\t\t\twhile( st == null || !st.hasMoreTokens() )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tString rl = in.readLine();\n\t\t\t\t\tif( rl == null )\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t\tst = new StringTokenizer(rl);\n\t\t\t\t}\n\t\t\t\tcatch( IOException e )\n\t\t\t\t{\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tpublic int nextInt()\n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tpublic long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t}\n\t\n\tstatic interface Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out);\n\t}\n\t\n\tstatic class F implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\n\tstatic class E implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\n\tstatic class D implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\t\n\tstatic class C implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t}\n\t}\n\t\n\tstatic class B implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tint n = in.nextInt();\n\t\t\tint cnt = 0;\n\t\t\tString judge = \"No\";\n\t\t\tfor( int i=0; i<n; i++ )\n\t\t\t{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tif( a == b )\n\t\t\t\t{\n\t\t\t\t\tcnt++;\n\t\t\t\t\tif( cnt == 3 )\n\t\t\t\t\t{\n\t\t\t\t\t\tjudge = \"Yes\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\tout.println(judge);\n\t\t}\n\t}\n\n\tstatic class A implements Solver\n\t{\n\t\tpublic void solve(int testNumber, MyScanner in, PrintWriter out)\n\t\t{\n\t\t\tString s = in.next();\n\t\t\tif( s.endsWith(\"s\") )\n\t\t\t{\n\t\t\t\ts += \"es\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\ts += \"s\";\n\t\t\t}\n\t\t\tout.println(s);\n\t\t}\n\t}\n\t\n\tpublic static void main(String[] args)\n\t{\n\t\tInputStream inputStream = System.in;\n\t\tOutputStream outputStream = System.out;\n\t\tMyScanner in = new MyScanner(inputStream);\n\t\tPrintWriter out = new PrintWriter(outputStream);\n\t\tSolver solver = new B();\n\t\tsolver.solve(1, in, out);\n\t\tout.close();\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
public class Main
{
static int MOD = (int) 1e9 + 7;
static class FenwickTree
{
// bit[1] ~ bit[n]
long[] bit; // = new long[n+1];
public FenwickTree(int n)
{
bit = new long[n+1];
}
// bit[1] + ... + bit[r]
long sum(int r)
{
long s = 0;
for( int i=r; i>0; i-=(i & -i) )
{
s += bit[i];
}
return s;
}
void add(int idx, int x)
{
for( int i=idx; i<bit.length; i+=(i & -i) )
{
bit[i] += x;
}
}
}
static class UnionFind
{
int[] par;
int[] n_nodes;
int max = 1;
public UnionFind(int n)
{
par = new int[n];
n_nodes = new int[n];
for( int i=0; i<n; i++ )
{
par[i] = i;
n_nodes[i] = 1;
}
}
int root(int x)
{
if( par[x] == x ) return x;
return par[x] = root(par[x]);
}
void unite(int x, int y)
{
int rx = root(x);
int ry = root(y);
if( rx == ry ) return;
par[rx] = ry;
n_nodes[ry] += n_nodes[rx];
max = Math.max(max, n_nodes[ry]);
}
boolean same(int x, int y)
{
int rx = root(x);
int ry = root(y);
return rx == ry;
}
}
static class Calc
{
static int gcd(int a, int b)
{
if( a == 0 )
{
return b;
}
return gcd(b%a, a);
}
static int ceilInt(int a, int b)
{
return (a%b==0 ? a/b : a/b+1);
}
static long power(long x, int n)
{
if( n == 0 )
{
return 1;
}
if( n % 2 == 0 )
{
long X = (x * x) % MOD;
return power(X, n/2);
}
else
{
return (x * power(x, n-1)) % MOD;
}
}
}
static class MyScanner
{
private BufferedReader in;
private StringTokenizer st;
public MyScanner(InputStream stream)
{
in = new BufferedReader(new InputStreamReader(stream));
}
public String next()
{
while( st == null || !st.hasMoreTokens() )
{
try
{
String rl = in.readLine();
if( rl == null )
{
return null;
}
st = new StringTokenizer(rl);
}
catch( IOException e )
{
return null;
}
}
return st.nextToken();
}
public int nextInt()
{
return Integer.parseInt(next());
}
public long nextLong()
{
return Long.parseLong(next());
}
}
static interface Solver
{
public void solve(int testNumber, MyScanner in, PrintWriter out);
}
static class F implements Solver
{
public void solve(int testNumber, MyScanner in, PrintWriter out)
{
}
}
static class E implements Solver
{
public void solve(int testNumber, MyScanner in, PrintWriter out)
{
}
}
static class D implements Solver
{
public void solve(int testNumber, MyScanner in, PrintWriter out)
{
}
}
static class C implements Solver
{
public void solve(int testNumber, MyScanner in, PrintWriter out)
{
}
}
static class B implements Solver
{
public void solve(int testNumber, MyScanner in, PrintWriter out)
{
int n = in.nextInt();
int cnt = 0;
String judge = "No";
for( int i=0; i<n; i++ )
{
int a = in.nextInt();
int b = in.nextInt();
if( a == b )
{
cnt++;
if( cnt == 3 )
{
judge = "Yes";
}
}
else
{
cnt = 0;
}
}
out.println(judge);
}
}
static class A implements Solver
{
public void solve(int testNumber, MyScanner in, PrintWriter out)
{
String s = in.next();
if( s.endsWith("s") )
{
s += "es";
}
else
{
s += "s";
}
out.println(s);
}
}
public static void main(String[] args)
{
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
MyScanner in = new MyScanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
Solver solver = new B();
solver.solve(1, in, out);
out.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
3,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
105,
5
],
[
105,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
23,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
8,
45
],
[
45,
46
],
[
45,
47
],
[
8,
48
],
[
48,
49
],
[
48,
50
],
[
8,
51
],
[
51,
52
],
[
51,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
67,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
66,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
66,
93
],
[
93,
94
],
[
93,
95
],
[
8,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
6,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
]
| [
"import java.util.*;\n\npublic class Main{ //クラス名はMain\n public static void main(String[] args) {\n\t\t\t\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\n\t\t\t// 文字列の入力\n\t\t\tint num = sc.nextInt();\n \n \t\tint[] numbers = new int[num*2];\n \t\tfor(int i=0;i<num*2;i++){\n \tnumbers[i] =sc.nextInt();\n }\n\t\t\t\n\t\t\t/*--------------------------------*/\n\t\t\tString ans = \"No\";\n \t\tint p = 0;\n \t\tint count = 0;\n \n \t\tfor(int i=0;i<num;i++){\n if(numbers[p] == numbers[p+1]){\n count++;\n }else{\n count =0;\n }\n if(count == 3){\n ans =\"Yes\";\n break;\n }\n p+=2;\n }\n \n \t\tSystem.out.println(ans);\n }\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main{ //クラス名はMain\n public static void main(String[] args) {\n\t\t\t\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\n\t\t\t// 文字列の入力\n\t\t\tint num = sc.nextInt();\n \n \t\tint[] numbers = new int[num*2];\n \t\tfor(int i=0;i<num*2;i++){\n \tnumbers[i] =sc.nextInt();\n }\n\t\t\t\n\t\t\t/*--------------------------------*/\n\t\t\tString ans = \"No\";\n \t\tint p = 0;\n \t\tint count = 0;\n \n \t\tfor(int i=0;i<num;i++){\n if(numbers[p] == numbers[p+1]){\n count++;\n }else{\n count =0;\n }\n if(count == 3){\n ans =\"Yes\";\n break;\n }\n p+=2;\n }\n \n \t\tSystem.out.println(ans);\n }\n}",
"Main",
"public static void main(String[] args) {\n\t\t\t\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\n\t\t\t// 文字列の入力\n\t\t\tint num = sc.nextInt();\n \n \t\tint[] numbers = new int[num*2];\n \t\tfor(int i=0;i<num*2;i++){\n \tnumbers[i] =sc.nextInt();\n }\n\t\t\t\n\t\t\t/*--------------------------------*/\n\t\t\tString ans = \"No\";\n \t\tint p = 0;\n \t\tint count = 0;\n \n \t\tfor(int i=0;i<num;i++){\n if(numbers[p] == numbers[p+1]){\n count++;\n }else{\n count =0;\n }\n if(count == 3){\n ans =\"Yes\";\n break;\n }\n p+=2;\n }\n \n \t\tSystem.out.println(ans);\n }",
"main",
"{\n\t\t\t\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\n\t\t\t// 文字列の入力\n\t\t\tint num = sc.nextInt();\n \n \t\tint[] numbers = new int[num*2];\n \t\tfor(int i=0;i<num*2;i++){\n \tnumbers[i] =sc.nextInt();\n }\n\t\t\t\n\t\t\t/*--------------------------------*/\n\t\t\tString ans = \"No\";\n \t\tint p = 0;\n \t\tint count = 0;\n \n \t\tfor(int i=0;i<num;i++){\n if(numbers[p] == numbers[p+1]){\n count++;\n }else{\n count =0;\n }\n if(count == 3){\n ans =\"Yes\";\n break;\n }\n p+=2;\n }\n \n \t\tSystem.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] numbers = new int[num*2];",
"numbers",
"new int[num*2]",
"num*2",
"num",
"2",
"for(int i=0;i<num*2;i++){\n \tnumbers[i] =sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<num*2",
"i",
"num*2",
"num",
"2",
"i++",
"i++",
"i",
"{\n \tnumbers[i] =sc.nextInt();\n }",
"{\n \tnumbers[i] =sc.nextInt();\n }",
"numbers[i] =sc.nextInt()",
"numbers[i]",
"numbers",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String ans = \"No\";",
"ans",
"\"No\"",
"int p = 0;",
"p",
"0",
"int count = 0;",
"count",
"0",
"for(int i=0;i<num;i++){\n if(numbers[p] == numbers[p+1]){\n count++;\n }else{\n count =0;\n }\n if(count == 3){\n ans =\"Yes\";\n break;\n }\n p+=2;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<num",
"i",
"num",
"i++",
"i++",
"i",
"{\n if(numbers[p] == numbers[p+1]){\n count++;\n }else{\n count =0;\n }\n if(count == 3){\n ans =\"Yes\";\n break;\n }\n p+=2;\n }",
"{\n if(numbers[p] == numbers[p+1]){\n count++;\n }else{\n count =0;\n }\n if(count == 3){\n ans =\"Yes\";\n break;\n }\n p+=2;\n }",
"if(numbers[p] == numbers[p+1]){\n count++;\n }else{\n count =0;\n }",
"numbers[p] == numbers[p+1]",
"numbers[p]",
"numbers",
"p",
"numbers[p+1]",
"numbers",
"p+1",
"p",
"1",
"{\n count++;\n }",
"count++",
"count",
"{\n count =0;\n }",
"count =0",
"count",
"0",
"if(count == 3){\n ans =\"Yes\";\n break;\n }",
"count == 3",
"count",
"3",
"{\n ans =\"Yes\";\n break;\n }",
"ans =\"Yes\"",
"ans",
"\"Yes\"",
"break;",
"p+=2",
"p",
"2",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main{ //クラス名はMain\n public static void main(String[] args) {\n\t\t\t\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\n\t\t\t// 文字列の入力\n\t\t\tint num = sc.nextInt();\n \n \t\tint[] numbers = new int[num*2];\n \t\tfor(int i=0;i<num*2;i++){\n \tnumbers[i] =sc.nextInt();\n }\n\t\t\t\n\t\t\t/*--------------------------------*/\n\t\t\tString ans = \"No\";\n \t\tint p = 0;\n \t\tint count = 0;\n \n \t\tfor(int i=0;i<num;i++){\n if(numbers[p] == numbers[p+1]){\n count++;\n }else{\n count =0;\n }\n if(count == 3){\n ans =\"Yes\";\n break;\n }\n p+=2;\n }\n \n \t\tSystem.out.println(ans);\n }\n}",
"public class Main{ //クラス名はMain\n public static void main(String[] args) {\n\t\t\t\n\t\t\tScanner sc = new Scanner(System.in);\n\t\t\t\n\t\t\t// 文字列の入力\n\t\t\tint num = sc.nextInt();\n \n \t\tint[] numbers = new int[num*2];\n \t\tfor(int i=0;i<num*2;i++){\n \tnumbers[i] =sc.nextInt();\n }\n\t\t\t\n\t\t\t/*--------------------------------*/\n\t\t\tString ans = \"No\";\n \t\tint p = 0;\n \t\tint count = 0;\n \n \t\tfor(int i=0;i<num;i++){\n if(numbers[p] == numbers[p+1]){\n count++;\n }else{\n count =0;\n }\n if(count == 3){\n ans =\"Yes\";\n break;\n }\n p+=2;\n }\n \n \t\tSystem.out.println(ans);\n }\n}",
"Main"
]
| import java.util.*;
public class Main{ //クラス名はMain
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// 文字列の入力
int num = sc.nextInt();
int[] numbers = new int[num*2];
for(int i=0;i<num*2;i++){
numbers[i] =sc.nextInt();
}
/*--------------------------------*/
String ans = "No";
int p = 0;
int count = 0;
for(int i=0;i<num;i++){
if(numbers[p] == numbers[p+1]){
count++;
}else{
count =0;
}
if(count == 3){
ans ="Yes";
break;
}
p+=2;
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
3,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
81,
5
],
[
81,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
43,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
32,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
8,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
60,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
6,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int count = 0;\n for(int i=0; i<N; i++) {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a == b) {\n count++;\n } else {\n count = 0;\n }\n if(count == 3) {\n break;\n }\n }\n if(count == 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int count = 0;\n for(int i=0; i<N; i++) {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a == b) {\n count++;\n } else {\n count = 0;\n }\n if(count == 3) {\n break;\n }\n }\n if(count == 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int count = 0;\n for(int i=0; i<N; i++) {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a == b) {\n count++;\n } else {\n count = 0;\n }\n if(count == 3) {\n break;\n }\n }\n if(count == 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int count = 0;\n for(int i=0; i<N; i++) {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a == b) {\n count++;\n } else {\n count = 0;\n }\n if(count == 3) {\n break;\n }\n }\n if(count == 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int N = scn.nextInt();",
"N",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int count = 0;",
"count",
"0",
"for(int i=0; i<N; i++) {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a == b) {\n count++;\n } else {\n count = 0;\n }\n if(count == 3) {\n break;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a == b) {\n count++;\n } else {\n count = 0;\n }\n if(count == 3) {\n break;\n }\n }",
"{\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a == b) {\n count++;\n } else {\n count = 0;\n }\n if(count == 3) {\n break;\n }\n }",
"int a = scn.nextInt();",
"a",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int b = scn.nextInt();",
"b",
"scn.nextInt()",
"scn.nextInt",
"scn",
"if(a == b) {\n count++;\n } else {\n count = 0;\n }",
"a == b",
"a",
"b",
"{\n count++;\n }",
"count++",
"count",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"if(count == 3) {\n break;\n }",
"count == 3",
"count",
"3",
"{\n break;\n }",
"break;",
"if(count == 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"count == 3",
"count",
"3",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int count = 0;\n for(int i=0; i<N; i++) {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a == b) {\n count++;\n } else {\n count = 0;\n }\n if(count == 3) {\n break;\n }\n }\n if(count == 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner scn = new Scanner(System.in);\n int N = scn.nextInt();\n int count = 0;\n for(int i=0; i<N; i++) {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a == b) {\n count++;\n } else {\n count = 0;\n }\n if(count == 3) {\n break;\n }\n }\n if(count == 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scn = new Scanner(System.in);
int N = scn.nextInt();
int count = 0;
for(int i=0; i<N; i++) {
int a = scn.nextInt();
int b = scn.nextInt();
if(a == b) {
count++;
} else {
count = 0;
}
if(count == 3) {
break;
}
}
if(count == 3) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
13,
17,
30,
4,
18,
13,
17,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
14,
2,
2,
18,
18,
13,
13,
13,
17,
2,
18,
18,
13,
13,
13,
17,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
40,
13,
30,
0,
13,
17,
0,
13,
4,
18,
13,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
11,
39
],
[
39,
40
],
[
39,
41
],
[
11,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
57,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
69,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
88,
94
],
[
79,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
11,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
99,
107
],
[
107,
108
],
[
108,
109
],
[
99,
110
],
[
111,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
113,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
112,
124
],
[
124,
125
],
[
125,
126
],
[
112,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
111,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
133,
137
],
[
11,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
143,
148
],
[
138,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
150,
155
],
[
9,
156
],
[
156,
157
]
]
| [
"import java.io.*;\nimport java.util.*;\nclass Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int maxcount = 0;\n int count=0;\n int N = sc.nextInt();\n if(N<3 || N>100)\n {\n System.exit(0);\n }\n int arr[][] = new int[N][2];\n for(int i=0; i<N; i++)\n {\n for(int j=0; j<2; j++)\n {\n arr[i][j]=sc.nextInt();\n if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);\n }\n }\n for(int i = 0; i < N ; i++)\n {\n if(arr[i][0]==arr[i][1])\n {\n count++; \n }\n else\n {\n count = 0;\n }\n maxcount = Math.max(maxcount,count);\n }\n if(maxcount>=3)\n {\n System.out.print(\"Yes\");\n }\n else\n {\n System.out.print(\"No\");\n }\n }\n}\n ",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main\n{\n public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int maxcount = 0;\n int count=0;\n int N = sc.nextInt();\n if(N<3 || N>100)\n {\n System.exit(0);\n }\n int arr[][] = new int[N][2];\n for(int i=0; i<N; i++)\n {\n for(int j=0; j<2; j++)\n {\n arr[i][j]=sc.nextInt();\n if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);\n }\n }\n for(int i = 0; i < N ; i++)\n {\n if(arr[i][0]==arr[i][1])\n {\n count++; \n }\n else\n {\n count = 0;\n }\n maxcount = Math.max(maxcount,count);\n }\n if(maxcount>=3)\n {\n System.out.print(\"Yes\");\n }\n else\n {\n System.out.print(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args)\n {\n Scanner sc = new Scanner(System.in);\n int maxcount = 0;\n int count=0;\n int N = sc.nextInt();\n if(N<3 || N>100)\n {\n System.exit(0);\n }\n int arr[][] = new int[N][2];\n for(int i=0; i<N; i++)\n {\n for(int j=0; j<2; j++)\n {\n arr[i][j]=sc.nextInt();\n if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);\n }\n }\n for(int i = 0; i < N ; i++)\n {\n if(arr[i][0]==arr[i][1])\n {\n count++; \n }\n else\n {\n count = 0;\n }\n maxcount = Math.max(maxcount,count);\n }\n if(maxcount>=3)\n {\n System.out.print(\"Yes\");\n }\n else\n {\n System.out.print(\"No\");\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int maxcount = 0;\n int count=0;\n int N = sc.nextInt();\n if(N<3 || N>100)\n {\n System.exit(0);\n }\n int arr[][] = new int[N][2];\n for(int i=0; i<N; i++)\n {\n for(int j=0; j<2; j++)\n {\n arr[i][j]=sc.nextInt();\n if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);\n }\n }\n for(int i = 0; i < N ; i++)\n {\n if(arr[i][0]==arr[i][1])\n {\n count++; \n }\n else\n {\n count = 0;\n }\n maxcount = Math.max(maxcount,count);\n }\n if(maxcount>=3)\n {\n System.out.print(\"Yes\");\n }\n else\n {\n System.out.print(\"No\");\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int maxcount = 0;",
"maxcount",
"0",
"int count=0;",
"count",
"0",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(N<3 || N>100)\n {\n System.exit(0);\n }",
"N<3 || N>100",
"N<3",
"N",
"3",
"N>100",
"N",
"100",
"{\n System.exit(0);\n }",
"System.exit(0)",
"System.exit",
"System",
"0",
"int arr[][] = new int[N][2];",
"arr",
"new int[N][2]",
"N",
"2",
"for(int i=0; i<N; i++)\n {\n for(int j=0; j<2; j++)\n {\n arr[i][j]=sc.nextInt();\n if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n for(int j=0; j<2; j++)\n {\n arr[i][j]=sc.nextInt();\n if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);\n }\n }",
"{\n for(int j=0; j<2; j++)\n {\n arr[i][j]=sc.nextInt();\n if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);\n }\n }",
"for(int j=0; j<2; j++)\n {\n arr[i][j]=sc.nextInt();\n if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<2",
"j",
"2",
"j++",
"j++",
"j",
"{\n arr[i][j]=sc.nextInt();\n if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);\n }",
"{\n arr[i][j]=sc.nextInt();\n if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);\n }",
"arr[i][j]=sc.nextInt()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(arr[i][j] < 1 || arr[i][j] > 6)\n System.exit(0);",
"arr[i][j] < 1 || arr[i][j] > 6",
"arr[i][j] < 1",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"1",
"arr[i][j] > 6",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"6",
"System.exit(0)",
"System.exit",
"System",
"0",
"for(int i = 0; i < N ; i++)\n {\n if(arr[i][0]==arr[i][1])\n {\n count++; \n }\n else\n {\n count = 0;\n }\n maxcount = Math.max(maxcount,count);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n if(arr[i][0]==arr[i][1])\n {\n count++; \n }\n else\n {\n count = 0;\n }\n maxcount = Math.max(maxcount,count);\n }",
"{\n if(arr[i][0]==arr[i][1])\n {\n count++; \n }\n else\n {\n count = 0;\n }\n maxcount = Math.max(maxcount,count);\n }",
"if(arr[i][0]==arr[i][1])\n {\n count++; \n }\n else\n {\n count = 0;\n }",
"arr[i][0]==arr[i][1]",
"arr[i][0]",
"arr[i]",
"arr",
"i",
"0",
"arr[i][1]",
"arr[i]",
"arr",
"i",
"1",
"{\n count++; \n }",
"count++",
"count",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"maxcount = Math.max(maxcount,count)",
"maxcount",
"Math.max(maxcount,count)",
"Math.max",
"Math",
"maxcount",
"count",
"if(maxcount>=3)\n {\n System.out.print(\"Yes\");\n }\n else\n {\n System.out.print(\"No\");\n }",
"maxcount>=3",
"maxcount",
"3",
"{\n System.out.print(\"Yes\");\n }",
"System.out.print(\"Yes\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.print(\"No\");\n }",
"System.out.print(\"No\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.io.*;
import java.util.*;
class Main
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
int maxcount = 0;
int count=0;
int N = sc.nextInt();
if(N<3 || N>100)
{
System.exit(0);
}
int arr[][] = new int[N][2];
for(int i=0; i<N; i++)
{
for(int j=0; j<2; j++)
{
arr[i][j]=sc.nextInt();
if(arr[i][j] < 1 || arr[i][j] > 6)
System.exit(0);
}
}
for(int i = 0; i < N ; i++)
{
if(arr[i][0]==arr[i][1])
{
count++;
}
else
{
count = 0;
}
maxcount = Math.max(maxcount,count);
}
if(maxcount>=3)
{
System.out.print("Yes");
}
else
{
System.out.print("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
4,
18,
13,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
299,
8
],
[
299,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
299,
14
],
[
14,
15
],
[
14,
16
],
[
299,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
19,
28
],
[
28,
29
],
[
28,
30
],
[
19,
31
],
[
31,
32
],
[
31,
33
],
[
19,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
57,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
46,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
71,
73
],
[
19,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
79,
82
],
[
17,
83
],
[
83,
84
],
[
299,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
98,
99
],
[
98,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
93,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
105,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
105,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
121,
123
],
[
105,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
87,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
85,
133
],
[
133,
134
],
[
299,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
140,
142
],
[
137,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
143,
148
],
[
148,
149
],
[
148,
150
],
[
143,
151
],
[
151,
152
],
[
152,
153
],
[
143,
154
],
[
155,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
158,
159
],
[
159,
160
],
[
158,
161
],
[
155,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
164,
166
],
[
155,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
171,
172
],
[
171,
173
],
[
155,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
174,
178
],
[
137,
179
],
[
179,
180
],
[
180,
181
],
[
179,
182
],
[
135,
183
],
[
183,
184
],
[
299,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
187,
189
],
[
185,
190
],
[
190,
191
],
[
190,
192
],
[
185,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
197,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
196,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
206,
213
],
[
213,
214
],
[
214,
215
],
[
214,
216
],
[
195,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
185,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
223,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
232,
233
],
[
227,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
238,
239
],
[
223,
240
],
[
240,
241
],
[
185,
242
],
[
242,
243
],
[
242,
244
],
[
244,
245
],
[
245,
246
],
[
246,
247
],
[
247,
248
],
[
246,
249
],
[
249,
250
],
[
185,
251
],
[
251,
252
],
[
251,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
253,
258
],
[
258,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
258,
263
],
[
263,
264
],
[
263,
265
],
[
258,
266
],
[
266,
267
],
[
267,
268
],
[
258,
269
],
[
269,
270
],
[
270,
271
],
[
271,
272
],
[
271,
273
],
[
270,
274
],
[
274,
275
],
[
253,
276
],
[
276,
277
],
[
251,
278
],
[
278,
279
],
[
185,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
283,
284
],
[
284,
285
],
[
285,
286
],
[
284,
287
],
[
287,
288
],
[
185,
289
],
[
289,
290
],
[
289,
291
],
[
291,
292
],
[
292,
293
],
[
293,
294
],
[
294,
295
],
[
293,
296
],
[
296,
297
],
[
0,
298
],
[
298,
299
],
[
298,
300
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\tstatic long mod = (long)1e9+7;\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc=new FastScanner();\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tboolean flag = false;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint s = sc.nextInt();\n\t\t\tint t = sc.nextInt();\n\t\t\tif(s==t)\n\t\t\t\tcount++;\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\tif(count ==3)\n\t\t\t\tflag = true;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(flag ? \"Yes\" : \"No\");\n\t}\n\t\n\tstatic final Random random = new Random();\n\t\n\tstatic void sort(int[] a) {\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tint cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic void sortl(long[] a) {\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tlong cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tString nextLine() { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n\t\t} \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tdouble nextDouble() { \n return Double.parseDouble(next()); \n } \n\t}\n\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic long mod = (long)1e9+7;\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc=new FastScanner();\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tboolean flag = false;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint s = sc.nextInt();\n\t\t\tint t = sc.nextInt();\n\t\t\tif(s==t)\n\t\t\t\tcount++;\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\tif(count ==3)\n\t\t\t\tflag = true;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(flag ? \"Yes\" : \"No\");\n\t}\n\t\n\tstatic final Random random = new Random();\n\t\n\tstatic void sort(int[] a) {\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tint cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic void sortl(long[] a) {\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tlong cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tString nextLine() { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n\t\t} \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tdouble nextDouble() { \n return Double.parseDouble(next()); \n } \n\t}\n\n}",
"Main",
"static long mod = (long)1e9+7;",
"mod",
"(long)1e9+7",
"(long)1e9",
"7",
"static final Random random = new Random();",
"random",
"new Random()",
"public static void main(String[] args) {\n\t\tFastScanner sc=new FastScanner();\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tboolean flag = false;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint s = sc.nextInt();\n\t\t\tint t = sc.nextInt();\n\t\t\tif(s==t)\n\t\t\t\tcount++;\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\tif(count ==3)\n\t\t\t\tflag = true;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(flag ? \"Yes\" : \"No\");\n\t}",
"main",
"{\n\t\tFastScanner sc=new FastScanner();\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tboolean flag = false;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint s = sc.nextInt();\n\t\t\tint t = sc.nextInt();\n\t\t\tif(s==t)\n\t\t\t\tcount++;\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\tif(count ==3)\n\t\t\t\tflag = true;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(flag ? \"Yes\" : \"No\");\n\t}",
"FastScanner sc=new FastScanner();",
"sc",
"new FastScanner()",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"boolean flag = false;",
"flag",
"false",
"for(int i =0; i<n; i++) {\n\t\t\tint s = sc.nextInt();\n\t\t\tint t = sc.nextInt();\n\t\t\tif(s==t)\n\t\t\t\tcount++;\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\tif(count ==3)\n\t\t\t\tflag = true;\n\t\t\t\n\t\t}",
"int i =0;",
"int i =0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint s = sc.nextInt();\n\t\t\tint t = sc.nextInt();\n\t\t\tif(s==t)\n\t\t\t\tcount++;\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\tif(count ==3)\n\t\t\t\tflag = true;\n\t\t\t\n\t\t}",
"{\n\t\t\tint s = sc.nextInt();\n\t\t\tint t = sc.nextInt();\n\t\t\tif(s==t)\n\t\t\t\tcount++;\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\tif(count ==3)\n\t\t\t\tflag = true;\n\t\t\t\n\t\t}",
"int s = sc.nextInt();",
"s",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int t = sc.nextInt();",
"t",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(s==t)\n\t\t\t\tcount++;\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}",
"s==t",
"s",
"t",
"count++",
"count",
"{\n\t\t\t\tcount=0;\n\t\t\t}",
"count=0",
"count",
"0",
"if(count ==3)\n\t\t\t\tflag = true;",
"count ==3",
"count",
"3",
"flag = true",
"flag",
"true",
"System.out.println(flag ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"flag ? \"Yes\" : \"No\"",
"flag",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"static void sort(int[] a) {\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tint cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}",
"sort",
"{\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tint cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}",
"int n = a.length;",
"n",
"a.length",
"a",
"a.length",
"for(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tint cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}",
"int i =0;",
"int i =0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint val = random.nextInt(n);\n\t\t\tint cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}",
"{\n\t\t\tint val = random.nextInt(n);\n\t\t\tint cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}",
"int val = random.nextInt(n);",
"val",
"random.nextInt(n)",
"random.nextInt",
"random",
"n",
"int cur = a[i];",
"cur",
"a[i]",
"a",
"i",
"a[i] = a[val]",
"a[i]",
"a",
"i",
"a[val]",
"a",
"val",
"a[val] = cur",
"a[val]",
"a",
"val",
"cur",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int[] a",
"a",
"static void sortl(long[] a) {\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tlong cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}",
"sortl",
"{\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tlong cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}",
"int n = a.length;",
"n",
"a.length",
"a",
"a.length",
"for(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tlong cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}",
"int i =0;",
"int i =0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint val = random.nextInt(n);\n\t\t\tlong cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}",
"{\n\t\t\tint val = random.nextInt(n);\n\t\t\tlong cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}",
"int val = random.nextInt(n);",
"val",
"random.nextInt(n)",
"random.nextInt",
"random",
"n",
"long cur = a[i];",
"cur",
"a[i]",
"a",
"i",
"a[i] = a[val]",
"a[i]",
"a",
"i",
"a[val]",
"a",
"val",
"a[val] = cur",
"a[val]",
"a",
"val",
"cur",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"long[] a",
"a",
"static class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tString nextLine() { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n\t\t} \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tdouble nextDouble() { \n return Double.parseDouble(next()); \n } \n\t}",
"FastScanner",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st=new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() {\n\t\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"while (st == null || !st.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"{\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"try {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t}",
"st=new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"String nextLine() { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n\t\t}",
"nextLine",
"{ \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n\t\t}",
"String str = \"\";",
"str",
"\"\"",
"try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n }",
"catch (IOException e) \n { \n e.printStackTrace(); \n }",
"IOException e",
"{ \n e.printStackTrace(); \n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ \n str = br.readLine(); \n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"int[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}",
"readArray",
"{\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}",
"int[] a=new int[n];",
"a",
"new int[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextInt();",
"a[i]=nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() { \n return Double.parseDouble(next()); \n }",
"nextDouble",
"{ \n return Double.parseDouble(next()); \n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public class Main {\n\tstatic long mod = (long)1e9+7;\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc=new FastScanner();\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tboolean flag = false;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint s = sc.nextInt();\n\t\t\tint t = sc.nextInt();\n\t\t\tif(s==t)\n\t\t\t\tcount++;\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\tif(count ==3)\n\t\t\t\tflag = true;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(flag ? \"Yes\" : \"No\");\n\t}\n\t\n\tstatic final Random random = new Random();\n\t\n\tstatic void sort(int[] a) {\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tint cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic void sortl(long[] a) {\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tlong cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tString nextLine() { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n\t\t} \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tdouble nextDouble() { \n return Double.parseDouble(next()); \n } \n\t}\n\n}",
"public class Main {\n\tstatic long mod = (long)1e9+7;\n\tpublic static void main(String[] args) {\n\t\tFastScanner sc=new FastScanner();\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tboolean flag = false;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint s = sc.nextInt();\n\t\t\tint t = sc.nextInt();\n\t\t\tif(s==t)\n\t\t\t\tcount++;\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\tif(count ==3)\n\t\t\t\tflag = true;\n\t\t\t\n\t\t}\n\t\t\n\t\tSystem.out.println(flag ? \"Yes\" : \"No\");\n\t}\n\t\n\tstatic final Random random = new Random();\n\t\n\tstatic void sort(int[] a) {\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tint cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic void sortl(long[] a) {\n\t\tint n = a.length;\n\t\tfor(int i =0; i<n; i++) {\n\t\t\tint val = random.nextInt(n);\n\t\t\tlong cur = a[i];\n\t\t\ta[i] = a[val];\n\t\t\ta[val] = cur;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreTokens()) {\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tString nextLine() { \n String str = \"\"; \n try\n { \n str = br.readLine(); \n } \n catch (IOException e) \n { \n e.printStackTrace(); \n } \n return str; \n\t\t} \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tint[] readArray(int n) {\n\t\t\tint[] a=new int[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextInt();\n\t\t\treturn a;\n\t\t}\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tdouble nextDouble() { \n return Double.parseDouble(next()); \n } \n\t}\n\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
static long mod = (long)1e9+7;
public static void main(String[] args) {
FastScanner sc=new FastScanner();
int n = sc.nextInt();
int count = 0;
boolean flag = false;
for(int i =0; i<n; i++) {
int s = sc.nextInt();
int t = sc.nextInt();
if(s==t)
count++;
else {
count=0;
}
if(count ==3)
flag = true;
}
System.out.println(flag ? "Yes" : "No");
}
static final Random random = new Random();
static void sort(int[] a) {
int n = a.length;
for(int i =0; i<n; i++) {
int val = random.nextInt(n);
int cur = a[i];
a[i] = a[val];
a[val] = cur;
}
Arrays.sort(a);
}
static void sortl(long[] a) {
int n = a.length;
for(int i =0; i<n; i++) {
int val = random.nextInt(n);
long cur = a[i];
a[i] = a[val];
a[val] = cur;
}
Arrays.sort(a);
}
static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
String next() {
while (st == null || !st.hasMoreTokens()) {
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
String nextLine() {
String str = "";
try
{
str = br.readLine();
}
catch (IOException e)
{
e.printStackTrace();
}
return str;
}
int nextInt() {
return Integer.parseInt(next());
}
int[] readArray(int n) {
int[] a=new int[n];
for (int i=0; i<n; i++) a[i]=nextInt();
return a;
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
13,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
11,
1,
0,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
17,
4,
18,
13,
13,
2,
4,
18,
13,
13,
4,
18,
13,
2,
13,
17,
2,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
17,
4,
18,
18,
13,
13,
17,
29,
17,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
192,
8
],
[
192,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
11,
22
],
[
22,
23
],
[
11,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
11,
29
],
[
29,
30
],
[
29,
31
],
[
11,
32
],
[
32,
33
],
[
32,
34
],
[
11,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
47,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
47,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
11,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
75,
76
],
[
66,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
80,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
79,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
90,
93
],
[
79,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
11,
99
],
[
99,
100
],
[
99,
101
],
[
99,
102
],
[
9,
103
],
[
103,
104
],
[
192,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
110,
120
],
[
120,
121
],
[
121,
122
],
[
110,
123
],
[
124,
124
],
[
124,
125
],
[
125,
126
],
[
127,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
130,
133
],
[
127,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
135,
138
],
[
134,
139
],
[
139,
140
],
[
140,
141
],
[
139,
142
],
[
142,
143
],
[
142,
144
],
[
127,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
149,
150
],
[
149,
151
],
[
145,
152
],
[
152,
153
],
[
153,
154
],
[
152,
155
],
[
155,
156
],
[
155,
157
],
[
125,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
159,
164
],
[
158,
165
],
[
165,
166
],
[
107,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
107,
173
],
[
173,
174
],
[
105,
175
],
[
175,
176
],
[
105,
177
],
[
177,
178
],
[
192,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
181,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
179,
189
],
[
189,
190
],
[
0,
191
],
[
191,
192
],
[
191,
193
]
]
| [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n void run(String[] args){\n Scanner scan=new Scanner(System.in);\n Integer count=scan.nextInt();\n Integer one;\n Integer two;\n Integer i;\n ArrayList<Integer>ones=new ArrayList<>();\n ArrayList<Integer>twos=new ArrayList<>();\n ArrayList<Integer>counts=new ArrayList<>();\n for(i=0;i<count;i++){\n one=scan.nextInt();\n two=scan.nextInt();\n ones.add(one);\n twos.add(two);\n }\n for(i=0;i<count;i++){\n if(ones.get(i)==twos.get(i)){\n counts.add(1);\n }\n else{\n counts.add(0);\n }\n }\n print(count,counts);\n }\n Integer print(Integer count,ArrayList<Integer>counts){\n Integer i;\n for(i=0;i<count-2;i++){\n if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){\n System.out.println(\"Yes\");\n return 0;\n }\n }\n System.out.println(\"No\");\n return 0;\n }\n public static void main(String args[]){\n Main printer = new Main();\n printer.run(args);\n }\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n void run(String[] args){\n Scanner scan=new Scanner(System.in);\n Integer count=scan.nextInt();\n Integer one;\n Integer two;\n Integer i;\n ArrayList<Integer>ones=new ArrayList<>();\n ArrayList<Integer>twos=new ArrayList<>();\n ArrayList<Integer>counts=new ArrayList<>();\n for(i=0;i<count;i++){\n one=scan.nextInt();\n two=scan.nextInt();\n ones.add(one);\n twos.add(two);\n }\n for(i=0;i<count;i++){\n if(ones.get(i)==twos.get(i)){\n counts.add(1);\n }\n else{\n counts.add(0);\n }\n }\n print(count,counts);\n }\n Integer print(Integer count,ArrayList<Integer>counts){\n Integer i;\n for(i=0;i<count-2;i++){\n if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){\n System.out.println(\"Yes\");\n return 0;\n }\n }\n System.out.println(\"No\");\n return 0;\n }\n public static void main(String args[]){\n Main printer = new Main();\n printer.run(args);\n }\n}",
"Main",
"void run(String[] args){\n Scanner scan=new Scanner(System.in);\n Integer count=scan.nextInt();\n Integer one;\n Integer two;\n Integer i;\n ArrayList<Integer>ones=new ArrayList<>();\n ArrayList<Integer>twos=new ArrayList<>();\n ArrayList<Integer>counts=new ArrayList<>();\n for(i=0;i<count;i++){\n one=scan.nextInt();\n two=scan.nextInt();\n ones.add(one);\n twos.add(two);\n }\n for(i=0;i<count;i++){\n if(ones.get(i)==twos.get(i)){\n counts.add(1);\n }\n else{\n counts.add(0);\n }\n }\n print(count,counts);\n }",
"run",
"{\n Scanner scan=new Scanner(System.in);\n Integer count=scan.nextInt();\n Integer one;\n Integer two;\n Integer i;\n ArrayList<Integer>ones=new ArrayList<>();\n ArrayList<Integer>twos=new ArrayList<>();\n ArrayList<Integer>counts=new ArrayList<>();\n for(i=0;i<count;i++){\n one=scan.nextInt();\n two=scan.nextInt();\n ones.add(one);\n twos.add(two);\n }\n for(i=0;i<count;i++){\n if(ones.get(i)==twos.get(i)){\n counts.add(1);\n }\n else{\n counts.add(0);\n }\n }\n print(count,counts);\n }",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"Integer count=scan.nextInt();",
"count",
"scan.nextInt()",
"scan.nextInt",
"scan",
"Integer one;",
"one",
"Integer two;",
"two",
"Integer i;",
"i",
"ArrayList<Integer>ones=new ArrayList<>();",
"ones",
"new ArrayList<>()",
"ArrayList<Integer>twos=new ArrayList<>();",
"twos",
"new ArrayList<>()",
"ArrayList<Integer>counts=new ArrayList<>();",
"counts",
"new ArrayList<>()",
"for(i=0;i<count;i++){\n one=scan.nextInt();\n two=scan.nextInt();\n ones.add(one);\n twos.add(two);\n }",
"i=0;",
"i=0",
"i",
"0",
"i<count",
"i",
"count",
"i++",
"i++",
"i",
"{\n one=scan.nextInt();\n two=scan.nextInt();\n ones.add(one);\n twos.add(two);\n }",
"{\n one=scan.nextInt();\n two=scan.nextInt();\n ones.add(one);\n twos.add(two);\n }",
"one=scan.nextInt()",
"one",
"scan.nextInt()",
"scan.nextInt",
"scan",
"two=scan.nextInt()",
"two",
"scan.nextInt()",
"scan.nextInt",
"scan",
"ones.add(one)",
"ones.add",
"ones",
"one",
"twos.add(two)",
"twos.add",
"twos",
"two",
"for(i=0;i<count;i++){\n if(ones.get(i)==twos.get(i)){\n counts.add(1);\n }\n else{\n counts.add(0);\n }\n }",
"i=0;",
"i=0",
"i",
"0",
"i<count",
"i",
"count",
"i++",
"i++",
"i",
"{\n if(ones.get(i)==twos.get(i)){\n counts.add(1);\n }\n else{\n counts.add(0);\n }\n }",
"{\n if(ones.get(i)==twos.get(i)){\n counts.add(1);\n }\n else{\n counts.add(0);\n }\n }",
"if(ones.get(i)==twos.get(i)){\n counts.add(1);\n }\n else{\n counts.add(0);\n }",
"ones.get(i)==twos.get(i)",
"ones.get(i)",
"ones.get",
"ones",
"i",
"twos.get(i)",
"twos.get",
"twos",
"i",
"{\n counts.add(1);\n }",
"counts.add(1)",
"counts.add",
"counts",
"1",
"{\n counts.add(0);\n }",
"counts.add(0)",
"counts.add",
"counts",
"0",
"print(count,counts)",
"print",
"count",
"counts",
"String[] args",
"args",
"Integer print(Integer count,ArrayList<Integer>counts){\n Integer i;\n for(i=0;i<count-2;i++){\n if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){\n System.out.println(\"Yes\");\n return 0;\n }\n }\n System.out.println(\"No\");\n return 0;\n }",
"print",
"{\n Integer i;\n for(i=0;i<count-2;i++){\n if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){\n System.out.println(\"Yes\");\n return 0;\n }\n }\n System.out.println(\"No\");\n return 0;\n }",
"Integer i;",
"i",
"for(i=0;i<count-2;i++){\n if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){\n System.out.println(\"Yes\");\n return 0;\n }\n }",
"i=0;",
"i=0",
"i",
"0",
"i<count-2",
"i",
"count-2",
"count",
"2",
"i++",
"i++",
"i",
"{\n if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){\n System.out.println(\"Yes\");\n return 0;\n }\n }",
"{\n if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){\n System.out.println(\"Yes\");\n return 0;\n }\n }",
"if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){\n System.out.println(\"Yes\");\n return 0;\n }",
"(1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))",
"(1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))",
"(1==counts.get(i))",
"1",
"counts.get(i)",
"counts.get",
"counts",
"i",
"(counts.get(i)==counts.get(i+1))",
"counts.get(i)",
"counts.get",
"counts",
"i",
"counts.get(i+1)",
"counts.get",
"counts",
"i+1",
"i",
"1",
"(counts.get(i+1)==counts.get(i+2))",
"counts.get(i+1)",
"counts.get",
"counts",
"i+1",
"i",
"1",
"counts.get(i+2)",
"counts.get",
"counts",
"i+2",
"i",
"2",
"{\n System.out.println(\"Yes\");\n return 0;\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return 0;",
"0",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"return 0;",
"0",
"Integer count",
"count",
"ArrayList<Integer>counts",
"counts",
"public static void main(String args[]){\n Main printer = new Main();\n printer.run(args);\n }",
"main",
"{\n Main printer = new Main();\n printer.run(args);\n }",
"Main printer = new Main();",
"printer",
"new Main()",
"printer.run(args)",
"printer.run",
"printer",
"args",
"String args[]",
"args",
"public class Main {\n void run(String[] args){\n Scanner scan=new Scanner(System.in);\n Integer count=scan.nextInt();\n Integer one;\n Integer two;\n Integer i;\n ArrayList<Integer>ones=new ArrayList<>();\n ArrayList<Integer>twos=new ArrayList<>();\n ArrayList<Integer>counts=new ArrayList<>();\n for(i=0;i<count;i++){\n one=scan.nextInt();\n two=scan.nextInt();\n ones.add(one);\n twos.add(two);\n }\n for(i=0;i<count;i++){\n if(ones.get(i)==twos.get(i)){\n counts.add(1);\n }\n else{\n counts.add(0);\n }\n }\n print(count,counts);\n }\n Integer print(Integer count,ArrayList<Integer>counts){\n Integer i;\n for(i=0;i<count-2;i++){\n if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){\n System.out.println(\"Yes\");\n return 0;\n }\n }\n System.out.println(\"No\");\n return 0;\n }\n public static void main(String args[]){\n Main printer = new Main();\n printer.run(args);\n }\n}",
"public class Main {\n void run(String[] args){\n Scanner scan=new Scanner(System.in);\n Integer count=scan.nextInt();\n Integer one;\n Integer two;\n Integer i;\n ArrayList<Integer>ones=new ArrayList<>();\n ArrayList<Integer>twos=new ArrayList<>();\n ArrayList<Integer>counts=new ArrayList<>();\n for(i=0;i<count;i++){\n one=scan.nextInt();\n two=scan.nextInt();\n ones.add(one);\n twos.add(two);\n }\n for(i=0;i<count;i++){\n if(ones.get(i)==twos.get(i)){\n counts.add(1);\n }\n else{\n counts.add(0);\n }\n }\n print(count,counts);\n }\n Integer print(Integer count,ArrayList<Integer>counts){\n Integer i;\n for(i=0;i<count-2;i++){\n if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){\n System.out.println(\"Yes\");\n return 0;\n }\n }\n System.out.println(\"No\");\n return 0;\n }\n public static void main(String args[]){\n Main printer = new Main();\n printer.run(args);\n }\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.Scanner;
public class Main {
void run(String[] args){
Scanner scan=new Scanner(System.in);
Integer count=scan.nextInt();
Integer one;
Integer two;
Integer i;
ArrayList<Integer>ones=new ArrayList<>();
ArrayList<Integer>twos=new ArrayList<>();
ArrayList<Integer>counts=new ArrayList<>();
for(i=0;i<count;i++){
one=scan.nextInt();
two=scan.nextInt();
ones.add(one);
twos.add(two);
}
for(i=0;i<count;i++){
if(ones.get(i)==twos.get(i)){
counts.add(1);
}
else{
counts.add(0);
}
}
print(count,counts);
}
Integer print(Integer count,ArrayList<Integer>counts){
Integer i;
for(i=0;i<count-2;i++){
if((1==counts.get(i))&&(counts.get(i)==counts.get(i+1))&&(counts.get(i+1)==counts.get(i+2))){
System.out.println("Yes");
return 0;
}
}
System.out.println("No");
return 0;
}
public static void main(String args[]){
Main printer = new Main();
printer.run(args);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
41,
13,
20,
4,
18,
13,
4,
18,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
13,
0,
13,
4,
13,
14,
2,
13,
13,
40,
13,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
13,
4,
18,
13,
17,
4,
18,
13,
17,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
6,
13,
41,
13,
18,
13,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
14,
2,
13,
13,
30,
29,
17,
30,
0,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
17,
29,
17,
12,
13,
30,
14,
4,
13,
29,
18,
13,
40,
13,
29,
40,
17,
12,
13,
30,
29,
2,
2,
17,
13,
2,
13,
17,
23,
13,
12,
13,
30,
42,
2,
4,
13,
40,
4,
13,
18,
13,
13,
40,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
14,
2,
2,
13,
17,
2,
17,
13,
30,
37,
20,
42,
17,
30,
14,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
14,
2,
2,
13,
40,
17,
40,
4,
13,
13,
30,
29,
8,
13,
40,
13,
13,
30,
37,
20,
0,
13,
4,
13,
12,
13,
30,
41,
13,
4,
13,
14,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
37,
20,
29,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
34,
35
],
[
34,
36
],
[
0,
37
],
[
37,
38
],
[
37,
39
],
[
0,
40
],
[
40,
41
],
[
40,
42
],
[
0,
43
],
[
43,
44
],
[
43,
45
],
[
0,
46
],
[
46,
47
],
[
46,
48
],
[
0,
49
],
[
49,
50
],
[
49,
51
],
[
0,
52
],
[
52,
53
],
[
52,
54
],
[
0,
55
],
[
55,
56
],
[
55,
57
],
[
0,
58
],
[
58,
59
],
[
58,
60
],
[
0,
61
],
[
61,
62
],
[
61,
63
],
[
0,
64
],
[
659,
65
],
[
659,
66
],
[
66,
67
],
[
66,
68
],
[
659,
69
],
[
69,
70
],
[
69,
71
],
[
659,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
74,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
72,
86
],
[
86,
87
],
[
659,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
90,
95
],
[
95,
96
],
[
90,
97
],
[
97,
98
],
[
90,
99
],
[
99,
100
],
[
99,
101
],
[
90,
102
],
[
102,
103
],
[
102,
104
],
[
90,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
105,
113
],
[
113,
114
],
[
114,
115
],
[
105,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
117,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
117,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
130,
131
],
[
126,
132
],
[
132,
133
],
[
132,
134
],
[
117,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
90,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
145,
148
],
[
143,
149
],
[
149,
150
],
[
150,
151
],
[
149,
152
],
[
659,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
659,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
162,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
172,
173
],
[
172,
174
],
[
167,
175
],
[
175,
176
],
[
176,
177
],
[
167,
178
],
[
179,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
184,
185
],
[
162,
186
],
[
186,
187
],
[
160,
188
],
[
188,
189
],
[
659,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
192,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
198,
203
],
[
203,
204
],
[
203,
205
],
[
198,
206
],
[
206,
207
],
[
207,
208
],
[
198,
209
],
[
210,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
211,
216
],
[
216,
217
],
[
216,
218
],
[
211,
219
],
[
219,
220
],
[
220,
221
],
[
211,
222
],
[
223,
223
],
[
223,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
226,
228
],
[
225,
229
],
[
224,
230
],
[
230,
231
],
[
192,
232
],
[
232,
233
],
[
190,
234
],
[
234,
235
],
[
190,
236
],
[
236,
237
],
[
659,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
659,
245
],
[
245,
246
],
[
245,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
247,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
252,
257
],
[
257,
258
],
[
257,
259
],
[
252,
260
],
[
260,
261
],
[
261,
262
],
[
252,
263
],
[
264,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
265,
269
],
[
269,
270
],
[
247,
271
],
[
271,
272
],
[
245,
273
],
[
273,
274
],
[
659,
275
],
[
275,
276
],
[
275,
277
],
[
277,
278
],
[
278,
279
],
[
278,
280
],
[
277,
283
],
[
283,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
283,
288
],
[
288,
289
],
[
288,
290
],
[
283,
291
],
[
291,
292
],
[
292,
293
],
[
283,
294
],
[
295,
295
],
[
295,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
296,
301
],
[
301,
302
],
[
301,
303
],
[
296,
304
],
[
304,
305
],
[
305,
306
],
[
296,
307
],
[
308,
308
],
[
308,
309
],
[
309,
310
],
[
310,
311
],
[
311,
312
],
[
311,
313
],
[
310,
314
],
[
309,
315
],
[
315,
316
],
[
277,
317
],
[
317,
318
],
[
275,
319
],
[
319,
320
],
[
275,
321
],
[
321,
322
],
[
659,
323
],
[
323,
324
],
[
323,
325
],
[
325,
326
],
[
326,
327
],
[
327,
328
],
[
328,
329
],
[
659,
330
],
[
330,
331
],
[
330,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
332,
337
],
[
337,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
337,
342
],
[
342,
343
],
[
342,
344
],
[
337,
345
],
[
345,
346
],
[
346,
347
],
[
337,
348
],
[
349,
349
],
[
349,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
350,
354
],
[
354,
355
],
[
332,
356
],
[
356,
357
],
[
330,
358
],
[
358,
359
],
[
659,
360
],
[
360,
361
],
[
360,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
362,
368
],
[
368,
369
],
[
369,
370
],
[
370,
371
],
[
370,
372
],
[
368,
373
],
[
373,
374
],
[
373,
375
],
[
368,
376
],
[
376,
377
],
[
377,
378
],
[
368,
379
],
[
380,
380
],
[
380,
381
],
[
381,
382
],
[
382,
383
],
[
383,
384
],
[
383,
385
],
[
381,
386
],
[
386,
387
],
[
386,
388
],
[
381,
389
],
[
389,
390
],
[
390,
391
],
[
381,
392
],
[
393,
393
],
[
393,
394
],
[
394,
395
],
[
395,
396
],
[
396,
397
],
[
396,
398
],
[
395,
399
],
[
394,
400
],
[
400,
401
],
[
362,
402
],
[
402,
403
],
[
360,
404
],
[
404,
405
],
[
360,
406
],
[
406,
407
],
[
0,
408
],
[
408,
409
],
[
408,
410
],
[
410,
411
],
[
410,
412
],
[
412,
413
],
[
412,
414
],
[
408,
415
],
[
415,
416
],
[
415,
417
],
[
408,
419
],
[
419,
420
],
[
419,
421
],
[
408,
422
],
[
422,
423
],
[
422,
424
],
[
408,
425
],
[
425,
426
],
[
425,
427
],
[
427,
428
],
[
428,
429
],
[
429,
430
],
[
429,
431
],
[
428,
432
],
[
432,
433
],
[
433,
434
],
[
428,
435
],
[
435,
436
],
[
436,
437
],
[
436,
438
],
[
435,
439
],
[
439,
440
],
[
440,
441
],
[
440,
442
],
[
442,
443
],
[
443,
444
],
[
444,
445
],
[
439,
446
],
[
446,
447
],
[
447,
448
],
[
447,
449
],
[
449,
450
],
[
450,
451
],
[
449,
452
],
[
435,
453
],
[
453,
454
],
[
454,
455
],
[
454,
456
],
[
453,
457
],
[
457,
458
],
[
458,
459
],
[
427,
460
],
[
460,
461
],
[
408,
462
],
[
462,
463
],
[
462,
464
],
[
464,
465
],
[
465,
466
],
[
466,
467
],
[
465,
468
],
[
468,
469
],
[
469,
470
],
[
469,
471
],
[
471,
472
],
[
465,
473
],
[
473,
474
],
[
474,
475
],
[
408,
476
],
[
476,
477
],
[
476,
478
],
[
478,
479
],
[
479,
480
],
[
480,
481
],
[
481,
482
],
[
481,
483
],
[
480,
484
],
[
484,
485
],
[
484,
486
],
[
476,
487
],
[
487,
488
],
[
408,
489
],
[
489,
490
],
[
489,
491
],
[
491,
492
],
[
492,
493
],
[
493,
494
],
[
494,
495
],
[
493,
496
],
[
496,
497
],
[
497,
498
],
[
497,
499
],
[
499,
500
],
[
499,
501
],
[
492,
502
],
[
502,
503
],
[
491,
504
],
[
504,
505
],
[
505,
506
],
[
408,
507
],
[
507,
508
],
[
507,
509
],
[
509,
510
],
[
510,
511
],
[
511,
512
],
[
512,
513
],
[
510,
514
],
[
514,
515
],
[
509,
516
],
[
516,
517
],
[
516,
518
],
[
509,
519
],
[
519,
520
],
[
519,
521
],
[
521,
522
],
[
509,
523
],
[
523,
524
],
[
524,
525
],
[
524,
526
],
[
523,
527
],
[
527,
528
],
[
528,
529
],
[
529,
530
],
[
528,
531
],
[
527,
532
],
[
532,
533
],
[
532,
534
],
[
534,
535
],
[
509,
536
],
[
536,
537
],
[
537,
538
],
[
538,
539
],
[
408,
540
],
[
540,
541
],
[
540,
542
],
[
542,
543
],
[
543,
544
],
[
544,
545
],
[
545,
546
],
[
543,
547
],
[
547,
548
],
[
542,
549
],
[
549,
550
],
[
549,
551
],
[
542,
552
],
[
552,
553
],
[
552,
554
],
[
542,
555
],
[
555,
556
],
[
555,
557
],
[
557,
558
],
[
542,
559
],
[
559,
560
],
[
560,
561
],
[
560,
562
],
[
559,
563
],
[
563,
564
],
[
564,
565
],
[
564,
566
],
[
563,
567
],
[
567,
568
],
[
567,
569
],
[
569,
570
],
[
542,
571
],
[
571,
572
],
[
572,
573
],
[
573,
574
],
[
573,
575
],
[
572,
576
],
[
576,
577
],
[
576,
578
],
[
571,
579
],
[
579,
580
],
[
580,
581
],
[
542,
582
],
[
582,
583
],
[
582,
584
],
[
584,
585
],
[
585,
586
],
[
586,
587
],
[
587,
588
],
[
587,
589
],
[
586,
590
],
[
590,
591
],
[
590,
592
],
[
585,
593
],
[
593,
594
],
[
594,
595
],
[
594,
596
],
[
593,
597
],
[
597,
598
],
[
597,
599
],
[
599,
600
],
[
599,
601
],
[
585,
602
],
[
602,
603
],
[
603,
604
],
[
604,
605
],
[
604,
606
],
[
606,
607
],
[
603,
608
],
[
608,
609
],
[
609,
610
],
[
609,
611
],
[
602,
612
],
[
612,
613
],
[
613,
614
],
[
614,
615
],
[
614,
616
],
[
616,
617
],
[
614,
618
],
[
602,
619
],
[
619,
620
],
[
620,
621
],
[
584,
622
],
[
622,
623
],
[
622,
624
],
[
624,
625
],
[
408,
626
],
[
626,
627
],
[
626,
628
],
[
628,
629
],
[
629,
630
],
[
629,
631
],
[
631,
632
],
[
628,
633
],
[
633,
634
],
[
634,
635
],
[
635,
636
],
[
635,
637
],
[
637,
638
],
[
637,
639
],
[
634,
640
],
[
640,
641
],
[
640,
642
],
[
642,
643
],
[
642,
644
],
[
633,
645
],
[
645,
646
],
[
628,
647
],
[
647,
648
],
[
408,
649
],
[
649,
650
],
[
649,
651
],
[
651,
652
],
[
652,
653
],
[
653,
654
],
[
654,
655
],
[
653,
656
],
[
656,
657
],
[
0,
658
],
[
658,
659
],
[
658,
660
]
]
| [
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.net.ConnectException;\nimport java.rmi.dgc.Lease;\nimport java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Deque;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.NoSuchElementException;\nimport java.util.Objects;\nimport java.util.Set;\nimport java.util.Stack;\nimport java.util.TreeMap;\nimport java.util.TreeSet;\n\nimport static java.util.Comparator.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tMain main = new Main();\n\t\tmain.solve();\n\t\tmain.out.close();\n\t}\n\t// ======================================================================\n\tpublic void solve() {\n\t\tint N = ni();\n\t\tint d1, d2, cnt = 0;\n\t\tboolean f = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\td1 = ni();\n\t\t\td2 = ni();\n\t\t\tif(d1 == d2)\tcnt++;\n\t\t\telse\t\t\tcnt = 0;\n\t\t\tif(cnt >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\tif(f)\tout.println(\"Yes\");\n\t\telse\tout.println(\"No\");\n\t}\n\n\t// ------------------------------------------\n\t// ライブラリ\n\t// ------------------------------------------\n\t// Print\n\tprivate PrintWriter out = new PrintWriter(System.out);\n\t\n\t// Scanner\n\tprivate FastScanner scan = new FastScanner();\n\tint ni(){ return scan.nextInt();}\n\tint[] ni(int n){int[] a = new int[n]; for(int i = 0; i < n; i++){a[i] = ni();} return a;}\n\tint[][] ni(int y, int x){int[][] a = new int[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ni();}} return a;}\n\tlong nl(){return scan.nextLong();}\n\tlong[] nl(int n){long[] a = new long[n]; for(int i = 0; i < n; i++){a[i] = nl();} return a;}\n\tlong[][] nl(int y, int x){long[][] a = new long[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = nl();}} return a;}\n\tString ns(){return scan.next();}\n\tString[] ns(int n){String[] a = new String[n]; for(int i = 0; i < n; i++){a[i] = ns();} return a;}\n\tString[][] ns(int y, int x){String[][] a = new String[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ns();}} return a;}\n}\nclass FastScanner {\n\tprivate final InputStream in = System.in;\n\tprivate final byte[] buffer = new byte[1024];\n\tprivate int ptr = 0;\n\tprivate int buflen = 0;\n\tprivate boolean hasNextByte() {\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tprivate int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n\tprivate static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n\tpublic boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}\n\tpublic String next() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile(isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\tpublic long nextLong() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tlong n = 0;\n\t\tboolean minus = false;\n\t\tint b = readByte();\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\tif (b < '0' || '9' < b) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile(true){\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t}else if(b == -1 || !isPrintableChar(b)){\n\t\t\t\treturn minus ? -n : n;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\tpublic int nextInt() {\n\t\tlong nl = nextLong();\n\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) nl;\n\t}\n\tpublic double nextDouble() { return Double.parseDouble(next());}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.net.ConnectException;",
"ConnectException",
"java.net",
"import java.rmi.dgc.Lease;",
"Lease",
"java.rmi.dgc",
"import java.util.ArrayDeque;",
"ArrayDeque",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Deque;",
"Deque",
"java.util",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Map;",
"Map",
"java.util",
"import java.util.NoSuchElementException;",
"NoSuchElementException",
"java.util",
"import java.util.Objects;",
"Objects",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"import java.util.Stack;",
"Stack",
"java.util",
"import java.util.TreeMap;",
"TreeMap",
"java.util",
"import java.util.TreeSet;",
"TreeSet",
"java.util",
"import static java.util.Comparator.*;",
"import static java.util.Comparator.*;",
"import static java.util.Comparator.*;",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tMain main = new Main();\n\t\tmain.solve();\n\t\tmain.out.close();\n\t}\n\t// ======================================================================\n\tpublic void solve() {\n\t\tint N = ni();\n\t\tint d1, d2, cnt = 0;\n\t\tboolean f = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\td1 = ni();\n\t\t\td2 = ni();\n\t\t\tif(d1 == d2)\tcnt++;\n\t\t\telse\t\t\tcnt = 0;\n\t\t\tif(cnt >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\tif(f)\tout.println(\"Yes\");\n\t\telse\tout.println(\"No\");\n\t}\n\n\t// ------------------------------------------\n\t// ライブラリ\n\t// ------------------------------------------\n\t// Print\n\tprivate PrintWriter out = new PrintWriter(System.out);\n\t\n\t// Scanner\n\tprivate FastScanner scan = new FastScanner();\n\tint ni(){ return scan.nextInt();}\n\tint[] ni(int n){int[] a = new int[n]; for(int i = 0; i < n; i++){a[i] = ni();} return a;}\n\tint[][] ni(int y, int x){int[][] a = new int[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ni();}} return a;}\n\tlong nl(){return scan.nextLong();}\n\tlong[] nl(int n){long[] a = new long[n]; for(int i = 0; i < n; i++){a[i] = nl();} return a;}\n\tlong[][] nl(int y, int x){long[][] a = new long[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = nl();}} return a;}\n\tString ns(){return scan.next();}\n\tString[] ns(int n){String[] a = new String[n]; for(int i = 0; i < n; i++){a[i] = ns();} return a;}\n\tString[][] ns(int y, int x){String[][] a = new String[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ns();}} return a;}\n}",
"Main",
"// ------------------------------------------\n\t// ライブラリ\n\t// ------------------------------------------\n\t// Print\n\tprivate PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"// Scanner\n\tprivate FastScanner scan = new FastScanner();",
"scan",
"new FastScanner()",
"public static void main(String[] args) {\n\t\tMain main = new Main();\n\t\tmain.solve();\n\t\tmain.out.close();\n\t}",
"main",
"{\n\t\tMain main = new Main();\n\t\tmain.solve();\n\t\tmain.out.close();\n\t}",
"Main main = new Main();",
"main",
"new Main()",
"main.solve()",
"main.solve",
"main",
"main.out.close()",
"main.out.close",
"main.out",
"main",
"main.out",
"String[] args",
"args",
"// ======================================================================\n\tpublic void solve() {\n\t\tint N = ni();\n\t\tint d1, d2, cnt = 0;\n\t\tboolean f = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\td1 = ni();\n\t\t\td2 = ni();\n\t\t\tif(d1 == d2)\tcnt++;\n\t\t\telse\t\t\tcnt = 0;\n\t\t\tif(cnt >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\tif(f)\tout.println(\"Yes\");\n\t\telse\tout.println(\"No\");\n\t}",
"solve",
"{\n\t\tint N = ni();\n\t\tint d1, d2, cnt = 0;\n\t\tboolean f = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\td1 = ni();\n\t\t\td2 = ni();\n\t\t\tif(d1 == d2)\tcnt++;\n\t\t\telse\t\t\tcnt = 0;\n\t\t\tif(cnt >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\tif(f)\tout.println(\"Yes\");\n\t\telse\tout.println(\"No\");\n\t}",
"int N = ni();",
"N",
"ni()",
"ni",
"int d1",
"d1",
"d2",
"d2",
"cnt = 0;",
"cnt",
"0",
"boolean f = false;",
"f",
"false",
"for (int i = 0; i < N; i++) {\n\t\t\td1 = ni();\n\t\t\td2 = ni();\n\t\t\tif(d1 == d2)\tcnt++;\n\t\t\telse\t\t\tcnt = 0;\n\t\t\tif(cnt >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\td1 = ni();\n\t\t\td2 = ni();\n\t\t\tif(d1 == d2)\tcnt++;\n\t\t\telse\t\t\tcnt = 0;\n\t\t\tif(cnt >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}",
"{\n\t\t\td1 = ni();\n\t\t\td2 = ni();\n\t\t\tif(d1 == d2)\tcnt++;\n\t\t\telse\t\t\tcnt = 0;\n\t\t\tif(cnt >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}",
"d1 = ni()",
"d1",
"ni()",
"ni",
"d2 = ni()",
"d2",
"ni()",
"ni",
"if(d1 == d2)\tcnt++;\n\t\t\telse\t\t\tcnt = 0;",
"d1 == d2",
"d1",
"d2",
"cnt++",
"cnt",
"cnt = 0",
"cnt",
"0",
"if(cnt >= 3) {\n\t\t\t\tf = true;\n\t\t\t}",
"cnt >= 3",
"cnt",
"3",
"{\n\t\t\t\tf = true;\n\t\t\t}",
"f = true",
"f",
"true",
"if(f)\tout.println(\"Yes\");\n\t\telse\tout.println(\"No\");",
"f",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"int ni(){ return scan.nextInt();}",
"ni",
"{ return scan.nextInt();}",
"return scan.nextInt();",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] ni(int n){int[] a = new int[n]; for(int i = 0; i < n; i++){a[i] = ni();} return a;}",
"ni",
"{int[] a = new int[n]; for(int i = 0; i < n; i++){a[i] = ni();} return a;}",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for(int i = 0; i < n; i++){a[i] = ni();}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{a[i] = ni();}",
"{a[i] = ni();}",
"a[i] = ni()",
"a[i]",
"a",
"i",
"ni()",
"ni",
"return a;",
"a",
"int n",
"n",
"int[][] ni(int y, int x){int[][] a = new int[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ni();}} return a;}",
"ni",
"{int[][] a = new int[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ni();}} return a;}",
"int[][] a = new int[y][x];",
"a",
"new int[y][x]",
"y",
"x",
"for(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ni();}}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < y",
"i",
"y",
"i++",
"i++",
"i",
"{for(int j = 0; j < x; j++){a[i][j] = ni();}}",
"{for(int j = 0; j < x; j++){a[i][j] = ni();}}",
"for(int j = 0; j < x; j++){a[i][j] = ni();}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < x",
"j",
"x",
"j++",
"j++",
"j",
"{a[i][j] = ni();}",
"{a[i][j] = ni();}",
"a[i][j] = ni()",
"a[i][j]",
"a[i]",
"a",
"i",
"j",
"ni()",
"ni",
"return a;",
"a",
"int y",
"y",
"int x",
"x",
"long nl(){return scan.nextLong();}",
"nl",
"{return scan.nextLong();}",
"return scan.nextLong();",
"scan.nextLong()",
"scan.nextLong",
"scan",
"long[] nl(int n){long[] a = new long[n]; for(int i = 0; i < n; i++){a[i] = nl();} return a;}",
"nl",
"{long[] a = new long[n]; for(int i = 0; i < n; i++){a[i] = nl();} return a;}",
"long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for(int i = 0; i < n; i++){a[i] = nl();}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{a[i] = nl();}",
"{a[i] = nl();}",
"a[i] = nl()",
"a[i]",
"a",
"i",
"nl()",
"nl",
"return a;",
"a",
"int n",
"n",
"long[][] nl(int y, int x){long[][] a = new long[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = nl();}} return a;}",
"nl",
"{long[][] a = new long[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = nl();}} return a;}",
"long[][] a = new long[y][x];",
"a",
"new long[y][x]",
"y",
"x",
"for(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = nl();}}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < y",
"i",
"y",
"i++",
"i++",
"i",
"{for(int j = 0; j < x; j++){a[i][j] = nl();}}",
"{for(int j = 0; j < x; j++){a[i][j] = nl();}}",
"for(int j = 0; j < x; j++){a[i][j] = nl();}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < x",
"j",
"x",
"j++",
"j++",
"j",
"{a[i][j] = nl();}",
"{a[i][j] = nl();}",
"a[i][j] = nl()",
"a[i][j]",
"a[i]",
"a",
"i",
"j",
"nl()",
"nl",
"return a;",
"a",
"int y",
"y",
"int x",
"x",
"String ns(){return scan.next();}",
"ns",
"{return scan.next();}",
"return scan.next();",
"scan.next()",
"scan.next",
"scan",
"String[] ns(int n){String[] a = new String[n]; for(int i = 0; i < n; i++){a[i] = ns();} return a;}",
"ns",
"{String[] a = new String[n]; for(int i = 0; i < n; i++){a[i] = ns();} return a;}",
"String[] a = new String[n];",
"a",
"new String[n]",
"n",
"for(int i = 0; i < n; i++){a[i] = ns();}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{a[i] = ns();}",
"{a[i] = ns();}",
"a[i] = ns()",
"a[i]",
"a",
"i",
"ns()",
"ns",
"return a;",
"a",
"int n",
"n",
"String[][] ns(int y, int x){String[][] a = new String[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ns();}} return a;}",
"ns",
"{String[][] a = new String[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ns();}} return a;}",
"String[][] a = new String[y][x];",
"a",
"new String[y][x]",
"y",
"x",
"for(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ns();}}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < y",
"i",
"y",
"i++",
"i++",
"i",
"{for(int j = 0; j < x; j++){a[i][j] = ns();}}",
"{for(int j = 0; j < x; j++){a[i][j] = ns();}}",
"for(int j = 0; j < x; j++){a[i][j] = ns();}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < x",
"j",
"x",
"j++",
"j++",
"j",
"{a[i][j] = ns();}",
"{a[i][j] = ns();}",
"a[i][j] = ns()",
"a[i][j]",
"a[i]",
"a",
"i",
"j",
"ns()",
"ns",
"return a;",
"a",
"int y",
"y",
"int x",
"x",
"class FastScanner {\n\tprivate final InputStream in = System.in;\n\tprivate final byte[] buffer = new byte[1024];\n\tprivate int ptr = 0;\n\tprivate int buflen = 0;\n\tprivate boolean hasNextByte() {\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tprivate int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}\n\tprivate static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}\n\tpublic boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}\n\tpublic String next() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile(isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\tpublic long nextLong() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tlong n = 0;\n\t\tboolean minus = false;\n\t\tint b = readByte();\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\tif (b < '0' || '9' < b) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile(true){\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t}else if(b == -1 || !isPrintableChar(b)){\n\t\t\t\treturn minus ? -n : n;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\tpublic int nextInt() {\n\t\tlong nl = nextLong();\n\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) nl;\n\t}\n\tpublic double nextDouble() { return Double.parseDouble(next());}\n}",
"FastScanner",
"private final InputStream in = System.in;",
"in",
"System.in",
"System",
"System.in",
"private final byte[] buffer = new byte[1024];",
"buffer",
"new byte[1024]",
"1024",
"private int ptr = 0;",
"ptr",
"0",
"private int buflen = 0;",
"buflen",
"0",
"private boolean hasNextByte() {\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"hasNextByte",
"{\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"if (ptr < buflen) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"ptr < buflen",
"ptr",
"buflen",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"ptr = 0",
"ptr",
"0",
"try {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"IOException e",
"{\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t}",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"buflen <= 0",
"buflen",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}",
"readByte",
"{ if (hasNextByte()) return buffer[ptr++]; else return -1;}",
"if (hasNextByte()) return buffer[ptr++]; else return -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}",
"isPrintableChar",
"{ return 33 <= c && c <= 126;}",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}",
"hasNext",
"{ while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}",
"while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;",
"hasNextByte() && !isPrintableChar(buffer[ptr])",
"hasNextByte()",
"hasNextByte",
"!isPrintableChar(buffer[ptr])",
"isPrintableChar(buffer[ptr])",
"isPrintableChar",
"buffer[ptr]",
"buffer",
"ptr",
"ptr++",
"ptr",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile(isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}",
"next",
"{\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile(isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while(isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public long nextLong() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tlong n = 0;\n\t\tboolean minus = false;\n\t\tint b = readByte();\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\tif (b < '0' || '9' < b) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile(true){\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t}else if(b == -1 || !isPrintableChar(b)){\n\t\t\t\treturn minus ? -n : n;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}",
"nextLong",
"{\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tlong n = 0;\n\t\tboolean minus = false;\n\t\tint b = readByte();\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\tif (b < '0' || '9' < b) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile(true){\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t}else if(b == -1 || !isPrintableChar(b)){\n\t\t\t\treturn minus ? -n : n;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"long n = 0;",
"n",
"0",
"boolean minus = false;",
"minus",
"false",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"if (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}",
"b == '-'",
"b",
"'-'",
"{\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"if (b < '0' || '9' < b) {\n\t\t\tthrow new NumberFormatException();\n\t\t}",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"{\n\t\t\tthrow new NumberFormatException();\n\t\t}",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while(true){\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t}else if(b == -1 || !isPrintableChar(b)){\n\t\t\t\treturn minus ? -n : n;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}",
"true",
"{\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t}else if(b == -1 || !isPrintableChar(b)){\n\t\t\t\treturn minus ? -n : n;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}",
"if ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t}else if(b == -1 || !isPrintableChar(b)){\n\t\t\t\treturn minus ? -n : n;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t}",
"n *= 10",
"n",
"10",
"n += b - '0'",
"n",
"b - '0'",
"b",
"'0'",
"if(b == -1 || !isPrintableChar(b)){\n\t\t\t\treturn minus ? -n : n;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t\t\t\treturn minus ? -n : n;\n\t\t\t}",
"return minus ? -n : n;",
"minus ? -n : n",
"minus",
"-n",
"n",
"n",
"{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"throw new NumberFormatException();",
"new NumberFormatException()",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public int nextInt() {\n\t\tlong nl = nextLong();\n\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) nl;\n\t}",
"nextInt",
"{\n\t\tlong nl = nextLong();\n\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) nl;\n\t}",
"long nl = nextLong();",
"nl",
"nextLong()",
"nextLong",
"if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();",
"nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE",
"nl < Integer.MIN_VALUE",
"nl",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"nl > Integer.MAX_VALUE",
"nl",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"throw new NumberFormatException();",
"new NumberFormatException()",
"return (int) nl;",
"(int) nl",
"public double nextDouble() { return Double.parseDouble(next());}",
"nextDouble",
"{ return Double.parseDouble(next());}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tMain main = new Main();\n\t\tmain.solve();\n\t\tmain.out.close();\n\t}\n\t// ======================================================================\n\tpublic void solve() {\n\t\tint N = ni();\n\t\tint d1, d2, cnt = 0;\n\t\tboolean f = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\td1 = ni();\n\t\t\td2 = ni();\n\t\t\tif(d1 == d2)\tcnt++;\n\t\t\telse\t\t\tcnt = 0;\n\t\t\tif(cnt >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\tif(f)\tout.println(\"Yes\");\n\t\telse\tout.println(\"No\");\n\t}\n\n\t// ------------------------------------------\n\t// ライブラリ\n\t// ------------------------------------------\n\t// Print\n\tprivate PrintWriter out = new PrintWriter(System.out);\n\t\n\t// Scanner\n\tprivate FastScanner scan = new FastScanner();\n\tint ni(){ return scan.nextInt();}\n\tint[] ni(int n){int[] a = new int[n]; for(int i = 0; i < n; i++){a[i] = ni();} return a;}\n\tint[][] ni(int y, int x){int[][] a = new int[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ni();}} return a;}\n\tlong nl(){return scan.nextLong();}\n\tlong[] nl(int n){long[] a = new long[n]; for(int i = 0; i < n; i++){a[i] = nl();} return a;}\n\tlong[][] nl(int y, int x){long[][] a = new long[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = nl();}} return a;}\n\tString ns(){return scan.next();}\n\tString[] ns(int n){String[] a = new String[n]; for(int i = 0; i < n; i++){a[i] = ns();} return a;}\n\tString[][] ns(int y, int x){String[][] a = new String[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ns();}} return a;}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tMain main = new Main();\n\t\tmain.solve();\n\t\tmain.out.close();\n\t}\n\t// ======================================================================\n\tpublic void solve() {\n\t\tint N = ni();\n\t\tint d1, d2, cnt = 0;\n\t\tboolean f = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\td1 = ni();\n\t\t\td2 = ni();\n\t\t\tif(d1 == d2)\tcnt++;\n\t\t\telse\t\t\tcnt = 0;\n\t\t\tif(cnt >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\tif(f)\tout.println(\"Yes\");\n\t\telse\tout.println(\"No\");\n\t}\n\n\t// ------------------------------------------\n\t// ライブラリ\n\t// ------------------------------------------\n\t// Print\n\tprivate PrintWriter out = new PrintWriter(System.out);\n\t\n\t// Scanner\n\tprivate FastScanner scan = new FastScanner();\n\tint ni(){ return scan.nextInt();}\n\tint[] ni(int n){int[] a = new int[n]; for(int i = 0; i < n; i++){a[i] = ni();} return a;}\n\tint[][] ni(int y, int x){int[][] a = new int[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ni();}} return a;}\n\tlong nl(){return scan.nextLong();}\n\tlong[] nl(int n){long[] a = new long[n]; for(int i = 0; i < n; i++){a[i] = nl();} return a;}\n\tlong[][] nl(int y, int x){long[][] a = new long[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = nl();}} return a;}\n\tString ns(){return scan.next();}\n\tString[] ns(int n){String[] a = new String[n]; for(int i = 0; i < n; i++){a[i] = ns();} return a;}\n\tString[][] ns(int y, int x){String[][] a = new String[y][x];\n\tfor(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ns();}} return a;}\n}",
"Main"
]
| import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.net.ConnectException;
import java.rmi.dgc.Lease;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Set;
import java.util.Stack;
import java.util.TreeMap;
import java.util.TreeSet;
import static java.util.Comparator.*;
public class Main {
public static void main(String[] args) {
Main main = new Main();
main.solve();
main.out.close();
}
// ======================================================================
public void solve() {
int N = ni();
int d1, d2, cnt = 0;
boolean f = false;
for (int i = 0; i < N; i++) {
d1 = ni();
d2 = ni();
if(d1 == d2) cnt++;
else cnt = 0;
if(cnt >= 3) {
f = true;
}
}
if(f) out.println("Yes");
else out.println("No");
}
// ------------------------------------------
// ライブラリ
// ------------------------------------------
// Print
private PrintWriter out = new PrintWriter(System.out);
// Scanner
private FastScanner scan = new FastScanner();
int ni(){ return scan.nextInt();}
int[] ni(int n){int[] a = new int[n]; for(int i = 0; i < n; i++){a[i] = ni();} return a;}
int[][] ni(int y, int x){int[][] a = new int[y][x];
for(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ni();}} return a;}
long nl(){return scan.nextLong();}
long[] nl(int n){long[] a = new long[n]; for(int i = 0; i < n; i++){a[i] = nl();} return a;}
long[][] nl(int y, int x){long[][] a = new long[y][x];
for(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = nl();}} return a;}
String ns(){return scan.next();}
String[] ns(int n){String[] a = new String[n]; for(int i = 0; i < n; i++){a[i] = ns();} return a;}
String[][] ns(int y, int x){String[][] a = new String[y][x];
for(int i = 0; i < y; i++){for(int j = 0; j < x; j++){a[i][j] = ns();}} return a;}
}
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
}else{
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
public boolean hasNext() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; return hasNextByte();}
public String next() {
if (!hasNext()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while(isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext()) throw new NoSuchElementException();
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while(true){
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
}else if(b == -1 || !isPrintableChar(b)){
return minus ? -n : n;
}else{
throw new NumberFormatException();
}
b = readByte();
}
}
public int nextInt() {
long nl = nextLong();
if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
return (int) nl;
}
public double nextDouble() { return Double.parseDouble(next());}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
13,
13,
17,
2,
18,
13,
2,
13,
17,
17,
2,
18,
13,
2,
13,
17,
17,
30,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
20,
17,
0,
18,
13,
17,
4,
18,
13,
0,
18,
13,
17,
4,
18,
13,
0,
18,
13,
13,
13,
4,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
171,
8
],
[
171,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
18,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
18,
28
],
[
28,
29
],
[
29,
30
],
[
18,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
37,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
11,
48
],
[
48,
49
],
[
48,
50
],
[
11,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
51,
63
],
[
63,
64
],
[
64,
65
],
[
51,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
79,
81
],
[
76,
82
],
[
70,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
83,
89
],
[
68,
90
],
[
90,
91
],
[
91,
92
],
[
11,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
93,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
9,
111
],
[
111,
112
],
[
171,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
115,
124
],
[
124,
125
],
[
124,
126
],
[
115,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
129,
134
],
[
134,
135
],
[
134,
136
],
[
129,
137
],
[
137,
138
],
[
138,
139
],
[
129,
140
],
[
141,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
141,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
146,
150
],
[
150,
151
],
[
151,
152
],
[
141,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
157,
158
],
[
158,
159
],
[
141,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
160,
164
],
[
115,
165
],
[
165,
166
],
[
165,
167
],
[
113,
168
],
[
168,
169
],
[
0,
170
],
[
170,
171
],
[
170,
172
]
]
| [
"import java.util.*;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\tpublic static void funct(int[][] arr) {\n\t\tint[] t=new int[arr.length];\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tt[i]=arr[i][1]-arr[i][0];\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=1;i<arr.length-1;i++) {\n\t\t\tif(t[i]==0 && t[i-1]==0 && t[i+1]==0) {\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tif(c>=1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[][] arr=new int[n][2];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint[] temp=new int[2];\n\t\t\ttemp[0]=sc.nextInt();\n\t\t\ttemp[1]=sc.nextInt();\n\t\t\tarr[i]=temp;\n\t\t}\n\t\tfunct(arr);\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\n\tpublic static void funct(int[][] arr) {\n\t\tint[] t=new int[arr.length];\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tt[i]=arr[i][1]-arr[i][0];\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=1;i<arr.length-1;i++) {\n\t\t\tif(t[i]==0 && t[i-1]==0 && t[i+1]==0) {\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tif(c>=1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[][] arr=new int[n][2];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint[] temp=new int[2];\n\t\t\ttemp[0]=sc.nextInt();\n\t\t\ttemp[1]=sc.nextInt();\n\t\t\tarr[i]=temp;\n\t\t}\n\t\tfunct(arr);\n\t}\n\n}",
"Main",
"public static void funct(int[][] arr) {\n\t\tint[] t=new int[arr.length];\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tt[i]=arr[i][1]-arr[i][0];\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=1;i<arr.length-1;i++) {\n\t\t\tif(t[i]==0 && t[i-1]==0 && t[i+1]==0) {\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tif(c>=1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"funct",
"{\n\t\tint[] t=new int[arr.length];\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tt[i]=arr[i][1]-arr[i][0];\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=1;i<arr.length-1;i++) {\n\t\t\tif(t[i]==0 && t[i-1]==0 && t[i+1]==0) {\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tif(c>=1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"int[] t=new int[arr.length];",
"t",
"new int[arr.length]",
"arr.length",
"arr",
"arr.length",
"for(int i=0;i<arr.length;i++) {\n\t\t\tt[i]=arr[i][1]-arr[i][0];\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n\t\t\tt[i]=arr[i][1]-arr[i][0];\n\t\t}",
"{\n\t\t\tt[i]=arr[i][1]-arr[i][0];\n\t\t}",
"t[i]=arr[i][1]-arr[i][0]",
"t[i]",
"t",
"i",
"arr[i][1]-arr[i][0]",
"arr[i][1]",
"arr[i]",
"arr",
"i",
"1",
"arr[i][0]",
"arr[i]",
"arr",
"i",
"0",
"int c=0;",
"c",
"0",
"for(int i=1;i<arr.length-1;i++) {\n\t\t\tif(t[i]==0 && t[i-1]==0 && t[i+1]==0) {\n\t\t\t\tc++;\n\t\t\t}\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<arr.length-1",
"i",
"arr.length-1",
"arr.length",
"arr",
"arr.length",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tif(t[i]==0 && t[i-1]==0 && t[i+1]==0) {\n\t\t\t\tc++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(t[i]==0 && t[i-1]==0 && t[i+1]==0) {\n\t\t\t\tc++;\n\t\t\t}\n\t\t}",
"if(t[i]==0 && t[i-1]==0 && t[i+1]==0) {\n\t\t\t\tc++;\n\t\t\t}",
"t[i]==0 && t[i-1]==0 && t[i+1]==0",
"t[i]==0 && t[i-1]==0 && t[i+1]==0",
"t[i]==0",
"t[i]",
"t",
"i",
"0",
"t[i-1]==0",
"t[i-1]",
"t",
"i-1",
"i",
"1",
"0",
"t[i+1]==0",
"t[i+1]",
"t",
"i+1",
"i",
"1",
"0",
"{\n\t\t\t\tc++;\n\t\t\t}",
"c++",
"c",
"if(c>=1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"c>=1",
"c",
"1",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"int[][] arr",
"arr",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[][] arr=new int[n][2];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint[] temp=new int[2];\n\t\t\ttemp[0]=sc.nextInt();\n\t\t\ttemp[1]=sc.nextInt();\n\t\t\tarr[i]=temp;\n\t\t}\n\t\tfunct(arr);\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[][] arr=new int[n][2];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint[] temp=new int[2];\n\t\t\ttemp[0]=sc.nextInt();\n\t\t\ttemp[1]=sc.nextInt();\n\t\t\tarr[i]=temp;\n\t\t}\n\t\tfunct(arr);\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] arr=new int[n][2];",
"arr",
"new int[n][2]",
"n",
"2",
"for(int i=0;i<n;i++) {\n\t\t\tint[] temp=new int[2];\n\t\t\ttemp[0]=sc.nextInt();\n\t\t\ttemp[1]=sc.nextInt();\n\t\t\tarr[i]=temp;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint[] temp=new int[2];\n\t\t\ttemp[0]=sc.nextInt();\n\t\t\ttemp[1]=sc.nextInt();\n\t\t\tarr[i]=temp;\n\t\t}",
"{\n\t\t\tint[] temp=new int[2];\n\t\t\ttemp[0]=sc.nextInt();\n\t\t\ttemp[1]=sc.nextInt();\n\t\t\tarr[i]=temp;\n\t\t}",
"int[] temp=new int[2];",
"temp",
"new int[2]",
"2",
"temp[0]=sc.nextInt()",
"temp[0]",
"temp",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"temp[1]=sc.nextInt()",
"temp[1]",
"temp",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"arr[i]=temp",
"arr[i]",
"arr",
"i",
"temp",
"funct(arr)",
"funct",
"arr",
"String[] args",
"args",
"public class Main {\n\t\n\tpublic static void funct(int[][] arr) {\n\t\tint[] t=new int[arr.length];\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tt[i]=arr[i][1]-arr[i][0];\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=1;i<arr.length-1;i++) {\n\t\t\tif(t[i]==0 && t[i-1]==0 && t[i+1]==0) {\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tif(c>=1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[][] arr=new int[n][2];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint[] temp=new int[2];\n\t\t\ttemp[0]=sc.nextInt();\n\t\t\ttemp[1]=sc.nextInt();\n\t\t\tarr[i]=temp;\n\t\t}\n\t\tfunct(arr);\n\t}\n\n}",
"public class Main {\n\t\n\tpublic static void funct(int[][] arr) {\n\t\tint[] t=new int[arr.length];\n\t\tfor(int i=0;i<arr.length;i++) {\n\t\t\tt[i]=arr[i][1]-arr[i][0];\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=1;i<arr.length-1;i++) {\n\t\t\tif(t[i]==0 && t[i-1]==0 && t[i+1]==0) {\n\t\t\t\tc++;\n\t\t\t}\n\t\t}\n\t\tif(c>=1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint[][] arr=new int[n][2];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint[] temp=new int[2];\n\t\t\ttemp[0]=sc.nextInt();\n\t\t\ttemp[1]=sc.nextInt();\n\t\t\tarr[i]=temp;\n\t\t}\n\t\tfunct(arr);\n\t}\n\n}",
"Main"
]
| import java.util.*;
import java.util.Scanner;
public class Main {
public static void funct(int[][] arr) {
int[] t=new int[arr.length];
for(int i=0;i<arr.length;i++) {
t[i]=arr[i][1]-arr[i][0];
}
int c=0;
for(int i=1;i<arr.length-1;i++) {
if(t[i]==0 && t[i-1]==0 && t[i+1]==0) {
c++;
}
}
if(c>=1) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
}
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int[][] arr=new int[n][2];
for(int i=0;i<n;i++) {
int[] temp=new int[2];
temp[0]=sc.nextInt();
temp[1]=sc.nextInt();
arr[i]=temp;
}
funct(arr);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
3,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
81,
5
],
[
81,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
43,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
8,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
60,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
6,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint zoro_cnt = 0;\n\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tint b = sc.nextInt();\n\t\t\tint c = sc.nextInt();\n\t\t\tif (b == c) {\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}\n\t\t}\n\n\t\tif (zoro_cnt >= 3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint zoro_cnt = 0;\n\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tint b = sc.nextInt();\n\t\t\tint c = sc.nextInt();\n\t\t\tif (b == c) {\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}\n\t\t}\n\n\t\tif (zoro_cnt >= 3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint zoro_cnt = 0;\n\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tint b = sc.nextInt();\n\t\t\tint c = sc.nextInt();\n\t\t\tif (b == c) {\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}\n\t\t}\n\n\t\tif (zoro_cnt >= 3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint zoro_cnt = 0;\n\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tint b = sc.nextInt();\n\t\t\tint c = sc.nextInt();\n\t\t\tif (b == c) {\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}\n\t\t}\n\n\t\tif (zoro_cnt >= 3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int zoro_cnt = 0;",
"zoro_cnt",
"0",
"for (int i = 0; i < a; i++) {\n\t\t\tint b = sc.nextInt();\n\t\t\tint c = sc.nextInt();\n\t\t\tif (b == c) {\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a",
"i",
"a",
"i++",
"i++",
"i",
"{\n\t\t\tint b = sc.nextInt();\n\t\t\tint c = sc.nextInt();\n\t\t\tif (b == c) {\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint b = sc.nextInt();\n\t\t\tint c = sc.nextInt();\n\t\t\tif (b == c) {\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}\n\t\t}",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (b == c) {\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}",
"b == c",
"b",
"c",
"{\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"zoro_cnt++",
"zoro_cnt",
"if (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"zoro_cnt >= 3",
"zoro_cnt",
"3",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"{\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}",
"zoro_cnt = 0",
"zoro_cnt",
"0",
"if (zoro_cnt >= 3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"zoro_cnt >= 3",
"zoro_cnt",
"3",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint zoro_cnt = 0;\n\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tint b = sc.nextInt();\n\t\t\tint c = sc.nextInt();\n\t\t\tif (b == c) {\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}\n\t\t}\n\n\t\tif (zoro_cnt >= 3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint zoro_cnt = 0;\n\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\tint b = sc.nextInt();\n\t\t\tint c = sc.nextInt();\n\t\t\tif (b == c) {\n\t\t\t\tzoro_cnt++;\n\t\t\t\tif (zoro_cnt >= 3) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzoro_cnt = 0;\n\t\t\t}\n\t\t}\n\n\t\tif (zoro_cnt >= 3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の入力
int a = sc.nextInt();
int zoro_cnt = 0;
for (int i = 0; i < a; i++) {
int b = sc.nextInt();
int c = sc.nextInt();
if (b == c) {
zoro_cnt++;
if (zoro_cnt >= 3) {
break;
}
} else {
zoro_cnt = 0;
}
}
if (zoro_cnt >= 3) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
41,
13,
2,
17,
17,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
17,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
41,
13,
41,
13,
20,
17,
17,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
40,
13,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
12,
13,
30,
29,
4,
18,
4,
18,
20,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
13,
0,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
18,
36,
13,
18,
13,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
17,
2,
13,
17,
12,
13,
30,
41,
13,
13,
29,
2,
2,
18,
36,
13,
18,
13,
13,
2,
18,
36,
13,
18,
13,
13,
23,
13,
13,
6,
13,
41,
13,
2,
17,
17,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
13,
0,
13,
0,
13,
17,
12,
13,
30,
0,
13,
20,
0,
13,
20,
13,
0,
13,
0,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
2,
17,
17,
41,
13,
17,
41,
13,
42,
2,
0,
13,
4,
13,
40,
17,
30,
14,
2,
13,
17,
3,
0,
18,
13,
40,
13,
13,
29,
20,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
2,
13,
17,
30,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
0,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
0,
13,
4,
18,
13,
13,
0,
13,
17,
13,
14,
2,
13,
40,
17,
0,
18,
13,
17,
40,
17,
12,
13,
30,
14,
2,
13,
13,
4,
13,
29,
18,
13,
40,
13,
12,
13,
30,
14,
2,
13,
17,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
18,
13,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
15,
17
],
[
13,
18
],
[
18,
19
],
[
18,
20
],
[
13,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
13,
26
],
[
26,
27
],
[
13,
28
],
[
28,
29
],
[
13,
30
],
[
30,
31
],
[
13,
32
],
[
32,
33
],
[
13,
34
],
[
34,
35
],
[
34,
36
],
[
13,
37
],
[
37,
38
],
[
37,
39
],
[
13,
40
],
[
40,
41
],
[
40,
42
],
[
13,
44
],
[
44,
45
],
[
44,
46
],
[
13,
47
],
[
47,
48
],
[
47,
49
],
[
13,
50
],
[
50,
51
],
[
50,
52
],
[
13,
53
],
[
53,
54
],
[
13,
55
],
[
55,
56
],
[
13,
57
],
[
57,
58
],
[
13,
59
],
[
59,
60
],
[
59,
61
],
[
13,
62
],
[
62,
63
],
[
62,
64
],
[
13,
65
],
[
65,
66
],
[
65,
67
],
[
13,
68
],
[
68,
69
],
[
13,
70
],
[
70,
71
],
[
13,
72
],
[
72,
73
],
[
72,
74
],
[
13,
77
],
[
77,
78
],
[
13,
79
],
[
79,
80
],
[
13,
81
],
[
81,
82
],
[
13,
83
],
[
83,
84
],
[
13,
85
],
[
85,
86
],
[
13,
87
],
[
87,
88
],
[
13,
89
],
[
89,
90
],
[
13,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
93,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
104,
108
],
[
93,
109
],
[
109,
110
],
[
109,
111
],
[
93,
112
],
[
112,
113
],
[
112,
114
],
[
93,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
120,
122
],
[
115,
123
],
[
123,
124
],
[
124,
125
],
[
115,
126
],
[
127,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
129,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
128,
140
],
[
140,
141
],
[
128,
142
],
[
142,
143
],
[
142,
144
],
[
127,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
149,
150
],
[
149,
151
],
[
93,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
157,
158
],
[
157,
159
],
[
157,
160
],
[
91,
161
],
[
161,
162
],
[
13,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
163,
172
],
[
172,
173
],
[
13,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
174,
178
],
[
178,
179
],
[
174,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
186,
188
],
[
180,
189
],
[
189,
190
],
[
180,
191
],
[
191,
192
],
[
174,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
197,
201
],
[
201,
202
],
[
201,
203
],
[
193,
204
],
[
204,
205
],
[
174,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
210,
214
],
[
214,
215
],
[
214,
216
],
[
174,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
219,
223
],
[
223,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
226,
228
],
[
225,
229
],
[
229,
230
],
[
229,
231
],
[
224,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
232,
236
],
[
236,
237
],
[
236,
238
],
[
217,
239
],
[
239,
240
],
[
174,
241
],
[
13,
242
],
[
242,
243
],
[
242,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
246,
248
],
[
242,
249
],
[
249,
250
],
[
242,
251
],
[
251,
252
],
[
242,
253
],
[
253,
254
],
[
242,
255
],
[
255,
256
],
[
242,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
259,
263
],
[
263,
264
],
[
263,
265
],
[
259,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
269,
271
],
[
242,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
274,
278
],
[
278,
279
],
[
278,
280
],
[
274,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
284,
286
],
[
272,
287
],
[
287,
288
],
[
242,
289
],
[
289,
290
],
[
289,
291
],
[
291,
292
],
[
292,
293
],
[
292,
294
],
[
295,
296
],
[
295,
297
],
[
291,
298
],
[
298,
299
],
[
298,
300
],
[
291,
301
],
[
301,
302
],
[
291,
303
],
[
303,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
304,
309
],
[
309,
310
],
[
303,
311
],
[
311,
312
],
[
312,
313
],
[
313,
314
],
[
313,
315
],
[
312,
316
],
[
311,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
317,
322
],
[
291,
323
],
[
323,
324
],
[
242,
325
],
[
325,
326
],
[
325,
327
],
[
327,
328
],
[
328,
329
],
[
328,
330
],
[
327,
331
],
[
331,
332
],
[
331,
333
],
[
333,
334
],
[
327,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
335,
339
],
[
339,
340
],
[
339,
341
],
[
341,
342
],
[
327,
343
],
[
343,
344
],
[
343,
345
],
[
345,
346
],
[
345,
347
],
[
327,
348
],
[
348,
349
],
[
348,
350
],
[
350,
351
],
[
350,
352
],
[
352,
353
],
[
327,
354
],
[
354,
355
],
[
355,
356
],
[
356,
357
],
[
357,
358
],
[
357,
359
],
[
359,
360
],
[
356,
361
],
[
355,
362
],
[
362,
363
],
[
362,
364
],
[
354,
365
],
[
365,
366
],
[
366,
367
],
[
366,
368
],
[
368,
369
],
[
369,
370
],
[
370,
371
],
[
370,
372
],
[
369,
373
],
[
368,
374
],
[
327,
375
],
[
375,
376
],
[
375,
377
],
[
377,
378
],
[
378,
379
],
[
327,
380
],
[
380,
381
],
[
242,
382
],
[
382,
383
],
[
382,
384
],
[
384,
385
],
[
385,
386
],
[
385,
387
],
[
384,
388
],
[
388,
389
],
[
388,
390
],
[
390,
391
],
[
384,
392
],
[
392,
393
],
[
393,
394
],
[
393,
395
],
[
392,
396
],
[
396,
397
],
[
396,
398
],
[
398,
399
],
[
384,
400
],
[
400,
401
],
[
400,
402
],
[
402,
403
],
[
402,
404
],
[
384,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
407,
409
],
[
409,
410
],
[
384,
411
],
[
411,
412
],
[
412,
413
],
[
413,
414
],
[
414,
415
],
[
414,
416
],
[
416,
417
],
[
413,
418
],
[
412,
419
],
[
419,
420
],
[
419,
421
],
[
411,
422
],
[
422,
423
],
[
423,
424
],
[
423,
425
],
[
425,
426
],
[
426,
427
],
[
427,
428
],
[
427,
429
],
[
426,
430
],
[
425,
431
],
[
384,
432
],
[
432,
433
],
[
432,
434
],
[
434,
435
],
[
435,
436
],
[
384,
437
],
[
437,
438
],
[
242,
439
],
[
439,
440
],
[
439,
441
],
[
441,
442
],
[
442,
443
],
[
442,
444
],
[
441,
445
],
[
445,
446
],
[
445,
447
],
[
441,
448
],
[
448,
449
],
[
448,
450
],
[
450,
451
],
[
441,
452
],
[
452,
453
],
[
453,
454
],
[
453,
455
],
[
452,
456
],
[
456,
457
],
[
456,
458
],
[
458,
459
],
[
441,
460
],
[
460,
461
],
[
460,
462
],
[
462,
463
],
[
462,
464
],
[
441,
465
],
[
465,
466
],
[
465,
467
],
[
467,
468
],
[
467,
469
],
[
469,
470
],
[
441,
471
],
[
471,
472
],
[
472,
473
],
[
473,
474
],
[
474,
475
],
[
474,
476
],
[
476,
477
],
[
473,
478
],
[
472,
479
],
[
479,
480
],
[
479,
481
],
[
471,
482
],
[
482,
483
],
[
483,
484
],
[
483,
485
],
[
485,
486
],
[
486,
487
],
[
487,
488
],
[
487,
489
],
[
486,
490
],
[
485,
491
],
[
441,
492
],
[
492,
493
],
[
493,
494
],
[
493,
495
],
[
492,
496
],
[
496,
497
],
[
497,
498
],
[
498,
499
],
[
499,
500
],
[
500,
501
],
[
500,
502
],
[
502,
503
],
[
499,
504
],
[
498,
505
],
[
505,
506
],
[
505,
507
],
[
497,
508
],
[
508,
509
],
[
509,
510
],
[
509,
511
],
[
511,
512
],
[
512,
513
],
[
512,
514
],
[
511,
515
],
[
515,
516
],
[
515,
517
],
[
441,
518
],
[
518,
519
],
[
518,
520
],
[
520,
521
],
[
521,
522
],
[
441,
523
],
[
523,
524
],
[
242,
525
],
[
525,
526
],
[
525,
527
],
[
527,
528
],
[
528,
529
],
[
528,
530
],
[
530,
531
],
[
531,
532
],
[
530,
533
],
[
530,
534
],
[
534,
535
],
[
534,
536
],
[
530,
537
],
[
527,
538
],
[
538,
539
],
[
539,
540
],
[
539,
541
],
[
541,
542
],
[
538,
543
],
[
543,
544
],
[
544,
545
],
[
544,
546
],
[
543,
547
],
[
547,
548
],
[
242,
549
],
[
549,
550
],
[
549,
551
],
[
551,
552
],
[
552,
553
],
[
553,
554
],
[
553,
555
],
[
552,
556
],
[
556,
557
],
[
551,
558
],
[
558,
559
],
[
559,
560
],
[
559,
561
],
[
561,
562
],
[
242,
563
],
[
563,
564
],
[
563,
565
],
[
565,
566
],
[
566,
567
],
[
567,
568
],
[
567,
569
],
[
566,
570
],
[
565,
571
],
[
571,
572
],
[
572,
573
],
[
242,
574
],
[
574,
575
],
[
574,
576
],
[
576,
577
],
[
577,
578
],
[
577,
579
],
[
576,
581
],
[
581,
582
],
[
582,
583
],
[
583,
584
],
[
583,
585
],
[
581,
586
],
[
586,
587
],
[
586,
588
],
[
581,
589
],
[
589,
590
],
[
590,
591
],
[
581,
592
],
[
593,
593
],
[
593,
594
],
[
594,
595
],
[
595,
596
],
[
595,
597
],
[
594,
598
],
[
598,
599
],
[
576,
600
],
[
600,
601
],
[
574,
602
],
[
602,
603
],
[
242,
604
],
[
604,
605
],
[
604,
606
],
[
606,
607
],
[
607,
608
],
[
607,
609
],
[
606,
611
],
[
611,
612
],
[
612,
613
],
[
613,
614
],
[
613,
615
],
[
611,
616
],
[
616,
617
],
[
616,
618
],
[
611,
619
],
[
619,
620
],
[
620,
621
],
[
611,
622
],
[
623,
623
],
[
623,
624
],
[
624,
625
],
[
625,
626
],
[
625,
627
],
[
624,
628
],
[
628,
629
],
[
606,
630
],
[
630,
631
],
[
604,
632
],
[
632,
633
],
[
242,
634
],
[
634,
635
],
[
634,
636
],
[
636,
637
],
[
637,
638
],
[
637,
639
],
[
636,
642
],
[
642,
643
],
[
643,
644
],
[
644,
645
],
[
644,
646
],
[
642,
647
],
[
647,
648
],
[
647,
649
],
[
642,
650
],
[
650,
651
],
[
651,
652
],
[
642,
653
],
[
654,
654
],
[
654,
655
],
[
655,
656
],
[
656,
657
],
[
657,
658
],
[
657,
659
],
[
655,
660
],
[
660,
661
],
[
660,
662
],
[
655,
663
],
[
663,
664
],
[
664,
665
],
[
655,
666
],
[
666,
667
],
[
667,
668
],
[
668,
669
],
[
669,
670
],
[
669,
671
],
[
668,
672
],
[
667,
673
],
[
673,
674
],
[
636,
675
],
[
675,
676
],
[
634,
677
],
[
677,
678
],
[
634,
679
],
[
679,
680
],
[
242,
681
],
[
681,
682
],
[
681,
683
],
[
683,
684
],
[
684,
685
],
[
684,
686
],
[
683,
689
],
[
689,
690
],
[
690,
691
],
[
691,
692
],
[
691,
693
],
[
689,
694
],
[
694,
695
],
[
694,
696
],
[
689,
697
],
[
697,
698
],
[
698,
699
],
[
689,
700
],
[
701,
701
],
[
701,
702
],
[
702,
703
],
[
703,
704
],
[
704,
705
],
[
704,
706
],
[
702,
707
],
[
707,
708
],
[
707,
709
],
[
702,
710
],
[
710,
711
],
[
711,
712
],
[
702,
713
],
[
713,
714
],
[
714,
715
],
[
715,
716
],
[
716,
717
],
[
716,
718
],
[
715,
719
],
[
714,
720
],
[
720,
721
],
[
683,
722
],
[
722,
723
],
[
681,
724
],
[
724,
725
],
[
681,
726
],
[
726,
727
]
]
| [
"\nimport java.io.*;\nimport java.math.BigInteger;\nimport java.util.*;\nimport java.awt.*;\n\n class Main {\n\n\tstatic long sx = 0, sy = 0, mod = (long) (1e9 + 7);\n\n\tstatic ArrayList<Integer>[] a;\n\tstatic Integer[][] dp;\n\tstatic long[] fa;\n\tstatic long[] farr;\n\tpublic static PrintWriter out = new PrintWriter(System.out);\n\tstatic ArrayList<pair> pa = new ArrayList<>();\n\tstatic long[] fact = new long[(int) 1e6];\n\tstatic StringBuilder sb = new StringBuilder();\n\tstatic boolean cycle = false;\n\tstatic long m = 998244353;\n\tstatic long[] no, col;\n\tstatic String s;\n\tstatic long k = 0, n = 0, one = 0;\n\tstatic int cnt;\n\t// static long[] dp;\n\t// static long[] p;\n\tstatic long[] ans;\n\t// static Double[][] a = new Double[2][2];\n\tstatic Double[][] b = new Double[2][2];\n\tstatic Double[] x;\n\tstatic Double[] y;\n\tstatic Double[] dis;\n\t// static boolean b = true;\n\tstatic int[][] par;\n\tstatic int[] depth;\n\tstatic HashMap<Integer, Integer> map;\n\tstatic ArrayList<Integer> p;\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\t// Scanner scn = new Scanner(new BufferedReader(new\n\t\t// InputStreamReader(System.in)));\n\n\t\tReader scn = new Reader();\n\n\t\tint n = scn.nextInt();\n\n\t\tint[][] a = scn.nextInt2DArray(n, 2);\n\n\t\tint cnt = 0;\n\t\tboolean b = false;\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tif (a[i][0] == a[i][1])\n\t\t\t\tcnt++;\n\t\t\telse\n\t\t\t\tcnt = 0;\n\n\t\t\tif (cnt >= 3)\n\t\t\t\tb = true;\n\t\t}\n\n\t\tSystem.out.println(b ? \"Yes\" : \"No\");\n\t}\n\n\t// _________________________TEMPLATE_____________________________________________________________\n\n\t// public static long lcm(long x, long y) {\n\t//\n\t// return (x * y) / gcd(x, y);\n\t// }\n\t//\n\t// private static long gcd(long x, long y) {\n\t// if (x == 0)\n\t// return y;\n\t//\n\t// return gcd(y % x, x);\n\t// }\n\t//\n\t// static class comp implements Comparator<Integer> {\n\t//\n\t// @Override\n\t// public int compare(Integer p1, Integer p2) {\n\t//\n\t// return p2 - p1;\n\t//\n\t// }\n\t// }\n\t//\n\t// }\n\t//\n\t// public static long pow(long a, long b) {\n\t//\n\t// if (b < 0)\n\t// return 0;\n\t// if (b == 0 || b == 1)\n\t// return (long) Math.pow(a, b);\n\t//\n\t// if (b % 2 == 0) {\n\t//\n\t// long ret = pow(a, b / 2);\n\t// ret = (ret % mod * ret % mod) % mod;\n\t// return ret;\n\t// }\n\t//\n\t// else {\n\t// return ((pow(a, b - 1) % mod) * a % mod) % mod;\n\t// }\n\t// }\n\n\tprivate static class pair implements Comparable<pair> {\n\n\t\tint val, cnt;\n\n\t\tpair(int a, int b) {\n\t\t\tval = a;\n\t\t\tcnt = b;\n\t\t}\n\n\t\t@Override\n\t\tpublic int compareTo(pair o) {\n\n\t\t\treturn this.val - o.val;\n\t\t}\n\n\t\t@Override\n\n\t\tpublic int hashCode() {\n\t\t\treturn val * 17 + cnt * 31;\n\t\t}\n\n\t\t@Override\n\n\t\tpublic boolean equals(Object o) {\n\n\t\t\tpair p = (pair) o;\n\t\t\treturn this.val == p.val && this.cnt == p.cnt;\n\t\t}\n\n\t}\n\n\tprivate static String reverse(String s) {\n\n\t\treturn new StringBuilder(s).reverse().toString();\n\t}\n\n\tpublic static class Reader {\n\t\tfinal private int BUFFER_SIZE = 1 << 16;\n\t\tprivate DataInputStream din;\n\t\tprivate byte[] buffer;\n\t\tprivate int bufferPointer, bytesRead;\n\n\t\tpublic Reader() {\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\n\t\tpublic Reader(String file_name) throws IOException {\n\t\t\tdin = new DataInputStream(new FileInputStream(file_name));\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\n\t\tpublic String readLine() throws IOException {\n\t\t\tbyte[] buf = new byte[1000000 + 1]; // line length\n\t\t\tint cnt = 0, c;\n\t\t\twhile ((c = read()) != -1) {\n\t\t\t\tif (c == '\\n')\n\t\t\t\t\tbreak;\n\t\t\t\tbuf[cnt++] = (byte) c;\n\t\t\t}\n\t\t\treturn new String(buf, 0, cnt);\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\n\t\tpublic long nextLong() throws IOException {\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (c == '.') {\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') {\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\n\t\tprivate void fillBuffer() throws IOException {\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}\n\n\t\tprivate byte read() throws IOException {\n\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\tfillBuffer();\n\t\t\treturn buffer[bufferPointer++];\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}\n\n\t\tpublic int[] nextIntArray(int n) throws IOException {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic long[] nextLongArray(int n) throws IOException {\n\t\t\tlong[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextLong();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic int[][] nextInt2DArray(int m, int n) throws IOException {\n\t\t\tint[][] arr = new int[m][n];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic long[][] nextInt2DArrayL(int m, int n) throws IOException {\n\t\t\tlong[][] arr = new long[m][n];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\t// kickstart - Solution\n\t\t// atcoder - Main\n\t}\n\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"import java.awt.*;",
"awt.*",
"java",
"class Main {\n\n\tstatic long sx = 0, sy = 0, mod = (long) (1e9 + 7);\n\n\tstatic ArrayList<Integer>[] a;\n\tstatic Integer[][] dp;\n\tstatic long[] fa;\n\tstatic long[] farr;\n\tpublic static PrintWriter out = new PrintWriter(System.out);\n\tstatic ArrayList<pair> pa = new ArrayList<>();\n\tstatic long[] fact = new long[(int) 1e6];\n\tstatic StringBuilder sb = new StringBuilder();\n\tstatic boolean cycle = false;\n\tstatic long m = 998244353;\n\tstatic long[] no, col;\n\tstatic String s;\n\tstatic long k = 0, n = 0, one = 0;\n\tstatic int cnt;\n\t// static long[] dp;\n\t// static long[] p;\n\tstatic long[] ans;\n\t// static Double[][] a = new Double[2][2];\n\tstatic Double[][] b = new Double[2][2];\n\tstatic Double[] x;\n\tstatic Double[] y;\n\tstatic Double[] dis;\n\t// static boolean b = true;\n\tstatic int[][] par;\n\tstatic int[] depth;\n\tstatic HashMap<Integer, Integer> map;\n\tstatic ArrayList<Integer> p;\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\t// Scanner scn = new Scanner(new BufferedReader(new\n\t\t// InputStreamReader(System.in)));\n\n\t\tReader scn = new Reader();\n\n\t\tint n = scn.nextInt();\n\n\t\tint[][] a = scn.nextInt2DArray(n, 2);\n\n\t\tint cnt = 0;\n\t\tboolean b = false;\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tif (a[i][0] == a[i][1])\n\t\t\t\tcnt++;\n\t\t\telse\n\t\t\t\tcnt = 0;\n\n\t\t\tif (cnt >= 3)\n\t\t\t\tb = true;\n\t\t}\n\n\t\tSystem.out.println(b ? \"Yes\" : \"No\");\n\t}\n\n\t// _________________________TEMPLATE_____________________________________________________________\n\n\t// public static long lcm(long x, long y) {\n\t//\n\t// return (x * y) / gcd(x, y);\n\t// }\n\t//\n\t// private static long gcd(long x, long y) {\n\t// if (x == 0)\n\t// return y;\n\t//\n\t// return gcd(y % x, x);\n\t// }\n\t//\n\t// static class comp implements Comparator<Integer> {\n\t//\n\t// @Override\n\t// public int compare(Integer p1, Integer p2) {\n\t//\n\t// return p2 - p1;\n\t//\n\t// }\n\t// }\n\t//\n\t// }\n\t//\n\t// public static long pow(long a, long b) {\n\t//\n\t// if (b < 0)\n\t// return 0;\n\t// if (b == 0 || b == 1)\n\t// return (long) Math.pow(a, b);\n\t//\n\t// if (b % 2 == 0) {\n\t//\n\t// long ret = pow(a, b / 2);\n\t// ret = (ret % mod * ret % mod) % mod;\n\t// return ret;\n\t// }\n\t//\n\t// else {\n\t// return ((pow(a, b - 1) % mod) * a % mod) % mod;\n\t// }\n\t// }\n\n\tprivate static class pair implements Comparable<pair> {\n\n\t\tint val, cnt;\n\n\t\tpair(int a, int b) {\n\t\t\tval = a;\n\t\t\tcnt = b;\n\t\t}\n\n\t\t@Override\n\t\tpublic int compareTo(pair o) {\n\n\t\t\treturn this.val - o.val;\n\t\t}\n\n\t\t@Override\n\n\t\tpublic int hashCode() {\n\t\t\treturn val * 17 + cnt * 31;\n\t\t}\n\n\t\t@Override\n\n\t\tpublic boolean equals(Object o) {\n\n\t\t\tpair p = (pair) o;\n\t\t\treturn this.val == p.val && this.cnt == p.cnt;\n\t\t}\n\n\t}\n\n\tprivate static String reverse(String s) {\n\n\t\treturn new StringBuilder(s).reverse().toString();\n\t}\n\n\tpublic static class Reader {\n\t\tfinal private int BUFFER_SIZE = 1 << 16;\n\t\tprivate DataInputStream din;\n\t\tprivate byte[] buffer;\n\t\tprivate int bufferPointer, bytesRead;\n\n\t\tpublic Reader() {\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\n\t\tpublic Reader(String file_name) throws IOException {\n\t\t\tdin = new DataInputStream(new FileInputStream(file_name));\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\n\t\tpublic String readLine() throws IOException {\n\t\t\tbyte[] buf = new byte[1000000 + 1]; // line length\n\t\t\tint cnt = 0, c;\n\t\t\twhile ((c = read()) != -1) {\n\t\t\t\tif (c == '\\n')\n\t\t\t\t\tbreak;\n\t\t\t\tbuf[cnt++] = (byte) c;\n\t\t\t}\n\t\t\treturn new String(buf, 0, cnt);\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\n\t\tpublic long nextLong() throws IOException {\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (c == '.') {\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') {\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\n\t\tprivate void fillBuffer() throws IOException {\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}\n\n\t\tprivate byte read() throws IOException {\n\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\tfillBuffer();\n\t\t\treturn buffer[bufferPointer++];\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}\n\n\t\tpublic int[] nextIntArray(int n) throws IOException {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic long[] nextLongArray(int n) throws IOException {\n\t\t\tlong[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextLong();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic int[][] nextInt2DArray(int m, int n) throws IOException {\n\t\t\tint[][] arr = new int[m][n];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic long[][] nextInt2DArrayL(int m, int n) throws IOException {\n\t\t\tlong[][] arr = new long[m][n];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\t// kickstart - Solution\n\t\t// atcoder - Main\n\t}\n\n}",
"Main",
"static long sx = 0",
"sx",
"0",
"sy = 0",
"sy",
"0",
"mod = (long) (1e9 + 7);",
"mod",
"(long) (1e9 + 7)",
"1e9",
"7",
"static ArrayList<Integer>[] a;",
"a",
"static Integer[][] dp;",
"dp",
"static long[] fa;",
"fa",
"static long[] farr;",
"farr",
"public static PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"static ArrayList<pair> pa = new ArrayList<>();",
"pa",
"new ArrayList<>()",
"static long[] fact = new long[(int) 1e6];",
"fact",
"new long[(int) 1e6]",
"(int) 1e6",
"static StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"static boolean cycle = false;",
"cycle",
"false",
"static long m = 998244353;",
"m",
"998244353",
"static long[] no",
"no",
"col;",
"col",
"static String s;",
"s",
"static long k = 0",
"k",
"0",
"n = 0",
"n",
"0",
"one = 0;",
"one",
"0",
"static int cnt;",
"cnt",
"// static long[] dp;\n\t// static long[] p;\n\tstatic long[] ans;",
"ans",
"// static Double[][] a = new Double[2][2];\n\tstatic Double[][] b = new Double[2][2];",
"b",
"new Double[2][2]",
"2",
"2",
"static Double[] x;",
"x",
"static Double[] y;",
"y",
"static Double[] dis;",
"dis",
"// static boolean b = true;\n\tstatic int[][] par;",
"par",
"static int[] depth;",
"depth",
"static HashMap<Integer, Integer> map;",
"map",
"static ArrayList<Integer> p;",
"p",
"public static void main(String[] args) throws IOException {\n\n\t\t// Scanner scn = new Scanner(new BufferedReader(new\n\t\t// InputStreamReader(System.in)));\n\n\t\tReader scn = new Reader();\n\n\t\tint n = scn.nextInt();\n\n\t\tint[][] a = scn.nextInt2DArray(n, 2);\n\n\t\tint cnt = 0;\n\t\tboolean b = false;\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tif (a[i][0] == a[i][1])\n\t\t\t\tcnt++;\n\t\t\telse\n\t\t\t\tcnt = 0;\n\n\t\t\tif (cnt >= 3)\n\t\t\t\tb = true;\n\t\t}\n\n\t\tSystem.out.println(b ? \"Yes\" : \"No\");\n\t}",
"main",
"{\n\n\t\t// Scanner scn = new Scanner(new BufferedReader(new\n\t\t// InputStreamReader(System.in)));\n\n\t\tReader scn = new Reader();\n\n\t\tint n = scn.nextInt();\n\n\t\tint[][] a = scn.nextInt2DArray(n, 2);\n\n\t\tint cnt = 0;\n\t\tboolean b = false;\n\t\tfor (int i = 0; i < n; i++) {\n\n\t\t\tif (a[i][0] == a[i][1])\n\t\t\t\tcnt++;\n\t\t\telse\n\t\t\t\tcnt = 0;\n\n\t\t\tif (cnt >= 3)\n\t\t\t\tb = true;\n\t\t}\n\n\t\tSystem.out.println(b ? \"Yes\" : \"No\");\n\t}",
"Reader scn = new Reader();",
"scn",
"new Reader()",
"int n = scn.nextInt();",
"n",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int[][] a = scn.nextInt2DArray(n, 2);",
"a",
"scn.nextInt2DArray(n, 2)",
"scn.nextInt2DArray",
"scn",
"n",
"2",
"int cnt = 0;",
"cnt",
"0",
"boolean b = false;",
"b",
"false",
"for (int i = 0; i < n; i++) {\n\n\t\t\tif (a[i][0] == a[i][1])\n\t\t\t\tcnt++;\n\t\t\telse\n\t\t\t\tcnt = 0;\n\n\t\t\tif (cnt >= 3)\n\t\t\t\tb = true;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\n\t\t\tif (a[i][0] == a[i][1])\n\t\t\t\tcnt++;\n\t\t\telse\n\t\t\t\tcnt = 0;\n\n\t\t\tif (cnt >= 3)\n\t\t\t\tb = true;\n\t\t}",
"{\n\n\t\t\tif (a[i][0] == a[i][1])\n\t\t\t\tcnt++;\n\t\t\telse\n\t\t\t\tcnt = 0;\n\n\t\t\tif (cnt >= 3)\n\t\t\t\tb = true;\n\t\t}",
"if (a[i][0] == a[i][1])\n\t\t\t\tcnt++;\n\t\t\telse\n\t\t\t\tcnt = 0;",
"a[i][0] == a[i][1]",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"cnt++",
"cnt",
"cnt = 0",
"cnt",
"0",
"if (cnt >= 3)\n\t\t\t\tb = true;",
"cnt >= 3",
"cnt",
"3",
"b = true",
"b",
"true",
"System.out.println(b ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"b ? \"Yes\" : \"No\"",
"b",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"private static String reverse(String s) {\n\n\t\treturn new StringBuilder(s).reverse().toString();\n\t}",
"reverse",
"{\n\n\t\treturn new StringBuilder(s).reverse().toString();\n\t}",
"return new StringBuilder(s).reverse().toString();",
"new StringBuilder(s).reverse().toString()",
"new StringBuilder(s).reverse().toString",
"new StringBuilder(s).reverse()",
"new StringBuilder(s).reverse",
"new StringBuilder(s)",
"String s",
"s",
"private static class pair implements Comparable<pair> {\n\n\t\tint val, cnt;\n\n\t\tpair(int a, int b) {\n\t\t\tval = a;\n\t\t\tcnt = b;\n\t\t}\n\n\t\t@Override\n\t\tpublic int compareTo(pair o) {\n\n\t\t\treturn this.val - o.val;\n\t\t}\n\n\t\t@Override\n\n\t\tpublic int hashCode() {\n\t\t\treturn val * 17 + cnt * 31;\n\t\t}\n\n\t\t@Override\n\n\t\tpublic boolean equals(Object o) {\n\n\t\t\tpair p = (pair) o;\n\t\t\treturn this.val == p.val && this.cnt == p.cnt;\n\t\t}\n\n\t}",
"pair",
"int val",
"val",
"cnt;",
"cnt",
"pair(int a, int b) {\n\t\t\tval = a;\n\t\t\tcnt = b;\n\t\t}",
"pair",
"{\n\t\t\tval = a;\n\t\t\tcnt = b;\n\t\t}",
"val = a",
"val",
"a",
"cnt = b",
"cnt",
"b",
"int a",
"a",
"int b",
"b",
"@Override\n\t\tpublic int compareTo(pair o) {\n\n\t\t\treturn this.val - o.val;\n\t\t}",
"compareTo",
"{\n\n\t\t\treturn this.val - o.val;\n\t\t}",
"return this.val - o.val;",
"this.val - o.val",
"this.val",
"this",
"this.val",
"o.val",
"o",
"o.val",
"pair o",
"o",
"@Override\n\n\t\tpublic int hashCode() {\n\t\t\treturn val * 17 + cnt * 31;\n\t\t}",
"hashCode",
"{\n\t\t\treturn val * 17 + cnt * 31;\n\t\t}",
"return val * 17 + cnt * 31;",
"val * 17 + cnt * 31",
"val * 17",
"val",
"17",
"cnt * 31",
"cnt",
"31",
"@Override\n\n\t\tpublic boolean equals(Object o) {\n\n\t\t\tpair p = (pair) o;\n\t\t\treturn this.val == p.val && this.cnt == p.cnt;\n\t\t}",
"equals",
"{\n\n\t\t\tpair p = (pair) o;\n\t\t\treturn this.val == p.val && this.cnt == p.cnt;\n\t\t}",
"pair p = (pair) o;",
"p",
"(pair) o",
"return this.val == p.val && this.cnt == p.cnt;",
"this.val == p.val && this.cnt == p.cnt",
"this.val == p.val",
"this.val",
"this",
"this.val",
"p.val",
"p",
"p.val",
"this.cnt == p.cnt",
"this.cnt",
"this",
"this.cnt",
"p.cnt",
"p",
"p.cnt",
"Object o",
"o",
"Comparable",
"public static class Reader {\n\t\tfinal private int BUFFER_SIZE = 1 << 16;\n\t\tprivate DataInputStream din;\n\t\tprivate byte[] buffer;\n\t\tprivate int bufferPointer, bytesRead;\n\n\t\tpublic Reader() {\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\n\t\tpublic Reader(String file_name) throws IOException {\n\t\t\tdin = new DataInputStream(new FileInputStream(file_name));\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\n\t\tpublic String readLine() throws IOException {\n\t\t\tbyte[] buf = new byte[1000000 + 1]; // line length\n\t\t\tint cnt = 0, c;\n\t\t\twhile ((c = read()) != -1) {\n\t\t\t\tif (c == '\\n')\n\t\t\t\t\tbreak;\n\t\t\t\tbuf[cnt++] = (byte) c;\n\t\t\t}\n\t\t\treturn new String(buf, 0, cnt);\n\t\t}\n\n\t\tpublic int nextInt() throws IOException {\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\n\t\tpublic long nextLong() throws IOException {\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\n\t\tpublic double nextDouble() throws IOException {\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (c == '.') {\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') {\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\n\t\tprivate void fillBuffer() throws IOException {\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}\n\n\t\tprivate byte read() throws IOException {\n\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\tfillBuffer();\n\t\t\treturn buffer[bufferPointer++];\n\t\t}\n\n\t\tpublic void close() throws IOException {\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}\n\n\t\tpublic int[] nextIntArray(int n) throws IOException {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic long[] nextLongArray(int n) throws IOException {\n\t\t\tlong[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextLong();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic int[][] nextInt2DArray(int m, int n) throws IOException {\n\t\t\tint[][] arr = new int[m][n];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic long[][] nextInt2DArrayL(int m, int n) throws IOException {\n\t\t\tlong[][] arr = new long[m][n];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\t// kickstart - Solution\n\t\t// atcoder - Main\n\t}",
"Reader",
"final private int BUFFER_SIZE = 1 << 16;",
"BUFFER_SIZE",
"1 << 16",
"1",
"16",
"private DataInputStream din;",
"din",
"private byte[] buffer;",
"buffer",
"private int bufferPointer",
"bufferPointer",
"bytesRead;",
"bytesRead",
"public Reader() {\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}",
"Reader",
"{\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}",
"din = new DataInputStream(System.in)",
"din",
"new DataInputStream(System.in)",
"buffer = new byte[BUFFER_SIZE]",
"buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"bufferPointer = bytesRead = 0",
"bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"public Reader(String file_name) throws IOException {\n\t\t\tdin = new DataInputStream(new FileInputStream(file_name));\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}",
"Reader",
"{\n\t\t\tdin = new DataInputStream(new FileInputStream(file_name));\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}",
"din = new DataInputStream(new FileInputStream(file_name))",
"din",
"new DataInputStream(new FileInputStream(file_name))",
"buffer = new byte[BUFFER_SIZE]",
"buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"bufferPointer = bytesRead = 0",
"bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"String file_name",
"file_name",
"public String readLine() throws IOException {\n\t\t\tbyte[] buf = new byte[1000000 + 1]; // line length\n\t\t\tint cnt = 0, c;\n\t\t\twhile ((c = read()) != -1) {\n\t\t\t\tif (c == '\\n')\n\t\t\t\t\tbreak;\n\t\t\t\tbuf[cnt++] = (byte) c;\n\t\t\t}\n\t\t\treturn new String(buf, 0, cnt);\n\t\t}",
"readLine",
"{\n\t\t\tbyte[] buf = new byte[1000000 + 1]; // line length\n\t\t\tint cnt = 0, c;\n\t\t\twhile ((c = read()) != -1) {\n\t\t\t\tif (c == '\\n')\n\t\t\t\t\tbreak;\n\t\t\t\tbuf[cnt++] = (byte) c;\n\t\t\t}\n\t\t\treturn new String(buf, 0, cnt);\n\t\t}",
"byte[] buf = new byte[1000000 + 1];",
"buf",
"new byte[1000000 + 1]",
"1000000 + 1",
"1000000",
"1",
"int cnt = 0",
"cnt",
"0",
"c;",
"c",
"while ((c = read()) != -1) {\n\t\t\t\tif (c == '\\n')\n\t\t\t\t\tbreak;\n\t\t\t\tbuf[cnt++] = (byte) c;\n\t\t\t}",
"(c = read()) != -1",
"(c = read())",
"c",
"read()",
"read",
"-1",
"1",
"{\n\t\t\t\tif (c == '\\n')\n\t\t\t\t\tbreak;\n\t\t\t\tbuf[cnt++] = (byte) c;\n\t\t\t}",
"if (c == '\\n')\n\t\t\t\t\tbreak;",
"c == '\\n'",
"c",
"'\\n'",
"break;",
"buf[cnt++] = (byte) c",
"buf[cnt++]",
"buf",
"cnt++",
"cnt",
"(byte) c",
"return new String(buf, 0, cnt);",
"new String(buf, 0, cnt)",
"public int nextInt() throws IOException {\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"nextInt",
"{\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"int ret = 0;",
"ret",
"0",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n\t\t\t\tc = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n\t\t\t\tc = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t}",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (neg)\n\t\t\t\treturn -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public long nextLong() throws IOException {\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"nextLong",
"{\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"long ret = 0;",
"ret",
"0",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n\t\t\t\tc = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n\t\t\t\tc = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t}",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (neg)\n\t\t\t\treturn -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public double nextDouble() throws IOException {\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (c == '.') {\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') {\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"nextDouble",
"{\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\n\t\t\tdo {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (c == '.') {\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') {\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"double ret = 0",
"ret",
"0",
"div = 1;",
"div",
"1",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n\t\t\t\tc = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n\t\t\t\tc = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do {\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t} while ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\t}",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (c == '.') {\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') {\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\t\t}\n\t\t\t}",
"c == '.'",
"c",
"'.'",
"{\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') {\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\t\t}\n\t\t\t}",
"while ((c = read()) >= '0' && c <= '9') {\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\t\t}",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"{\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\t\t}",
"ret += (c - '0') / (div *= 10)",
"ret",
"(c - '0') / (div *= 10)",
"(c - '0')",
"c",
"'0'",
"(div *= 10)",
"div",
"10",
"if (neg)\n\t\t\t\treturn -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"private void fillBuffer() throws IOException {\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}",
"fillBuffer",
"{\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}",
"bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE)",
"bytesRead",
"din.read(buffer, bufferPointer = 0, BUFFER_SIZE)",
"din.read",
"din",
"buffer",
"bufferPointer = 0",
"bufferPointer",
"0",
"BUFFER_SIZE",
"if (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;",
"bytesRead == -1",
"bytesRead",
"-1",
"1",
"buffer[0] = -1",
"buffer[0]",
"buffer",
"0",
"-1",
"1",
"private byte read() throws IOException {\n\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\tfillBuffer();\n\t\t\treturn buffer[bufferPointer++];\n\t\t}",
"read",
"{\n\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\tfillBuffer();\n\t\t\treturn buffer[bufferPointer++];\n\t\t}",
"if (bufferPointer == bytesRead)\n\t\t\t\tfillBuffer();",
"bufferPointer == bytesRead",
"bufferPointer",
"bytesRead",
"fillBuffer()",
"fillBuffer",
"return buffer[bufferPointer++];",
"buffer[bufferPointer++]",
"buffer",
"bufferPointer++",
"bufferPointer",
"public void close() throws IOException {\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}",
"close",
"{\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}",
"if (din == null)\n\t\t\t\treturn;",
"din == null",
"din",
"null",
"return;",
"din.close()",
"din.close",
"din",
"public int[] nextIntArray(int n) throws IOException {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"nextIntArray",
"{\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"int[] arr = new int[n];",
"arr",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextInt();\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tarr[i] = nextInt();\n\t\t\t}",
"{\n\t\t\t\tarr[i] = nextInt();\n\t\t\t}",
"arr[i] = nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int n",
"n",
"public long[] nextLongArray(int n) throws IOException {\n\t\t\tlong[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextLong();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"nextLongArray",
"{\n\t\t\tlong[] arr = new long[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextLong();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"long[] arr = new long[n];",
"arr",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = nextLong();\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tarr[i] = nextLong();\n\t\t\t}",
"{\n\t\t\t\tarr[i] = nextLong();\n\t\t\t}",
"arr[i] = nextLong()",
"arr[i]",
"arr",
"i",
"nextLong()",
"nextLong",
"return arr;",
"arr",
"int n",
"n",
"public int[][] nextInt2DArray(int m, int n) throws IOException {\n\t\t\tint[][] arr = new int[m][n];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"nextInt2DArray",
"{\n\t\t\tint[][] arr = new int[m][n];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"int[][] arr = new int[m][n];",
"arr",
"new int[m][n]",
"m",
"n",
"for (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}",
"{\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}",
"for (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"arr[i][j] = nextInt();",
"arr[i][j] = nextInt()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int m",
"m",
"int n",
"n",
"public long[][] nextInt2DArrayL(int m, int n) throws IOException {\n\t\t\tlong[][] arr = new long[m][n];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"nextInt2DArrayL",
"{\n\t\t\tlong[][] arr = new long[m][n];\n\t\t\tfor (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"long[][] arr = new long[m][n];",
"arr",
"new long[m][n]",
"m",
"n",
"for (int i = 0; i < m; i++) {\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}",
"{\n\t\t\t\tfor (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();\n\t\t\t}",
"for (int j = 0; j < n; j++)\n\t\t\t\t\tarr[i][j] = nextInt();",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"arr[i][j] = nextInt();",
"arr[i][j] = nextInt()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int m",
"m",
"int n",
"n"
]
|
import java.io.*;
import java.math.BigInteger;
import java.util.*;
import java.awt.*;
class Main {
static long sx = 0, sy = 0, mod = (long) (1e9 + 7);
static ArrayList<Integer>[] a;
static Integer[][] dp;
static long[] fa;
static long[] farr;
public static PrintWriter out = new PrintWriter(System.out);
static ArrayList<pair> pa = new ArrayList<>();
static long[] fact = new long[(int) 1e6];
static StringBuilder sb = new StringBuilder();
static boolean cycle = false;
static long m = 998244353;
static long[] no, col;
static String s;
static long k = 0, n = 0, one = 0;
static int cnt;
// static long[] dp;
// static long[] p;
static long[] ans;
// static Double[][] a = new Double[2][2];
static Double[][] b = new Double[2][2];
static Double[] x;
static Double[] y;
static Double[] dis;
// static boolean b = true;
static int[][] par;
static int[] depth;
static HashMap<Integer, Integer> map;
static ArrayList<Integer> p;
public static void main(String[] args) throws IOException {
// Scanner scn = new Scanner(new BufferedReader(new
// InputStreamReader(System.in)));
Reader scn = new Reader();
int n = scn.nextInt();
int[][] a = scn.nextInt2DArray(n, 2);
int cnt = 0;
boolean b = false;
for (int i = 0; i < n; i++) {
if (a[i][0] == a[i][1])
cnt++;
else
cnt = 0;
if (cnt >= 3)
b = true;
}
System.out.println(b ? "Yes" : "No");
}
// _________________________TEMPLATE_____________________________________________________________
// public static long lcm(long x, long y) {
//
// return (x * y) / gcd(x, y);
// }
//
// private static long gcd(long x, long y) {
// if (x == 0)
// return y;
//
// return gcd(y % x, x);
// }
//
// static class comp implements Comparator<Integer> {
//
// @Override
// public int compare(Integer p1, Integer p2) {
//
// return p2 - p1;
//
// }
// }
//
// }
//
// public static long pow(long a, long b) {
//
// if (b < 0)
// return 0;
// if (b == 0 || b == 1)
// return (long) Math.pow(a, b);
//
// if (b % 2 == 0) {
//
// long ret = pow(a, b / 2);
// ret = (ret % mod * ret % mod) % mod;
// return ret;
// }
//
// else {
// return ((pow(a, b - 1) % mod) * a % mod) % mod;
// }
// }
private static class pair implements Comparable<pair> {
int val, cnt;
pair(int a, int b) {
val = a;
cnt = b;
}
@Override
public int compareTo(pair o) {
return this.val - o.val;
}
@Override
public int hashCode() {
return val * 17 + cnt * 31;
}
@Override
public boolean equals(Object o) {
pair p = (pair) o;
return this.val == p.val && this.cnt == p.cnt;
}
}
private static String reverse(String s) {
return new StringBuilder(s).reverse().toString();
}
public static class Reader {
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public Reader() {
din = new DataInputStream(System.in);
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public Reader(String file_name) throws IOException {
din = new DataInputStream(new FileInputStream(file_name));
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public String readLine() throws IOException {
byte[] buf = new byte[1000000 + 1]; // line length
int cnt = 0, c;
while ((c = read()) != -1) {
if (c == '\n')
break;
buf[cnt++] = (byte) c;
}
return new String(buf, 0, cnt);
}
public int nextInt() throws IOException {
int ret = 0;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (neg)
return -ret;
return ret;
}
public long nextLong() throws IOException {
long ret = 0;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (neg)
return -ret;
return ret;
}
public double nextDouble() throws IOException {
double ret = 0, div = 1;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do {
ret = ret * 10 + c - '0';
} while ((c = read()) >= '0' && c <= '9');
if (c == '.') {
while ((c = read()) >= '0' && c <= '9') {
ret += (c - '0') / (div *= 10);
}
}
if (neg)
return -ret;
return ret;
}
private void fillBuffer() throws IOException {
bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
if (bytesRead == -1)
buffer[0] = -1;
}
private byte read() throws IOException {
if (bufferPointer == bytesRead)
fillBuffer();
return buffer[bufferPointer++];
}
public void close() throws IOException {
if (din == null)
return;
din.close();
}
public int[] nextIntArray(int n) throws IOException {
int[] arr = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = nextInt();
}
return arr;
}
public long[] nextLongArray(int n) throws IOException {
long[] arr = new long[n];
for (int i = 0; i < n; i++) {
arr[i] = nextLong();
}
return arr;
}
public int[][] nextInt2DArray(int m, int n) throws IOException {
int[][] arr = new int[m][n];
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++)
arr[i][j] = nextInt();
}
return arr;
}
public long[][] nextInt2DArrayL(int m, int n) throws IOException {
long[][] arr = new long[m][n];
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++)
arr[i][j] = nextInt();
}
return arr;
}
// kickstart - Solution
// atcoder - Main
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
17,
41,
13,
17,
41,
13,
17,
28,
13,
13,
30,
30,
14,
2,
18,
13,
17,
18,
13,
17,
40,
13,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
3,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
6,
13,
41,
13,
17,
41,
13,
17,
12,
13,
30,
0,
13,
20,
0,
13,
17,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
14,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
37,
20,
30,
29,
4,
18,
13,
29,
4,
18,
13,
17,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
260,
17
],
[
260,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
29,
31
],
[
20,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
39,
40
],
[
39,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
46,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
20,
55
],
[
55,
56
],
[
55,
57
],
[
20,
58
],
[
58,
59
],
[
58,
60
],
[
20,
61
],
[
61,
62
],
[
61,
63
],
[
61,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
71,
73
],
[
66,
74
],
[
74,
75
],
[
66,
76
],
[
76,
77
],
[
76,
78
],
[
65,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
20,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
93,
95
],
[
93,
96
],
[
18,
97
],
[
97,
98
],
[
260,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
99,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
113,
114
],
[
113,
115
],
[
107,
116
],
[
116,
117
],
[
99,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
121,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
131,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
120,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
99,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
148,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
158,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
147,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
170,
173
],
[
99,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
178,
181
],
[
181,
182
],
[
99,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
187,
190
],
[
190,
191
],
[
99,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
196,
199
],
[
199,
200
],
[
99,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
203,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
208,
213
],
[
213,
214
],
[
213,
215
],
[
208,
216
],
[
216,
217
],
[
217,
218
],
[
208,
219
],
[
219,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
220,
224
],
[
224,
225
],
[
203,
226
],
[
226,
227
],
[
201,
228
],
[
228,
229
],
[
99,
230
],
[
230,
231
],
[
230,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
232,
237
],
[
237,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
237,
242
],
[
242,
243
],
[
242,
244
],
[
237,
245
],
[
245,
246
],
[
246,
247
],
[
237,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
249,
253
],
[
253,
254
],
[
232,
255
],
[
255,
256
],
[
230,
257
],
[
257,
258
],
[
0,
259
],
[
259,
260
],
[
259,
261
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n private static class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n\n public String next() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0; i < n; i++) {\n d[i] = sc.nextIntArray(2);\n }\n boolean found = false;\n int count = 0;\n for (int[] di : d) {\n if (di[0] == di[1]) count++;\n else count = 0;\n if (count == 3) {\n found = true;\n break;\n }\n }\n System.out.println(found ? \"Yes\" : \"No\");\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n private static class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n\n public String next() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0; i < n; i++) {\n d[i] = sc.nextIntArray(2);\n }\n boolean found = false;\n int count = 0;\n for (int[] di : d) {\n if (di[0] == di[1]) count++;\n else count = 0;\n if (count == 3) {\n found = true;\n break;\n }\n }\n System.out.println(found ? \"Yes\" : \"No\");\n }\n}",
"Main",
"public static void main(String[] args) {\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0; i < n; i++) {\n d[i] = sc.nextIntArray(2);\n }\n boolean found = false;\n int count = 0;\n for (int[] di : d) {\n if (di[0] == di[1]) count++;\n else count = 0;\n if (count == 3) {\n found = true;\n break;\n }\n }\n System.out.println(found ? \"Yes\" : \"No\");\n }",
"main",
"{\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0; i < n; i++) {\n d[i] = sc.nextIntArray(2);\n }\n boolean found = false;\n int count = 0;\n for (int[] di : d) {\n if (di[0] == di[1]) count++;\n else count = 0;\n if (count == 3) {\n found = true;\n break;\n }\n }\n System.out.println(found ? \"Yes\" : \"No\");\n }",
"FastScanner sc = new FastScanner(System.in);",
"sc",
"new FastScanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] d = new int[n][2];",
"d",
"new int[n][2]",
"n",
"2",
"for (int i = 0; i < n; i++) {\n d[i] = sc.nextIntArray(2);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n d[i] = sc.nextIntArray(2);\n }",
"{\n d[i] = sc.nextIntArray(2);\n }",
"d[i] = sc.nextIntArray(2)",
"d[i]",
"d",
"i",
"sc.nextIntArray(2)",
"sc.nextIntArray",
"sc",
"2",
"boolean found = false;",
"found",
"false",
"int count = 0;",
"count",
"0",
"for (int[] di : d) {\n if (di[0] == di[1]) count++;\n else count = 0;\n if (count == 3) {\n found = true;\n break;\n }\n }",
"int[] di",
"d",
"{\n if (di[0] == di[1]) count++;\n else count = 0;\n if (count == 3) {\n found = true;\n break;\n }\n }",
"{\n if (di[0] == di[1]) count++;\n else count = 0;\n if (count == 3) {\n found = true;\n break;\n }\n }",
"if (di[0] == di[1]) count++;\n else count = 0;",
"di[0] == di[1]",
"di[0]",
"di",
"0",
"di[1]",
"di",
"1",
"count++",
"count",
"count = 0",
"count",
"0",
"if (count == 3) {\n found = true;\n break;\n }",
"count == 3",
"count",
"3",
"{\n found = true;\n break;\n }",
"found = true",
"found",
"true",
"break;",
"System.out.println(found ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"found ? \"Yes\" : \"No\"",
"found",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"private static class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n\n public String next() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }",
"FastScanner",
"private BufferedReader reader = null;",
"reader",
"null",
"private StringTokenizer tokenizer = null;",
"tokenizer",
"null",
"public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }",
"FastScanner",
"{\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }",
"reader = new BufferedReader(new InputStreamReader(in))",
"reader",
"new BufferedReader(new InputStreamReader(in))",
"tokenizer = null",
"tokenizer",
"null",
"InputStream in",
"in",
"public String next() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"next",
"{\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }",
"if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n tokenizer = new StringTokenizer(reader.readLine());\n }",
"tokenizer = new StringTokenizer(reader.readLine())",
"tokenizer",
"new StringTokenizer(reader.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }",
"nextLine",
"{\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }",
"if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"tokenizer == null || !tokenizer.hasMoreTokens()",
"tokenizer == null",
"tokenizer",
"null",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }",
"catch (IOException e) {\n throw new RuntimeException(e);\n }",
"IOException e",
"{\n throw new RuntimeException(e);\n }",
"throw new RuntimeException(e);",
"new RuntimeException(e)",
"{\n return reader.readLine();\n }",
"return reader.readLine();",
"reader.readLine()",
"reader.readLine",
"reader",
"return tokenizer.nextToken(\"\\n\");",
"tokenizer.nextToken(\"\\n\")",
"tokenizer.nextToken",
"tokenizer",
"\"\\n\"",
"public long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }",
"nextIntArray",
"{\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n a[i] = nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextInt();",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }",
"nextLongArray",
"{\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }",
"long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for (int i = 0; i < n; i++)\n a[i] = nextLong();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextLong();",
"a[i] = nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"public class Main {\n private static class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n\n public String next() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0; i < n; i++) {\n d[i] = sc.nextIntArray(2);\n }\n boolean found = false;\n int count = 0;\n for (int[] di : d) {\n if (di[0] == di[1]) count++;\n else count = 0;\n if (count == 3) {\n found = true;\n break;\n }\n }\n System.out.println(found ? \"Yes\" : \"No\");\n }\n}",
"public class Main {\n private static class FastScanner {\n private BufferedReader reader = null;\n private StringTokenizer tokenizer = null;\n\n public FastScanner(InputStream in) {\n reader = new BufferedReader(new InputStreamReader(in));\n tokenizer = null;\n }\n\n public String next() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n tokenizer = new StringTokenizer(reader.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return tokenizer.nextToken();\n }\n\n public String nextLine() {\n if (tokenizer == null || !tokenizer.hasMoreTokens()) {\n try {\n return reader.readLine();\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n\n return tokenizer.nextToken(\"\\n\");\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n }\n\n public static void main(String[] args) {\n FastScanner sc = new FastScanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0; i < n; i++) {\n d[i] = sc.nextIntArray(2);\n }\n boolean found = false;\n int count = 0;\n for (int[] di : d) {\n if (di[0] == di[1]) count++;\n else count = 0;\n if (count == 3) {\n found = true;\n break;\n }\n }\n System.out.println(found ? \"Yes\" : \"No\");\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
private static class FastScanner {
private BufferedReader reader = null;
private StringTokenizer tokenizer = null;
public FastScanner(InputStream in) {
reader = new BufferedReader(new InputStreamReader(in));
tokenizer = null;
}
public String next() {
if (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public String nextLine() {
if (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
return reader.readLine();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken("\n");
}
public long nextLong() {
return Long.parseLong(next());
}
public int nextInt() {
return Integer.parseInt(next());
}
public double nextDouble() {
return Double.parseDouble(next());
}
public int[] nextIntArray(int n) {
int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = nextInt();
return a;
}
public long[] nextLongArray(int n) {
long[] a = new long[n];
for (int i = 0; i < n; i++)
a[i] = nextLong();
return a;
}
}
public static void main(String[] args) {
FastScanner sc = new FastScanner(System.in);
int n = sc.nextInt();
int[][] d = new int[n][2];
for (int i = 0; i < n; i++) {
d[i] = sc.nextIntArray(2);
}
boolean found = false;
int count = 0;
for (int[] di : d) {
if (di[0] == di[1]) count++;
else count = 0;
if (count == 3) {
found = true;
break;
}
}
System.out.println(found ? "Yes" : "No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
77,
5
],
[
77,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
46,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
70,
73
],
[
6,
74
],
[
74,
75
],
[
0,
76
],
[
76,
77
],
[
76,
78
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint cnt =0;\n\t\tboolean isWin = false;\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif( d1 == d2 ) {\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcnt =0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println( isWin ? \"Yes\" :\"No\");\n\n\t}\n\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint cnt =0;\n\t\tboolean isWin = false;\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif( d1 == d2 ) {\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcnt =0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println( isWin ? \"Yes\" :\"No\");\n\n\t}\n\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint cnt =0;\n\t\tboolean isWin = false;\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif( d1 == d2 ) {\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcnt =0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println( isWin ? \"Yes\" :\"No\");\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint cnt =0;\n\t\tboolean isWin = false;\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif( d1 == d2 ) {\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcnt =0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println( isWin ? \"Yes\" :\"No\");\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cnt =0;",
"cnt",
"0",
"boolean isWin = false;",
"isWin",
"false",
"for( int i=0 ; i < n ; i++ ) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif( d1 == d2 ) {\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcnt =0;\n\t\t\t}\n\t\t}",
"int i=0 ;",
"int i=0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif( d1 == d2 ) {\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcnt =0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif( d1 == d2 ) {\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcnt =0;\n\t\t\t}\n\t\t}",
"int d1 = sc.nextInt();",
"d1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d2 = sc.nextInt();",
"d2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if( d1 == d2 ) {\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcnt =0;\n\t\t\t}",
"d1 == d2",
"d1",
"d2",
"{\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}",
"cnt++",
"cnt",
"if( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}",
"cnt == 3",
"cnt",
"3",
"{\n\t\t\t\t\tisWin =true;\n\t\t\t\t}",
"isWin =true",
"isWin",
"true",
"{\n\t\t\t\tcnt =0;\n\t\t\t}",
"cnt =0",
"cnt",
"0",
"System.out.println( isWin ? \"Yes\" :\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"isWin ? \"Yes\" :\"No\"",
"isWin",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint cnt =0;\n\t\tboolean isWin = false;\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif( d1 == d2 ) {\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcnt =0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println( isWin ? \"Yes\" :\"No\");\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint cnt =0;\n\t\tboolean isWin = false;\n\t\tfor( int i=0 ; i < n ; i++ ) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif( d1 == d2 ) {\n\t\t\t\tcnt++;\n\t\t\t\tif( cnt == 3) {\n\t\t\t\t\tisWin =true;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcnt =0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println( isWin ? \"Yes\" :\"No\");\n\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
// 整数の入力
int n = sc.nextInt();
int cnt =0;
boolean isWin = false;
for( int i=0 ; i < n ; i++ ) {
int d1 = sc.nextInt();
int d2 = sc.nextInt();
if( d1 == d2 ) {
cnt++;
if( cnt == 3) {
isWin =true;
}
}else {
cnt =0;
}
}
System.out.println( isWin ? "Yes" :"No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
30,
0,
13,
17,
3,
14,
13,
4,
18,
13,
17,
4,
18,
13,
17,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
13,
17,
3,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
17,
13,
23,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
13,
0,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
13,
12,
13,
30,
29,
13,
12,
13,
30,
14,
2,
2,
4,
18,
13,
4,
18,
36,
17,
29,
40,
17,
14,
2,
2,
4,
18,
13,
4,
18,
36,
17,
29,
17,
29,
17,
23,
13,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
11,
59
],
[
59,
60
],
[
59,
61
],
[
11,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
62,
72
],
[
72,
73
],
[
73,
74
],
[
62,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
79,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
92,
98
],
[
91,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
99,
105
],
[
79,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
107,
113
],
[
106,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
114,
120
],
[
77,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
11,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
126,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
11,
136
],
[
136,
137
],
[
137,
138
],
[
9,
139
],
[
139,
140
],
[
7,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
143,
149
],
[
149,
150
],
[
149,
151
],
[
143,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
157,
158
],
[
157,
159
],
[
152,
160
],
[
160,
161
],
[
161,
162
],
[
152,
163
],
[
164,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
166,
170
],
[
170,
171
],
[
170,
172
],
[
165,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
173,
177
],
[
143,
178
],
[
178,
179
],
[
141,
180
],
[
180,
181
],
[
141,
182
],
[
182,
183
],
[
7,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
188,
192
],
[
192,
193
],
[
192,
194
],
[
192,
195
],
[
184,
196
],
[
196,
197
],
[
184,
198
],
[
198,
199
],
[
7,
200
],
[
200,
201
],
[
200,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
203,
207
],
[
207,
208
],
[
203,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
210,
213
],
[
213,
214
],
[
213,
215
],
[
200,
216
],
[
216,
217
],
[
200,
218
],
[
218,
219
],
[
7,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
224,
228
],
[
220,
229
],
[
229,
230
],
[
220,
231
],
[
231,
232
],
[
7,
233
],
[
233,
234
],
[
233,
235
],
[
235,
236
],
[
235,
237
],
[
233,
238
],
[
238,
239
],
[
238,
240
],
[
233,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
244,
245
],
[
245,
246
],
[
246,
247
],
[
247,
248
],
[
244,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
249,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
243,
260
],
[
260,
261
],
[
261,
262
],
[
262,
263
],
[
233,
264
],
[
264,
265
],
[
264,
266
],
[
266,
267
],
[
267,
268
],
[
268,
269
],
[
269,
270
],
[
268,
271
],
[
271,
272
],
[
233,
273
],
[
273,
274
],
[
273,
275
],
[
275,
276
],
[
276,
277
],
[
277,
278
],
[
278,
279
],
[
277,
280
],
[
280,
281
],
[
233,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
284,
289
],
[
289,
290
],
[
290,
291
],
[
291,
292
],
[
291,
293
],
[
289,
294
],
[
294,
295
],
[
294,
296
],
[
289,
297
],
[
297,
298
],
[
298,
299
],
[
289,
300
],
[
300,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
301,
305
],
[
305,
306
],
[
284,
307
],
[
307,
308
],
[
282,
309
],
[
309,
310
],
[
233,
311
],
[
311,
312
],
[
311,
313
],
[
313,
314
],
[
314,
315
],
[
314,
316
],
[
313,
318
],
[
318,
319
],
[
319,
320
],
[
320,
321
],
[
320,
322
],
[
318,
323
],
[
323,
324
],
[
323,
325
],
[
318,
326
],
[
326,
327
],
[
327,
328
],
[
318,
329
],
[
329,
330
],
[
330,
331
],
[
331,
332
],
[
331,
333
],
[
330,
334
],
[
334,
335
],
[
313,
336
],
[
336,
337
],
[
311,
338
],
[
338,
339
],
[
233,
340
],
[
340,
341
],
[
340,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
342,
347
],
[
347,
348
],
[
348,
349
],
[
349,
350
],
[
349,
351
],
[
347,
352
],
[
352,
353
],
[
352,
354
],
[
347,
355
],
[
355,
356
],
[
356,
357
],
[
347,
358
],
[
358,
359
],
[
359,
360
],
[
360,
361
],
[
360,
362
],
[
359,
363
],
[
363,
364
],
[
342,
365
],
[
365,
366
],
[
340,
367
],
[
367,
368
],
[
340,
369
],
[
369,
370
],
[
7,
371
],
[
371,
372
],
[
371,
373
],
[
373,
374
],
[
371,
375
],
[
375,
376
],
[
371,
377
],
[
377,
378
],
[
377,
379
],
[
379,
380
],
[
380,
381
],
[
380,
382
],
[
379,
383
],
[
383,
384
],
[
383,
385
],
[
377,
386
],
[
386,
387
],
[
377,
388
],
[
388,
389
],
[
371,
390
],
[
390,
391
],
[
390,
392
],
[
392,
393
],
[
393,
394
],
[
371,
395
],
[
395,
396
],
[
395,
397
],
[
397,
398
],
[
398,
399
],
[
371,
400
],
[
400,
401
],
[
400,
402
],
[
402,
403
],
[
403,
404
],
[
404,
405
],
[
405,
406
],
[
406,
407
],
[
407,
408
],
[
405,
409
],
[
409,
410
],
[
410,
411
],
[
404,
412
],
[
403,
413
],
[
413,
414
],
[
414,
415
],
[
403,
416
],
[
416,
417
],
[
417,
418
],
[
418,
419
],
[
419,
420
],
[
420,
421
],
[
418,
422
],
[
422,
423
],
[
423,
424
],
[
417,
425
],
[
416,
426
],
[
426,
427
],
[
416,
428
],
[
428,
429
],
[
400,
430
],
[
430,
431
],
[
371,
432
]
]
| [
"import java.io.*;\nimport java.util.*;\n\nclass Main{\n\n\tpublic static void main(String[] args) {\n FastScanner in = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n int d[][] = new int[n][2];\n for(int i=0;i<n;i++) {\n \td[i][0] = in.nextInt();\n \td[i][1] = in.nextInt();\n }\n boolean ans = false;\n for(int i=0;i<n-2;i++) {\n \tif(d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]) {\n \t\tans = true; break;\n \t}\n }\n if(ans) \n \tout.println(\"Yes\");\n else\n \tout.println(\"No\");\n out.flush();\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\t\t\n\t\tString next() {\n\t\t\twhile(!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}catch(IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint[] readArray(int n) {\n\t\t\tint a[] = new int[n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t\tInteger[] readArray(long n) {\n\t\t Integer a[] = new Integer[(int)n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t\tlong[] readArray(int n,long x) {\n\t\t\tlong a[] = new long[n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Pair implements Comparable<Pair> {\n\t\tint x, y;\n\t\tPair(int a, int b){ x = a; y = b; }\n\t\tint getKey() { return x; }\n\t\tint getVal() { return y; }\n\t\t@Override\n\t\tpublic int compareTo(Pair o) {\n\t\t\tif(o.getVal() - this.getVal()>0)\n\t\t\t\treturn -1;\n\t\t\telse if(o.getVal() - this.getVal()<0)\n\t\t\t\treturn 1;\n\t\t\telse \n\t\t\t\treturn 0;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic boolean arrayEquals(char a[], char b[]) {\n\t\tint n = a.length;\n\t\tboolean verdict = true;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(a[i]!=b[i]) {\n\t\t\t\tverdict = false;break;\n\t\t\t}\n\t\t}\n\t\treturn verdict;\n\t}\n\t\n\tstatic long lcm(long a, long b) {\n\t\treturn (a*b)/gcd(a,b);\n\t}\n\t\n\tstatic long gcd(long a, long b) {\n\t\tif(b==0) return a;\n\t\telse return gcd(b,a%b);\n\t}\n\t\n\tstatic long hashInt(int x,int y) {\n\t\treturn x*(1_000_000_000L)+y;\n\t}\n}\n",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main{\n\n\tpublic static void main(String[] args) {\n FastScanner in = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n int d[][] = new int[n][2];\n for(int i=0;i<n;i++) {\n \td[i][0] = in.nextInt();\n \td[i][1] = in.nextInt();\n }\n boolean ans = false;\n for(int i=0;i<n-2;i++) {\n \tif(d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]) {\n \t\tans = true; break;\n \t}\n }\n if(ans) \n \tout.println(\"Yes\");\n else\n \tout.println(\"No\");\n out.flush();\n\t}\n\t\n\tstatic class FastScanner {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\t\t\n\t\tString next() {\n\t\t\twhile(!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}catch(IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint[] readArray(int n) {\n\t\t\tint a[] = new int[n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t\tInteger[] readArray(long n) {\n\t\t Integer a[] = new Integer[(int)n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t\tlong[] readArray(int n,long x) {\n\t\t\tlong a[] = new long[n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic class Pair implements Comparable<Pair> {\n\t\tint x, y;\n\t\tPair(int a, int b){ x = a; y = b; }\n\t\tint getKey() { return x; }\n\t\tint getVal() { return y; }\n\t\t@Override\n\t\tpublic int compareTo(Pair o) {\n\t\t\tif(o.getVal() - this.getVal()>0)\n\t\t\t\treturn -1;\n\t\t\telse if(o.getVal() - this.getVal()<0)\n\t\t\t\treturn 1;\n\t\t\telse \n\t\t\t\treturn 0;\n\t\t}\n\t\t\n\t}\n\t\n\tstatic boolean arrayEquals(char a[], char b[]) {\n\t\tint n = a.length;\n\t\tboolean verdict = true;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(a[i]!=b[i]) {\n\t\t\t\tverdict = false;break;\n\t\t\t}\n\t\t}\n\t\treturn verdict;\n\t}\n\t\n\tstatic long lcm(long a, long b) {\n\t\treturn (a*b)/gcd(a,b);\n\t}\n\t\n\tstatic long gcd(long a, long b) {\n\t\tif(b==0) return a;\n\t\telse return gcd(b,a%b);\n\t}\n\t\n\tstatic long hashInt(int x,int y) {\n\t\treturn x*(1_000_000_000L)+y;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n FastScanner in = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n int d[][] = new int[n][2];\n for(int i=0;i<n;i++) {\n \td[i][0] = in.nextInt();\n \td[i][1] = in.nextInt();\n }\n boolean ans = false;\n for(int i=0;i<n-2;i++) {\n \tif(d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]) {\n \t\tans = true; break;\n \t}\n }\n if(ans) \n \tout.println(\"Yes\");\n else\n \tout.println(\"No\");\n out.flush();\n\t}",
"main",
"{\n FastScanner in = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n int n = in.nextInt();\n int d[][] = new int[n][2];\n for(int i=0;i<n;i++) {\n \td[i][0] = in.nextInt();\n \td[i][1] = in.nextInt();\n }\n boolean ans = false;\n for(int i=0;i<n-2;i++) {\n \tif(d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]) {\n \t\tans = true; break;\n \t}\n }\n if(ans) \n \tout.println(\"Yes\");\n else\n \tout.println(\"No\");\n out.flush();\n\t}",
"FastScanner in = new FastScanner();",
"in",
"new FastScanner()",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int d[][] = new int[n][2];",
"d",
"new int[n][2]",
"n",
"2",
"for(int i=0;i<n;i++) {\n \td[i][0] = in.nextInt();\n \td[i][1] = in.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \td[i][0] = in.nextInt();\n \td[i][1] = in.nextInt();\n }",
"{\n \td[i][0] = in.nextInt();\n \td[i][1] = in.nextInt();\n }",
"d[i][0] = in.nextInt()",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"in.nextInt()",
"in.nextInt",
"in",
"d[i][1] = in.nextInt()",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"in.nextInt()",
"in.nextInt",
"in",
"boolean ans = false;",
"ans",
"false",
"for(int i=0;i<n-2;i++) {\n \tif(d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]) {\n \t\tans = true; break;\n \t}\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n-2",
"i",
"n-2",
"n",
"2",
"i++",
"i++",
"i",
"{\n \tif(d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]) {\n \t\tans = true; break;\n \t}\n }",
"{\n \tif(d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]) {\n \t\tans = true; break;\n \t}\n }",
"if(d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]) {\n \t\tans = true; break;\n \t}",
"d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]",
"d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]",
"d[i][0]==d[i][1]",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"d[i+1][0]==d[i+1][1]",
"d[i+1][0]",
"d[i+1]",
"d",
"i+1",
"i",
"1",
"0",
"d[i+1][1]",
"d[i+1]",
"d",
"i+1",
"i",
"1",
"1",
"d[i+2][0]==d[i+2][1]",
"d[i+2][0]",
"d[i+2]",
"d",
"i+2",
"i",
"2",
"0",
"d[i+2][1]",
"d[i+2]",
"d",
"i+2",
"i",
"2",
"1",
"{\n \t\tans = true; break;\n \t}",
"ans = true",
"ans",
"true",
"break;",
"if(ans) \n \tout.println(\"Yes\");\n else\n \tout.println(\"No\");",
"ans",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"static boolean arrayEquals(char a[], char b[]) {\n\t\tint n = a.length;\n\t\tboolean verdict = true;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(a[i]!=b[i]) {\n\t\t\t\tverdict = false;break;\n\t\t\t}\n\t\t}\n\t\treturn verdict;\n\t}",
"arrayEquals",
"{\n\t\tint n = a.length;\n\t\tboolean verdict = true;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(a[i]!=b[i]) {\n\t\t\t\tverdict = false;break;\n\t\t\t}\n\t\t}\n\t\treturn verdict;\n\t}",
"int n = a.length;",
"n",
"a.length",
"a",
"a.length",
"boolean verdict = true;",
"verdict",
"true",
"for(int i=0;i<n;i++) {\n\t\t\tif(a[i]!=b[i]) {\n\t\t\t\tverdict = false;break;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(a[i]!=b[i]) {\n\t\t\t\tverdict = false;break;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(a[i]!=b[i]) {\n\t\t\t\tverdict = false;break;\n\t\t\t}\n\t\t}",
"if(a[i]!=b[i]) {\n\t\t\t\tverdict = false;break;\n\t\t\t}",
"a[i]!=b[i]",
"a[i]",
"a",
"i",
"b[i]",
"b",
"i",
"{\n\t\t\t\tverdict = false;break;\n\t\t\t}",
"verdict = false",
"verdict",
"false",
"break;",
"return verdict;",
"verdict",
"char a[]",
"a",
"char b[]",
"b",
"static long lcm(long a, long b) {\n\t\treturn (a*b)/gcd(a,b);\n\t}",
"lcm",
"{\n\t\treturn (a*b)/gcd(a,b);\n\t}",
"return (a*b)/gcd(a,b);",
"(a*b)/gcd(a,b)",
"(a*b)",
"a",
"b",
"gcd(a,b)",
"gcd",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static long gcd(long a, long b) {\n\t\tif(b==0) return a;\n\t\telse return gcd(b,a%b);\n\t}",
"gcd",
"{\n\t\tif(b==0) return a;\n\t\telse return gcd(b,a%b);\n\t}",
"if(b==0) return a;\n\t\telse return gcd(b,a%b);",
"b==0",
"b",
"0",
"return a;",
"a",
"return gcd(b,a%b);",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static long hashInt(int x,int y) {\n\t\treturn x*(1_000_000_000L)+y;\n\t}",
"hashInt",
"{\n\t\treturn x*(1_000_000_000L)+y;\n\t}",
"return x*(1_000_000_000L)+y;",
"x*(1_000_000_000L)+y",
"x*(1_000_000_000L)",
"x",
"(1_000_000_000L)",
"y",
"int x",
"x",
"int y",
"y",
"static class FastScanner {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\t\t\n\t\tString next() {\n\t\t\twhile(!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}catch(IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\t\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\t\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\t\n\t\tint[] readArray(int n) {\n\t\t\tint a[] = new int[n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t\tInteger[] readArray(long n) {\n\t\t Integer a[] = new Integer[(int)n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextInt();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t\tlong[] readArray(int n,long x) {\n\t\t\tlong a[] = new long[n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextLong();\n\t\t\treturn a;\n\t\t}\n\t\t\n\t}",
"FastScanner",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st = new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() {\n\t\t\twhile(!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}catch(IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile(!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}catch(IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"while(!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}catch(IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try {\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}catch(IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch(IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tst = new StringTokenizer(br.readLine());\n\t\t\t\t}",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"int[] readArray(int n) {\n\t\t\tint a[] = new int[n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextInt();\n\t\t\treturn a;\n\t\t}",
"readArray",
"{\n\t\t\tint a[] = new int[n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextInt();\n\t\t\treturn a;\n\t\t}",
"int a[] = new int[n];",
"a",
"new int[n]",
"n",
"for(int i=0;i<n;i++) a[i] = nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextInt();",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"Integer[] readArray(long n) {\n\t\t Integer a[] = new Integer[(int)n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextInt();\n\t\t\treturn a;\n\t\t}",
"readArray",
"{\n\t\t Integer a[] = new Integer[(int)n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextInt();\n\t\t\treturn a;\n\t\t}",
"Integer a[] = new Integer[(int)n];",
"a",
"new Integer[(int)n]",
"(int)n",
"for(int i=0;i<n;i++) a[i] = nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextInt();",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"long n",
"n",
"long[] readArray(int n,long x) {\n\t\t\tlong a[] = new long[n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextLong();\n\t\t\treturn a;\n\t\t}",
"readArray",
"{\n\t\t\tlong a[] = new long[n];\n\t\t\tfor(int i=0;i<n;i++) a[i] = nextLong();\n\t\t\treturn a;\n\t\t}",
"long a[] = new long[n];",
"a",
"new long[n]",
"n",
"for(int i=0;i<n;i++) a[i] = nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextLong();",
"a[i] = nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"long x",
"x",
"static class Pair implements Comparable<Pair> {\n\t\tint x, y;\n\t\tPair(int a, int b){ x = a; y = b; }\n\t\tint getKey() { return x; }\n\t\tint getVal() { return y; }\n\t\t@Override\n\t\tpublic int compareTo(Pair o) {\n\t\t\tif(o.getVal() - this.getVal()>0)\n\t\t\t\treturn -1;\n\t\t\telse if(o.getVal() - this.getVal()<0)\n\t\t\t\treturn 1;\n\t\t\telse \n\t\t\t\treturn 0;\n\t\t}\n\t\t\n\t}",
"Pair",
"int x",
"x",
"y;",
"y",
"Pair(int a, int b){ x = a; y = b; }",
"Pair",
"{ x = a; y = b; }",
"x = a",
"x",
"a",
"y = b",
"y",
"b",
"int a",
"a",
"int b",
"b",
"int getKey() { return x; }",
"getKey",
"{ return x; }",
"return x;",
"x",
"int getVal() { return y; }",
"getVal",
"{ return y; }",
"return y;",
"y",
"@Override\n\t\tpublic int compareTo(Pair o) {\n\t\t\tif(o.getVal() - this.getVal()>0)\n\t\t\t\treturn -1;\n\t\t\telse if(o.getVal() - this.getVal()<0)\n\t\t\t\treturn 1;\n\t\t\telse \n\t\t\t\treturn 0;\n\t\t}",
"compareTo",
"{\n\t\t\tif(o.getVal() - this.getVal()>0)\n\t\t\t\treturn -1;\n\t\t\telse if(o.getVal() - this.getVal()<0)\n\t\t\t\treturn 1;\n\t\t\telse \n\t\t\t\treturn 0;\n\t\t}",
"if(o.getVal() - this.getVal()>0)\n\t\t\t\treturn -1;\n\t\t\telse if(o.getVal() - this.getVal()<0)\n\t\t\t\treturn 1;\n\t\t\telse \n\t\t\t\treturn 0;",
"o.getVal() - this.getVal()>0",
"o.getVal() - this.getVal()",
"o.getVal()",
"o.getVal",
"o",
"this.getVal()",
"this.getVal",
"this",
"0",
"return -1;",
"-1",
"1",
"if(o.getVal() - this.getVal()<0)\n\t\t\t\treturn 1;\n\t\t\telse \n\t\t\t\treturn 0;",
"o.getVal() - this.getVal()<0",
"o.getVal() - this.getVal()",
"o.getVal()",
"o.getVal",
"o",
"this.getVal()",
"this.getVal",
"this",
"0",
"return 1;",
"1",
"return 0;",
"0",
"Pair o",
"o",
"Comparable"
]
| import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args) {
FastScanner in = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
int n = in.nextInt();
int d[][] = new int[n][2];
for(int i=0;i<n;i++) {
d[i][0] = in.nextInt();
d[i][1] = in.nextInt();
}
boolean ans = false;
for(int i=0;i<n-2;i++) {
if(d[i][0]==d[i][1]&&d[i+1][0]==d[i+1][1]&&d[i+2][0]==d[i+2][1]) {
ans = true; break;
}
}
if(ans)
out.println("Yes");
else
out.println("No");
out.flush();
}
static class FastScanner {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer("");
String next() {
while(!st.hasMoreTokens())
try {
st = new StringTokenizer(br.readLine());
}catch(IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
int[] readArray(int n) {
int a[] = new int[n];
for(int i=0;i<n;i++) a[i] = nextInt();
return a;
}
Integer[] readArray(long n) {
Integer a[] = new Integer[(int)n];
for(int i=0;i<n;i++) a[i] = nextInt();
return a;
}
long[] readArray(int n,long x) {
long a[] = new long[n];
for(int i=0;i<n;i++) a[i] = nextLong();
return a;
}
}
static class Pair implements Comparable<Pair> {
int x, y;
Pair(int a, int b){ x = a; y = b; }
int getKey() { return x; }
int getVal() { return y; }
@Override
public int compareTo(Pair o) {
if(o.getVal() - this.getVal()>0)
return -1;
else if(o.getVal() - this.getVal()<0)
return 1;
else
return 0;
}
}
static boolean arrayEquals(char a[], char b[]) {
int n = a.length;
boolean verdict = true;
for(int i=0;i<n;i++) {
if(a[i]!=b[i]) {
verdict = false;break;
}
}
return verdict;
}
static long lcm(long a, long b) {
return (a*b)/gcd(a,b);
}
static long gcd(long a, long b) {
if(b==0) return a;
else return gcd(b,a%b);
}
static long hashInt(int x,int y) {
return x*(1_000_000_000L)+y;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
46,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
35,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
]
| [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t String s = \"No\";\n int count = 0;\n for(int i=0;i<a;i++){int b = sc.nextInt();\n int c = sc.nextInt();\n if(b==c){count++;}\n else{count=0;}\n if(count>=3){s=\"Yes\";break;}\n }\t\t \n\t\tSystem.out.println(s);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t String s = \"No\";\n int count = 0;\n for(int i=0;i<a;i++){int b = sc.nextInt();\n int c = sc.nextInt();\n if(b==c){count++;}\n else{count=0;}\n if(count>=3){s=\"Yes\";break;}\n }\t\t \n\t\tSystem.out.println(s);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t String s = \"No\";\n int count = 0;\n for(int i=0;i<a;i++){int b = sc.nextInt();\n int c = sc.nextInt();\n if(b==c){count++;}\n else{count=0;}\n if(count>=3){s=\"Yes\";break;}\n }\t\t \n\t\tSystem.out.println(s);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t String s = \"No\";\n int count = 0;\n for(int i=0;i<a;i++){int b = sc.nextInt();\n int c = sc.nextInt();\n if(b==c){count++;}\n else{count=0;}\n if(count>=3){s=\"Yes\";break;}\n }\t\t \n\t\tSystem.out.println(s);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String s = \"No\";",
"s",
"\"No\"",
"int count = 0;",
"count",
"0",
"for(int i=0;i<a;i++){int b = sc.nextInt();\n int c = sc.nextInt();\n if(b==c){count++;}\n else{count=0;}\n if(count>=3){s=\"Yes\";break;}\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<a",
"i",
"a",
"i++",
"i++",
"i",
"{int b = sc.nextInt();\n int c = sc.nextInt();\n if(b==c){count++;}\n else{count=0;}\n if(count>=3){s=\"Yes\";break;}\n }",
"{int b = sc.nextInt();\n int c = sc.nextInt();\n if(b==c){count++;}\n else{count=0;}\n if(count>=3){s=\"Yes\";break;}\n }",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(b==c){count++;}\n else{count=0;}",
"b==c",
"b",
"c",
"{count++;}",
"count++",
"count",
"{count=0;}",
"count=0",
"count",
"0",
"if(count>=3){s=\"Yes\";break;}",
"count>=3",
"count",
"3",
"{s=\"Yes\";break;}",
"s=\"Yes\"",
"s",
"\"Yes\"",
"break;",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t String s = \"No\";\n int count = 0;\n for(int i=0;i<a;i++){int b = sc.nextInt();\n int c = sc.nextInt();\n if(b==c){count++;}\n else{count=0;}\n if(count>=3){s=\"Yes\";break;}\n }\t\t \n\t\tSystem.out.println(s);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a = sc.nextInt();\n\t String s = \"No\";\n int count = 0;\n for(int i=0;i<a;i++){int b = sc.nextInt();\n int c = sc.nextInt();\n if(b==c){count++;}\n else{count=0;}\n if(count>=3){s=\"Yes\";break;}\n }\t\t \n\t\tSystem.out.println(s);\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
String s = "No";
int count = 0;
for(int i=0;i<a;i++){int b = sc.nextInt();
int c = sc.nextInt();
if(b==c){count++;}
else{count=0;}
if(count>=3){s="Yes";break;}
}
System.out.println(s);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
0,
13,
17,
0,
13,
17,
9,
0,
13,
17,
40,
13,
14,
2,
13,
17,
30,
3,
14,
2,
13,
2,
13,
17,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
2,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
11,
1,
41,
13,
2,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
30,
14,
2,
18,
18,
13,
13,
13,
17,
30,
0,
18,
18,
13,
13,
13,
4,
13,
18,
18,
13,
13,
13,
14,
2,
13,
2,
13,
17,
30,
0,
18,
18,
13,
13,
13,
4,
13,
18,
18,
13,
13,
13,
30,
0,
18,
18,
13,
13,
13,
4,
13,
18,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
17,
30,
29,
17,
30,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
4,
18,
13,
13,
17,
0,
18,
13,
17,
17,
14,
2,
13,
17,
0,
18,
13,
17,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
18,
13,
13,
18,
13,
13,
13,
30,
0,
18,
13,
2,
13,
17,
17,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
30,
0,
18,
13,
2,
13,
17,
17,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
2,
13,
13,
29,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
17,
41,
13,
17,
6,
13,
12,
13,
30,
6,
13,
41,
13,
2,
17,
17,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
13,
0,
13,
0,
13,
17,
12,
13,
30,
38,
5,
13,
30,
37,
20,
30,
0,
13,
20,
0,
13,
20,
13,
0,
13,
0,
13,
17,
23,
13,
12,
13,
30,
41,
13,
42,
2,
2,
0,
13,
4,
13,
40,
17,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
41,
13,
20,
42,
2,
13,
40,
17,
30,
14,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
3,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
42,
2,
2,
0,
13,
4,
13,
40,
17,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
41,
13,
20,
42,
2,
13,
40,
17,
30,
14,
2,
2,
13,
17,
2,
13,
17,
3,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
4,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
2,
4,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
42,
2,
13,
17,
0,
13,
4,
13,
41,
13,
2,
13,
17,
14,
13,
0,
13,
4,
13,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
0,
13,
2,
2,
2,
13,
17,
13,
17,
14,
2,
13,
17,
42,
2,
2,
0,
13,
4,
13,
17,
2,
13,
17,
0,
13,
2,
2,
13,
17,
0,
13,
17,
14,
13,
29,
40,
13,
29,
13,
12,
13,
30,
0,
13,
4,
18,
13,
13,
0,
13,
17,
13,
14,
2,
13,
40,
17,
0,
18,
13,
17,
40,
17,
12,
13,
30,
38,
5,
13,
30,
37,
20,
30,
14,
2,
13,
13,
4,
13,
29,
18,
13,
40,
13,
12,
13,
30,
14,
2,
13,
17,
29,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
950,
8
],
[
950,
9
],
[
9,
10
],
[
9,
11
],
[
950,
12
],
[
12,
13
],
[
12,
14
],
[
950,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
23,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
17,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
60,
62
],
[
56,
63
],
[
41,
64
],
[
64,
65
],
[
64,
66
],
[
41,
67
],
[
67,
68
],
[
41,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
17,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
75,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
17,
91
],
[
91,
92
],
[
92,
93
],
[
15,
94
],
[
94,
95
],
[
950,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
99,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
99,
111
],
[
111,
112
],
[
112,
113
],
[
99,
114
],
[
115,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
116,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
116,
128
],
[
128,
129
],
[
129,
130
],
[
116,
131
],
[
132,
132
],
[
132,
133
],
[
133,
134
],
[
136,
135
],
[
143,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
140,
142
],
[
143,
143
],
[
143,
144
],
[
143,
145
],
[
136,
146
],
[
146,
147
],
[
146,
148
],
[
133,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
151,
157
],
[
150,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
160,
164
],
[
159,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
149,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
175,
177
],
[
172,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
179,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
172,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
194,
198
],
[
193,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
201,
205
],
[
96,
206
],
[
206,
207
],
[
96,
208
],
[
208,
209
],
[
96,
210
],
[
210,
211
],
[
96,
212
],
[
212,
213
],
[
950,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
218,
222
],
[
217,
223
],
[
223,
224
],
[
224,
225
],
[
217,
226
],
[
226,
227
],
[
227,
228
],
[
214,
229
],
[
229,
230
],
[
950,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
234,
235
],
[
234,
236
],
[
233,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
239,
244
],
[
244,
245
],
[
244,
246
],
[
239,
247
],
[
247,
248
],
[
248,
249
],
[
239,
250
],
[
251,
251
],
[
251,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
252,
257
],
[
257,
258
],
[
257,
259
],
[
252,
260
],
[
260,
261
],
[
261,
262
],
[
252,
263
],
[
264,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
266,
270
],
[
265,
271
],
[
271,
272
],
[
272,
273
],
[
233,
274
],
[
274,
275
],
[
231,
276
],
[
276,
277
],
[
231,
278
],
[
278,
279
],
[
950,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
282,
286
],
[
286,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
286,
291
],
[
291,
292
],
[
291,
293
],
[
286,
294
],
[
294,
295
],
[
295,
296
],
[
286,
297
],
[
298,
298
],
[
298,
299
],
[
299,
300
],
[
299,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
301,
305
],
[
282,
306
],
[
306,
307
],
[
280,
308
],
[
308,
309
],
[
280,
310
],
[
310,
311
],
[
280,
312
],
[
312,
313
],
[
950,
314
],
[
314,
315
],
[
314,
316
],
[
316,
317
],
[
317,
318
],
[
317,
319
],
[
316,
321
],
[
321,
322
],
[
322,
323
],
[
321,
324
],
[
321,
325
],
[
316,
326
],
[
326,
327
],
[
327,
328
],
[
327,
329
],
[
326,
330
],
[
316,
331
],
[
331,
332
],
[
332,
333
],
[
332,
334
],
[
331,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
335,
339
],
[
316,
340
],
[
340,
341
],
[
340,
342
],
[
316,
343
],
[
343,
344
],
[
344,
345
],
[
345,
346
],
[
345,
347
],
[
343,
348
],
[
348,
349
],
[
348,
350
],
[
343,
351
],
[
351,
352
],
[
352,
353
],
[
343,
354
],
[
355,
355
],
[
355,
356
],
[
356,
357
],
[
357,
358
],
[
358,
359
],
[
359,
360
],
[
359,
361
],
[
358,
362
],
[
362,
363
],
[
362,
364
],
[
357,
365
],
[
356,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
370,
372
],
[
367,
373
],
[
366,
374
],
[
374,
375
],
[
375,
376
],
[
375,
377
],
[
374,
378
],
[
378,
379
],
[
378,
380
],
[
366,
381
],
[
381,
382
],
[
382,
383
],
[
382,
384
],
[
381,
385
],
[
356,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
388,
390
],
[
390,
391
],
[
390,
392
],
[
387,
393
],
[
314,
394
],
[
394,
395
],
[
950,
396
],
[
396,
397
],
[
396,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
400,
402
],
[
399,
403
],
[
403,
404
],
[
404,
405
],
[
398,
406
],
[
406,
407
],
[
406,
408
],
[
398,
409
],
[
409,
410
],
[
410,
411
],
[
411,
412
],
[
411,
413
],
[
409,
414
],
[
414,
415
],
[
414,
416
],
[
409,
417
],
[
417,
418
],
[
418,
419
],
[
409,
420
],
[
421,
421
],
[
421,
422
],
[
422,
423
],
[
422,
424
],
[
424,
425
],
[
424,
426
],
[
398,
427
],
[
427,
428
],
[
396,
429
],
[
429,
430
],
[
950,
431
],
[
431,
432
],
[
431,
433
],
[
433,
434
],
[
434,
435
],
[
435,
436
],
[
435,
437
],
[
434,
438
],
[
438,
439
],
[
433,
440
],
[
440,
441
],
[
441,
442
],
[
441,
443
],
[
441,
444
],
[
444,
445
],
[
444,
446
],
[
431,
447
],
[
447,
448
],
[
431,
449
],
[
449,
450
],
[
950,
451
],
[
451,
452
],
[
451,
453
],
[
453,
454
],
[
453,
455
],
[
451,
456
],
[
456,
457
],
[
456,
458
],
[
950,
459
],
[
459,
460
],
[
459,
461
],
[
461,
462
],
[
461,
463
],
[
950,
464
],
[
464,
465
],
[
464,
466
],
[
466,
467
],
[
466,
468
],
[
468,
469
],
[
468,
470
],
[
464,
471
],
[
471,
472
],
[
464,
473
],
[
473,
474
],
[
464,
475
],
[
475,
476
],
[
464,
477
],
[
477,
478
],
[
464,
479
],
[
479,
480
],
[
479,
481
],
[
481,
482
],
[
482,
483
],
[
482,
484
],
[
481,
485
],
[
485,
486
],
[
485,
487
],
[
481,
489
],
[
489,
490
],
[
489,
491
],
[
491,
492
],
[
491,
493
],
[
464,
494
],
[
494,
495
],
[
494,
496
],
[
496,
497
],
[
497,
498
],
[
498,
499
],
[
498,
500
],
[
500,
501
],
[
501,
502
],
[
497,
503
],
[
503,
504
],
[
504,
505
],
[
504,
506
],
[
496,
507
],
[
507,
508
],
[
507,
509
],
[
496,
511
],
[
511,
512
],
[
511,
513
],
[
513,
514
],
[
513,
515
],
[
494,
516
],
[
516,
517
],
[
464,
518
],
[
518,
519
],
[
518,
520
],
[
520,
521
],
[
521,
522
],
[
520,
523
],
[
523,
524
],
[
524,
525
],
[
525,
526
],
[
526,
527
],
[
526,
528
],
[
528,
529
],
[
525,
530
],
[
530,
531
],
[
524,
532
],
[
532,
533
],
[
533,
534
],
[
534,
535
],
[
534,
536
],
[
533,
537
],
[
537,
538
],
[
537,
539
],
[
532,
540
],
[
540,
541
],
[
540,
542
],
[
520,
543
],
[
543,
544
],
[
543,
545
],
[
520,
546
],
[
546,
547
],
[
547,
548
],
[
547,
549
],
[
549,
550
],
[
546,
551
],
[
551,
552
],
[
552,
553
],
[
554,
554
],
[
554,
555
],
[
555,
556
],
[
555,
557
],
[
554,
558
],
[
558,
559
],
[
558,
560
],
[
554,
561
],
[
561,
562
],
[
561,
563
],
[
552,
564
],
[
551,
565
],
[
565,
566
],
[
566,
567
],
[
565,
568
],
[
551,
569
],
[
569,
570
],
[
569,
571
],
[
571,
572
],
[
520,
573
],
[
573,
574
],
[
574,
575
],
[
575,
576
],
[
464,
577
],
[
577,
578
],
[
577,
579
],
[
579,
580
],
[
580,
581
],
[
579,
582
],
[
582,
583
],
[
583,
584
],
[
584,
585
],
[
585,
586
],
[
585,
587
],
[
587,
588
],
[
584,
589
],
[
589,
590
],
[
583,
591
],
[
591,
592
],
[
592,
593
],
[
593,
594
],
[
593,
595
],
[
592,
596
],
[
596,
597
],
[
596,
598
],
[
591,
599
],
[
599,
600
],
[
599,
601
],
[
579,
602
],
[
602,
603
],
[
602,
604
],
[
579,
605
],
[
605,
606
],
[
606,
607
],
[
606,
608
],
[
608,
609
],
[
605,
610
],
[
610,
611
],
[
611,
612
],
[
612,
613
],
[
613,
614
],
[
613,
615
],
[
612,
616
],
[
616,
617
],
[
616,
618
],
[
611,
619
],
[
610,
620
],
[
620,
621
],
[
621,
622
],
[
620,
623
],
[
610,
624
],
[
624,
625
],
[
624,
626
],
[
626,
627
],
[
579,
628
],
[
628,
629
],
[
629,
630
],
[
630,
631
],
[
464,
632
],
[
632,
633
],
[
632,
634
],
[
634,
635
],
[
635,
636
],
[
635,
637
],
[
634,
638
],
[
638,
639
],
[
638,
640
],
[
640,
641
],
[
634,
642
],
[
642,
643
],
[
643,
644
],
[
643,
645
],
[
642,
646
],
[
646,
647
],
[
646,
648
],
[
648,
649
],
[
634,
650
],
[
650,
651
],
[
650,
652
],
[
652,
653
],
[
652,
654
],
[
634,
655
],
[
655,
656
],
[
655,
657
],
[
657,
658
],
[
657,
659
],
[
659,
660
],
[
634,
661
],
[
661,
662
],
[
662,
663
],
[
663,
664
],
[
664,
665
],
[
664,
666
],
[
666,
667
],
[
663,
668
],
[
662,
669
],
[
669,
670
],
[
669,
671
],
[
661,
672
],
[
672,
673
],
[
672,
674
],
[
674,
675
],
[
675,
676
],
[
676,
677
],
[
676,
678
],
[
675,
679
],
[
674,
680
],
[
634,
681
],
[
681,
682
],
[
681,
683
],
[
683,
684
],
[
684,
685
],
[
634,
686
],
[
686,
687
],
[
464,
688
],
[
688,
689
],
[
688,
690
],
[
690,
691
],
[
691,
692
],
[
691,
693
],
[
690,
695
],
[
695,
696
],
[
696,
697
],
[
697,
698
],
[
697,
699
],
[
695,
700
],
[
700,
701
],
[
700,
702
],
[
695,
703
],
[
703,
704
],
[
704,
705
],
[
695,
706
],
[
706,
707
],
[
707,
708
],
[
708,
709
],
[
708,
710
],
[
707,
711
],
[
711,
712
],
[
712,
713
],
[
711,
714
],
[
690,
715
],
[
715,
716
],
[
688,
717
],
[
717,
718
],
[
688,
719
],
[
719,
720
],
[
464,
721
],
[
721,
722
],
[
721,
723
],
[
723,
724
],
[
724,
725
],
[
724,
726
],
[
723,
727
],
[
727,
728
],
[
727,
729
],
[
729,
730
],
[
723,
731
],
[
731,
732
],
[
732,
733
],
[
732,
734
],
[
731,
735
],
[
735,
736
],
[
735,
737
],
[
737,
738
],
[
723,
739
],
[
739,
740
],
[
739,
741
],
[
741,
742
],
[
741,
743
],
[
723,
744
],
[
744,
745
],
[
744,
746
],
[
746,
747
],
[
746,
748
],
[
748,
749
],
[
723,
750
],
[
750,
751
],
[
751,
752
],
[
752,
753
],
[
753,
754
],
[
753,
755
],
[
755,
756
],
[
752,
757
],
[
751,
758
],
[
758,
759
],
[
758,
760
],
[
750,
761
],
[
761,
762
],
[
761,
763
],
[
763,
764
],
[
764,
765
],
[
765,
766
],
[
765,
767
],
[
764,
768
],
[
763,
769
],
[
723,
770
],
[
770,
771
],
[
770,
772
],
[
772,
773
],
[
773,
774
],
[
723,
775
],
[
775,
776
],
[
464,
777
],
[
777,
778
],
[
777,
779
],
[
779,
780
],
[
780,
781
],
[
780,
782
],
[
779,
784
],
[
784,
785
],
[
785,
786
],
[
786,
787
],
[
786,
788
],
[
784,
789
],
[
789,
790
],
[
789,
791
],
[
784,
792
],
[
792,
793
],
[
793,
794
],
[
784,
795
],
[
795,
796
],
[
796,
797
],
[
797,
798
],
[
797,
799
],
[
796,
800
],
[
800,
801
],
[
801,
802
],
[
800,
803
],
[
779,
804
],
[
804,
805
],
[
777,
806
],
[
806,
807
],
[
777,
808
],
[
808,
809
],
[
464,
810
],
[
810,
811
],
[
810,
812
],
[
812,
813
],
[
813,
814
],
[
813,
815
],
[
812,
816
],
[
816,
817
],
[
816,
818
],
[
812,
819
],
[
819,
820
],
[
819,
821
],
[
821,
822
],
[
812,
823
],
[
823,
824
],
[
824,
825
],
[
824,
826
],
[
823,
827
],
[
827,
828
],
[
827,
829
],
[
829,
830
],
[
812,
831
],
[
831,
832
],
[
831,
833
],
[
833,
834
],
[
833,
835
],
[
812,
836
],
[
836,
837
],
[
836,
838
],
[
838,
839
],
[
838,
840
],
[
840,
841
],
[
812,
842
],
[
842,
843
],
[
843,
844
],
[
844,
845
],
[
845,
846
],
[
845,
847
],
[
847,
848
],
[
844,
849
],
[
843,
850
],
[
850,
851
],
[
850,
852
],
[
842,
853
],
[
853,
854
],
[
853,
855
],
[
855,
856
],
[
856,
857
],
[
857,
858
],
[
857,
859
],
[
856,
860
],
[
855,
861
],
[
812,
862
],
[
862,
863
],
[
863,
864
],
[
863,
865
],
[
862,
866
],
[
866,
867
],
[
867,
868
],
[
868,
869
],
[
869,
870
],
[
869,
871
],
[
871,
872
],
[
868,
873
],
[
867,
874
],
[
874,
875
],
[
874,
876
],
[
866,
877
],
[
877,
878
],
[
877,
879
],
[
879,
880
],
[
880,
881
],
[
880,
882
],
[
879,
883
],
[
883,
884
],
[
883,
885
],
[
812,
886
],
[
886,
887
],
[
886,
888
],
[
888,
889
],
[
889,
890
],
[
812,
891
],
[
891,
892
],
[
464,
893
],
[
893,
894
],
[
893,
895
],
[
895,
896
],
[
896,
897
],
[
896,
898
],
[
898,
899
],
[
899,
900
],
[
898,
901
],
[
898,
902
],
[
902,
903
],
[
902,
904
],
[
898,
905
],
[
895,
906
],
[
906,
907
],
[
907,
908
],
[
907,
909
],
[
909,
910
],
[
906,
911
],
[
911,
912
],
[
912,
913
],
[
912,
914
],
[
911,
915
],
[
915,
916
],
[
464,
917
],
[
917,
918
],
[
917,
919
],
[
919,
920
],
[
920,
921
],
[
921,
922
],
[
921,
923
],
[
923,
924
],
[
924,
925
],
[
920,
926
],
[
926,
927
],
[
927,
928
],
[
928,
929
],
[
928,
930
],
[
927,
931
],
[
931,
932
],
[
926,
933
],
[
933,
934
],
[
934,
935
],
[
934,
936
],
[
936,
937
],
[
464,
938
],
[
938,
939
],
[
938,
940
],
[
940,
941
],
[
941,
942
],
[
942,
943
],
[
942,
944
],
[
941,
945
],
[
940,
946
],
[
946,
947
],
[
947,
948
],
[
0,
949
],
[
949,
950
],
[
949,
951
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\tstatic final StdIn in = new StdIn();\n\tstatic final PrintWriter out = new PrintWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint n= in.nextInt();\n\t\tboolean isok = false;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tint b = in.nextInt();\n\t\t\tif(a != b) {\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tisok = true;\n\t\t\tcounter++;\n\t\t\tif(counter == 3) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n if(isok && counter == 3) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\t\tout.close();\n\t}\n\t\n\tstatic void update(int[][] dp0, int[][] dp, int i, int j) {\n\t\t//(i-1, j-1), (i-1, j), (i-1, j+1)\n\t\t//(i, j-1), (i, j), (i, j+1)\n\t\t//(i+1, j-1), (i+1, j), (i+1, j+1)\n\n\t\t//(i-1 or j-1) should not be lesser than 0\n\t\t//(i+1 or j+1) should not be greater than 2\n\n\t\t//difference between (i or j) and its inc or dec should not cross 2\n\n\t\tfor (int k = i-1; k <= i+1; k++) {\n\t\t\tfor (int k2 = j-1; k2 <= j+1; k2++) {\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n// \t\t(I, j-1), (I, j+1), const I , change in j\n// (I+1, j-1), (I+1, j+1), change 1 (+ve), change in j\n// (I-1, j-1), (I-1, j+1), change 1 (-ve), change in j\n// (I-1, j), (I+1, j) change in I, const j\n\n\t}\n\n\tstatic int toggle(int n) {\n\t\tif(n%2==0) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\t\n\tstatic int [][] Grid(int m, int n) {\n\t\tint [][]dp = new int[m][n];\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}\n\t\t}\n\t\treturn dp;\n\t}\n\n\tpublic static long powmod(int x, long y, long mod) {\n long total = 1;\n for (long i = 0; i < y; i++) {\n total = (total * x) % mod;\n }\n return total;\n \n }\n \n\n static class Pair {\n int first = 1;\n int second = 2;\n }\n\n public void fibonacci(int N) {\n boolean arr[] = new boolean[N];\n Arrays.fill(arr, false);\n arr[0] = true;\n if(N>1)\n arr[1] = true;\n\n Pair p = new Pair();\n for (int i = 3; i <= N; i++) {\n \n if(p.first + p.second == i) {\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n } else {\n arr[i-1] = false;\n }\n }\n }\n\n public class Solver {\n\t\tSolver() {\n\t\t\t\n }\n \n }\n\n static long factorial(long x) {\n if(x <= 1) {\n return 1;\n }\n long res = 2;\n for (int i = 3; i <= x; i++) {\n res = res * i;\n }\n return res;\n }\n \n static long gcdOfFactorial(long a, long b) { \n if (b == 0) \n return a; \n return gcdOfFactorial(b, a % b);\n } \n\t\n\tstatic class StdIn {\n\t\tfinal private int BUFFER_SIZE = 1 << 16;\n\t\tprivate DataInputStream din;\n\t\tprivate byte[] buffer;\n\t\tprivate int bufferPointer, bytesRead;\n\t\tpublic StdIn() {\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\t\tpublic StdIn(InputStream in) {\n\t\t\ttry{\n\t\t\t\tdin = new DataInputStream(in);\n\t\t\t} catch(Exception e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\t\tpublic String next() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == ' ' || c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc=read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}\n\t\tpublic String nextLine() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}\n\t\tpublic int nextInt() {\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tpublic int[] readIntArray(int n, int os) {\n\t\t\tint[] ar = new int[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextInt()+os;\n\t\t\treturn ar;\n\t\t}\n\t\tpublic long nextLong() {\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tpublic long[] readLongArray(int n, long os) {\n\t\t\tlong[] ar = new long[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextLong()+os;\n\t\t\treturn ar;\n\t\t}\n\t\tpublic double nextDouble() {\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (c == '.')\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9')\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tprivate void fillBuffer() throws IOException {\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}\n\t\tprivate byte read() {\n\t\t\ttry{\n\t\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\t\tfillBuffer();\n\t\t\t\treturn buffer[bufferPointer++];\n\t\t\t} catch(IOException e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t}\n\t\tpublic void close() throws IOException {\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic final StdIn in = new StdIn();\n\tstatic final PrintWriter out = new PrintWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint n= in.nextInt();\n\t\tboolean isok = false;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tint b = in.nextInt();\n\t\t\tif(a != b) {\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tisok = true;\n\t\t\tcounter++;\n\t\t\tif(counter == 3) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n if(isok && counter == 3) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\t\tout.close();\n\t}\n\t\n\tstatic void update(int[][] dp0, int[][] dp, int i, int j) {\n\t\t//(i-1, j-1), (i-1, j), (i-1, j+1)\n\t\t//(i, j-1), (i, j), (i, j+1)\n\t\t//(i+1, j-1), (i+1, j), (i+1, j+1)\n\n\t\t//(i-1 or j-1) should not be lesser than 0\n\t\t//(i+1 or j+1) should not be greater than 2\n\n\t\t//difference between (i or j) and its inc or dec should not cross 2\n\n\t\tfor (int k = i-1; k <= i+1; k++) {\n\t\t\tfor (int k2 = j-1; k2 <= j+1; k2++) {\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n// \t\t(I, j-1), (I, j+1), const I , change in j\n// (I+1, j-1), (I+1, j+1), change 1 (+ve), change in j\n// (I-1, j-1), (I-1, j+1), change 1 (-ve), change in j\n// (I-1, j), (I+1, j) change in I, const j\n\n\t}\n\n\tstatic int toggle(int n) {\n\t\tif(n%2==0) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\t\n\tstatic int [][] Grid(int m, int n) {\n\t\tint [][]dp = new int[m][n];\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}\n\t\t}\n\t\treturn dp;\n\t}\n\n\tpublic static long powmod(int x, long y, long mod) {\n long total = 1;\n for (long i = 0; i < y; i++) {\n total = (total * x) % mod;\n }\n return total;\n \n }\n \n\n static class Pair {\n int first = 1;\n int second = 2;\n }\n\n public void fibonacci(int N) {\n boolean arr[] = new boolean[N];\n Arrays.fill(arr, false);\n arr[0] = true;\n if(N>1)\n arr[1] = true;\n\n Pair p = new Pair();\n for (int i = 3; i <= N; i++) {\n \n if(p.first + p.second == i) {\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n } else {\n arr[i-1] = false;\n }\n }\n }\n\n public class Solver {\n\t\tSolver() {\n\t\t\t\n }\n \n }\n\n static long factorial(long x) {\n if(x <= 1) {\n return 1;\n }\n long res = 2;\n for (int i = 3; i <= x; i++) {\n res = res * i;\n }\n return res;\n }\n \n static long gcdOfFactorial(long a, long b) { \n if (b == 0) \n return a; \n return gcdOfFactorial(b, a % b);\n } \n\t\n\tstatic class StdIn {\n\t\tfinal private int BUFFER_SIZE = 1 << 16;\n\t\tprivate DataInputStream din;\n\t\tprivate byte[] buffer;\n\t\tprivate int bufferPointer, bytesRead;\n\t\tpublic StdIn() {\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\t\tpublic StdIn(InputStream in) {\n\t\t\ttry{\n\t\t\t\tdin = new DataInputStream(in);\n\t\t\t} catch(Exception e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\t\tpublic String next() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == ' ' || c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc=read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}\n\t\tpublic String nextLine() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}\n\t\tpublic int nextInt() {\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tpublic int[] readIntArray(int n, int os) {\n\t\t\tint[] ar = new int[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextInt()+os;\n\t\t\treturn ar;\n\t\t}\n\t\tpublic long nextLong() {\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tpublic long[] readLongArray(int n, long os) {\n\t\t\tlong[] ar = new long[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextLong()+os;\n\t\t\treturn ar;\n\t\t}\n\t\tpublic double nextDouble() {\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (c == '.')\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9')\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tprivate void fillBuffer() throws IOException {\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}\n\t\tprivate byte read() {\n\t\t\ttry{\n\t\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\t\tfillBuffer();\n\t\t\t\treturn buffer[bufferPointer++];\n\t\t\t} catch(IOException e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t}\n\t\tpublic void close() throws IOException {\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}\n\t}\n}",
"Main",
"static final StdIn in = new StdIn();",
"in",
"new StdIn()",
"static final PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"public static void main(String[] args) {\n\t\tint n= in.nextInt();\n\t\tboolean isok = false;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tint b = in.nextInt();\n\t\t\tif(a != b) {\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tisok = true;\n\t\t\tcounter++;\n\t\t\tif(counter == 3) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n if(isok && counter == 3) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\t\tout.close();\n\t}",
"main",
"{\n\t\tint n= in.nextInt();\n\t\tboolean isok = false;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tint b = in.nextInt();\n\t\t\tif(a != b) {\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tisok = true;\n\t\t\tcounter++;\n\t\t\tif(counter == 3) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n if(isok && counter == 3) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\t\tout.close();\n\t}",
"int n= in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"boolean isok = false;",
"isok",
"false",
"int counter = 0;",
"counter",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tint b = in.nextInt();\n\t\t\tif(a != b) {\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tisok = true;\n\t\t\tcounter++;\n\t\t\tif(counter == 3) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint a = in.nextInt();\n\t\t\tint b = in.nextInt();\n\t\t\tif(a != b) {\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tisok = true;\n\t\t\tcounter++;\n\t\t\tif(counter == 3) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint a = in.nextInt();\n\t\t\tint b = in.nextInt();\n\t\t\tif(a != b) {\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tisok = true;\n\t\t\tcounter++;\n\t\t\tif(counter == 3) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int a = in.nextInt();",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"int b = in.nextInt();",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"if(a != b) {\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}",
"a != b",
"a",
"b",
"{\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}",
"isok = false",
"isok",
"false",
"counter = 0",
"counter",
"0",
"continue;",
"isok = true",
"isok",
"true",
"counter++",
"counter",
"if(counter == 3) {\n\t\t\t\tbreak;\n\t\t\t}",
"counter == 3",
"counter",
"3",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"if(isok && counter == 3) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}",
"isok && counter == 3",
"isok",
"counter == 3",
"counter",
"3",
"{\n\t\t\tout.println(\"Yes\");\n\t\t}",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"{\n\t\t\tout.println(\"No\");\n\t\t}",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static void update(int[][] dp0, int[][] dp, int i, int j) {\n\t\t//(i-1, j-1), (i-1, j), (i-1, j+1)\n\t\t//(i, j-1), (i, j), (i, j+1)\n\t\t//(i+1, j-1), (i+1, j), (i+1, j+1)\n\n\t\t//(i-1 or j-1) should not be lesser than 0\n\t\t//(i+1 or j+1) should not be greater than 2\n\n\t\t//difference between (i or j) and its inc or dec should not cross 2\n\n\t\tfor (int k = i-1; k <= i+1; k++) {\n\t\t\tfor (int k2 = j-1; k2 <= j+1; k2++) {\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n// \t\t(I, j-1), (I, j+1), const I , change in j\n// (I+1, j-1), (I+1, j+1), change 1 (+ve), change in j\n// (I-1, j-1), (I-1, j+1), change 1 (-ve), change in j\n// (I-1, j), (I+1, j) change in I, const j\n\n\t}",
"update",
"{\n\t\t//(i-1, j-1), (i-1, j), (i-1, j+1)\n\t\t//(i, j-1), (i, j), (i, j+1)\n\t\t//(i+1, j-1), (i+1, j), (i+1, j+1)\n\n\t\t//(i-1 or j-1) should not be lesser than 0\n\t\t//(i+1 or j+1) should not be greater than 2\n\n\t\t//difference between (i or j) and its inc or dec should not cross 2\n\n\t\tfor (int k = i-1; k <= i+1; k++) {\n\t\t\tfor (int k2 = j-1; k2 <= j+1; k2++) {\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n// \t\t(I, j-1), (I, j+1), const I , change in j\n// (I+1, j-1), (I+1, j+1), change 1 (+ve), change in j\n// (I-1, j-1), (I-1, j+1), change 1 (-ve), change in j\n// (I-1, j), (I+1, j) change in I, const j\n\n\t}",
"for (int k = i-1; k <= i+1; k++) {\n\t\t\tfor (int k2 = j-1; k2 <= j+1; k2++) {\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int k = i-1;",
"int k = i-1;",
"k",
"i-1",
"i",
"1",
"k <= i+1",
"k",
"i+1",
"i",
"1",
"k++",
"k++",
"k",
"{\n\t\t\tfor (int k2 = j-1; k2 <= j+1; k2++) {\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor (int k2 = j-1; k2 <= j+1; k2++) {\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for (int k2 = j-1; k2 <= j+1; k2++) {\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"int k2 = j-1;",
"int k2 = j-1;",
"k2",
"j-1",
"j",
"1",
"k2 <= j+1",
"k2",
"j+1",
"j",
"1",
"k2++",
"k2++",
"k2",
"{\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"if(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}",
"k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2",
"k2 >= 0",
"k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2",
"k >= 0",
"k",
"0",
"k <= 2",
"k",
"2",
"k2 >= 0",
"k2",
"0",
"k2 <= 2",
"k2",
"2",
"{\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}",
"if(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}",
"dp0[k][k2] == 1",
"dp0[k][k2]",
"dp0[k]",
"dp0",
"k",
"k2",
"1",
"{\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}",
"dp[k][k2] = toggle(dp[k][k2])",
"dp[k][k2]",
"dp[k]",
"dp",
"k",
"k2",
"toggle(dp[k][k2])",
"toggle",
"dp[k][k2]",
"dp[k]",
"dp",
"k",
"k2",
"if(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}",
"k2 == j+1",
"k2",
"j+1",
"j",
"1",
"{\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}",
"dp[k][k2] = toggle(dp[k][k2])",
"dp[k][k2]",
"dp[k]",
"dp",
"k",
"k2",
"toggle(dp[k][k2])",
"toggle",
"dp[k][k2]",
"dp[k]",
"dp",
"k",
"k2",
"{\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}",
"dp[k][k2]= toggle(dp[k][k2])",
"dp[k][k2]",
"dp[k]",
"dp",
"k",
"k2",
"toggle(dp[k][k2])",
"toggle",
"dp[k][k2]",
"dp[k]",
"dp",
"k",
"k2",
"int[][] dp0",
"dp0",
"int[][] dp",
"dp",
"int i",
"i",
"int j",
"j",
"static int toggle(int n) {\n\t\tif(n%2==0) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"toggle",
"{\n\t\tif(n%2==0) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}",
"if(n%2==0) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}",
"n%2==0",
"n%2",
"n",
"2",
"0",
"{\n\t\t\treturn 1;\n\t\t}",
"return 1;",
"1",
"{\n\t\t\treturn 0;\n\t\t}",
"return 0;",
"0",
"int n",
"n",
"static int [][] Grid(int m, int n) {\n\t\tint [][]dp = new int[m][n];\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}\n\t\t}\n\t\treturn dp;\n\t}",
"Grid",
"{\n\t\tint [][]dp = new int[m][n];\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}\n\t\t}\n\t\treturn dp;\n\t}",
"int [][]dp = new int[m][n];",
"dp",
"new int[m][n]",
"m",
"n",
"for (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < m",
"i",
"m",
"i++",
"i++",
"i",
"{\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}\n\t\t}",
"for (int j = 0; j < n; j++) {\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < n",
"j",
"n",
"j++",
"j++",
"j",
"{\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}",
"{\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}",
"dp[i][j] = in.nextInt()",
"dp[i][j]",
"dp[i]",
"dp",
"i",
"j",
"in.nextInt()",
"in.nextInt",
"in",
"return dp;",
"dp",
"int m",
"m",
"int n",
"n",
"public static long powmod(int x, long y, long mod) {\n long total = 1;\n for (long i = 0; i < y; i++) {\n total = (total * x) % mod;\n }\n return total;\n \n }",
"powmod",
"{\n long total = 1;\n for (long i = 0; i < y; i++) {\n total = (total * x) % mod;\n }\n return total;\n \n }",
"long total = 1;",
"total",
"1",
"for (long i = 0; i < y; i++) {\n total = (total * x) % mod;\n }",
"long i = 0;",
"long i = 0;",
"i",
"0",
"i < y",
"i",
"y",
"i++",
"i++",
"i",
"{\n total = (total * x) % mod;\n }",
"{\n total = (total * x) % mod;\n }",
"total = (total * x) % mod",
"total",
"(total * x) % mod",
"(total * x)",
"total",
"x",
"mod",
"return total;",
"total",
"int x",
"x",
"long y",
"y",
"long mod",
"mod",
"public void fibonacci(int N) {\n boolean arr[] = new boolean[N];\n Arrays.fill(arr, false);\n arr[0] = true;\n if(N>1)\n arr[1] = true;\n\n Pair p = new Pair();\n for (int i = 3; i <= N; i++) {\n \n if(p.first + p.second == i) {\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n } else {\n arr[i-1] = false;\n }\n }\n }",
"fibonacci",
"{\n boolean arr[] = new boolean[N];\n Arrays.fill(arr, false);\n arr[0] = true;\n if(N>1)\n arr[1] = true;\n\n Pair p = new Pair();\n for (int i = 3; i <= N; i++) {\n \n if(p.first + p.second == i) {\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n } else {\n arr[i-1] = false;\n }\n }\n }",
"boolean arr[] = new boolean[N];",
"arr",
"new boolean[N]",
"N",
"Arrays.fill(arr, false)",
"Arrays.fill",
"Arrays",
"arr",
"false",
"arr[0] = true",
"arr[0]",
"arr",
"0",
"true",
"if(N>1)\n arr[1] = true;",
"N>1",
"N",
"1",
"arr[1] = true",
"arr[1]",
"arr",
"1",
"true",
"Pair p = new Pair();",
"p",
"new Pair()",
"for (int i = 3; i <= N; i++) {\n \n if(p.first + p.second == i) {\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n } else {\n arr[i-1] = false;\n }\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \n if(p.first + p.second == i) {\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n } else {\n arr[i-1] = false;\n }\n }",
"{\n \n if(p.first + p.second == i) {\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n } else {\n arr[i-1] = false;\n }\n }",
"if(p.first + p.second == i) {\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n } else {\n arr[i-1] = false;\n }",
"p.first + p.second == i",
"p.first + p.second",
"p.first",
"p",
"p.first",
"p.second",
"p",
"p.second",
"i",
"{\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n }",
"arr[i-1] = true",
"arr[i-1]",
"arr",
"i-1",
"i",
"1",
"true",
"p.first = p.second",
"p.first",
"p",
"p.first",
"p.second",
"p",
"p.second",
"p.second = i",
"p.second",
"p",
"p.second",
"i",
"{\n arr[i-1] = false;\n }",
"arr[i-1] = false",
"arr[i-1]",
"arr",
"i-1",
"i",
"1",
"false",
"int N",
"N",
"static long factorial(long x) {\n if(x <= 1) {\n return 1;\n }\n long res = 2;\n for (int i = 3; i <= x; i++) {\n res = res * i;\n }\n return res;\n }",
"factorial",
"{\n if(x <= 1) {\n return 1;\n }\n long res = 2;\n for (int i = 3; i <= x; i++) {\n res = res * i;\n }\n return res;\n }",
"if(x <= 1) {\n return 1;\n }",
"x <= 1",
"x",
"1",
"{\n return 1;\n }",
"return 1;",
"1",
"long res = 2;",
"res",
"2",
"for (int i = 3; i <= x; i++) {\n res = res * i;\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= x",
"i",
"x",
"i++",
"i++",
"i",
"{\n res = res * i;\n }",
"{\n res = res * i;\n }",
"res = res * i",
"res",
"res * i",
"res",
"i",
"return res;",
"res",
"long x",
"x",
"static long gcdOfFactorial(long a, long b) { \n if (b == 0) \n return a; \n return gcdOfFactorial(b, a % b);\n }",
"gcdOfFactorial",
"{ \n if (b == 0) \n return a; \n return gcdOfFactorial(b, a % b);\n }",
"if (b == 0) \n return a;",
"b == 0",
"b",
"0",
"return a;",
"a",
"return gcdOfFactorial(b, a % b);",
"gcdOfFactorial(b, a % b)",
"gcdOfFactorial",
"b",
"a % b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static class Pair {\n int first = 1;\n int second = 2;\n }",
"Pair",
"int first = 1;",
"first",
"1",
"int second = 2;",
"second",
"2",
"public class Solver {\n\t\tSolver() {\n\t\t\t\n }\n \n }",
"Solver",
"Solver() {\n\t\t\t\n }",
"Solver",
"{\n\t\t\t\n }",
"static class StdIn {\n\t\tfinal private int BUFFER_SIZE = 1 << 16;\n\t\tprivate DataInputStream din;\n\t\tprivate byte[] buffer;\n\t\tprivate int bufferPointer, bytesRead;\n\t\tpublic StdIn() {\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\t\tpublic StdIn(InputStream in) {\n\t\t\ttry{\n\t\t\t\tdin = new DataInputStream(in);\n\t\t\t} catch(Exception e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\t\tpublic String next() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == ' ' || c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc=read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}\n\t\tpublic String nextLine() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}\n\t\tpublic int nextInt() {\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tpublic int[] readIntArray(int n, int os) {\n\t\t\tint[] ar = new int[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextInt()+os;\n\t\t\treturn ar;\n\t\t}\n\t\tpublic long nextLong() {\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tpublic long[] readLongArray(int n, long os) {\n\t\t\tlong[] ar = new long[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextLong()+os;\n\t\t\treturn ar;\n\t\t}\n\t\tpublic double nextDouble() {\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (c == '.')\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9')\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tprivate void fillBuffer() throws IOException {\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}\n\t\tprivate byte read() {\n\t\t\ttry{\n\t\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\t\tfillBuffer();\n\t\t\t\treturn buffer[bufferPointer++];\n\t\t\t} catch(IOException e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t}\n\t\tpublic void close() throws IOException {\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}\n\t}",
"StdIn",
"final private int BUFFER_SIZE = 1 << 16;",
"BUFFER_SIZE",
"1 << 16",
"1",
"16",
"private DataInputStream din;",
"din",
"private byte[] buffer;",
"buffer",
"private int bufferPointer",
"bufferPointer",
"bytesRead;",
"bytesRead",
"public StdIn() {\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}",
"StdIn",
"{\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}",
"din = new DataInputStream(System.in)",
"din",
"new DataInputStream(System.in)",
"buffer = new byte[BUFFER_SIZE]",
"buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"bufferPointer = bytesRead = 0",
"bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"public StdIn(InputStream in) {\n\t\t\ttry{\n\t\t\t\tdin = new DataInputStream(in);\n\t\t\t} catch(Exception e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}",
"StdIn",
"{\n\t\t\ttry{\n\t\t\t\tdin = new DataInputStream(in);\n\t\t\t} catch(Exception e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}",
"try{\n\t\t\t\tdin = new DataInputStream(in);\n\t\t\t} catch(Exception e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}",
"catch(Exception e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}",
"Exception e",
"{\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}",
"throw new RuntimeException();",
"new RuntimeException()",
"{\n\t\t\t\tdin = new DataInputStream(in);\n\t\t\t}",
"din = new DataInputStream(in)",
"din",
"new DataInputStream(in)",
"buffer = new byte[BUFFER_SIZE]",
"buffer",
"new byte[BUFFER_SIZE]",
"BUFFER_SIZE",
"bufferPointer = bytesRead = 0",
"bufferPointer",
"bytesRead = 0",
"bytesRead",
"0",
"InputStream in",
"in",
"public String next() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == ' ' || c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc=read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}",
"next",
"{\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == ' ' || c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc=read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}",
"int c;",
"c",
"while((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));",
"(c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r')",
"(c=read())!=-1",
"(c=read())",
"c",
"read()",
"read",
"-1",
"1",
"(c==' '||c=='\\n'||c=='\\r')",
"c==' '||c=='\\n'||c=='\\r'",
"c==' '",
"c",
"' '",
"c=='\\n'",
"c",
"'\\n'",
"c=='\\r'",
"c",
"'\\r'",
"StringBuilder s = new StringBuilder();",
"s",
"new StringBuilder()",
"while (c != -1)\n\t\t\t{\n\t\t\t\tif (c == ' ' || c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc=read();\n\t\t\t}",
"c != -1",
"c",
"-1",
"1",
"{\n\t\t\t\tif (c == ' ' || c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc=read();\n\t\t\t}",
"if (c == ' ' || c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;",
"c == ' ' || c == '\\n'||c=='\\r'",
"c == ' ' || c == '\\n'||c=='\\r'",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c=='\\r'",
"c",
"'\\r'",
"break;",
"s.append((char)c)",
"s.append",
"s",
"(char)c",
"c=read()",
"c",
"read()",
"read",
"return s.toString();",
"s.toString()",
"s.toString",
"s",
"public String nextLine() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}",
"nextLine",
"{\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}",
"int c;",
"c",
"while((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));",
"(c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r')",
"(c=read())!=-1",
"(c=read())",
"c",
"read()",
"read",
"-1",
"1",
"(c==' '||c=='\\n'||c=='\\r')",
"c==' '||c=='\\n'||c=='\\r'",
"c==' '",
"c",
"' '",
"c=='\\n'",
"c",
"'\\n'",
"c=='\\r'",
"c",
"'\\r'",
"StringBuilder s = new StringBuilder();",
"s",
"new StringBuilder()",
"while (c != -1)\n\t\t\t{\n\t\t\t\tif (c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc = read();\n\t\t\t}",
"c != -1",
"c",
"-1",
"1",
"{\n\t\t\t\tif (c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc = read();\n\t\t\t}",
"if (c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;",
"c == '\\n'||c=='\\r'",
"c == '\\n'",
"c",
"'\\n'",
"c=='\\r'",
"c",
"'\\r'",
"break;",
"s.append((char)c)",
"s.append",
"s",
"(char)c",
"c = read()",
"c",
"read()",
"read",
"return s.toString();",
"s.toString()",
"s.toString",
"s",
"public int nextInt() {\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"nextInt",
"{\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"int ret = 0;",
"ret",
"0",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n\t\t\t\tc = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n\t\t\t\tc = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (neg)\n\t\t\t\treturn -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public int[] readIntArray(int n, int os) {\n\t\t\tint[] ar = new int[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextInt()+os;\n\t\t\treturn ar;\n\t\t}",
"readIntArray",
"{\n\t\t\tint[] ar = new int[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextInt()+os;\n\t\t\treturn ar;\n\t\t}",
"int[] ar = new int[n];",
"ar",
"new int[n]",
"n",
"for(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextInt()+os;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"++i",
"++i",
"i",
"ar[i]=nextInt()+os;",
"ar[i]=nextInt()+os",
"ar[i]",
"ar",
"i",
"nextInt()+os",
"nextInt()",
"nextInt",
"os",
"return ar;",
"ar",
"int n",
"n",
"int os",
"os",
"public long nextLong() {\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"nextLong",
"{\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"long ret = 0;",
"ret",
"0",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n\t\t\t\tc = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n\t\t\t\tc = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (neg)\n\t\t\t\treturn -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public long[] readLongArray(int n, long os) {\n\t\t\tlong[] ar = new long[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextLong()+os;\n\t\t\treturn ar;\n\t\t}",
"readLongArray",
"{\n\t\t\tlong[] ar = new long[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextLong()+os;\n\t\t\treturn ar;\n\t\t}",
"long[] ar = new long[n];",
"ar",
"new long[n]",
"n",
"for(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextLong()+os;",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"++i",
"++i",
"i",
"ar[i]=nextLong()+os;",
"ar[i]=nextLong()+os",
"ar[i]",
"ar",
"i",
"nextLong()+os",
"nextLong()",
"nextLong",
"os",
"return ar;",
"ar",
"int n",
"n",
"long os",
"os",
"public double nextDouble() {\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (c == '.')\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9')\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"nextDouble",
"{\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (c == '.')\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9')\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}",
"double ret = 0",
"ret",
"0",
"div = 1;",
"div",
"1",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n\t\t\t\tc = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n\t\t\t\tc = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (c == '.')\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9')\n\t\t\t\t\tret += (c - '0') / (div *= 10);",
"c == '.'",
"c",
"'.'",
"while ((c = read()) >= '0' && c <= '9')\n\t\t\t\t\tret += (c - '0') / (div *= 10);",
"(c = read()) >= '0' && c <= '9'",
"(c = read()) >= '0'",
"(c = read())",
"c",
"read()",
"read",
"'0'",
"c <= '9'",
"c",
"'9'",
"ret += (c - '0') / (div *= 10)",
"ret",
"(c - '0') / (div *= 10)",
"(c - '0')",
"c",
"'0'",
"(div *= 10)",
"div",
"10",
"if (neg)\n\t\t\t\treturn -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"private void fillBuffer() throws IOException {\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}",
"fillBuffer",
"{\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}",
"bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE)",
"bytesRead",
"din.read(buffer, bufferPointer = 0, BUFFER_SIZE)",
"din.read",
"din",
"buffer",
"bufferPointer = 0",
"bufferPointer",
"0",
"BUFFER_SIZE",
"if (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;",
"bytesRead == -1",
"bytesRead",
"-1",
"1",
"buffer[0] = -1",
"buffer[0]",
"buffer",
"0",
"-1",
"1",
"private byte read() {\n\t\t\ttry{\n\t\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\t\tfillBuffer();\n\t\t\t\treturn buffer[bufferPointer++];\n\t\t\t} catch(IOException e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t}",
"read",
"{\n\t\t\ttry{\n\t\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\t\tfillBuffer();\n\t\t\t\treturn buffer[bufferPointer++];\n\t\t\t} catch(IOException e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t}",
"try{\n\t\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\t\tfillBuffer();\n\t\t\t\treturn buffer[bufferPointer++];\n\t\t\t} catch(IOException e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}",
"catch(IOException e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}",
"IOException e",
"{\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}",
"throw new RuntimeException();",
"new RuntimeException()",
"{\n\t\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\t\tfillBuffer();\n\t\t\t\treturn buffer[bufferPointer++];\n\t\t\t}",
"if (bufferPointer == bytesRead)\n\t\t\t\t\tfillBuffer();",
"bufferPointer == bytesRead",
"bufferPointer",
"bytesRead",
"fillBuffer()",
"fillBuffer",
"return buffer[bufferPointer++];",
"buffer[bufferPointer++]",
"buffer",
"bufferPointer++",
"bufferPointer",
"public void close() throws IOException {\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}",
"close",
"{\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}",
"if (din == null)\n\t\t\t\treturn;",
"din == null",
"din",
"null",
"return;",
"din.close()",
"din.close",
"din",
"public class Main {\n\tstatic final StdIn in = new StdIn();\n\tstatic final PrintWriter out = new PrintWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint n= in.nextInt();\n\t\tboolean isok = false;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tint b = in.nextInt();\n\t\t\tif(a != b) {\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tisok = true;\n\t\t\tcounter++;\n\t\t\tif(counter == 3) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n if(isok && counter == 3) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\t\tout.close();\n\t}\n\t\n\tstatic void update(int[][] dp0, int[][] dp, int i, int j) {\n\t\t//(i-1, j-1), (i-1, j), (i-1, j+1)\n\t\t//(i, j-1), (i, j), (i, j+1)\n\t\t//(i+1, j-1), (i+1, j), (i+1, j+1)\n\n\t\t//(i-1 or j-1) should not be lesser than 0\n\t\t//(i+1 or j+1) should not be greater than 2\n\n\t\t//difference between (i or j) and its inc or dec should not cross 2\n\n\t\tfor (int k = i-1; k <= i+1; k++) {\n\t\t\tfor (int k2 = j-1; k2 <= j+1; k2++) {\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n// \t\t(I, j-1), (I, j+1), const I , change in j\n// (I+1, j-1), (I+1, j+1), change 1 (+ve), change in j\n// (I-1, j-1), (I-1, j+1), change 1 (-ve), change in j\n// (I-1, j), (I+1, j) change in I, const j\n\n\t}\n\n\tstatic int toggle(int n) {\n\t\tif(n%2==0) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\t\n\tstatic int [][] Grid(int m, int n) {\n\t\tint [][]dp = new int[m][n];\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}\n\t\t}\n\t\treturn dp;\n\t}\n\n\tpublic static long powmod(int x, long y, long mod) {\n long total = 1;\n for (long i = 0; i < y; i++) {\n total = (total * x) % mod;\n }\n return total;\n \n }\n \n\n static class Pair {\n int first = 1;\n int second = 2;\n }\n\n public void fibonacci(int N) {\n boolean arr[] = new boolean[N];\n Arrays.fill(arr, false);\n arr[0] = true;\n if(N>1)\n arr[1] = true;\n\n Pair p = new Pair();\n for (int i = 3; i <= N; i++) {\n \n if(p.first + p.second == i) {\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n } else {\n arr[i-1] = false;\n }\n }\n }\n\n public class Solver {\n\t\tSolver() {\n\t\t\t\n }\n \n }\n\n static long factorial(long x) {\n if(x <= 1) {\n return 1;\n }\n long res = 2;\n for (int i = 3; i <= x; i++) {\n res = res * i;\n }\n return res;\n }\n \n static long gcdOfFactorial(long a, long b) { \n if (b == 0) \n return a; \n return gcdOfFactorial(b, a % b);\n } \n\t\n\tstatic class StdIn {\n\t\tfinal private int BUFFER_SIZE = 1 << 16;\n\t\tprivate DataInputStream din;\n\t\tprivate byte[] buffer;\n\t\tprivate int bufferPointer, bytesRead;\n\t\tpublic StdIn() {\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\t\tpublic StdIn(InputStream in) {\n\t\t\ttry{\n\t\t\t\tdin = new DataInputStream(in);\n\t\t\t} catch(Exception e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\t\tpublic String next() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == ' ' || c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc=read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}\n\t\tpublic String nextLine() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}\n\t\tpublic int nextInt() {\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tpublic int[] readIntArray(int n, int os) {\n\t\t\tint[] ar = new int[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextInt()+os;\n\t\t\treturn ar;\n\t\t}\n\t\tpublic long nextLong() {\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tpublic long[] readLongArray(int n, long os) {\n\t\t\tlong[] ar = new long[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextLong()+os;\n\t\t\treturn ar;\n\t\t}\n\t\tpublic double nextDouble() {\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (c == '.')\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9')\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tprivate void fillBuffer() throws IOException {\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}\n\t\tprivate byte read() {\n\t\t\ttry{\n\t\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\t\tfillBuffer();\n\t\t\t\treturn buffer[bufferPointer++];\n\t\t\t} catch(IOException e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t}\n\t\tpublic void close() throws IOException {\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}\n\t}\n}",
"public class Main {\n\tstatic final StdIn in = new StdIn();\n\tstatic final PrintWriter out = new PrintWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint n= in.nextInt();\n\t\tboolean isok = false;\n\t\tint counter = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a = in.nextInt();\n\t\t\tint b = in.nextInt();\n\t\t\tif(a != b) {\n\t\t\t\tisok = false;\n\t\t\t\tcounter = 0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tisok = true;\n\t\t\tcounter++;\n\t\t\tif(counter == 3) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n if(isok && counter == 3) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\t\tout.close();\n\t}\n\t\n\tstatic void update(int[][] dp0, int[][] dp, int i, int j) {\n\t\t//(i-1, j-1), (i-1, j), (i-1, j+1)\n\t\t//(i, j-1), (i, j), (i, j+1)\n\t\t//(i+1, j-1), (i+1, j), (i+1, j+1)\n\n\t\t//(i-1 or j-1) should not be lesser than 0\n\t\t//(i+1 or j+1) should not be greater than 2\n\n\t\t//difference between (i or j) and its inc or dec should not cross 2\n\n\t\tfor (int k = i-1; k <= i+1; k++) {\n\t\t\tfor (int k2 = j-1; k2 <= j+1; k2++) {\n\t\t\t\t\n\t\t\t\tif(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {\n\t\t\t\t\t//valid\n\t\t\t\t\tif(dp0[k][k2] == 1) {\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t\tif(k2 == j+1) {\n\t\t\t\t\t\t// out.println(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]);\n\t\t\t\t\t\tdp[k][k2] = toggle(dp[k][k2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// out.print(\"(\"+k+\",\"+k2+\")=>\"+dp[k][k2]+\",\");\n\t\t\t\t\t\tdp[k][k2]= toggle(dp[k][k2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n// \t\t(I, j-1), (I, j+1), const I , change in j\n// (I+1, j-1), (I+1, j+1), change 1 (+ve), change in j\n// (I-1, j-1), (I-1, j+1), change 1 (-ve), change in j\n// (I-1, j), (I+1, j) change in I, const j\n\n\t}\n\n\tstatic int toggle(int n) {\n\t\tif(n%2==0) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}\n\t\n\tstatic int [][] Grid(int m, int n) {\n\t\tint [][]dp = new int[m][n];\n\t\tfor (int i = 0; i < m; i++) {\n\t\t\tfor (int j = 0; j < n; j++) {\n\t\t\t\tdp[i][j] = in.nextInt();\n\t\t\t}\n\t\t}\n\t\treturn dp;\n\t}\n\n\tpublic static long powmod(int x, long y, long mod) {\n long total = 1;\n for (long i = 0; i < y; i++) {\n total = (total * x) % mod;\n }\n return total;\n \n }\n \n\n static class Pair {\n int first = 1;\n int second = 2;\n }\n\n public void fibonacci(int N) {\n boolean arr[] = new boolean[N];\n Arrays.fill(arr, false);\n arr[0] = true;\n if(N>1)\n arr[1] = true;\n\n Pair p = new Pair();\n for (int i = 3; i <= N; i++) {\n \n if(p.first + p.second == i) {\n arr[i-1] = true;\n p.first = p.second;\n p.second = i;\n } else {\n arr[i-1] = false;\n }\n }\n }\n\n public class Solver {\n\t\tSolver() {\n\t\t\t\n }\n \n }\n\n static long factorial(long x) {\n if(x <= 1) {\n return 1;\n }\n long res = 2;\n for (int i = 3; i <= x; i++) {\n res = res * i;\n }\n return res;\n }\n \n static long gcdOfFactorial(long a, long b) { \n if (b == 0) \n return a; \n return gcdOfFactorial(b, a % b);\n } \n\t\n\tstatic class StdIn {\n\t\tfinal private int BUFFER_SIZE = 1 << 16;\n\t\tprivate DataInputStream din;\n\t\tprivate byte[] buffer;\n\t\tprivate int bufferPointer, bytesRead;\n\t\tpublic StdIn() {\n\t\t\tdin = new DataInputStream(System.in);\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\t\tpublic StdIn(InputStream in) {\n\t\t\ttry{\n\t\t\t\tdin = new DataInputStream(in);\n\t\t\t} catch(Exception e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t\tbuffer = new byte[BUFFER_SIZE];\n\t\t\tbufferPointer = bytesRead = 0;\n\t\t}\n\t\tpublic String next() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == ' ' || c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc=read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}\n\t\tpublic String nextLine() {\n\t\t\tint c;\n\t\t\twhile((c=read())!=-1&&(c==' '||c=='\\n'||c=='\\r'));\n\t\t\tStringBuilder s = new StringBuilder();\n\t\t\twhile (c != -1)\n\t\t\t{\n\t\t\t\tif (c == '\\n'||c=='\\r')\n\t\t\t\t\tbreak;\n\t\t\t\ts.append((char)c);\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\treturn s.toString();\n\t\t}\n\t\tpublic int nextInt() {\n\t\t\tint ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tpublic int[] readIntArray(int n, int os) {\n\t\t\tint[] ar = new int[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextInt()+os;\n\t\t\treturn ar;\n\t\t}\n\t\tpublic long nextLong() {\n\t\t\tlong ret = 0;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tpublic long[] readLongArray(int n, long os) {\n\t\t\tlong[] ar = new long[n];\n\t\t\tfor(int i=0; i<n; ++i)\n\t\t\t\tar[i]=nextLong()+os;\n\t\t\treturn ar;\n\t\t}\n\t\tpublic double nextDouble() {\n\t\t\tdouble ret = 0, div = 1;\n\t\t\tbyte c = read();\n\t\t\twhile (c <= ' ')\n\t\t\t\tc = read();\n\t\t\tboolean neg = (c == '-');\n\t\t\tif (neg)\n\t\t\t\tc = read();\n\t\t\tdo\n\t\t\t\tret = ret * 10 + c - '0';\n\t\t\twhile ((c = read()) >= '0' && c <= '9');\n\t\t\tif (c == '.')\n\t\t\t\twhile ((c = read()) >= '0' && c <= '9')\n\t\t\t\t\tret += (c - '0') / (div *= 10);\n\t\t\tif (neg)\n\t\t\t\treturn -ret;\n\t\t\treturn ret;\n\t\t}\n\t\tprivate void fillBuffer() throws IOException {\n\t\t\tbytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n\t\t\tif (bytesRead == -1)\n\t\t\t\tbuffer[0] = -1;\n\t\t}\n\t\tprivate byte read() {\n\t\t\ttry{\n\t\t\t\tif (bufferPointer == bytesRead)\n\t\t\t\t\tfillBuffer();\n\t\t\t\treturn buffer[bufferPointer++];\n\t\t\t} catch(IOException e) {\n\t\t\t\tthrow new RuntimeException();\n\t\t\t}\n\t\t}\n\t\tpublic void close() throws IOException {\n\t\t\tif (din == null)\n\t\t\t\treturn;\n\t\t\tdin.close();\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
static final StdIn in = new StdIn();
static final PrintWriter out = new PrintWriter(System.out);
public static void main(String[] args) {
int n= in.nextInt();
boolean isok = false;
int counter = 0;
for (int i = 0; i < n; i++) {
int a = in.nextInt();
int b = in.nextInt();
if(a != b) {
isok = false;
counter = 0;
continue;
}
isok = true;
counter++;
if(counter == 3) {
break;
}
}
if(isok && counter == 3) {
out.println("Yes");
} else {
out.println("No");
}
out.close();
}
static void update(int[][] dp0, int[][] dp, int i, int j) {
//(i-1, j-1), (i-1, j), (i-1, j+1)
//(i, j-1), (i, j), (i, j+1)
//(i+1, j-1), (i+1, j), (i+1, j+1)
//(i-1 or j-1) should not be lesser than 0
//(i+1 or j+1) should not be greater than 2
//difference between (i or j) and its inc or dec should not cross 2
for (int k = i-1; k <= i+1; k++) {
for (int k2 = j-1; k2 <= j+1; k2++) {
if(k >= 0 && k <= 2 && k2 >= 0 && k2 <= 2) {
//valid
if(dp0[k][k2] == 1) {
dp[k][k2] = toggle(dp[k][k2]);
}
if(k2 == j+1) {
// out.println("("+k+","+k2+")=>"+dp[k][k2]);
dp[k][k2] = toggle(dp[k][k2]);
} else {
// out.print("("+k+","+k2+")=>"+dp[k][k2]+",");
dp[k][k2]= toggle(dp[k][k2]);
}
}
}
}
// (I, j-1), (I, j+1), const I , change in j
// (I+1, j-1), (I+1, j+1), change 1 (+ve), change in j
// (I-1, j-1), (I-1, j+1), change 1 (-ve), change in j
// (I-1, j), (I+1, j) change in I, const j
}
static int toggle(int n) {
if(n%2==0) {
return 1;
} else {
return 0;
}
}
static int [][] Grid(int m, int n) {
int [][]dp = new int[m][n];
for (int i = 0; i < m; i++) {
for (int j = 0; j < n; j++) {
dp[i][j] = in.nextInt();
}
}
return dp;
}
public static long powmod(int x, long y, long mod) {
long total = 1;
for (long i = 0; i < y; i++) {
total = (total * x) % mod;
}
return total;
}
static class Pair {
int first = 1;
int second = 2;
}
public void fibonacci(int N) {
boolean arr[] = new boolean[N];
Arrays.fill(arr, false);
arr[0] = true;
if(N>1)
arr[1] = true;
Pair p = new Pair();
for (int i = 3; i <= N; i++) {
if(p.first + p.second == i) {
arr[i-1] = true;
p.first = p.second;
p.second = i;
} else {
arr[i-1] = false;
}
}
}
public class Solver {
Solver() {
}
}
static long factorial(long x) {
if(x <= 1) {
return 1;
}
long res = 2;
for (int i = 3; i <= x; i++) {
res = res * i;
}
return res;
}
static long gcdOfFactorial(long a, long b) {
if (b == 0)
return a;
return gcdOfFactorial(b, a % b);
}
static class StdIn {
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public StdIn() {
din = new DataInputStream(System.in);
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public StdIn(InputStream in) {
try{
din = new DataInputStream(in);
} catch(Exception e) {
throw new RuntimeException();
}
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public String next() {
int c;
while((c=read())!=-1&&(c==' '||c=='\n'||c=='\r'));
StringBuilder s = new StringBuilder();
while (c != -1)
{
if (c == ' ' || c == '\n'||c=='\r')
break;
s.append((char)c);
c=read();
}
return s.toString();
}
public String nextLine() {
int c;
while((c=read())!=-1&&(c==' '||c=='\n'||c=='\r'));
StringBuilder s = new StringBuilder();
while (c != -1)
{
if (c == '\n'||c=='\r')
break;
s.append((char)c);
c = read();
}
return s.toString();
}
public int nextInt() {
int ret = 0;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do
ret = ret * 10 + c - '0';
while ((c = read()) >= '0' && c <= '9');
if (neg)
return -ret;
return ret;
}
public int[] readIntArray(int n, int os) {
int[] ar = new int[n];
for(int i=0; i<n; ++i)
ar[i]=nextInt()+os;
return ar;
}
public long nextLong() {
long ret = 0;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do
ret = ret * 10 + c - '0';
while ((c = read()) >= '0' && c <= '9');
if (neg)
return -ret;
return ret;
}
public long[] readLongArray(int n, long os) {
long[] ar = new long[n];
for(int i=0; i<n; ++i)
ar[i]=nextLong()+os;
return ar;
}
public double nextDouble() {
double ret = 0, div = 1;
byte c = read();
while (c <= ' ')
c = read();
boolean neg = (c == '-');
if (neg)
c = read();
do
ret = ret * 10 + c - '0';
while ((c = read()) >= '0' && c <= '9');
if (c == '.')
while ((c = read()) >= '0' && c <= '9')
ret += (c - '0') / (div *= 10);
if (neg)
return -ret;
return ret;
}
private void fillBuffer() throws IOException {
bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);
if (bytesRead == -1)
buffer[0] = -1;
}
private byte read() {
try{
if (bufferPointer == bytesRead)
fillBuffer();
return buffer[bufferPointer++];
} catch(IOException e) {
throw new RuntimeException();
}
}
public void close() throws IOException {
if (din == null)
return;
din.close();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
3,
41,
13,
8,
13,
17,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
122,
5
],
[
122,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
49,
50
],
[
40,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
8,
61
],
[
61,
62
],
[
62,
63
],
[
8,
64
],
[
64,
65
],
[
64,
66
],
[
8,
67
],
[
67,
68
],
[
67,
69
],
[
8,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
70,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
83,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
82,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
8,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
109,
112
],
[
8,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
6,
119
],
[
119,
120
],
[
0,
121
],
[
121,
122
],
[
121,
123
]
]
| [
"import java.util.*;\n\npublic class Main {\n\n public static void main(String args[]) {\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n Integer[] d1 = new Integer[n];\n Integer[] d2 = new Integer[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(sc.next());\n d2[i] = Integer.parseInt(sc.next());\n }\n sc.close();\n\n // 主処理\n boolean judge = false;\n int renzoku = 0;\n for (int i = 0; i < n; i++) {\n if (d1[i] == d2[i]) {\n renzoku++;\n } else {\n renzoku = 0;\n }\n if (renzoku == 3) {\n judge = true;\n break;\n }\n }\n String result = judge ? \"Yes\" : \"No\";\n\n // 出力\n System.out.println(result);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String args[]) {\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n Integer[] d1 = new Integer[n];\n Integer[] d2 = new Integer[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(sc.next());\n d2[i] = Integer.parseInt(sc.next());\n }\n sc.close();\n\n // 主処理\n boolean judge = false;\n int renzoku = 0;\n for (int i = 0; i < n; i++) {\n if (d1[i] == d2[i]) {\n renzoku++;\n } else {\n renzoku = 0;\n }\n if (renzoku == 3) {\n judge = true;\n break;\n }\n }\n String result = judge ? \"Yes\" : \"No\";\n\n // 出力\n System.out.println(result);\n }\n}",
"Main",
"public static void main(String args[]) {\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n Integer[] d1 = new Integer[n];\n Integer[] d2 = new Integer[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(sc.next());\n d2[i] = Integer.parseInt(sc.next());\n }\n sc.close();\n\n // 主処理\n boolean judge = false;\n int renzoku = 0;\n for (int i = 0; i < n; i++) {\n if (d1[i] == d2[i]) {\n renzoku++;\n } else {\n renzoku = 0;\n }\n if (renzoku == 3) {\n judge = true;\n break;\n }\n }\n String result = judge ? \"Yes\" : \"No\";\n\n // 出力\n System.out.println(result);\n }",
"main",
"{\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n Integer[] d1 = new Integer[n];\n Integer[] d2 = new Integer[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(sc.next());\n d2[i] = Integer.parseInt(sc.next());\n }\n sc.close();\n\n // 主処理\n boolean judge = false;\n int renzoku = 0;\n for (int i = 0; i < n; i++) {\n if (d1[i] == d2[i]) {\n renzoku++;\n } else {\n renzoku = 0;\n }\n if (renzoku == 3) {\n judge = true;\n break;\n }\n }\n String result = judge ? \"Yes\" : \"No\";\n\n // 出力\n System.out.println(result);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = Integer.parseInt(sc.next());",
"n",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"Integer[] d1 = new Integer[n];",
"d1",
"new Integer[n]",
"n",
"Integer[] d2 = new Integer[n];",
"d2",
"new Integer[n]",
"n",
"for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(sc.next());\n d2[i] = Integer.parseInt(sc.next());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n d1[i] = Integer.parseInt(sc.next());\n d2[i] = Integer.parseInt(sc.next());\n }",
"{\n d1[i] = Integer.parseInt(sc.next());\n d2[i] = Integer.parseInt(sc.next());\n }",
"d1[i] = Integer.parseInt(sc.next())",
"d1[i]",
"d1",
"i",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"d2[i] = Integer.parseInt(sc.next())",
"d2[i]",
"d2",
"i",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"sc.close()",
"sc.close",
"sc",
"boolean judge = false;",
"judge",
"false",
"int renzoku = 0;",
"renzoku",
"0",
"for (int i = 0; i < n; i++) {\n if (d1[i] == d2[i]) {\n renzoku++;\n } else {\n renzoku = 0;\n }\n if (renzoku == 3) {\n judge = true;\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (d1[i] == d2[i]) {\n renzoku++;\n } else {\n renzoku = 0;\n }\n if (renzoku == 3) {\n judge = true;\n break;\n }\n }",
"{\n if (d1[i] == d2[i]) {\n renzoku++;\n } else {\n renzoku = 0;\n }\n if (renzoku == 3) {\n judge = true;\n break;\n }\n }",
"if (d1[i] == d2[i]) {\n renzoku++;\n } else {\n renzoku = 0;\n }",
"d1[i] == d2[i]",
"d1[i]",
"d1",
"i",
"d2[i]",
"d2",
"i",
"{\n renzoku++;\n }",
"renzoku++",
"renzoku",
"{\n renzoku = 0;\n }",
"renzoku = 0",
"renzoku",
"0",
"if (renzoku == 3) {\n judge = true;\n break;\n }",
"renzoku == 3",
"renzoku",
"3",
"{\n judge = true;\n break;\n }",
"judge = true",
"judge",
"true",
"break;",
"String result = judge ? \"Yes\" : \"No\";",
"result",
"judge ? \"Yes\" : \"No\"",
"judge",
"\"Yes\"",
"\"No\"",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String args[]",
"args",
"public class Main {\n\n public static void main(String args[]) {\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n Integer[] d1 = new Integer[n];\n Integer[] d2 = new Integer[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(sc.next());\n d2[i] = Integer.parseInt(sc.next());\n }\n sc.close();\n\n // 主処理\n boolean judge = false;\n int renzoku = 0;\n for (int i = 0; i < n; i++) {\n if (d1[i] == d2[i]) {\n renzoku++;\n } else {\n renzoku = 0;\n }\n if (renzoku == 3) {\n judge = true;\n break;\n }\n }\n String result = judge ? \"Yes\" : \"No\";\n\n // 出力\n System.out.println(result);\n }\n}",
"public class Main {\n\n public static void main(String args[]) {\n\n // 入力\n Scanner sc = new Scanner(System.in);\n int n = Integer.parseInt(sc.next());\n Integer[] d1 = new Integer[n];\n Integer[] d2 = new Integer[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(sc.next());\n d2[i] = Integer.parseInt(sc.next());\n }\n sc.close();\n\n // 主処理\n boolean judge = false;\n int renzoku = 0;\n for (int i = 0; i < n; i++) {\n if (d1[i] == d2[i]) {\n renzoku++;\n } else {\n renzoku = 0;\n }\n if (renzoku == 3) {\n judge = true;\n break;\n }\n }\n String result = judge ? \"Yes\" : \"No\";\n\n // 出力\n System.out.println(result);\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String args[]) {
// 入力
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.next());
Integer[] d1 = new Integer[n];
Integer[] d2 = new Integer[n];
for (int i = 0; i < n; i++) {
d1[i] = Integer.parseInt(sc.next());
d2[i] = Integer.parseInt(sc.next());
}
sc.close();
// 主処理
boolean judge = false;
int renzoku = 0;
for (int i = 0; i < n; i++) {
if (d1[i] == d2[i]) {
renzoku++;
} else {
renzoku = 0;
}
if (renzoku == 3) {
judge = true;
break;
}
}
String result = judge ? "Yes" : "No";
// 出力
System.out.println(result);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
4,
13,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
17,
13,
17,
13,
17,
12,
13,
30,
29,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
29,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
20,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
4,
18,
13,
13,
13,
18,
4,
18,
13,
13,
13,
30,
14,
2,
2,
18,
4,
18,
13,
2,
13,
17,
13,
18,
4,
18,
13,
2,
13,
17,
13,
2,
18,
4,
18,
13,
2,
13,
17,
13,
18,
4,
18,
13,
2,
13,
17,
13,
30,
0,
13,
17,
3,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
7,
11
],
[
11,
12
],
[
7,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
15,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
15,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
13,
28
],
[
28,
29
],
[
13,
30
],
[
30,
31
],
[
7,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
39,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
37,
43
],
[
39,
44
],
[
7,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
7,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
50,
58
],
[
58,
59
],
[
7,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
7,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
65,
73
],
[
73,
74
],
[
0,
75
],
[
204,
76
],
[
204,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
79,
88
],
[
88,
89
],
[
88,
90
],
[
79,
91
],
[
91,
92
],
[
91,
93
],
[
79,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
94,
105
],
[
106,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
79,
111
],
[
111,
112
],
[
111,
113
],
[
79,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
114,
124
],
[
124,
125
],
[
125,
126
],
[
114,
127
],
[
128,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
131,
136
],
[
130,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
138,
141
],
[
137,
142
],
[
129,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
148,
151
],
[
151,
152
],
[
151,
153
],
[
147,
154
],
[
146,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
159,
160
],
[
159,
161
],
[
155,
162
],
[
145,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
165,
168
],
[
168,
169
],
[
168,
170
],
[
164,
171
],
[
163,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
173,
176
],
[
176,
177
],
[
176,
178
],
[
172,
179
],
[
144,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
79,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
185,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
189,
194
],
[
185,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
195,
200
],
[
77,
201
],
[
201,
202
],
[
0,
203
],
[
203,
204
],
[
203,
205
]
]
| [
"\nimport java.util.ArrayList;\nimport java.util.Scanner;\n\nclass Pair{\n\tint x;\n\tint y;\n\tpublic Pair(int x, int y) {\n\t\tsuper();\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}\n\t@Override\n\tpublic String toString() {\n\t\treturn \"Pair [x=\" + x + \", y=\" + y + \"]\";\n\t}\n\tpublic int getX() {\n\t\treturn x;\n\t}\n\tpublic void setX(int x) {\n\t\tthis.x = x;\n\t}\n\tpublic int getY() {\n\t\treturn y;\n\t}\n\tpublic void setY(int y) {\n\t\tthis.y = y;\n\t}\n\t\n}\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tboolean flag=false;\n\t\tArrayList<Pair> a=new ArrayList<Pair>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta.add(new Pair(sc.nextInt(),sc.nextInt()));\n\t\t}\n\t\tboolean ans=false;\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a.get(i).x==a.get(i).y) {\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans==true) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Pair{\n\tint x;\n\tint y;\n\tpublic Pair(int x, int y) {\n\t\tsuper();\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}\n\t@Override\n\tpublic String toString() {\n\t\treturn \"Pair [x=\" + x + \", y=\" + y + \"]\";\n\t}\n\tpublic int getX() {\n\t\treturn x;\n\t}\n\tpublic void setX(int x) {\n\t\tthis.x = x;\n\t}\n\tpublic int getY() {\n\t\treturn y;\n\t}\n\tpublic void setY(int y) {\n\t\tthis.y = y;\n\t}\n\t\n}",
"Pair",
"int x;",
"x",
"int y;",
"y",
"public Pair(int x, int y) {\n\t\tsuper();\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"Pair",
"{\n\t\tsuper();\n\t\tthis.x = x;\n\t\tthis.y = y;\n\t}",
"super()",
"super",
"this.x = x",
"this.x",
"this",
"this.x",
"x",
"this.y = y",
"this.y",
"this",
"this.y",
"y",
"int x",
"x",
"int y",
"y",
"@Override\n\tpublic String toString() {\n\t\treturn \"Pair [x=\" + x + \", y=\" + y + \"]\";\n\t}",
"toString",
"{\n\t\treturn \"Pair [x=\" + x + \", y=\" + y + \"]\";\n\t}",
"return \"Pair [x=\" + x + \", y=\" + y + \"]\";",
"\"Pair [x=\" + x + \", y=\" + y + \"]\"",
"y",
"\", y=\"",
"\"Pair [x=\" + x + \", y=\" + y + \"]\"",
"\"Pair [x=\"",
"x",
"\", y=\"",
"y",
"\"]\"",
"public int getX() {\n\t\treturn x;\n\t}",
"getX",
"{\n\t\treturn x;\n\t}",
"return x;",
"x",
"public void setX(int x) {\n\t\tthis.x = x;\n\t}",
"setX",
"{\n\t\tthis.x = x;\n\t}",
"this.x = x",
"this.x",
"this",
"this.x",
"x",
"int x",
"x",
"public int getY() {\n\t\treturn y;\n\t}",
"getY",
"{\n\t\treturn y;\n\t}",
"return y;",
"y",
"public void setY(int y) {\n\t\tthis.y = y;\n\t}",
"setY",
"{\n\t\tthis.y = y;\n\t}",
"this.y = y",
"this.y",
"this",
"this.y",
"y",
"int y",
"y",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tboolean flag=false;\n\t\tArrayList<Pair> a=new ArrayList<Pair>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta.add(new Pair(sc.nextInt(),sc.nextInt()));\n\t\t}\n\t\tboolean ans=false;\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a.get(i).x==a.get(i).y) {\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans==true) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tboolean flag=false;\n\t\tArrayList<Pair> a=new ArrayList<Pair>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta.add(new Pair(sc.nextInt(),sc.nextInt()));\n\t\t}\n\t\tboolean ans=false;\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a.get(i).x==a.get(i).y) {\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans==true) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tboolean flag=false;\n\t\tArrayList<Pair> a=new ArrayList<Pair>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta.add(new Pair(sc.nextInt(),sc.nextInt()));\n\t\t}\n\t\tboolean ans=false;\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a.get(i).x==a.get(i).y) {\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans==true) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean flag=false;",
"flag",
"false",
"ArrayList<Pair> a=new ArrayList<Pair>();",
"a",
"new ArrayList<Pair>()",
"for(int i=0;i<n;i++) {\n\t\t\ta.add(new Pair(sc.nextInt(),sc.nextInt()));\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ta.add(new Pair(sc.nextInt(),sc.nextInt()));\n\t\t}",
"{\n\t\t\ta.add(new Pair(sc.nextInt(),sc.nextInt()));\n\t\t}",
"a.add(new Pair(sc.nextInt(),sc.nextInt()))",
"a.add",
"a",
"new Pair(sc.nextInt(),sc.nextInt())",
"boolean ans=false;",
"ans",
"false",
"for(int i=0;i<n-2;i++) {\n\t\t\tif(a.get(i).x==a.get(i).y) {\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n-2",
"i",
"n-2",
"n",
"2",
"i++",
"i++",
"i",
"{\n\t\t\tif(a.get(i).x==a.get(i).y) {\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(a.get(i).x==a.get(i).y) {\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"if(a.get(i).x==a.get(i).y) {\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"a.get(i).x==a.get(i).y",
"a.get(i).x",
"a.get(i)",
"a.get",
"a",
"i",
"a.get(i).x",
"a.get(i).y",
"a.get(i)",
"a.get",
"a",
"i",
"a.get(i).y",
"{\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y",
"a.get(i+1).x==a.get(i+1).y",
"a.get(i+1).x",
"a.get(i+1)",
"a.get",
"a",
"i+1",
"i",
"1",
"a.get(i+1).x",
"a.get(i+1).y",
"a.get(i+1)",
"a.get",
"a",
"i+1",
"i",
"1",
"a.get(i+1).y",
"a.get(i+2).x==a.get(i+2).y",
"a.get(i+2).x",
"a.get(i+2)",
"a.get",
"a",
"i+2",
"i",
"2",
"a.get(i+2).x",
"a.get(i+2).y",
"a.get(i+2)",
"a.get",
"a",
"i+2",
"i",
"2",
"a.get(i+2).y",
"{\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"ans=true",
"ans",
"true",
"break;",
"if(ans==true) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");",
"ans==true",
"ans",
"true",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tboolean flag=false;\n\t\tArrayList<Pair> a=new ArrayList<Pair>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta.add(new Pair(sc.nextInt(),sc.nextInt()));\n\t\t}\n\t\tboolean ans=false;\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a.get(i).x==a.get(i).y) {\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans==true) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tboolean flag=false;\n\t\tArrayList<Pair> a=new ArrayList<Pair>();\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta.add(new Pair(sc.nextInt(),sc.nextInt()));\n\t\t}\n\t\tboolean ans=false;\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a.get(i).x==a.get(i).y) {\n\t\t\t\tif(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {\n\t\t\t\t\tans=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans==true) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n\n}",
"Main"
]
|
import java.util.ArrayList;
import java.util.Scanner;
class Pair{
int x;
int y;
public Pair(int x, int y) {
super();
this.x = x;
this.y = y;
}
@Override
public String toString() {
return "Pair [x=" + x + ", y=" + y + "]";
}
public int getX() {
return x;
}
public void setX(int x) {
this.x = x;
}
public int getY() {
return y;
}
public void setY(int y) {
this.y = y;
}
}
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
boolean flag=false;
ArrayList<Pair> a=new ArrayList<Pair>();
for(int i=0;i<n;i++) {
a.add(new Pair(sc.nextInt(),sc.nextInt()));
}
boolean ans=false;
for(int i=0;i<n-2;i++) {
if(a.get(i).x==a.get(i).y) {
if(a.get(i+1).x==a.get(i+1).y&&a.get(i+2).x==a.get(i+2).y) {
ans=true;
break;
}
}
}
if(ans==true) System.out.println("Yes");
else System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
87,
5
],
[
87,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
46,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
35,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
65,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
8,
81
],
[
81,
82
],
[
82,
83
],
[
6,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
]
| [
"import java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner =new Scanner(System.in);\n\t\tint N = scanner.nextInt();\n\n\t\tint streak = 0;\n\t\tboolean judge = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tif (A == B) {\n\t\t\t\tstreak++;\n\t\t\t}else{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\tif (streak >= 3) {\n\t\t\t\tjudge = true;\n\t\t\t}\n\t\t}\n\n\t\tif (judge) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner =new Scanner(System.in);\n\t\tint N = scanner.nextInt();\n\n\t\tint streak = 0;\n\t\tboolean judge = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tif (A == B) {\n\t\t\t\tstreak++;\n\t\t\t}else{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\tif (streak >= 3) {\n\t\t\t\tjudge = true;\n\t\t\t}\n\t\t}\n\n\t\tif (judge) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scanner =new Scanner(System.in);\n\t\tint N = scanner.nextInt();\n\n\t\tint streak = 0;\n\t\tboolean judge = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tif (A == B) {\n\t\t\t\tstreak++;\n\t\t\t}else{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\tif (streak >= 3) {\n\t\t\t\tjudge = true;\n\t\t\t}\n\t\t}\n\n\t\tif (judge) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\t}",
"main",
"{\n\t\tScanner scanner =new Scanner(System.in);\n\t\tint N = scanner.nextInt();\n\n\t\tint streak = 0;\n\t\tboolean judge = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tif (A == B) {\n\t\t\t\tstreak++;\n\t\t\t}else{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\tif (streak >= 3) {\n\t\t\t\tjudge = true;\n\t\t\t}\n\t\t}\n\n\t\tif (judge) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\t}",
"Scanner scanner =new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int N = scanner.nextInt();",
"N",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int streak = 0;",
"streak",
"0",
"boolean judge = false;",
"judge",
"false",
"for (int i = 0; i < N; i++) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tif (A == B) {\n\t\t\t\tstreak++;\n\t\t\t}else{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\tif (streak >= 3) {\n\t\t\t\tjudge = true;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tif (A == B) {\n\t\t\t\tstreak++;\n\t\t\t}else{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\tif (streak >= 3) {\n\t\t\t\tjudge = true;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tif (A == B) {\n\t\t\t\tstreak++;\n\t\t\t}else{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\tif (streak >= 3) {\n\t\t\t\tjudge = true;\n\t\t\t}\n\t\t}",
"int A = scanner.nextInt();",
"A",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int B = scanner.nextInt();",
"B",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if (A == B) {\n\t\t\t\tstreak++;\n\t\t\t}else{\n\t\t\t\tstreak = 0;\n\t\t\t}",
"A == B",
"A",
"B",
"{\n\t\t\t\tstreak++;\n\t\t\t}",
"streak++",
"streak",
"{\n\t\t\t\tstreak = 0;\n\t\t\t}",
"streak = 0",
"streak",
"0",
"if (streak >= 3) {\n\t\t\t\tjudge = true;\n\t\t\t}",
"streak >= 3",
"streak",
"3",
"{\n\t\t\t\tjudge = true;\n\t\t\t}",
"judge = true",
"judge",
"true",
"if (judge) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"judge",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"scanner.close()",
"scanner.close",
"scanner",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner =new Scanner(System.in);\n\t\tint N = scanner.nextInt();\n\n\t\tint streak = 0;\n\t\tboolean judge = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tif (A == B) {\n\t\t\t\tstreak++;\n\t\t\t}else{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\tif (streak >= 3) {\n\t\t\t\tjudge = true;\n\t\t\t}\n\t\t}\n\n\t\tif (judge) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner =new Scanner(System.in);\n\t\tint N = scanner.nextInt();\n\n\t\tint streak = 0;\n\t\tboolean judge = false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint A = scanner.nextInt();\n\t\t\tint B = scanner.nextInt();\n\t\t\tif (A == B) {\n\t\t\t\tstreak++;\n\t\t\t}else{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\tif (streak >= 3) {\n\t\t\t\tjudge = true;\n\t\t\t}\n\t\t}\n\n\t\tif (judge) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t\tscanner.close();\n\t}\n\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scanner =new Scanner(System.in);
int N = scanner.nextInt();
int streak = 0;
boolean judge = false;
for (int i = 0; i < N; i++) {
int A = scanner.nextInt();
int B = scanner.nextInt();
if (A == B) {
streak++;
}else{
streak = 0;
}
if (streak >= 3) {
judge = true;
}
}
if (judge) {
System.out.println("Yes");
}else{
System.out.println("No");
}
scanner.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
40,
13,
0,
13,
17,
14,
2,
17,
13,
0,
13,
17,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
85,
5
],
[
85,
6
],
[
6,
7
],
[
6,
8
],
[
85,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
9,
15
],
[
15,
16
],
[
85,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
19,
28
],
[
28,
29
],
[
28,
30
],
[
19,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
43,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
43,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
54,
60
],
[
60,
61
],
[
60,
62
],
[
43,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
19,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"import java.util.*;\n\npublic class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n\n int n = sc.nextInt();\n boolean flag = false;\n int cnt = 0;\n for (int i=0; i<n; i++) {\n int s = sc.nextInt();\n int t = sc.nextInt();\n if (s == t) cnt++;\n else cnt = 0;\n if (3 <= cnt) flag = true;\n }\n\n if (flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n\n\n}\n",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n\n int n = sc.nextInt();\n boolean flag = false;\n int cnt = 0;\n for (int i=0; i<n; i++) {\n int s = sc.nextInt();\n int t = sc.nextInt();\n if (s == t) cnt++;\n else cnt = 0;\n if (3 <= cnt) flag = true;\n }\n\n if (flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n\n\n}",
"Main",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n new Main().run();\n }",
"main",
"{\n new Main().run();\n }",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"void run() {\n\n int n = sc.nextInt();\n boolean flag = false;\n int cnt = 0;\n for (int i=0; i<n; i++) {\n int s = sc.nextInt();\n int t = sc.nextInt();\n if (s == t) cnt++;\n else cnt = 0;\n if (3 <= cnt) flag = true;\n }\n\n if (flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"run",
"{\n\n int n = sc.nextInt();\n boolean flag = false;\n int cnt = 0;\n for (int i=0; i<n; i++) {\n int s = sc.nextInt();\n int t = sc.nextInt();\n if (s == t) cnt++;\n else cnt = 0;\n if (3 <= cnt) flag = true;\n }\n\n if (flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean flag = false;",
"flag",
"false",
"int cnt = 0;",
"cnt",
"0",
"for (int i=0; i<n; i++) {\n int s = sc.nextInt();\n int t = sc.nextInt();\n if (s == t) cnt++;\n else cnt = 0;\n if (3 <= cnt) flag = true;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int s = sc.nextInt();\n int t = sc.nextInt();\n if (s == t) cnt++;\n else cnt = 0;\n if (3 <= cnt) flag = true;\n }",
"{\n int s = sc.nextInt();\n int t = sc.nextInt();\n if (s == t) cnt++;\n else cnt = 0;\n if (3 <= cnt) flag = true;\n }",
"int s = sc.nextInt();",
"s",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int t = sc.nextInt();",
"t",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (s == t) cnt++;\n else cnt = 0;",
"s == t",
"s",
"t",
"cnt++",
"cnt",
"cnt = 0",
"cnt",
"0",
"if (3 <= cnt) flag = true;",
"3 <= cnt",
"3",
"cnt",
"flag = true",
"flag",
"true",
"if (flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");",
"flag",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n\n int n = sc.nextInt();\n boolean flag = false;\n int cnt = 0;\n for (int i=0; i<n; i++) {\n int s = sc.nextInt();\n int t = sc.nextInt();\n if (s == t) cnt++;\n else cnt = 0;\n if (3 <= cnt) flag = true;\n }\n\n if (flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n\n\n}",
"public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n public static void main(String[] args) {\n new Main().run();\n }\n\n void run() {\n\n int n = sc.nextInt();\n boolean flag = false;\n int cnt = 0;\n for (int i=0; i<n; i++) {\n int s = sc.nextInt();\n int t = sc.nextInt();\n if (s == t) cnt++;\n else cnt = 0;\n if (3 <= cnt) flag = true;\n }\n\n if (flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n\n\n}",
"Main"
]
| import java.util.*;
public class Main {
Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
new Main().run();
}
void run() {
int n = sc.nextInt();
boolean flag = false;
int cnt = 0;
for (int i=0; i<n; i++) {
int s = sc.nextInt();
int t = sc.nextInt();
if (s == t) cnt++;
else cnt = 0;
if (3 <= cnt) flag = true;
}
if (flag) System.out.println("Yes");
else System.out.println("No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
0,
18,
13,
13,
17,
0,
18,
13,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
18,
13,
13,
18,
13,
2,
13,
17,
2,
18,
13,
13,
17,
30,
40,
13,
30,
0,
13,
4,
18,
13,
13,
2,
13,
17,
0,
13,
17,
0,
13,
4,
18,
13,
13,
2,
13,
17,
4,
18,
18,
13,
13,
8,
2,
13,
17,
17,
17,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
30,
0,
13,
2,
13,
13,
40,
13,
30,
0,
13,
2,
13,
13,
0,
13,
17,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
4,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
4,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
4,
18,
13,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
472,
8
],
[
472,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
472,
14
],
[
14,
15
],
[
14,
16
],
[
472,
17
],
[
17,
18
],
[
17,
19
],
[
472,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
22,
31
],
[
31,
32
],
[
31,
33
],
[
22,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
47,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
47,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
58,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
22,
72
],
[
72,
73
],
[
72,
74
],
[
22,
75
],
[
75,
76
],
[
75,
77
],
[
22,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
78,
88
],
[
88,
89
],
[
89,
90
],
[
78,
91
],
[
92,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
94,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
93,
109
],
[
109,
110
],
[
110,
111
],
[
93,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
115,
119
],
[
119,
120
],
[
119,
121
],
[
112,
122
],
[
122,
123
],
[
122,
124
],
[
22,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
127,
131
],
[
131,
132
],
[
131,
133
],
[
22,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
139,
144
],
[
20,
145
],
[
145,
146
],
[
0,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
149,
151
],
[
147,
152
],
[
152,
153
],
[
152,
154
],
[
147,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
158,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
163,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
157,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
147,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
184,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
190,
194
],
[
189,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
198,
200
],
[
195,
201
],
[
201,
202
],
[
189,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
206,
208
],
[
203,
209
],
[
209,
210
],
[
209,
211
],
[
180,
212
],
[
212,
213
],
[
178,
214
],
[
214,
215
],
[
178,
216
],
[
216,
217
],
[
147,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
221,
225
],
[
225,
226
],
[
226,
227
],
[
220,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
229,
232
],
[
232,
233
],
[
232,
234
],
[
218,
235
],
[
235,
236
],
[
218,
237
],
[
237,
238
],
[
147,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
243,
245
],
[
242,
246
],
[
246,
247
],
[
247,
248
],
[
241,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
250,
253
],
[
253,
254
],
[
253,
255
],
[
239,
256
],
[
256,
257
],
[
239,
258
],
[
258,
259
],
[
147,
260
],
[
260,
261
],
[
260,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
262,
266
],
[
266,
267
],
[
266,
268
],
[
266,
269
],
[
269,
270
],
[
270,
271
],
[
271,
272
],
[
270,
273
],
[
262,
274
],
[
274,
275
],
[
275,
276
],
[
274,
277
],
[
262,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
278,
283
],
[
283,
284
],
[
283,
285
],
[
285,
286
],
[
285,
287
],
[
278,
288
],
[
288,
289
],
[
289,
290
],
[
278,
291
],
[
292,
292
],
[
292,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
293,
297
],
[
297,
298
],
[
298,
299
],
[
297,
300
],
[
262,
301
],
[
301,
302
],
[
260,
303
],
[
303,
304
],
[
147,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
307,
311
],
[
311,
312
],
[
311,
313
],
[
311,
314
],
[
314,
315
],
[
315,
316
],
[
316,
317
],
[
315,
318
],
[
307,
319
],
[
319,
320
],
[
320,
321
],
[
319,
322
],
[
307,
323
],
[
323,
324
],
[
324,
325
],
[
325,
326
],
[
325,
327
],
[
323,
328
],
[
328,
329
],
[
328,
330
],
[
330,
331
],
[
331,
332
],
[
323,
333
],
[
333,
334
],
[
334,
335
],
[
323,
336
],
[
337,
337
],
[
337,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
338,
342
],
[
342,
343
],
[
343,
344
],
[
342,
345
],
[
307,
346
],
[
346,
347
],
[
305,
348
],
[
348,
349
],
[
147,
350
],
[
350,
351
],
[
350,
352
],
[
352,
353
],
[
353,
354
],
[
353,
355
],
[
352,
356
],
[
356,
357
],
[
356,
358
],
[
356,
359
],
[
359,
360
],
[
360,
361
],
[
361,
362
],
[
360,
363
],
[
352,
364
],
[
364,
365
],
[
365,
366
],
[
364,
367
],
[
352,
368
],
[
368,
369
],
[
369,
370
],
[
370,
371
],
[
370,
372
],
[
368,
373
],
[
373,
374
],
[
373,
375
],
[
375,
376
],
[
375,
377
],
[
368,
378
],
[
378,
379
],
[
379,
380
],
[
368,
381
],
[
382,
382
],
[
382,
383
],
[
383,
384
],
[
384,
385
],
[
384,
386
],
[
383,
387
],
[
387,
388
],
[
388,
389
],
[
387,
390
],
[
352,
391
],
[
391,
392
],
[
350,
393
],
[
393,
394
],
[
147,
395
],
[
395,
396
],
[
395,
397
],
[
397,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
399,
402
],
[
402,
403
],
[
147,
404
],
[
404,
405
],
[
404,
406
],
[
406,
407
],
[
407,
408
],
[
407,
409
],
[
406,
411
],
[
411,
412
],
[
412,
413
],
[
413,
414
],
[
413,
415
],
[
411,
416
],
[
416,
417
],
[
416,
418
],
[
411,
419
],
[
419,
420
],
[
420,
421
],
[
411,
422
],
[
422,
423
],
[
423,
424
],
[
424,
425
],
[
424,
426
],
[
423,
427
],
[
427,
428
],
[
406,
429
],
[
429,
430
],
[
404,
431
],
[
431,
432
],
[
147,
433
],
[
433,
434
],
[
433,
435
],
[
435,
436
],
[
436,
437
],
[
437,
438
],
[
438,
439
],
[
437,
440
],
[
440,
441
],
[
147,
442
],
[
442,
443
],
[
442,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
444,
449
],
[
449,
450
],
[
450,
451
],
[
451,
452
],
[
451,
453
],
[
449,
454
],
[
454,
455
],
[
454,
456
],
[
449,
457
],
[
457,
458
],
[
458,
459
],
[
449,
460
],
[
460,
461
],
[
461,
462
],
[
462,
463
],
[
462,
464
],
[
461,
465
],
[
465,
466
],
[
444,
467
],
[
467,
468
],
[
442,
469
],
[
469,
470
],
[
0,
471
],
[
471,
472
],
[
471,
473
]
]
| [
"//package Atcoder;\nimport java.util.*;\nimport java.io.*;\npublic class Main\n{\n\tstatic final int mod=(int)1e9+7;\n\tstatic final int inf=(int)1e9;\n\tstatic final long INF=(long)1e18;\n\tpublic static void main(String[] args)\n\t{\n\t\tFastScanner fs=new FastScanner();\n\t\tint n=fs.nextInt();\n\t\tint arr[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tint a=fs.nextInt();\n\t\t\tint b=fs.nextInt();\n\t\t\tif(a==b)\n\t\t\t\tarr[i]=1;\n\t\t\telse\n\t\t\t\tarr[i]=0;\n\t\t}\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tint c=0,max=0;\n\t\tfor(int i=0;i<n-1;i++)\n\t\t{\n\t\t\tif(arr[i]==arr[i+1] && arr[i]==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}\n\t\t}\n\t\tmax=Math.max(max, c+1);\n\t\tSystem.out.println(max>=3 ? \"Yes\":\"No\");\n\t}\n}\nclass FastScanner \n{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\t\tpublic String next() \n\t\t{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tlong pow(long x,long n)\n\t\t{\n\t\t\tlong res=1;\n\t\t\twhile(n>0)\n\t\t\t{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}\n\t\t\treturn res;\n\t\t}\n\t\tint gcd(int a,int b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn gcd(b,a%b);\n\t\t}\n\t\tlong longgcd(long a,long b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn longgcd(b,a%b);\n\t\t}\n\t\tint[] sort(int arr[])\n\t\t{\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor(int i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\tchar[] charsort(char arr[])\n\t {\n\t \tArrayList<Character> list = new ArrayList<>();\n\t \tfor(char c:arr)list.add(c);\n\t \tCollections.sort(list);\n\t \tfor(int i=0;i<list.size();i++)\n\t \t{\n\t \t\tarr[i]=list.get(i);\n\t \t}\n\t \treturn arr;\n\t }\n\t\tlong[] longsort(long arr[])\n\t\t{\n\t\t\tArrayList<Long> list = new ArrayList<Long>();\n\t\t\tfor(long i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\tpublic int nextInt() \n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tpublic int[] readArray(int n)\n\t\t{\n\t\t\tint[] arr=new int[n];\n\t\t\tfor (int i=0; i<n; i++) arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\t\n\t\tpublic long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tpublic long[] longreadArray(int n) \n\t\t{\n\t\t\tlong[] a=new long[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main\n{\n\tstatic final int mod=(int)1e9+7;\n\tstatic final int inf=(int)1e9;\n\tstatic final long INF=(long)1e18;\n\tpublic static void main(String[] args)\n\t{\n\t\tFastScanner fs=new FastScanner();\n\t\tint n=fs.nextInt();\n\t\tint arr[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tint a=fs.nextInt();\n\t\t\tint b=fs.nextInt();\n\t\t\tif(a==b)\n\t\t\t\tarr[i]=1;\n\t\t\telse\n\t\t\t\tarr[i]=0;\n\t\t}\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tint c=0,max=0;\n\t\tfor(int i=0;i<n-1;i++)\n\t\t{\n\t\t\tif(arr[i]==arr[i+1] && arr[i]==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}\n\t\t}\n\t\tmax=Math.max(max, c+1);\n\t\tSystem.out.println(max>=3 ? \"Yes\":\"No\");\n\t}\n}",
"Main",
"static final int mod=(int)1e9+7;",
"mod",
"(int)1e9+7",
"(int)1e9",
"7",
"static final int inf=(int)1e9;",
"inf",
"(int)1e9",
"static final long INF=(long)1e18;",
"INF",
"(long)1e18",
"public static void main(String[] args)\n\t{\n\t\tFastScanner fs=new FastScanner();\n\t\tint n=fs.nextInt();\n\t\tint arr[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tint a=fs.nextInt();\n\t\t\tint b=fs.nextInt();\n\t\t\tif(a==b)\n\t\t\t\tarr[i]=1;\n\t\t\telse\n\t\t\t\tarr[i]=0;\n\t\t}\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tint c=0,max=0;\n\t\tfor(int i=0;i<n-1;i++)\n\t\t{\n\t\t\tif(arr[i]==arr[i+1] && arr[i]==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}\n\t\t}\n\t\tmax=Math.max(max, c+1);\n\t\tSystem.out.println(max>=3 ? \"Yes\":\"No\");\n\t}",
"main",
"{\n\t\tFastScanner fs=new FastScanner();\n\t\tint n=fs.nextInt();\n\t\tint arr[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tint a=fs.nextInt();\n\t\t\tint b=fs.nextInt();\n\t\t\tif(a==b)\n\t\t\t\tarr[i]=1;\n\t\t\telse\n\t\t\t\tarr[i]=0;\n\t\t}\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tint c=0,max=0;\n\t\tfor(int i=0;i<n-1;i++)\n\t\t{\n\t\t\tif(arr[i]==arr[i+1] && arr[i]==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}\n\t\t}\n\t\tmax=Math.max(max, c+1);\n\t\tSystem.out.println(max>=3 ? \"Yes\":\"No\");\n\t}",
"FastScanner fs=new FastScanner();",
"fs",
"new FastScanner()",
"int n=fs.nextInt();",
"n",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int arr[]=new int[n];",
"arr",
"new int[n]",
"n",
"for(int i=0;i<n;i++)\n\t\t{\n\t\t\tint a=fs.nextInt();\n\t\t\tint b=fs.nextInt();\n\t\t\tif(a==b)\n\t\t\t\tarr[i]=1;\n\t\t\telse\n\t\t\t\tarr[i]=0;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint a=fs.nextInt();\n\t\t\tint b=fs.nextInt();\n\t\t\tif(a==b)\n\t\t\t\tarr[i]=1;\n\t\t\telse\n\t\t\t\tarr[i]=0;\n\t\t}",
"{\n\t\t\tint a=fs.nextInt();\n\t\t\tint b=fs.nextInt();\n\t\t\tif(a==b)\n\t\t\t\tarr[i]=1;\n\t\t\telse\n\t\t\t\tarr[i]=0;\n\t\t}",
"int a=fs.nextInt();",
"a",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int b=fs.nextInt();",
"b",
"fs.nextInt()",
"fs.nextInt",
"fs",
"if(a==b)\n\t\t\t\tarr[i]=1;\n\t\t\telse\n\t\t\t\tarr[i]=0;",
"a==b",
"a",
"b",
"arr[i]=1",
"arr[i]",
"arr",
"i",
"1",
"arr[i]=0",
"arr[i]",
"arr",
"i",
"0",
"int c=0",
"c",
"0",
"max=0;",
"max",
"0",
"for(int i=0;i<n-1;i++)\n\t\t{\n\t\t\tif(arr[i]==arr[i+1] && arr[i]==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"{\n\t\t\tif(arr[i]==arr[i+1] && arr[i]==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(arr[i]==arr[i+1] && arr[i]==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}\n\t\t}",
"if(arr[i]==arr[i+1] && arr[i]==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}",
"arr[i]==arr[i+1] && arr[i]==1",
"arr[i]==arr[i+1]",
"arr[i]",
"arr",
"i",
"arr[i+1]",
"arr",
"i+1",
"i",
"1",
"arr[i]==1",
"arr[i]",
"arr",
"i",
"1",
"{\n\t\t\t\tc++;\n\t\t\t}",
"c++",
"c",
"{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}",
"max=Math.max(max,c+1)",
"max",
"Math.max(max,c+1)",
"Math.max",
"Math",
"max",
"c+1",
"c",
"1",
"c=0",
"c",
"0",
"max=Math.max(max, c+1)",
"max",
"Math.max(max, c+1)",
"Math.max",
"Math",
"max",
"c+1",
"c",
"1",
"System.out.println(max>=3 ? \"Yes\":\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"max>=3 ? \"Yes\":\"No\"",
"max>=3",
"max",
"3",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"class FastScanner \n{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st = new StringTokenizer(\"\");\n\t\tpublic String next() \n\t\t{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t\t\n\t\t}\n\t\t\n\t\tlong pow(long x,long n)\n\t\t{\n\t\t\tlong res=1;\n\t\t\twhile(n>0)\n\t\t\t{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}\n\t\t\treturn res;\n\t\t}\n\t\tint gcd(int a,int b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn gcd(b,a%b);\n\t\t}\n\t\tlong longgcd(long a,long b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn longgcd(b,a%b);\n\t\t}\n\t\tint[] sort(int arr[])\n\t\t{\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor(int i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\tchar[] charsort(char arr[])\n\t {\n\t \tArrayList<Character> list = new ArrayList<>();\n\t \tfor(char c:arr)list.add(c);\n\t \tCollections.sort(list);\n\t \tfor(int i=0;i<list.size();i++)\n\t \t{\n\t \t\tarr[i]=list.get(i);\n\t \t}\n\t \treturn arr;\n\t }\n\t\tlong[] longsort(long arr[])\n\t\t{\n\t\t\tArrayList<Long> list = new ArrayList<Long>();\n\t\t\tfor(long i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\t\tpublic int nextInt() \n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tpublic int[] readArray(int n)\n\t\t{\n\t\t\tint[] arr=new int[n];\n\t\t\tfor (int i=0; i<n; i++) arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}\t\n\t\tpublic long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tpublic long[] longreadArray(int n) \n\t\t{\n\t\t\tlong[] a=new long[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}\n}",
"FastScanner",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st = new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"public String next() \n\t\t{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t\t\n\t\t}",
"next",
"{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t\t\n\t\t}",
"while (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t}",
"st=new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"long pow(long x,long n)\n\t\t{\n\t\t\tlong res=1;\n\t\t\twhile(n>0)\n\t\t\t{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}\n\t\t\treturn res;\n\t\t}",
"pow",
"{\n\t\t\tlong res=1;\n\t\t\twhile(n>0)\n\t\t\t{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}\n\t\t\treturn res;\n\t\t}",
"long res=1;",
"res",
"1",
"while(n>0)\n\t\t\t{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}",
"n>0",
"n",
"0",
"{\n\t\t\t \tif(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}\n\t\t\t}",
"if(n%2!=0)\n\t\t\t \t{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}\n\t\t\t \telse\n\t\t\t \t{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}",
"n%2!=0",
"n%2",
"n",
"2",
"0",
"{\n\t\t\t \t\tres=(res*x);n--;\n\t\t\t \t}",
"res=(res*x)",
"res",
"(res*x)",
"res",
"x",
"n--",
"n",
"{\n\t\t\t \t\tx=(x*x);n/=2;\n\t\t\t \t}",
"x=(x*x)",
"x",
"(x*x)",
"x",
"x",
"n/=2",
"n",
"2",
"return res;",
"res",
"long x",
"x",
"long n",
"n",
"int gcd(int a,int b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn gcd(b,a%b);\n\t\t}",
"gcd",
"{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn gcd(b,a%b);\n\t\t}",
"if(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}",
"b==0",
"b",
"0",
"{\n\t\t\t\treturn a;\n\t\t\t}",
"return a;",
"a",
"return gcd(b,a%b);",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"long longgcd(long a,long b)\n\t\t{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn longgcd(b,a%b);\n\t\t}",
"longgcd",
"{\n\t\t\tif(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}\n\t\t\treturn longgcd(b,a%b);\n\t\t}",
"if(b==0)\n\t\t\t{\n\t\t\t\treturn a;\n\t\t\t}",
"b==0",
"b",
"0",
"{\n\t\t\t\treturn a;\n\t\t\t}",
"return a;",
"a",
"return longgcd(b,a%b);",
"longgcd(b,a%b)",
"longgcd",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"int[] sort(int arr[])\n\t\t{\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor(int i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"sort",
"{\n\t\t\tArrayList<Integer> list = new ArrayList<Integer>();\n\t\t\tfor(int i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"ArrayList<Integer> list = new ArrayList<Integer>();",
"list",
"new ArrayList<Integer>()",
"for(int i:arr)list.add(i);",
"int i",
"arr",
"list.add(i);",
"list.add(i)",
"list.add",
"list",
"i",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"for(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}",
"{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}",
"arr[i]=list.get(i)",
"arr[i]",
"arr",
"i",
"list.get(i)",
"list.get",
"list",
"i",
"return arr;",
"arr",
"int arr[]",
"arr",
"char[] charsort(char arr[])\n\t {\n\t \tArrayList<Character> list = new ArrayList<>();\n\t \tfor(char c:arr)list.add(c);\n\t \tCollections.sort(list);\n\t \tfor(int i=0;i<list.size();i++)\n\t \t{\n\t \t\tarr[i]=list.get(i);\n\t \t}\n\t \treturn arr;\n\t }",
"charsort",
"{\n\t \tArrayList<Character> list = new ArrayList<>();\n\t \tfor(char c:arr)list.add(c);\n\t \tCollections.sort(list);\n\t \tfor(int i=0;i<list.size();i++)\n\t \t{\n\t \t\tarr[i]=list.get(i);\n\t \t}\n\t \treturn arr;\n\t }",
"ArrayList<Character> list = new ArrayList<>();",
"list",
"new ArrayList<>()",
"for(char c:arr)list.add(c);",
"char c",
"arr",
"list.add(c);",
"list.add(c)",
"list.add",
"list",
"c",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"for(int i=0;i<list.size();i++)\n\t \t{\n\t \t\tarr[i]=list.get(i);\n\t \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<list.size()",
"i",
"list.size()",
"list.size",
"list",
"i++",
"i++",
"i",
"{\n\t \t\tarr[i]=list.get(i);\n\t \t}",
"{\n\t \t\tarr[i]=list.get(i);\n\t \t}",
"arr[i]=list.get(i)",
"arr[i]",
"arr",
"i",
"list.get(i)",
"list.get",
"list",
"i",
"return arr;",
"arr",
"char arr[]",
"arr",
"long[] longsort(long arr[])\n\t\t{\n\t\t\tArrayList<Long> list = new ArrayList<Long>();\n\t\t\tfor(long i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"longsort",
"{\n\t\t\tArrayList<Long> list = new ArrayList<Long>();\n\t\t\tfor(long i:arr)list.add(i);\n\t\t\tCollections.sort(list);\n\t\t\tfor(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"ArrayList<Long> list = new ArrayList<Long>();",
"list",
"new ArrayList<Long>()",
"for(long i:arr)list.add(i);",
"long i",
"arr",
"list.add(i);",
"list.add(i)",
"list.add",
"list",
"i",
"Collections.sort(list)",
"Collections.sort",
"Collections",
"list",
"for(int i=0;i<arr.length;i++)\n\t\t\t{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<arr.length",
"i",
"arr.length",
"arr",
"arr.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}",
"{\n\t\t\t\tarr[i]=list.get(i);\n\t\t\t}",
"arr[i]=list.get(i)",
"arr[i]",
"arr",
"i",
"list.get(i)",
"list.get",
"list",
"i",
"return arr;",
"arr",
"long arr[]",
"arr",
"public int nextInt() \n\t\t{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public int[] readArray(int n)\n\t\t{\n\t\t\tint[] arr=new int[n];\n\t\t\tfor (int i=0; i<n; i++) arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}",
"readArray",
"{\n\t\t\tint[] arr=new int[n];\n\t\t\tfor (int i=0; i<n; i++) arr[i]=nextInt();\n\t\t\treturn arr;\n\t\t}",
"int[] arr=new int[n];",
"arr",
"new int[n]",
"n",
"for (int i=0; i<n; i++) arr[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"arr[i]=nextInt();",
"arr[i]=nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int n",
"n",
"public long nextLong()\n\t\t{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public long[] longreadArray(int n) \n\t\t{\n\t\t\tlong[] a=new long[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}",
"longreadArray",
"{\n\t\t\tlong[] a=new long[n];\n\t\t\tfor (int i=0; i<n; i++) a[i]=nextLong();\n\t\t\treturn a;\n\t\t}",
"long[] a=new long[n];",
"a",
"new long[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextLong();",
"a[i]=nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"public class Main\n{\n\tstatic final int mod=(int)1e9+7;\n\tstatic final int inf=(int)1e9;\n\tstatic final long INF=(long)1e18;\n\tpublic static void main(String[] args)\n\t{\n\t\tFastScanner fs=new FastScanner();\n\t\tint n=fs.nextInt();\n\t\tint arr[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tint a=fs.nextInt();\n\t\t\tint b=fs.nextInt();\n\t\t\tif(a==b)\n\t\t\t\tarr[i]=1;\n\t\t\telse\n\t\t\t\tarr[i]=0;\n\t\t}\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tint c=0,max=0;\n\t\tfor(int i=0;i<n-1;i++)\n\t\t{\n\t\t\tif(arr[i]==arr[i+1] && arr[i]==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}\n\t\t}\n\t\tmax=Math.max(max, c+1);\n\t\tSystem.out.println(max>=3 ? \"Yes\":\"No\");\n\t}\n}",
"public class Main\n{\n\tstatic final int mod=(int)1e9+7;\n\tstatic final int inf=(int)1e9;\n\tstatic final long INF=(long)1e18;\n\tpublic static void main(String[] args)\n\t{\n\t\tFastScanner fs=new FastScanner();\n\t\tint n=fs.nextInt();\n\t\tint arr[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tint a=fs.nextInt();\n\t\t\tint b=fs.nextInt();\n\t\t\tif(a==b)\n\t\t\t\tarr[i]=1;\n\t\t\telse\n\t\t\t\tarr[i]=0;\n\t\t}\n\t\t//System.out.println(Arrays.toString(arr));\n\t\tint c=0,max=0;\n\t\tfor(int i=0;i<n-1;i++)\n\t\t{\n\t\t\tif(arr[i]==arr[i+1] && arr[i]==1)\n\t\t\t{\n\t\t\t\tc++;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmax=Math.max(max,c+1);\n\t\t\t\tc=0;\n\t\t\t}\n\t\t}\n\t\tmax=Math.max(max, c+1);\n\t\tSystem.out.println(max>=3 ? \"Yes\":\"No\");\n\t}\n}",
"Main"
]
| //package Atcoder;
import java.util.*;
import java.io.*;
public class Main
{
static final int mod=(int)1e9+7;
static final int inf=(int)1e9;
static final long INF=(long)1e18;
public static void main(String[] args)
{
FastScanner fs=new FastScanner();
int n=fs.nextInt();
int arr[]=new int[n];
for(int i=0;i<n;i++)
{
int a=fs.nextInt();
int b=fs.nextInt();
if(a==b)
arr[i]=1;
else
arr[i]=0;
}
//System.out.println(Arrays.toString(arr));
int c=0,max=0;
for(int i=0;i<n-1;i++)
{
if(arr[i]==arr[i+1] && arr[i]==1)
{
c++;
}
else
{
max=Math.max(max,c+1);
c=0;
}
}
max=Math.max(max, c+1);
System.out.println(max>=3 ? "Yes":"No");
}
}
class FastScanner
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer("");
public String next()
{
while (!st.hasMoreTokens())
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
long pow(long x,long n)
{
long res=1;
while(n>0)
{
if(n%2!=0)
{
res=(res*x);n--;
}
else
{
x=(x*x);n/=2;
}
}
return res;
}
int gcd(int a,int b)
{
if(b==0)
{
return a;
}
return gcd(b,a%b);
}
long longgcd(long a,long b)
{
if(b==0)
{
return a;
}
return longgcd(b,a%b);
}
int[] sort(int arr[])
{
ArrayList<Integer> list = new ArrayList<Integer>();
for(int i:arr)list.add(i);
Collections.sort(list);
for(int i=0;i<arr.length;i++)
{
arr[i]=list.get(i);
}
return arr;
}
char[] charsort(char arr[])
{
ArrayList<Character> list = new ArrayList<>();
for(char c:arr)list.add(c);
Collections.sort(list);
for(int i=0;i<list.size();i++)
{
arr[i]=list.get(i);
}
return arr;
}
long[] longsort(long arr[])
{
ArrayList<Long> list = new ArrayList<Long>();
for(long i:arr)list.add(i);
Collections.sort(list);
for(int i=0;i<arr.length;i++)
{
arr[i]=list.get(i);
}
return arr;
}
public int nextInt()
{
return Integer.parseInt(next());
}
public int[] readArray(int n)
{
int[] arr=new int[n];
for (int i=0; i<n; i++) arr[i]=nextInt();
return arr;
}
public long nextLong()
{
return Long.parseLong(next());
}
public long[] longreadArray(int n)
{
long[] a=new long[n];
for (int i=0; i<n; i++) a[i]=nextLong();
return a;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
3,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
87,
5
],
[
87,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
46,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
35,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
66,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
6,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int count = 0;\n boolean flg = false;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b){\n count++;\n } else {\n count = 0;\n } \n if (count >= 3) {\n flg = true;\n break;\n }\n } \n if (flg == true) {\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int count = 0;\n boolean flg = false;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b){\n count++;\n } else {\n count = 0;\n } \n if (count >= 3) {\n flg = true;\n break;\n }\n } \n if (flg == true) {\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int count = 0;\n boolean flg = false;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b){\n count++;\n } else {\n count = 0;\n } \n if (count >= 3) {\n flg = true;\n break;\n }\n } \n if (flg == true) {\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int count = 0;\n boolean flg = false;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b){\n count++;\n } else {\n count = 0;\n } \n if (count >= 3) {\n flg = true;\n break;\n }\n } \n if (flg == true) {\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"boolean flg = false;",
"flg",
"false",
"for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b){\n count++;\n } else {\n count = 0;\n } \n if (count >= 3) {\n flg = true;\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b){\n count++;\n } else {\n count = 0;\n } \n if (count >= 3) {\n flg = true;\n break;\n }\n }",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b){\n count++;\n } else {\n count = 0;\n } \n if (count >= 3) {\n flg = true;\n break;\n }\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (a == b){\n count++;\n } else {\n count = 0;\n }",
"a == b",
"a",
"b",
"{\n count++;\n }",
"count++",
"count",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"if (count >= 3) {\n flg = true;\n break;\n }",
"count >= 3",
"count",
"3",
"{\n flg = true;\n break;\n }",
"flg = true",
"flg",
"true",
"break;",
"if (flg == true) {\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }",
"flg == true",
"flg",
"true",
"{\n System.out.print(\"Yes\");\n }",
"System.out.print(\"Yes\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.print(\"No\");\n }",
"System.out.print(\"No\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int count = 0;\n boolean flg = false;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b){\n count++;\n } else {\n count = 0;\n } \n if (count >= 3) {\n flg = true;\n break;\n }\n } \n if (flg == true) {\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int count = 0;\n boolean flg = false;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b){\n count++;\n } else {\n count = 0;\n } \n if (count >= 3) {\n flg = true;\n break;\n }\n } \n if (flg == true) {\n System.out.print(\"Yes\");\n } else {\n System.out.print(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int count = 0;
boolean flg = false;
for (int i = 0; i < N; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
if (a == b){
count++;
} else {
count = 0;
}
if (count >= 3) {
flg = true;
break;
}
}
if (flg == true) {
System.out.print("Yes");
} else {
System.out.print("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
43,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
32,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
58,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int zorocount = 0;\n for (int i = 0; i < N; i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2){\n zorocount++;\n }else {\n zorocount = 0;\n }\n if (zorocount > 2){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int zorocount = 0;\n for (int i = 0; i < N; i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2){\n zorocount++;\n }else {\n zorocount = 0;\n }\n if (zorocount > 2){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int zorocount = 0;\n for (int i = 0; i < N; i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2){\n zorocount++;\n }else {\n zorocount = 0;\n }\n if (zorocount > 2){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int zorocount = 0;\n for (int i = 0; i < N; i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2){\n zorocount++;\n }else {\n zorocount = 0;\n }\n if (zorocount > 2){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int zorocount = 0;",
"zorocount",
"0",
"for (int i = 0; i < N; i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2){\n zorocount++;\n }else {\n zorocount = 0;\n }\n if (zorocount > 2){\n System.out.println(\"Yes\");\n return;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2){\n zorocount++;\n }else {\n zorocount = 0;\n }\n if (zorocount > 2){\n System.out.println(\"Yes\");\n return;\n }\n }",
"{\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2){\n zorocount++;\n }else {\n zorocount = 0;\n }\n if (zorocount > 2){\n System.out.println(\"Yes\");\n return;\n }\n }",
"int d1 = sc.nextInt();",
"d1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d2 = sc.nextInt();",
"d2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (d1 == d2){\n zorocount++;\n }else {\n zorocount = 0;\n }",
"d1 == d2",
"d1",
"d2",
"{\n zorocount++;\n }",
"zorocount++",
"zorocount",
"{\n zorocount = 0;\n }",
"zorocount = 0",
"zorocount",
"0",
"if (zorocount > 2){\n System.out.println(\"Yes\");\n return;\n }",
"zorocount > 2",
"zorocount",
"2",
"{\n System.out.println(\"Yes\");\n return;\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int zorocount = 0;\n for (int i = 0; i < N; i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2){\n zorocount++;\n }else {\n zorocount = 0;\n }\n if (zorocount > 2){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int zorocount = 0;\n for (int i = 0; i < N; i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2){\n zorocount++;\n }else {\n zorocount = 0;\n }\n if (zorocount > 2){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int zorocount = 0;
for (int i = 0; i < N; i++){
int d1 = sc.nextInt();
int d2 = sc.nextInt();
if (d1 == d2){
zorocount++;
}else {
zorocount = 0;
}
if (zorocount > 2){
System.out.println("Yes");
return;
}
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
18,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
29,
4,
18,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
4,
18,
20,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
29,
4,
18,
4,
18,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
17,
40,
13,
29,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
14,
2,
13,
17,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
2,
2,
13,
13,
13,
0,
18,
13,
2,
2,
13,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
0,
13,
20,
12,
13,
30,
14,
4,
18,
13,
29,
4,
18,
13,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
12,
13,
30,
29,
4,
18,
4,
13,
17,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
517,
20
],
[
517,
21
],
[
21,
22
],
[
21,
23
],
[
517,
24
],
[
24,
25
],
[
24,
26
],
[
517,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
33,
34
],
[
33,
35
],
[
29,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
29,
41
],
[
41,
42
],
[
41,
43
],
[
29,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
46,
51
],
[
51,
52
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
46,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
29,
67
],
[
67,
68
],
[
67,
69
],
[
29,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
71,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
88,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
29,
99
],
[
99,
100
],
[
99,
101
],
[
29,
102
],
[
102,
103
],
[
102,
104
],
[
29,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
105,
113
],
[
113,
114
],
[
114,
115
],
[
105,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
127,
131
],
[
118,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
29,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
136,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
29,
150
],
[
150,
151
],
[
151,
152
],
[
29,
153
],
[
153,
154
],
[
154,
155
],
[
27,
156
],
[
156,
157
],
[
517,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
163,
166
],
[
160,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
169,
172
],
[
160,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
176,
179
],
[
158,
180
],
[
180,
181
],
[
158,
182
],
[
182,
183
],
[
517,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
184,
193
],
[
193,
194
],
[
517,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
201,
202
],
[
200,
203
],
[
197,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
207,
208
],
[
206,
209
],
[
197,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
213,
216
],
[
213,
217
],
[
217,
218
],
[
218,
219
],
[
217,
220
],
[
195,
221
],
[
221,
222
],
[
195,
223
],
[
223,
224
],
[
517,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
231
],
[
231,
232
],
[
232,
233
],
[
232,
234
],
[
231,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
235,
239
],
[
239,
240
],
[
227,
241
],
[
241,
242
],
[
242,
243
],
[
242,
244
],
[
225,
245
],
[
245,
246
],
[
517,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
250,
251
],
[
250,
252
],
[
252,
253
],
[
252,
254
],
[
249,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
255,
259
],
[
259,
260
],
[
260,
261
],
[
261,
262
],
[
262,
263
],
[
262,
264
],
[
260,
265
],
[
265,
266
],
[
265,
267
],
[
260,
268
],
[
268,
269
],
[
269,
270
],
[
260,
271
],
[
272,
272
],
[
272,
273
],
[
273,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
273,
278
],
[
278,
279
],
[
278,
280
],
[
273,
281
],
[
281,
282
],
[
282,
283
],
[
273,
284
],
[
285,
285
],
[
285,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
288,
290
],
[
290,
291
],
[
291,
292
],
[
291,
293
],
[
290,
294
],
[
285,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
298,
299
],
[
299,
300
],
[
299,
301
],
[
298,
302
],
[
295,
303
],
[
303,
304
],
[
303,
305
],
[
285,
306
],
[
306,
307
],
[
307,
308
],
[
307,
309
],
[
306,
310
],
[
247,
311
],
[
311,
312
],
[
247,
313
],
[
313,
314
],
[
517,
315
],
[
315,
316
],
[
315,
317
],
[
317,
318
],
[
315,
319
],
[
319,
320
],
[
315,
321
],
[
321,
322
],
[
321,
323
],
[
323,
324
],
[
324,
325
],
[
325,
326
],
[
325,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
324,
331
],
[
331,
332
],
[
332,
333
],
[
332,
334
],
[
331,
335
],
[
335,
336
],
[
335,
337
],
[
315,
338
],
[
338,
339
],
[
338,
340
],
[
340,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
341,
345
],
[
345,
346
],
[
346,
347
],
[
347,
348
],
[
340,
349
],
[
349,
350
],
[
350,
351
],
[
350,
352
],
[
352,
353
],
[
353,
354
],
[
354,
355
],
[
349,
356
],
[
356,
357
],
[
357,
358
],
[
357,
359
],
[
340,
360
],
[
360,
361
],
[
361,
362
],
[
362,
363
],
[
315,
364
],
[
364,
365
],
[
364,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
369,
370
],
[
368,
371
],
[
371,
372
],
[
315,
373
],
[
373,
374
],
[
373,
375
],
[
375,
376
],
[
376,
377
],
[
377,
378
],
[
378,
379
],
[
377,
380
],
[
380,
381
],
[
315,
382
],
[
382,
383
],
[
382,
384
],
[
384,
385
],
[
385,
386
],
[
386,
387
],
[
387,
388
],
[
386,
389
],
[
389,
390
],
[
315,
391
],
[
391,
392
],
[
391,
393
],
[
393,
394
],
[
394,
395
],
[
394,
396
],
[
393,
397
],
[
397,
398
],
[
398,
399
],
[
398,
400
],
[
400,
401
],
[
401,
402
],
[
402,
403
],
[
397,
404
],
[
404,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
408,
409
],
[
393,
410
],
[
410,
411
],
[
315,
412
],
[
412,
413
],
[
412,
414
],
[
414,
415
],
[
415,
416
],
[
416,
417
],
[
417,
418
],
[
418,
419
],
[
416,
420
],
[
315,
421
],
[
421,
422
],
[
421,
423
],
[
423,
424
],
[
424,
425
],
[
424,
426
],
[
423,
428
],
[
428,
429
],
[
429,
430
],
[
430,
431
],
[
430,
432
],
[
428,
433
],
[
433,
434
],
[
433,
435
],
[
428,
436
],
[
436,
437
],
[
437,
438
],
[
428,
439
],
[
439,
440
],
[
440,
441
],
[
441,
442
],
[
441,
443
],
[
440,
444
],
[
444,
445
],
[
423,
446
],
[
446,
447
],
[
421,
448
],
[
448,
449
],
[
315,
450
],
[
450,
451
],
[
450,
452
],
[
452,
453
],
[
453,
454
],
[
453,
455
],
[
452,
457
],
[
457,
458
],
[
458,
459
],
[
459,
460
],
[
459,
461
],
[
457,
462
],
[
462,
463
],
[
462,
464
],
[
457,
465
],
[
465,
466
],
[
466,
467
],
[
457,
468
],
[
468,
469
],
[
469,
470
],
[
470,
471
],
[
470,
472
],
[
469,
473
],
[
473,
474
],
[
452,
475
],
[
475,
476
],
[
450,
477
],
[
477,
478
],
[
315,
479
],
[
479,
480
],
[
479,
481
],
[
481,
482
],
[
482,
483
],
[
482,
484
],
[
481,
486
],
[
486,
487
],
[
487,
488
],
[
488,
489
],
[
488,
490
],
[
486,
491
],
[
491,
492
],
[
491,
493
],
[
486,
494
],
[
494,
495
],
[
495,
496
],
[
486,
497
],
[
497,
498
],
[
498,
499
],
[
499,
500
],
[
499,
501
],
[
498,
502
],
[
502,
503
],
[
481,
504
],
[
504,
505
],
[
479,
506
],
[
506,
507
],
[
315,
508
],
[
508,
509
],
[
508,
510
],
[
510,
511
],
[
511,
512
],
[
512,
513
],
[
513,
514
],
[
514,
515
],
[
0,
516
],
[
516,
517
],
[
516,
518
]
]
| [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.lang.reflect.Array;\nimport java.math.BigInteger;\nimport java.util.*;\n\n\npublic class Main {\n static int smallest = 0;\n final static long MOD = 1000000007;\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n //out.println();\n int n = fs.nextInt();\n\n int [][] d = new int[n][2];\n\n for (int i = 0; i < n; i++) {\n d[i] = fs.nextIntArray(2);\n }\n\n boolean true_ar [] = new boolean[n];\n\n for (int i = 0; i < n; i++) {\n true_ar[i] = d[i][0] == d[i][1];\n }\n\n int len = 0;\n int maxlen = 0;\n for(int i = 0; i < n; i++) {\n if(true_ar[i]) {\n len++;\n maxlen = Math.max(len, maxlen);\n } else {\n len = 0;\n }\n }\n\n if(maxlen >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n out.flush();\n out.close();\n }\n\n public static int gcd (int a, int b) {\n BigInteger aa = BigInteger.valueOf(a);\n BigInteger bb = BigInteger.valueOf(b);\n return (int)aa.gcd(bb).longValue();\n }\n\n public static String rString(String s) {\n return new StringBuilder(s).reverse().toString();\n }\n\n public static long modpow(long exp, long pow) {\n BigInteger exp_b = BigInteger.valueOf(exp);\n BigInteger pow_b = BigInteger.valueOf(pow);\n return exp_b.modPow(pow_b, BigInteger.valueOf(MOD)).longValue();\n }\n\n public static int powoftwo(long n){\n int count = 0;\n while(n != 0) {\n n >>= 1;\n count++;\n }\n return count - 1;\n }\n\n public static void rotate(int[] nums, int k) {\n int n = nums.length;\n if(k > 0) {\n for(int j = 0; j < k; j++) {\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }\n }\n }\n\n\n static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner() {\n try {\n br = new BufferedReader(new InputStreamReader(System.in));\n // br = new BufferedReader(new FileReader(\"chat.txt\"));\n st = new StringTokenizer(\"\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n public String next() {\n if (st.hasMoreTokens())\n return st.nextToken();\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String nextLine() {\n String line = \"\";\n try {\n line = br.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return line;\n }\n\n public char nextChar() {\n return next().charAt(0);\n }\n\n public Integer[] nextIntegerArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n\n public char[] nextCharArray() {\n return nextLine().toCharArray();\n }\n }\n\n}\n\n\n\n\n",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.lang.reflect.Array;",
"Array",
"java.lang.reflect",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n static int smallest = 0;\n final static long MOD = 1000000007;\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n //out.println();\n int n = fs.nextInt();\n\n int [][] d = new int[n][2];\n\n for (int i = 0; i < n; i++) {\n d[i] = fs.nextIntArray(2);\n }\n\n boolean true_ar [] = new boolean[n];\n\n for (int i = 0; i < n; i++) {\n true_ar[i] = d[i][0] == d[i][1];\n }\n\n int len = 0;\n int maxlen = 0;\n for(int i = 0; i < n; i++) {\n if(true_ar[i]) {\n len++;\n maxlen = Math.max(len, maxlen);\n } else {\n len = 0;\n }\n }\n\n if(maxlen >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n out.flush();\n out.close();\n }\n\n public static int gcd (int a, int b) {\n BigInteger aa = BigInteger.valueOf(a);\n BigInteger bb = BigInteger.valueOf(b);\n return (int)aa.gcd(bb).longValue();\n }\n\n public static String rString(String s) {\n return new StringBuilder(s).reverse().toString();\n }\n\n public static long modpow(long exp, long pow) {\n BigInteger exp_b = BigInteger.valueOf(exp);\n BigInteger pow_b = BigInteger.valueOf(pow);\n return exp_b.modPow(pow_b, BigInteger.valueOf(MOD)).longValue();\n }\n\n public static int powoftwo(long n){\n int count = 0;\n while(n != 0) {\n n >>= 1;\n count++;\n }\n return count - 1;\n }\n\n public static void rotate(int[] nums, int k) {\n int n = nums.length;\n if(k > 0) {\n for(int j = 0; j < k; j++) {\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }\n }\n }\n\n\n static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner() {\n try {\n br = new BufferedReader(new InputStreamReader(System.in));\n // br = new BufferedReader(new FileReader(\"chat.txt\"));\n st = new StringTokenizer(\"\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n public String next() {\n if (st.hasMoreTokens())\n return st.nextToken();\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String nextLine() {\n String line = \"\";\n try {\n line = br.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return line;\n }\n\n public char nextChar() {\n return next().charAt(0);\n }\n\n public Integer[] nextIntegerArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n\n public char[] nextCharArray() {\n return nextLine().toCharArray();\n }\n }\n\n}",
"Main",
"static int smallest = 0;",
"smallest",
"0",
"final static long MOD = 1000000007;",
"MOD",
"1000000007",
"public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n //out.println();\n int n = fs.nextInt();\n\n int [][] d = new int[n][2];\n\n for (int i = 0; i < n; i++) {\n d[i] = fs.nextIntArray(2);\n }\n\n boolean true_ar [] = new boolean[n];\n\n for (int i = 0; i < n; i++) {\n true_ar[i] = d[i][0] == d[i][1];\n }\n\n int len = 0;\n int maxlen = 0;\n for(int i = 0; i < n; i++) {\n if(true_ar[i]) {\n len++;\n maxlen = Math.max(len, maxlen);\n } else {\n len = 0;\n }\n }\n\n if(maxlen >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n out.flush();\n out.close();\n }",
"main",
"{\n FastScanner fs = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n //out.println();\n int n = fs.nextInt();\n\n int [][] d = new int[n][2];\n\n for (int i = 0; i < n; i++) {\n d[i] = fs.nextIntArray(2);\n }\n\n boolean true_ar [] = new boolean[n];\n\n for (int i = 0; i < n; i++) {\n true_ar[i] = d[i][0] == d[i][1];\n }\n\n int len = 0;\n int maxlen = 0;\n for(int i = 0; i < n; i++) {\n if(true_ar[i]) {\n len++;\n maxlen = Math.max(len, maxlen);\n } else {\n len = 0;\n }\n }\n\n if(maxlen >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n out.flush();\n out.close();\n }",
"FastScanner fs = new FastScanner();",
"fs",
"new FastScanner()",
"PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"int n = fs.nextInt();",
"n",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int [][] d = new int[n][2];",
"d",
"new int[n][2]",
"n",
"2",
"for (int i = 0; i < n; i++) {\n d[i] = fs.nextIntArray(2);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n d[i] = fs.nextIntArray(2);\n }",
"{\n d[i] = fs.nextIntArray(2);\n }",
"d[i] = fs.nextIntArray(2)",
"d[i]",
"d",
"i",
"fs.nextIntArray(2)",
"fs.nextIntArray",
"fs",
"2",
"boolean true_ar [] = new boolean[n];",
"true_ar",
"new boolean[n]",
"n",
"for (int i = 0; i < n; i++) {\n true_ar[i] = d[i][0] == d[i][1];\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n true_ar[i] = d[i][0] == d[i][1];\n }",
"{\n true_ar[i] = d[i][0] == d[i][1];\n }",
"true_ar[i] = d[i][0] == d[i][1]",
"true_ar[i]",
"true_ar",
"i",
"d[i][0] == d[i][1]",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"int len = 0;",
"len",
"0",
"int maxlen = 0;",
"maxlen",
"0",
"for(int i = 0; i < n; i++) {\n if(true_ar[i]) {\n len++;\n maxlen = Math.max(len, maxlen);\n } else {\n len = 0;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(true_ar[i]) {\n len++;\n maxlen = Math.max(len, maxlen);\n } else {\n len = 0;\n }\n }",
"{\n if(true_ar[i]) {\n len++;\n maxlen = Math.max(len, maxlen);\n } else {\n len = 0;\n }\n }",
"if(true_ar[i]) {\n len++;\n maxlen = Math.max(len, maxlen);\n } else {\n len = 0;\n }",
"true_ar[i]",
"true_ar",
"i",
"{\n len++;\n maxlen = Math.max(len, maxlen);\n }",
"len++",
"len",
"maxlen = Math.max(len, maxlen)",
"maxlen",
"Math.max(len, maxlen)",
"Math.max",
"Math",
"len",
"maxlen",
"{\n len = 0;\n }",
"len = 0",
"len",
"0",
"if(maxlen >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }",
"maxlen >= 3",
"maxlen",
"3",
"{\n out.println(\"Yes\");\n }",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"{\n out.println(\"No\");\n }",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"out.flush()",
"out.flush",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"public static int gcd (int a, int b) {\n BigInteger aa = BigInteger.valueOf(a);\n BigInteger bb = BigInteger.valueOf(b);\n return (int)aa.gcd(bb).longValue();\n }",
"gcd",
"{\n BigInteger aa = BigInteger.valueOf(a);\n BigInteger bb = BigInteger.valueOf(b);\n return (int)aa.gcd(bb).longValue();\n }",
"BigInteger aa = BigInteger.valueOf(a);",
"aa",
"BigInteger.valueOf(a)",
"BigInteger.valueOf",
"BigInteger",
"a",
"BigInteger bb = BigInteger.valueOf(b);",
"bb",
"BigInteger.valueOf(b)",
"BigInteger.valueOf",
"BigInteger",
"b",
"return (int)aa.gcd(bb).longValue();",
"(int)aa.gcd(bb).longValue()",
"aa.gcd(bb).longValue",
"aa.gcd(bb)",
"aa.gcd",
"aa",
"bb",
"int a",
"a",
"int b",
"b",
"public static String rString(String s) {\n return new StringBuilder(s).reverse().toString();\n }",
"rString",
"{\n return new StringBuilder(s).reverse().toString();\n }",
"return new StringBuilder(s).reverse().toString();",
"new StringBuilder(s).reverse().toString()",
"new StringBuilder(s).reverse().toString",
"new StringBuilder(s).reverse()",
"new StringBuilder(s).reverse",
"new StringBuilder(s)",
"String s",
"s",
"public static long modpow(long exp, long pow) {\n BigInteger exp_b = BigInteger.valueOf(exp);\n BigInteger pow_b = BigInteger.valueOf(pow);\n return exp_b.modPow(pow_b, BigInteger.valueOf(MOD)).longValue();\n }",
"modpow",
"{\n BigInteger exp_b = BigInteger.valueOf(exp);\n BigInteger pow_b = BigInteger.valueOf(pow);\n return exp_b.modPow(pow_b, BigInteger.valueOf(MOD)).longValue();\n }",
"BigInteger exp_b = BigInteger.valueOf(exp);",
"exp_b",
"BigInteger.valueOf(exp)",
"BigInteger.valueOf",
"BigInteger",
"exp",
"BigInteger pow_b = BigInteger.valueOf(pow);",
"pow_b",
"BigInteger.valueOf(pow)",
"BigInteger.valueOf",
"BigInteger",
"pow",
"return exp_b.modPow(pow_b, BigInteger.valueOf(MOD)).longValue();",
"exp_b.modPow(pow_b, BigInteger.valueOf(MOD)).longValue()",
"exp_b.modPow(pow_b, BigInteger.valueOf(MOD)).longValue",
"exp_b.modPow(pow_b, BigInteger.valueOf(MOD))",
"exp_b.modPow",
"exp_b",
"pow_b",
"BigInteger.valueOf(MOD)",
"BigInteger.valueOf",
"BigInteger",
"MOD",
"long exp",
"exp",
"long pow",
"pow",
"public static int powoftwo(long n){\n int count = 0;\n while(n != 0) {\n n >>= 1;\n count++;\n }\n return count - 1;\n }",
"powoftwo",
"{\n int count = 0;\n while(n != 0) {\n n >>= 1;\n count++;\n }\n return count - 1;\n }",
"int count = 0;",
"count",
"0",
"while(n != 0) {\n n >>= 1;\n count++;\n }",
"n != 0",
"n",
"0",
"{\n n >>= 1;\n count++;\n }",
"n >>= 1",
"n",
"1",
"count++",
"count",
"return count - 1;",
"count - 1",
"count",
"1",
"long n",
"n",
"public static void rotate(int[] nums, int k) {\n int n = nums.length;\n if(k > 0) {\n for(int j = 0; j < k; j++) {\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }\n }\n }",
"rotate",
"{\n int n = nums.length;\n if(k > 0) {\n for(int j = 0; j < k; j++) {\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }\n }\n }",
"int n = nums.length;",
"n",
"nums.length",
"nums",
"nums.length",
"if(k > 0) {\n for(int j = 0; j < k; j++) {\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }\n }",
"k > 0",
"k",
"0",
"{\n for(int j = 0; j < k; j++) {\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }\n }",
"for(int j = 0; j < k; j++) {\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < k",
"j",
"k",
"j++",
"j++",
"j",
"{\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }",
"{\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }",
"for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }",
"{\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }",
"int temp = nums[(i + k) % n];",
"temp",
"nums[(i + k) % n]",
"nums",
"(i + k) % n",
"(i + k)",
"i",
"k",
"n",
"nums[(i + k) % n] = nums[i]",
"nums[(i + k) % n]",
"nums",
"(i + k) % n",
"(i + k)",
"i",
"k",
"n",
"nums[i]",
"nums",
"i",
"nums[i] = temp",
"nums[i]",
"nums",
"i",
"temp",
"int[] nums",
"nums",
"int k",
"k",
"static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner() {\n try {\n br = new BufferedReader(new InputStreamReader(System.in));\n // br = new BufferedReader(new FileReader(\"chat.txt\"));\n st = new StringTokenizer(\"\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n public String next() {\n if (st.hasMoreTokens())\n return st.nextToken();\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String nextLine() {\n String line = \"\";\n try {\n line = br.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return line;\n }\n\n public char nextChar() {\n return next().charAt(0);\n }\n\n public Integer[] nextIntegerArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n\n public char[] nextCharArray() {\n return nextLine().toCharArray();\n }\n }",
"FastScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastScanner() {\n try {\n br = new BufferedReader(new InputStreamReader(System.in));\n // br = new BufferedReader(new FileReader(\"chat.txt\"));\n st = new StringTokenizer(\"\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"FastScanner",
"{\n try {\n br = new BufferedReader(new InputStreamReader(System.in));\n // br = new BufferedReader(new FileReader(\"chat.txt\"));\n st = new StringTokenizer(\"\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"try {\n br = new BufferedReader(new InputStreamReader(System.in));\n // br = new BufferedReader(new FileReader(\"chat.txt\"));\n st = new StringTokenizer(\"\");\n } catch (Exception e) {\n e.printStackTrace();\n }",
"catch (Exception e) {\n e.printStackTrace();\n }",
"Exception e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n // br = new BufferedReader(new FileReader(\"chat.txt\"));\n st = new StringTokenizer(\"\");\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"st = new StringTokenizer(\"\")",
"st",
"new StringTokenizer(\"\")",
"public String next() {\n if (st.hasMoreTokens())\n return st.nextToken();\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"next",
"{\n if (st.hasMoreTokens())\n return st.nextToken();\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"if (st.hasMoreTokens())\n return st.nextToken();",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n e.printStackTrace();\n }",
"catch (Exception e) {\n e.printStackTrace();\n }",
"Exception e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public String nextLine() {\n String line = \"\";\n try {\n line = br.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return line;\n }",
"nextLine",
"{\n String line = \"\";\n try {\n line = br.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return line;\n }",
"String line = \"\";",
"line",
"\"\"",
"try {\n line = br.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }",
"catch (Exception e) {\n e.printStackTrace();\n }",
"Exception e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n line = br.readLine();\n }",
"line = br.readLine()",
"line",
"br.readLine()",
"br.readLine",
"br",
"return line;",
"line",
"public char nextChar() {\n return next().charAt(0);\n }",
"nextChar",
"{\n return next().charAt(0);\n }",
"return next().charAt(0);",
"next().charAt(0)",
"next().charAt",
"next()",
"next",
"0",
"public Integer[] nextIntegerArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }",
"nextIntegerArray",
"{\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }",
"Integer[] a = new Integer[n];",
"a",
"new Integer[n]",
"n",
"for (int i = 0; i < n; i++)\n a[i] = nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextInt();",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }",
"nextIntArray",
"{\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n a[i] = nextInt();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextInt();",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }",
"nextLongArray",
"{\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }",
"long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for (int i = 0; i < n; i++)\n a[i] = nextLong();",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"a[i] = nextLong();",
"a[i] = nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"public char[] nextCharArray() {\n return nextLine().toCharArray();\n }",
"nextCharArray",
"{\n return nextLine().toCharArray();\n }",
"return nextLine().toCharArray();",
"nextLine().toCharArray()",
"nextLine().toCharArray",
"nextLine()",
"nextLine",
"public class Main {\n static int smallest = 0;\n final static long MOD = 1000000007;\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n //out.println();\n int n = fs.nextInt();\n\n int [][] d = new int[n][2];\n\n for (int i = 0; i < n; i++) {\n d[i] = fs.nextIntArray(2);\n }\n\n boolean true_ar [] = new boolean[n];\n\n for (int i = 0; i < n; i++) {\n true_ar[i] = d[i][0] == d[i][1];\n }\n\n int len = 0;\n int maxlen = 0;\n for(int i = 0; i < n; i++) {\n if(true_ar[i]) {\n len++;\n maxlen = Math.max(len, maxlen);\n } else {\n len = 0;\n }\n }\n\n if(maxlen >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n out.flush();\n out.close();\n }\n\n public static int gcd (int a, int b) {\n BigInteger aa = BigInteger.valueOf(a);\n BigInteger bb = BigInteger.valueOf(b);\n return (int)aa.gcd(bb).longValue();\n }\n\n public static String rString(String s) {\n return new StringBuilder(s).reverse().toString();\n }\n\n public static long modpow(long exp, long pow) {\n BigInteger exp_b = BigInteger.valueOf(exp);\n BigInteger pow_b = BigInteger.valueOf(pow);\n return exp_b.modPow(pow_b, BigInteger.valueOf(MOD)).longValue();\n }\n\n public static int powoftwo(long n){\n int count = 0;\n while(n != 0) {\n n >>= 1;\n count++;\n }\n return count - 1;\n }\n\n public static void rotate(int[] nums, int k) {\n int n = nums.length;\n if(k > 0) {\n for(int j = 0; j < k; j++) {\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }\n }\n }\n\n\n static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner() {\n try {\n br = new BufferedReader(new InputStreamReader(System.in));\n // br = new BufferedReader(new FileReader(\"chat.txt\"));\n st = new StringTokenizer(\"\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n public String next() {\n if (st.hasMoreTokens())\n return st.nextToken();\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String nextLine() {\n String line = \"\";\n try {\n line = br.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return line;\n }\n\n public char nextChar() {\n return next().charAt(0);\n }\n\n public Integer[] nextIntegerArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n\n public char[] nextCharArray() {\n return nextLine().toCharArray();\n }\n }\n\n}",
"public class Main {\n static int smallest = 0;\n final static long MOD = 1000000007;\n\n public static void main(String[] args) {\n FastScanner fs = new FastScanner();\n PrintWriter out = new PrintWriter(System.out);\n //out.println();\n int n = fs.nextInt();\n\n int [][] d = new int[n][2];\n\n for (int i = 0; i < n; i++) {\n d[i] = fs.nextIntArray(2);\n }\n\n boolean true_ar [] = new boolean[n];\n\n for (int i = 0; i < n; i++) {\n true_ar[i] = d[i][0] == d[i][1];\n }\n\n int len = 0;\n int maxlen = 0;\n for(int i = 0; i < n; i++) {\n if(true_ar[i]) {\n len++;\n maxlen = Math.max(len, maxlen);\n } else {\n len = 0;\n }\n }\n\n if(maxlen >= 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n out.flush();\n out.close();\n }\n\n public static int gcd (int a, int b) {\n BigInteger aa = BigInteger.valueOf(a);\n BigInteger bb = BigInteger.valueOf(b);\n return (int)aa.gcd(bb).longValue();\n }\n\n public static String rString(String s) {\n return new StringBuilder(s).reverse().toString();\n }\n\n public static long modpow(long exp, long pow) {\n BigInteger exp_b = BigInteger.valueOf(exp);\n BigInteger pow_b = BigInteger.valueOf(pow);\n return exp_b.modPow(pow_b, BigInteger.valueOf(MOD)).longValue();\n }\n\n public static int powoftwo(long n){\n int count = 0;\n while(n != 0) {\n n >>= 1;\n count++;\n }\n return count - 1;\n }\n\n public static void rotate(int[] nums, int k) {\n int n = nums.length;\n if(k > 0) {\n for(int j = 0; j < k; j++) {\n for (int i = 0; i < n; i++) {\n int temp = nums[(i + k) % n];\n nums[(i + k) % n] = nums[i];\n nums[i] = temp;\n }\n }\n }\n }\n\n\n static class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner() {\n try {\n br = new BufferedReader(new InputStreamReader(System.in));\n // br = new BufferedReader(new FileReader(\"chat.txt\"));\n st = new StringTokenizer(\"\");\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n public String next() {\n if (st.hasMoreTokens())\n return st.nextToken();\n try {\n st = new StringTokenizer(br.readLine());\n } catch (Exception e) {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public double nextDouble() {\n return Double.parseDouble(next());\n }\n\n public String nextLine() {\n String line = \"\";\n try {\n line = br.readLine();\n } catch (Exception e) {\n e.printStackTrace();\n }\n return line;\n }\n\n public char nextChar() {\n return next().charAt(0);\n }\n\n public Integer[] nextIntegerArray(int n) {\n Integer[] a = new Integer[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public int[] nextIntArray(int n) {\n int[] a = new int[n];\n for (int i = 0; i < n; i++)\n a[i] = nextInt();\n return a;\n }\n\n public long[] nextLongArray(int n) {\n long[] a = new long[n];\n for (int i = 0; i < n; i++)\n a[i] = nextLong();\n return a;\n }\n\n public char[] nextCharArray() {\n return nextLine().toCharArray();\n }\n }\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;
public class Main {
static int smallest = 0;
final static long MOD = 1000000007;
public static void main(String[] args) {
FastScanner fs = new FastScanner();
PrintWriter out = new PrintWriter(System.out);
//out.println();
int n = fs.nextInt();
int [][] d = new int[n][2];
for (int i = 0; i < n; i++) {
d[i] = fs.nextIntArray(2);
}
boolean true_ar [] = new boolean[n];
for (int i = 0; i < n; i++) {
true_ar[i] = d[i][0] == d[i][1];
}
int len = 0;
int maxlen = 0;
for(int i = 0; i < n; i++) {
if(true_ar[i]) {
len++;
maxlen = Math.max(len, maxlen);
} else {
len = 0;
}
}
if(maxlen >= 3) {
out.println("Yes");
} else {
out.println("No");
}
out.flush();
out.close();
}
public static int gcd (int a, int b) {
BigInteger aa = BigInteger.valueOf(a);
BigInteger bb = BigInteger.valueOf(b);
return (int)aa.gcd(bb).longValue();
}
public static String rString(String s) {
return new StringBuilder(s).reverse().toString();
}
public static long modpow(long exp, long pow) {
BigInteger exp_b = BigInteger.valueOf(exp);
BigInteger pow_b = BigInteger.valueOf(pow);
return exp_b.modPow(pow_b, BigInteger.valueOf(MOD)).longValue();
}
public static int powoftwo(long n){
int count = 0;
while(n != 0) {
n >>= 1;
count++;
}
return count - 1;
}
public static void rotate(int[] nums, int k) {
int n = nums.length;
if(k > 0) {
for(int j = 0; j < k; j++) {
for (int i = 0; i < n; i++) {
int temp = nums[(i + k) % n];
nums[(i + k) % n] = nums[i];
nums[i] = temp;
}
}
}
}
static class FastScanner {
BufferedReader br;
StringTokenizer st;
public FastScanner() {
try {
br = new BufferedReader(new InputStreamReader(System.in));
// br = new BufferedReader(new FileReader("chat.txt"));
st = new StringTokenizer("");
} catch (Exception e) {
e.printStackTrace();
}
}
public String next() {
if (st.hasMoreTokens())
return st.nextToken();
try {
st = new StringTokenizer(br.readLine());
} catch (Exception e) {
e.printStackTrace();
}
return st.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
public long nextLong() {
return Long.parseLong(next());
}
public double nextDouble() {
return Double.parseDouble(next());
}
public String nextLine() {
String line = "";
try {
line = br.readLine();
} catch (Exception e) {
e.printStackTrace();
}
return line;
}
public char nextChar() {
return next().charAt(0);
}
public Integer[] nextIntegerArray(int n) {
Integer[] a = new Integer[n];
for (int i = 0; i < n; i++)
a[i] = nextInt();
return a;
}
public int[] nextIntArray(int n) {
int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = nextInt();
return a;
}
public long[] nextLongArray(int n) {
long[] a = new long[n];
for (int i = 0; i < n; i++)
a[i] = nextLong();
return a;
}
public char[] nextCharArray() {
return nextLine().toCharArray();
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
41,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
13,
13,
40,
13,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
40,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
86,
5
],
[
86,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
27,
37
],
[
37,
38
],
[
38,
39
],
[
27,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
52,
58
],
[
58,
59
],
[
58,
60
],
[
41,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
68,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
6,
83
],
[
83,
84
],
[
0,
85
],
[
85,
86
],
[
85,
87
]
]
| [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n \tint cnt = 0;\n \tint a,b;\n \tboolean nzj = true;\n\t\t\n \tfor(int i = 0;i < n && nzj;i++){\n a = sc.nextInt();\n b = sc.nextInt();\n if(a == b) cnt++;\n else cnt = 0;\n if(cnt == 3) nzj = false;\n }\n \t\n\t\tif(!nzj) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n \tint cnt = 0;\n \tint a,b;\n \tboolean nzj = true;\n\t\t\n \tfor(int i = 0;i < n && nzj;i++){\n a = sc.nextInt();\n b = sc.nextInt();\n if(a == b) cnt++;\n else cnt = 0;\n if(cnt == 3) nzj = false;\n }\n \t\n\t\tif(!nzj) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n \tint cnt = 0;\n \tint a,b;\n \tboolean nzj = true;\n\t\t\n \tfor(int i = 0;i < n && nzj;i++){\n a = sc.nextInt();\n b = sc.nextInt();\n if(a == b) cnt++;\n else cnt = 0;\n if(cnt == 3) nzj = false;\n }\n \t\n\t\tif(!nzj) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n \tint cnt = 0;\n \tint a,b;\n \tboolean nzj = true;\n\t\t\n \tfor(int i = 0;i < n && nzj;i++){\n a = sc.nextInt();\n b = sc.nextInt();\n if(a == b) cnt++;\n else cnt = 0;\n if(cnt == 3) nzj = false;\n }\n \t\n\t\tif(!nzj) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cnt = 0;",
"cnt",
"0",
"int a",
"a",
"b;",
"b",
"boolean nzj = true;",
"nzj",
"true",
"for(int i = 0;i < n && nzj;i++){\n a = sc.nextInt();\n b = sc.nextInt();\n if(a == b) cnt++;\n else cnt = 0;\n if(cnt == 3) nzj = false;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n && nzj",
"i < n",
"i",
"n",
"nzj",
"i++",
"i++",
"i",
"{\n a = sc.nextInt();\n b = sc.nextInt();\n if(a == b) cnt++;\n else cnt = 0;\n if(cnt == 3) nzj = false;\n }",
"{\n a = sc.nextInt();\n b = sc.nextInt();\n if(a == b) cnt++;\n else cnt = 0;\n if(cnt == 3) nzj = false;\n }",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a == b) cnt++;\n else cnt = 0;",
"a == b",
"a",
"b",
"cnt++",
"cnt",
"cnt = 0",
"cnt",
"0",
"if(cnt == 3) nzj = false;",
"cnt == 3",
"cnt",
"3",
"nzj = false",
"nzj",
"false",
"if(!nzj) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");",
"!nzj",
"nzj",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n \tint cnt = 0;\n \tint a,b;\n \tboolean nzj = true;\n\t\t\n \tfor(int i = 0;i < n && nzj;i++){\n a = sc.nextInt();\n b = sc.nextInt();\n if(a == b) cnt++;\n else cnt = 0;\n if(cnt == 3) nzj = false;\n }\n \t\n\t\tif(!nzj) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n \tint cnt = 0;\n \tint a,b;\n \tboolean nzj = true;\n\t\t\n \tfor(int i = 0;i < n && nzj;i++){\n a = sc.nextInt();\n b = sc.nextInt();\n if(a == b) cnt++;\n else cnt = 0;\n if(cnt == 3) nzj = false;\n }\n \t\n\t\tif(!nzj) System.out.println(\"Yes\");\n \telse System.out.println(\"No\");\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int cnt = 0;
int a,b;
boolean nzj = true;
for(int i = 0;i < n && nzj;i++){
a = sc.nextInt();
b = sc.nextInt();
if(a == b) cnt++;
else cnt = 0;
if(cnt == 3) nzj = false;
}
if(!nzj) System.out.println("Yes");
else System.out.println("No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
30,
0,
13,
17,
41,
13,
8,
13,
17,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
83,
5
],
[
83,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
35,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
35,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
35,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
49,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
70,
73
],
[
8,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
6,
80
],
[
80,
81
],
[
0,
82
],
[
82,
83
],
[
82,
84
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean flg = false;\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsc.nextLine();\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\n\t\tString ans = flg ? \"Yes\" : \"No\";\n\t\tSystem.out.println(ans);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean flg = false;\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsc.nextLine();\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\n\t\tString ans = flg ? \"Yes\" : \"No\";\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean flg = false;\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsc.nextLine();\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\n\t\tString ans = flg ? \"Yes\" : \"No\";\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean flg = false;\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsc.nextLine();\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\n\t\tString ans = flg ? \"Yes\" : \"No\";\n\t\tSystem.out.println(ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean flg = false;",
"flg",
"false",
"int cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tsc.nextLine();\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tsc.nextLine();\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tsc.nextLine();\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (a == b) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}",
"a == b",
"a",
"b",
"{\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t}",
"cnt++",
"cnt",
"if (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}",
"cnt == 3",
"cnt",
"3",
"{\n\t\t\t\t\tflg = true;\n\t\t\t\t}",
"flg = true",
"flg",
"true",
"{\n\t\t\t\tcnt = 0;\n\t\t\t}",
"cnt = 0",
"cnt",
"0",
"String ans = flg ? \"Yes\" : \"No\";",
"ans",
"flg ? \"Yes\" : \"No\"",
"flg",
"\"Yes\"",
"\"No\"",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean flg = false;\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsc.nextLine();\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\n\t\tString ans = flg ? \"Yes\" : \"No\";\n\t\tSystem.out.println(ans);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean flg = false;\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tsc.nextLine();\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\n\t\tString ans = flg ? \"Yes\" : \"No\";\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
boolean flg = false;
int cnt = 0;
for (int i = 0; i < n; i++) {
sc.nextLine();
int a = sc.nextInt();
int b = sc.nextInt();
if (a == b) {
cnt++;
if (cnt == 3) {
flg = true;
}
} else {
cnt = 0;
}
}
String ans = flg ? "Yes" : "No";
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
13,
13,
0,
13,
17,
0,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
17,
30,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
0,
13,
17,
9,
40,
13,
4,
18,
18,
13,
13,
8,
2,
13,
17,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
126,
8
],
[
126,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
21,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
38,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
56,
57
],
[
38,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
58,
65
],
[
65,
66
],
[
65,
67
],
[
11,
68
],
[
68,
69
],
[
68,
70
],
[
11,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
71,
81
],
[
81,
82
],
[
82,
83
],
[
71,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
87,
92
],
[
86,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
98,
105
],
[
93,
106
],
[
106,
107
],
[
106,
108
],
[
93,
109
],
[
85,
110
],
[
110,
111
],
[
11,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
117,
122
],
[
9,
123
],
[
123,
124
],
[
0,
125
],
[
125,
126
],
[
125,
127
]
]
| [
"import java.util.*;\nimport java.io.*;\npublic class Main {\n\n\tpublic static void main(String[] args) throws java.lang.Exception{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n=Integer.parseInt(br.readLine());\n\t\tString ans=\"\";\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\tint a=Integer.parseInt(st.nextToken()),b=Integer.parseInt(st.nextToken());\n\t\t\tif(a==b) ans+=\"1\";\n\t\t\telse ans+=\"0\";\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=0; i<ans.length(); i++) {\n\t\t\tif(ans.charAt(i)=='0') {\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++c;\n\t\t}\n\t\tSystem.out.println(c>=3?\"Yes\":\"No\");\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) throws java.lang.Exception{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n=Integer.parseInt(br.readLine());\n\t\tString ans=\"\";\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\tint a=Integer.parseInt(st.nextToken()),b=Integer.parseInt(st.nextToken());\n\t\t\tif(a==b) ans+=\"1\";\n\t\t\telse ans+=\"0\";\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=0; i<ans.length(); i++) {\n\t\t\tif(ans.charAt(i)=='0') {\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++c;\n\t\t}\n\t\tSystem.out.println(c>=3?\"Yes\":\"No\");\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws java.lang.Exception{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n=Integer.parseInt(br.readLine());\n\t\tString ans=\"\";\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\tint a=Integer.parseInt(st.nextToken()),b=Integer.parseInt(st.nextToken());\n\t\t\tif(a==b) ans+=\"1\";\n\t\t\telse ans+=\"0\";\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=0; i<ans.length(); i++) {\n\t\t\tif(ans.charAt(i)=='0') {\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++c;\n\t\t}\n\t\tSystem.out.println(c>=3?\"Yes\":\"No\");\n\t}",
"main",
"{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n=Integer.parseInt(br.readLine());\n\t\tString ans=\"\";\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\tint a=Integer.parseInt(st.nextToken()),b=Integer.parseInt(st.nextToken());\n\t\t\tif(a==b) ans+=\"1\";\n\t\t\telse ans+=\"0\";\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=0; i<ans.length(); i++) {\n\t\t\tif(ans.charAt(i)=='0') {\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++c;\n\t\t}\n\t\tSystem.out.println(c>=3?\"Yes\":\"No\");\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n=Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"String ans=\"\";",
"ans",
"\"\"",
"for(int i=0; i<n; i++) {\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\tint a=Integer.parseInt(st.nextToken()),b=Integer.parseInt(st.nextToken());\n\t\t\tif(a==b) ans+=\"1\";\n\t\t\telse ans+=\"0\";\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\tint a=Integer.parseInt(st.nextToken()),b=Integer.parseInt(st.nextToken());\n\t\t\tif(a==b) ans+=\"1\";\n\t\t\telse ans+=\"0\";\n\t\t}",
"{\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\tint a=Integer.parseInt(st.nextToken()),b=Integer.parseInt(st.nextToken());\n\t\t\tif(a==b) ans+=\"1\";\n\t\t\telse ans+=\"0\";\n\t\t}",
"StringTokenizer st = new StringTokenizer(br.readLine());",
"st",
"new StringTokenizer(br.readLine())",
"int a=Integer.parseInt(st.nextToken())",
"a",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"b=Integer.parseInt(st.nextToken());",
"b",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"if(a==b) ans+=\"1\";\n\t\t\telse ans+=\"0\";",
"a==b",
"a",
"b",
"ans+=\"1\"",
"ans",
"\"1\"",
"ans+=\"0\"",
"ans",
"\"0\"",
"int c=0;",
"c",
"0",
"for(int i=0; i<ans.length(); i++) {\n\t\t\tif(ans.charAt(i)=='0') {\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++c;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<ans.length()",
"i",
"ans.length()",
"ans.length",
"ans",
"i++",
"i++",
"i",
"{\n\t\t\tif(ans.charAt(i)=='0') {\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++c;\n\t\t}",
"{\n\t\t\tif(ans.charAt(i)=='0') {\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++c;\n\t\t}",
"if(ans.charAt(i)=='0') {\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}",
"ans.charAt(i)=='0'",
"ans.charAt(i)",
"ans.charAt",
"ans",
"i",
"'0'",
"{\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}",
"if(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"c>=3",
"c",
"3",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"c=0",
"c",
"0",
"continue;",
"++c",
"c",
"System.out.println(c>=3?\"Yes\":\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"c>=3?\"Yes\":\"No\"",
"c>=3",
"c",
"3",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws java.lang.Exception{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n=Integer.parseInt(br.readLine());\n\t\tString ans=\"\";\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\tint a=Integer.parseInt(st.nextToken()),b=Integer.parseInt(st.nextToken());\n\t\t\tif(a==b) ans+=\"1\";\n\t\t\telse ans+=\"0\";\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=0; i<ans.length(); i++) {\n\t\t\tif(ans.charAt(i)=='0') {\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++c;\n\t\t}\n\t\tSystem.out.println(c>=3?\"Yes\":\"No\");\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws java.lang.Exception{\n\t\t\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint n=Integer.parseInt(br.readLine());\n\t\tString ans=\"\";\n\t\tfor(int i=0; i<n; i++) {\n\t\t\tStringTokenizer st = new StringTokenizer(br.readLine());\n\t\t\tint a=Integer.parseInt(st.nextToken()),b=Integer.parseInt(st.nextToken());\n\t\t\tif(a==b) ans+=\"1\";\n\t\t\telse ans+=\"0\";\n\t\t}\n\t\tint c=0;\n\t\tfor(int i=0; i<ans.length(); i++) {\n\t\t\tif(ans.charAt(i)=='0') {\n\t\t\t\tif(c>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tc=0;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t++c;\n\t\t}\n\t\tSystem.out.println(c>=3?\"Yes\":\"No\");\n\t}\n\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws java.lang.Exception{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n=Integer.parseInt(br.readLine());
String ans="";
for(int i=0; i<n; i++) {
StringTokenizer st = new StringTokenizer(br.readLine());
int a=Integer.parseInt(st.nextToken()),b=Integer.parseInt(st.nextToken());
if(a==b) ans+="1";
else ans+="0";
}
int c=0;
for(int i=0; i<ans.length(); i++) {
if(ans.charAt(i)=='0') {
if(c>=3) {
System.out.println("Yes");
return;
}
c=0;
continue;
}
++c;
}
System.out.println(c>=3?"Yes":"No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
14,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
40,
13,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
79,
5
],
[
79,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
30,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
35,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
8,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
6,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String s[]){\n Scanner sc=new Scanner(System.in);\n int n=0;\n if(sc.hasNextInt())\n n=sc.nextInt();\n int cnt=0;\n boolean res=false;\n while(n--!=0){\n byte x=sc.nextByte();\n byte y=sc.nextByte();\n if(x==y)\n cnt++;\n else\n cnt=0;\n if(cnt==3)\n res=true;\n }\n if(res)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String s[]){\n Scanner sc=new Scanner(System.in);\n int n=0;\n if(sc.hasNextInt())\n n=sc.nextInt();\n int cnt=0;\n boolean res=false;\n while(n--!=0){\n byte x=sc.nextByte();\n byte y=sc.nextByte();\n if(x==y)\n cnt++;\n else\n cnt=0;\n if(cnt==3)\n res=true;\n }\n if(res)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String s[]){\n Scanner sc=new Scanner(System.in);\n int n=0;\n if(sc.hasNextInt())\n n=sc.nextInt();\n int cnt=0;\n boolean res=false;\n while(n--!=0){\n byte x=sc.nextByte();\n byte y=sc.nextByte();\n if(x==y)\n cnt++;\n else\n cnt=0;\n if(cnt==3)\n res=true;\n }\n if(res)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"main",
"{\n Scanner sc=new Scanner(System.in);\n int n=0;\n if(sc.hasNextInt())\n n=sc.nextInt();\n int cnt=0;\n boolean res=false;\n while(n--!=0){\n byte x=sc.nextByte();\n byte y=sc.nextByte();\n if(x==y)\n cnt++;\n else\n cnt=0;\n if(cnt==3)\n res=true;\n }\n if(res)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=0;",
"n",
"0",
"if(sc.hasNextInt())\n n=sc.nextInt();",
"sc.hasNextInt()",
"sc.hasNextInt",
"sc",
"n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cnt=0;",
"cnt",
"0",
"boolean res=false;",
"res",
"false",
"while(n--!=0){\n byte x=sc.nextByte();\n byte y=sc.nextByte();\n if(x==y)\n cnt++;\n else\n cnt=0;\n if(cnt==3)\n res=true;\n }",
"n--!=0",
"n--",
"n",
"0",
"{\n byte x=sc.nextByte();\n byte y=sc.nextByte();\n if(x==y)\n cnt++;\n else\n cnt=0;\n if(cnt==3)\n res=true;\n }",
"byte x=sc.nextByte();",
"x",
"sc.nextByte()",
"sc.nextByte",
"sc",
"byte y=sc.nextByte();",
"y",
"sc.nextByte()",
"sc.nextByte",
"sc",
"if(x==y)\n cnt++;\n else\n cnt=0;",
"x==y",
"x",
"y",
"cnt++",
"cnt",
"cnt=0",
"cnt",
"0",
"if(cnt==3)\n res=true;",
"cnt==3",
"cnt",
"3",
"res=true",
"res",
"true",
"if(res)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");",
"res",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String s[]",
"s",
"public class Main {\n public static void main(String s[]){\n Scanner sc=new Scanner(System.in);\n int n=0;\n if(sc.hasNextInt())\n n=sc.nextInt();\n int cnt=0;\n boolean res=false;\n while(n--!=0){\n byte x=sc.nextByte();\n byte y=sc.nextByte();\n if(x==y)\n cnt++;\n else\n cnt=0;\n if(cnt==3)\n res=true;\n }\n if(res)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"public class Main {\n public static void main(String s[]){\n Scanner sc=new Scanner(System.in);\n int n=0;\n if(sc.hasNextInt())\n n=sc.nextInt();\n int cnt=0;\n boolean res=false;\n while(n--!=0){\n byte x=sc.nextByte();\n byte y=sc.nextByte();\n if(x==y)\n cnt++;\n else\n cnt=0;\n if(cnt==3)\n res=true;\n }\n if(res)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String s[]){
Scanner sc=new Scanner(System.in);
int n=0;
if(sc.hasNextInt())
n=sc.nextInt();
int cnt=0;
boolean res=false;
while(n--!=0){
byte x=sc.nextByte();
byte y=sc.nextByte();
if(x==y)
cnt++;
else
cnt=0;
if(cnt==3)
res=true;
}
if(res)
System.out.println("Yes");
else
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
40,
13,
0,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
40,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
40,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
60,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
59,
71
],
[
71,
72
],
[
59,
73
],
[
73,
74
],
[
73,
75
],
[
40,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
81,
83
],
[
76,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
8,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
88,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
6,
104
],
[
104,
105
]
]
| [
"import java.util.*;\n\nclass Main{\n\tpublic static void main(String args[]){\n \tScanner in = new Scanner(System.in);\n \n int n = in.nextInt();\n int ar[][] = new int[n][2];\n int temp = 0;\n boolean status = false;\n for(int i = 0 ; i < n ; i++){\n ar[i][0] = in.nextInt();\n ar[i][1] = in.nextInt();\n\n if(ar[i][0]==ar[i][1])\n temp++;\n else\n temp = 0;\n if(status == false && temp == 3){\n status = true;\n }\n }\n\n if(status == true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n\tpublic static void main(String args[]){\n \tScanner in = new Scanner(System.in);\n \n int n = in.nextInt();\n int ar[][] = new int[n][2];\n int temp = 0;\n boolean status = false;\n for(int i = 0 ; i < n ; i++){\n ar[i][0] = in.nextInt();\n ar[i][1] = in.nextInt();\n\n if(ar[i][0]==ar[i][1])\n temp++;\n else\n temp = 0;\n if(status == false && temp == 3){\n status = true;\n }\n }\n\n if(status == true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n \n }\n}",
"Main",
"public static void main(String args[]){\n \tScanner in = new Scanner(System.in);\n \n int n = in.nextInt();\n int ar[][] = new int[n][2];\n int temp = 0;\n boolean status = false;\n for(int i = 0 ; i < n ; i++){\n ar[i][0] = in.nextInt();\n ar[i][1] = in.nextInt();\n\n if(ar[i][0]==ar[i][1])\n temp++;\n else\n temp = 0;\n if(status == false && temp == 3){\n status = true;\n }\n }\n\n if(status == true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n \n }",
"main",
"{\n \tScanner in = new Scanner(System.in);\n \n int n = in.nextInt();\n int ar[][] = new int[n][2];\n int temp = 0;\n boolean status = false;\n for(int i = 0 ; i < n ; i++){\n ar[i][0] = in.nextInt();\n ar[i][1] = in.nextInt();\n\n if(ar[i][0]==ar[i][1])\n temp++;\n else\n temp = 0;\n if(status == false && temp == 3){\n status = true;\n }\n }\n\n if(status == true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n \n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int ar[][] = new int[n][2];",
"ar",
"new int[n][2]",
"n",
"2",
"int temp = 0;",
"temp",
"0",
"boolean status = false;",
"status",
"false",
"for(int i = 0 ; i < n ; i++){\n ar[i][0] = in.nextInt();\n ar[i][1] = in.nextInt();\n\n if(ar[i][0]==ar[i][1])\n temp++;\n else\n temp = 0;\n if(status == false && temp == 3){\n status = true;\n }\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n ar[i][0] = in.nextInt();\n ar[i][1] = in.nextInt();\n\n if(ar[i][0]==ar[i][1])\n temp++;\n else\n temp = 0;\n if(status == false && temp == 3){\n status = true;\n }\n }",
"{\n ar[i][0] = in.nextInt();\n ar[i][1] = in.nextInt();\n\n if(ar[i][0]==ar[i][1])\n temp++;\n else\n temp = 0;\n if(status == false && temp == 3){\n status = true;\n }\n }",
"ar[i][0] = in.nextInt()",
"ar[i][0]",
"ar[i]",
"ar",
"i",
"0",
"in.nextInt()",
"in.nextInt",
"in",
"ar[i][1] = in.nextInt()",
"ar[i][1]",
"ar[i]",
"ar",
"i",
"1",
"in.nextInt()",
"in.nextInt",
"in",
"if(ar[i][0]==ar[i][1])\n temp++;\n else\n temp = 0;",
"ar[i][0]==ar[i][1]",
"ar[i][0]",
"ar[i]",
"ar",
"i",
"0",
"ar[i][1]",
"ar[i]",
"ar",
"i",
"1",
"temp++",
"temp",
"temp = 0",
"temp",
"0",
"if(status == false && temp == 3){\n status = true;\n }",
"status == false && temp == 3",
"status == false",
"status",
"false",
"temp == 3",
"temp",
"3",
"{\n status = true;\n }",
"status = true",
"status",
"true",
"if(status == true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");",
"status == true",
"status",
"true",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args"
]
| import java.util.*;
class Main{
public static void main(String args[]){
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int ar[][] = new int[n][2];
int temp = 0;
boolean status = false;
for(int i = 0 ; i < n ; i++){
ar[i][0] = in.nextInt();
ar[i][1] = in.nextInt();
if(ar[i][0]==ar[i][1])
temp++;
else
temp = 0;
if(status == false && temp == 3){
status = true;
}
}
if(status == true)
System.out.println("Yes");
else
System.out.println("No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
14,
2,
13,
13,
30,
0,
13,
17,
0,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
125,
5
],
[
125,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
55,
57
],
[
8,
58
],
[
58,
59
],
[
58,
60
],
[
8,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
66,
68
],
[
61,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
73,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
73,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
84,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
73,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
108,
115
],
[
8,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
6,
122
],
[
122,
123
],
[
0,
124
],
[
124,
125
],
[
124,
126
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint[] array1 = new int[n];\n\t\tint[] array2 = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray1[i] = sc.nextInt();\n\t\t\tarray2[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tboolean flag = false;\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint d1 = array1[i];\n\t\t\tint d2 = array2[i];\n\t\t\tif(d1==d2) {\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}\n\n\t\t\tif(ans==3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint[] array1 = new int[n];\n\t\tint[] array2 = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray1[i] = sc.nextInt();\n\t\t\tarray2[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tboolean flag = false;\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint d1 = array1[i];\n\t\t\tint d2 = array2[i];\n\t\t\tif(d1==d2) {\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}\n\n\t\t\tif(ans==3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint[] array1 = new int[n];\n\t\tint[] array2 = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray1[i] = sc.nextInt();\n\t\t\tarray2[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tboolean flag = false;\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint d1 = array1[i];\n\t\t\tint d2 = array2[i];\n\t\t\tif(d1==d2) {\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}\n\n\t\t\tif(ans==3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\n\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint[] array1 = new int[n];\n\t\tint[] array2 = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray1[i] = sc.nextInt();\n\t\t\tarray2[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tboolean flag = false;\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint d1 = array1[i];\n\t\t\tint d2 = array2[i];\n\t\t\tif(d1==d2) {\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}\n\n\t\t\tif(ans==3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] array1 = new int[n];",
"array1",
"new int[n]",
"n",
"int[] array2 = new int[n];",
"array2",
"new int[n]",
"n",
"for(int i=0;i<n;i++) {\n\t\t\tarray1[i] = sc.nextInt();\n\t\t\tarray2[i] = sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tarray1[i] = sc.nextInt();\n\t\t\tarray2[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\tarray1[i] = sc.nextInt();\n\t\t\tarray2[i] = sc.nextInt();\n\t\t}",
"array1[i] = sc.nextInt()",
"array1[i]",
"array1",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"array2[i] = sc.nextInt()",
"array2[i]",
"array2",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"boolean flag = false;",
"flag",
"false",
"int ans = 0;",
"ans",
"0",
"for(int i=0;i<n;i++) {\n\t\t\tint d1 = array1[i];\n\t\t\tint d2 = array2[i];\n\t\t\tif(d1==d2) {\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}\n\n\t\t\tif(ans==3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint d1 = array1[i];\n\t\t\tint d2 = array2[i];\n\t\t\tif(d1==d2) {\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}\n\n\t\t\tif(ans==3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d1 = array1[i];\n\t\t\tint d2 = array2[i];\n\t\t\tif(d1==d2) {\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}\n\n\t\t\tif(ans==3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"int d1 = array1[i];",
"d1",
"array1[i]",
"array1",
"i",
"int d2 = array2[i];",
"d2",
"array2[i]",
"array2",
"i",
"if(d1==d2) {\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}",
"d1==d2",
"d1",
"d2",
"{\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}",
"flag = true",
"flag",
"true",
"ans = ans + 1",
"ans",
"ans + 1",
"ans",
"1",
"{\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}",
"flag = false",
"flag",
"false",
"ans = 0",
"ans",
"0",
"if(ans==3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"ans==3",
"ans",
"3",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint[] array1 = new int[n];\n\t\tint[] array2 = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray1[i] = sc.nextInt();\n\t\t\tarray2[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tboolean flag = false;\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint d1 = array1[i];\n\t\t\tint d2 = array2[i];\n\t\t\tif(d1==d2) {\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}\n\n\t\t\tif(ans==3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint[] array1 = new int[n];\n\t\tint[] array2 = new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tarray1[i] = sc.nextInt();\n\t\t\tarray2[i] = sc.nextInt();\n\t\t}\n\t\tsc.close();\n\n\t\tboolean flag = false;\n\t\tint ans = 0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tint d1 = array1[i];\n\t\t\tint d2 = array2[i];\n\t\t\tif(d1==d2) {\n\t\t\t\tflag = true;\n\t\t\t\tans = ans + 1;\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t\tans = 0;\n\t\t\t}\n\n\t\t\tif(ans==3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\n\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] array1 = new int[n];
int[] array2 = new int[n];
for(int i=0;i<n;i++) {
array1[i] = sc.nextInt();
array2[i] = sc.nextInt();
}
sc.close();
boolean flag = false;
int ans = 0;
for(int i=0;i<n;i++) {
int d1 = array1[i];
int d2 = array2[i];
if(d1==d2) {
flag = true;
ans = ans + 1;
}else {
flag = false;
ans = 0;
}
if(ans==3) {
System.out.println("Yes");
return;
}
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
41,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
17,
4,
18,
13,
13,
28,
13,
13,
30,
30,
14,
4,
18,
18,
13,
17,
18,
13,
17,
30,
40,
13,
14,
2,
13,
17,
30,
3,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
100,
11
],
[
100,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
19,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
14,
24
],
[
24,
25
],
[
24,
26
],
[
14,
27
],
[
27,
28
],
[
14,
29
],
[
29,
30
],
[
29,
31
],
[
14,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
36,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
36,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
14,
52
],
[
52,
53
],
[
52,
54
],
[
52,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
57,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
57,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
14,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
79,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
12,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
]
| [
"import java.util.ArrayList;\nimport java.util.List;\nimport java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.nextLine();\n\t\tint count = 0;\n\t\tString str = \"\";\n\t\tString[] line;\n\t\tList<String[]> lineArray = new ArrayList() ;\n\t\t\n \twhile (sc.hasNextLine()) {\n \t\tstr = sc.nextLine();\n \t\tline = str.split(\" \");\n \t\tlineArray.add(line);\n }\n \t\n \tfor (String[] comLine : lineArray) {\n \t\tif (comLine[0].equals(comLine[1])) {\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} else {\n \t\t\tcount = 0;\n \t\t}\n \t}\n\n \tif (count == 3) {\n \t\tSystem.out.println(\"Yes\");\n \t} else {\n \t\tSystem.out.println(\"No\");\n \t}\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.nextLine();\n\t\tint count = 0;\n\t\tString str = \"\";\n\t\tString[] line;\n\t\tList<String[]> lineArray = new ArrayList() ;\n\t\t\n \twhile (sc.hasNextLine()) {\n \t\tstr = sc.nextLine();\n \t\tline = str.split(\" \");\n \t\tlineArray.add(line);\n }\n \t\n \tfor (String[] comLine : lineArray) {\n \t\tif (comLine[0].equals(comLine[1])) {\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} else {\n \t\t\tcount = 0;\n \t\t}\n \t}\n\n \tif (count == 3) {\n \t\tSystem.out.println(\"Yes\");\n \t} else {\n \t\tSystem.out.println(\"No\");\n \t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.nextLine();\n\t\tint count = 0;\n\t\tString str = \"\";\n\t\tString[] line;\n\t\tList<String[]> lineArray = new ArrayList() ;\n\t\t\n \twhile (sc.hasNextLine()) {\n \t\tstr = sc.nextLine();\n \t\tline = str.split(\" \");\n \t\tlineArray.add(line);\n }\n \t\n \tfor (String[] comLine : lineArray) {\n \t\tif (comLine[0].equals(comLine[1])) {\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} else {\n \t\t\tcount = 0;\n \t\t}\n \t}\n\n \tif (count == 3) {\n \t\tSystem.out.println(\"Yes\");\n \t} else {\n \t\tSystem.out.println(\"No\");\n \t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.nextLine();\n\t\tint count = 0;\n\t\tString str = \"\";\n\t\tString[] line;\n\t\tList<String[]> lineArray = new ArrayList() ;\n\t\t\n \twhile (sc.hasNextLine()) {\n \t\tstr = sc.nextLine();\n \t\tline = str.split(\" \");\n \t\tlineArray.add(line);\n }\n \t\n \tfor (String[] comLine : lineArray) {\n \t\tif (comLine[0].equals(comLine[1])) {\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} else {\n \t\t\tcount = 0;\n \t\t}\n \t}\n\n \tif (count == 3) {\n \t\tSystem.out.println(\"Yes\");\n \t} else {\n \t\tSystem.out.println(\"No\");\n \t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int count = 0;",
"count",
"0",
"String str = \"\";",
"str",
"\"\"",
"String[] line;",
"line",
"List<String[]> lineArray = new ArrayList() ;",
"lineArray",
"new ArrayList()",
"while (sc.hasNextLine()) {\n \t\tstr = sc.nextLine();\n \t\tline = str.split(\" \");\n \t\tlineArray.add(line);\n }",
"sc.hasNextLine()",
"sc.hasNextLine",
"sc",
"{\n \t\tstr = sc.nextLine();\n \t\tline = str.split(\" \");\n \t\tlineArray.add(line);\n }",
"str = sc.nextLine()",
"str",
"sc.nextLine()",
"sc.nextLine",
"sc",
"line = str.split(\" \")",
"line",
"str.split(\" \")",
"str.split",
"str",
"\" \"",
"lineArray.add(line)",
"lineArray.add",
"lineArray",
"line",
"for (String[] comLine : lineArray) {\n \t\tif (comLine[0].equals(comLine[1])) {\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} else {\n \t\t\tcount = 0;\n \t\t}\n \t}",
"String[] comLine",
"lineArray",
"{\n \t\tif (comLine[0].equals(comLine[1])) {\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} else {\n \t\t\tcount = 0;\n \t\t}\n \t}",
"{\n \t\tif (comLine[0].equals(comLine[1])) {\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} else {\n \t\t\tcount = 0;\n \t\t}\n \t}",
"if (comLine[0].equals(comLine[1])) {\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} else {\n \t\t\tcount = 0;\n \t\t}",
"comLine[0].equals(comLine[1])",
"comLine[0].equals",
"comLine[0]",
"comLine",
"0",
"comLine[1]",
"comLine",
"1",
"{\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}",
"count++",
"count",
"if (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}",
"count == 3",
"count",
"3",
"{\n \t\t\t\tbreak;\n \t\t\t}",
"break;",
"{\n \t\t\tcount = 0;\n \t\t}",
"count = 0",
"count",
"0",
"if (count == 3) {\n \t\tSystem.out.println(\"Yes\");\n \t} else {\n \t\tSystem.out.println(\"No\");\n \t}",
"count == 3",
"count",
"3",
"{\n \t\tSystem.out.println(\"Yes\");\n \t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n \t\tSystem.out.println(\"No\");\n \t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.nextLine();\n\t\tint count = 0;\n\t\tString str = \"\";\n\t\tString[] line;\n\t\tList<String[]> lineArray = new ArrayList() ;\n\t\t\n \twhile (sc.hasNextLine()) {\n \t\tstr = sc.nextLine();\n \t\tline = str.split(\" \");\n \t\tlineArray.add(line);\n }\n \t\n \tfor (String[] comLine : lineArray) {\n \t\tif (comLine[0].equals(comLine[1])) {\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} else {\n \t\t\tcount = 0;\n \t\t}\n \t}\n\n \tif (count == 3) {\n \t\tSystem.out.println(\"Yes\");\n \t} else {\n \t\tSystem.out.println(\"No\");\n \t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tsc.nextLine();\n\t\tint count = 0;\n\t\tString str = \"\";\n\t\tString[] line;\n\t\tList<String[]> lineArray = new ArrayList() ;\n\t\t\n \twhile (sc.hasNextLine()) {\n \t\tstr = sc.nextLine();\n \t\tline = str.split(\" \");\n \t\tlineArray.add(line);\n }\n \t\n \tfor (String[] comLine : lineArray) {\n \t\tif (comLine[0].equals(comLine[1])) {\n \t\t\tcount++;\n \t\t\tif (count == 3) {\n \t\t\t\tbreak;\n \t\t\t}\n \t\t} else {\n \t\t\tcount = 0;\n \t\t}\n \t}\n\n \tif (count == 3) {\n \t\tSystem.out.println(\"Yes\");\n \t} else {\n \t\tSystem.out.println(\"No\");\n \t}\n\t}\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
sc.nextLine();
int count = 0;
String str = "";
String[] line;
List<String[]> lineArray = new ArrayList() ;
while (sc.hasNextLine()) {
str = sc.nextLine();
line = str.split(" ");
lineArray.add(line);
}
for (String[] comLine : lineArray) {
if (comLine[0].equals(comLine[1])) {
count++;
if (count == 3) {
break;
}
} else {
count = 0;
}
}
if (count == 3) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
13,
13,
18,
13,
13,
2,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
2,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
30,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
25,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
55,
65
],
[
65,
66
],
[
66,
67
],
[
55,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
72,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
77,
79
],
[
72,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
83,
85
],
[
80,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
72,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
91,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
70,
102
],
[
102,
103
],
[
103,
104
],
[
8,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
110,
115
],
[
105,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
117,
122
],
[
6,
123
],
[
123,
124
]
]
| [
"import java.util.*;\n\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n int count = 0;\n for (int i = 0; i < n; i++) {\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n }\n for (int i = 0; i < n - 2; i++) {\n if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {\n count++;\n }\n }\n if (count > 0) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n int count = 0;\n for (int i = 0; i < n; i++) {\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n }\n for (int i = 0; i < n - 2; i++) {\n if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {\n count++;\n }\n }\n if (count > 0) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n int count = 0;\n for (int i = 0; i < n; i++) {\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n }\n for (int i = 0; i < n - 2; i++) {\n if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {\n count++;\n }\n }\n if (count > 0) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n int count = 0;\n for (int i = 0; i < n; i++) {\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n }\n for (int i = 0; i < n - 2; i++) {\n if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {\n count++;\n }\n }\n if (count > 0) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] d1 = new int[n];",
"d1",
"new int[n]",
"n",
"int[] d2 = new int[n];",
"d2",
"new int[n]",
"n",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n }",
"{\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n }",
"d1[i] = sc.nextInt()",
"d1[i]",
"d1",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d2[i] = sc.nextInt()",
"d2[i]",
"d2",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i = 0; i < n - 2; i++) {\n if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {\n count++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n - 2",
"i",
"n - 2",
"n",
"2",
"i++",
"i++",
"i",
"{\n if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {\n count++;\n }\n }",
"{\n if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {\n count++;\n }\n }",
"if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {\n count++;\n }",
"d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]",
"d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]",
"d1[i] == d2[i]",
"d1[i]",
"d1",
"i",
"d2[i]",
"d2",
"i",
"d1[i + 1] == d2[i + 1]",
"d1[i + 1]",
"d1",
"i + 1",
"i",
"1",
"d2[i + 1]",
"d2",
"i + 1",
"i",
"1",
"d1[i + 2] == d2[i + 2]",
"d1[i + 2]",
"d1",
"i + 2",
"i",
"2",
"d2[i + 2]",
"d2",
"i + 2",
"i",
"2",
"{\n count++;\n }",
"count++",
"count",
"if (count > 0) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"count > 0",
"count",
"0",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args"
]
| import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[] d1 = new int[n];
int[] d2 = new int[n];
int count = 0;
for (int i = 0; i < n; i++) {
d1[i] = sc.nextInt();
d2[i] = sc.nextInt();
}
for (int i = 0; i < n - 2; i++) {
if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {
count++;
}
}
if (count > 0) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
2,
13,
13,
41,
13,
4,
18,
4,
18,
13,
17,
0,
13,
2,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
17,
1,
0,
13,
17,
30,
30,
14,
2,
2,
2,
4,
18,
13,
13,
4,
18,
13,
2,
13,
17,
2,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
2,
4,
18,
13,
2,
13,
17,
4,
18,
13,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
143,
11
],
[
143,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
14,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
41,
46
],
[
38,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
38,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
54,
59
],
[
38,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
14,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
72,
76
],
[
65,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
65,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
86,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
94,
96
],
[
85,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
101,
102
],
[
101,
103
],
[
97,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
107,
108
],
[
107,
109
],
[
85,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
114,
116
],
[
110,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
120,
121
],
[
120,
122
],
[
83,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
123,
130
],
[
130,
131
],
[
131,
132
],
[
130,
133
],
[
14,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
12,
140
],
[
140,
141
],
[
0,
142
],
[
142,
143
],
[
142,
144
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\nimport java.util.Vector;\n \npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner ob=new Scanner(System.in);\n\t\tint n=ob.nextInt();\n\t\tString s=\"\";\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tchar c1=ob.next().charAt(0);\n\t\t\ts=s+c1;\n\t\t\tchar c2=ob.next().charAt(0);\n\t\t\ts=s+c2;\n\t\t}\n\t\tfor(int i=0;i<=s.length()-6;i+=2)\n\t\t{\n\t\tif((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))\n\t\t{System.out.println(\"Yes\");System.exit(0);}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Vector;",
"Vector",
"java.util",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner ob=new Scanner(System.in);\n\t\tint n=ob.nextInt();\n\t\tString s=\"\";\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tchar c1=ob.next().charAt(0);\n\t\t\ts=s+c1;\n\t\t\tchar c2=ob.next().charAt(0);\n\t\t\ts=s+c2;\n\t\t}\n\t\tfor(int i=0;i<=s.length()-6;i+=2)\n\t\t{\n\t\tif((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))\n\t\t{System.out.println(\"Yes\");System.exit(0);}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner ob=new Scanner(System.in);\n\t\tint n=ob.nextInt();\n\t\tString s=\"\";\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tchar c1=ob.next().charAt(0);\n\t\t\ts=s+c1;\n\t\t\tchar c2=ob.next().charAt(0);\n\t\t\ts=s+c2;\n\t\t}\n\t\tfor(int i=0;i<=s.length()-6;i+=2)\n\t\t{\n\t\tif((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))\n\t\t{System.out.println(\"Yes\");System.exit(0);}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\tScanner ob=new Scanner(System.in);\n\t\tint n=ob.nextInt();\n\t\tString s=\"\";\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tchar c1=ob.next().charAt(0);\n\t\t\ts=s+c1;\n\t\t\tchar c2=ob.next().charAt(0);\n\t\t\ts=s+c2;\n\t\t}\n\t\tfor(int i=0;i<=s.length()-6;i+=2)\n\t\t{\n\t\tif((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))\n\t\t{System.out.println(\"Yes\");System.exit(0);}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"Scanner ob=new Scanner(System.in);",
"ob",
"new Scanner(System.in)",
"int n=ob.nextInt();",
"n",
"ob.nextInt()",
"ob.nextInt",
"ob",
"String s=\"\";",
"s",
"\"\"",
"for (int i=0; i<n; i++) {\n\t\t\tchar c1=ob.next().charAt(0);\n\t\t\ts=s+c1;\n\t\t\tchar c2=ob.next().charAt(0);\n\t\t\ts=s+c2;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tchar c1=ob.next().charAt(0);\n\t\t\ts=s+c1;\n\t\t\tchar c2=ob.next().charAt(0);\n\t\t\ts=s+c2;\n\t\t}",
"{\n\t\t\tchar c1=ob.next().charAt(0);\n\t\t\ts=s+c1;\n\t\t\tchar c2=ob.next().charAt(0);\n\t\t\ts=s+c2;\n\t\t}",
"char c1=ob.next().charAt(0);",
"c1",
"ob.next().charAt(0)",
"ob.next().charAt",
"ob.next()",
"ob.next",
"ob",
"0",
"s=s+c1",
"s",
"s+c1",
"s",
"c1",
"char c2=ob.next().charAt(0);",
"c2",
"ob.next().charAt(0)",
"ob.next().charAt",
"ob.next()",
"ob.next",
"ob",
"0",
"s=s+c2",
"s",
"s+c2",
"s",
"c2",
"for(int i=0;i<=s.length()-6;i+=2)\n\t\t{\n\t\tif((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))\n\t\t{System.out.println(\"Yes\");System.exit(0);}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=s.length()-6",
"i",
"s.length()-6",
"s.length()",
"s.length",
"s",
"6",
"i+=2",
"i+=2",
"i",
"2",
"{\n\t\tif((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))\n\t\t{System.out.println(\"Yes\");System.exit(0);}\n\t\t}",
"{\n\t\tif((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))\n\t\t{System.out.println(\"Yes\");System.exit(0);}\n\t\t}",
"if((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))\n\t\t{System.out.println(\"Yes\");System.exit(0);}",
"(s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5))",
"(s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5))",
"(s.charAt(i)==s.charAt(i+1))",
"s.charAt(i)",
"s.charAt",
"s",
"i",
"s.charAt(i+1)",
"s.charAt",
"s",
"i+1",
"i",
"1",
"(s.charAt(i+2)==s.charAt(i+3))",
"s.charAt(i+2)",
"s.charAt",
"s",
"i+2",
"i",
"2",
"s.charAt(i+3)",
"s.charAt",
"s",
"i+3",
"i",
"3",
"(s.charAt(i+4)==s.charAt(i+5))",
"s.charAt(i+4)",
"s.charAt",
"s",
"i+4",
"i",
"4",
"s.charAt(i+5)",
"s.charAt",
"s",
"i+5",
"i",
"5",
"{System.out.println(\"Yes\");System.exit(0);}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.exit(0)",
"System.exit",
"System",
"0",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner ob=new Scanner(System.in);\n\t\tint n=ob.nextInt();\n\t\tString s=\"\";\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tchar c1=ob.next().charAt(0);\n\t\t\ts=s+c1;\n\t\t\tchar c2=ob.next().charAt(0);\n\t\t\ts=s+c2;\n\t\t}\n\t\tfor(int i=0;i<=s.length()-6;i+=2)\n\t\t{\n\t\tif((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))\n\t\t{System.out.println(\"Yes\");System.exit(0);}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner ob=new Scanner(System.in);\n\t\tint n=ob.nextInt();\n\t\tString s=\"\";\n\t\tfor (int i=0; i<n; i++) {\n\t\t\tchar c1=ob.next().charAt(0);\n\t\t\ts=s+c1;\n\t\t\tchar c2=ob.next().charAt(0);\n\t\t\ts=s+c2;\n\t\t}\n\t\tfor(int i=0;i<=s.length()-6;i+=2)\n\t\t{\n\t\tif((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))\n\t\t{System.out.println(\"Yes\");System.exit(0);}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main"
]
| import java.util.Arrays;
import java.util.Scanner;
import java.util.Vector;
public class Main {
public static void main(String[] args) {
Scanner ob=new Scanner(System.in);
int n=ob.nextInt();
String s="";
for (int i=0; i<n; i++) {
char c1=ob.next().charAt(0);
s=s+c1;
char c2=ob.next().charAt(0);
s=s+c2;
}
for(int i=0;i<=s.length()-6;i+=2)
{
if((s.charAt(i)==s.charAt(i+1))&&(s.charAt(i+2)==s.charAt(i+3))&&(s.charAt(i+4)==s.charAt(i+5)))
{System.out.println("Yes");System.exit(0);}
}
System.out.println("No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
43,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
32,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
58,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int c = 0;\n \n for(int i = 0;i < n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n \n if(d1 == d2){\n c++;\n }else{\n c = 0;\n }\n \n if(c >= 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n \n \n System.out.println(\"No\");\n \n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int c = 0;\n \n for(int i = 0;i < n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n \n if(d1 == d2){\n c++;\n }else{\n c = 0;\n }\n \n if(c >= 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n \n \n System.out.println(\"No\");\n \n \n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int c = 0;\n \n for(int i = 0;i < n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n \n if(d1 == d2){\n c++;\n }else{\n c = 0;\n }\n \n if(c >= 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n \n \n System.out.println(\"No\");\n \n \n }",
"main",
"{\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int c = 0;\n \n for(int i = 0;i < n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n \n if(d1 == d2){\n c++;\n }else{\n c = 0;\n }\n \n if(c >= 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n \n \n System.out.println(\"No\");\n \n \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = 0;",
"c",
"0",
"for(int i = 0;i < n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n \n if(d1 == d2){\n c++;\n }else{\n c = 0;\n }\n \n if(c >= 3){\n System.out.println(\"Yes\");\n return;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n \n if(d1 == d2){\n c++;\n }else{\n c = 0;\n }\n \n if(c >= 3){\n System.out.println(\"Yes\");\n return;\n }\n }",
"{\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n \n if(d1 == d2){\n c++;\n }else{\n c = 0;\n }\n \n if(c >= 3){\n System.out.println(\"Yes\");\n return;\n }\n }",
"int d1 = sc.nextInt();",
"d1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d2 = sc.nextInt();",
"d2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(d1 == d2){\n c++;\n }else{\n c = 0;\n }",
"d1 == d2",
"d1",
"d2",
"{\n c++;\n }",
"c++",
"c",
"{\n c = 0;\n }",
"c = 0",
"c",
"0",
"if(c >= 3){\n System.out.println(\"Yes\");\n return;\n }",
"c >= 3",
"c",
"3",
"{\n System.out.println(\"Yes\");\n return;\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int c = 0;\n \n for(int i = 0;i < n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n \n if(d1 == d2){\n c++;\n }else{\n c = 0;\n }\n \n if(c >= 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n \n \n System.out.println(\"No\");\n \n \n }\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int c = 0;\n \n for(int i = 0;i < n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n \n if(d1 == d2){\n c++;\n }else{\n c = 0;\n }\n \n if(c >= 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n \n \n System.out.println(\"No\");\n \n \n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) throws Exception {
// Your code here!
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int c = 0;
for(int i = 0;i < n;i++){
int d1 = sc.nextInt();
int d2 = sc.nextInt();
if(d1 == d2){
c++;
}else{
c = 0;
}
if(c >= 3){
System.out.println("Yes");
return;
}
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
4,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
14,
4,
18,
13,
17,
30,
0,
13,
2,
13,
17,
30,
0,
13,
2,
13,
17,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
13,
13,
30,
14,
2,
18,
13,
17,
17,
30,
0,
18,
13,
17,
17,
30,
14,
2,
18,
13,
17,
17,
30,
0,
18,
13,
17,
17,
30,
14,
2,
18,
13,
17,
17,
30,
0,
18,
13,
17,
17,
0,
13,
17,
30,
30,
0,
13,
20,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
163,
5
],
[
163,
6
],
[
6,
7
],
[
163,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
163,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
17,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
25,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
25,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
39,
41
],
[
17,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
163,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
50,
56
],
[
56,
57
],
[
56,
58
],
[
50,
59
],
[
59,
60
],
[
59,
61
],
[
50,
62
],
[
62,
63
],
[
50,
64
],
[
64,
65
],
[
50,
66
],
[
66,
67
],
[
50,
68
],
[
68,
69
],
[
50,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
70,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
82,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
82,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
98,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
98,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
111,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
111,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
124,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
130,
136
],
[
136,
137
],
[
136,
138
],
[
124,
139
],
[
93,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
50,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
144,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
149,
154
],
[
144,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
156,
161
],
[
0,
162
],
[
162,
163
],
[
162,
164
]
]
| [
"import java.util.Scanner;\npublic class Main{\n\tstatic private Scanner scanner;\n\tstatic{\n\t\tscanner = new Scanner(System.in);\n\t}\n\tstatic public void main(String[] args){\n\t\tm2();\n\t}\n\tstatic public void m1(){\n\t\tString s = scanner.next();\n\t \tString result;\n\t\tif(s.endsWith(\"s\")){\n\t\t\tresult = s + \"es\";\n\t\t}else{\n\t\t\tresult = s + \"s\";\n\t\t}\n\t\tSystem.out.println(result);\n\n\t}\n\tstatic public void m2(){\n\t\tint n = scanner.nextInt();\n\t\tboolean result = false;\n\t\tboolean[] ba = new boolean[]{false,false,false};\n\t\tString s;\n\t\tString[] sa;\n\t\tint d1;\n\t\tint d2;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t//s = scanner.next();\n\t\t\t//sa = s.split(\" \");\n\t\t\td1 = scanner.nextInt();//Integer.parseInt(sa[0]);\n\t\t\td2 = scanner.nextInt();//Integer.parseInt(sa[1]);\n\t\t\tif( d1 == d2 ){\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}\n\n\t\t}\n\t\tif(result == true){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tstatic private Scanner scanner;\n\tstatic{\n\t\tscanner = new Scanner(System.in);\n\t}\n\tstatic public void main(String[] args){\n\t\tm2();\n\t}\n\tstatic public void m1(){\n\t\tString s = scanner.next();\n\t \tString result;\n\t\tif(s.endsWith(\"s\")){\n\t\t\tresult = s + \"es\";\n\t\t}else{\n\t\t\tresult = s + \"s\";\n\t\t}\n\t\tSystem.out.println(result);\n\n\t}\n\tstatic public void m2(){\n\t\tint n = scanner.nextInt();\n\t\tboolean result = false;\n\t\tboolean[] ba = new boolean[]{false,false,false};\n\t\tString s;\n\t\tString[] sa;\n\t\tint d1;\n\t\tint d2;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t//s = scanner.next();\n\t\t\t//sa = s.split(\" \");\n\t\t\td1 = scanner.nextInt();//Integer.parseInt(sa[0]);\n\t\t\td2 = scanner.nextInt();//Integer.parseInt(sa[1]);\n\t\t\tif( d1 == d2 ){\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}\n\n\t\t}\n\t\tif(result == true){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}\n}",
"Main",
"static private Scanner scanner;",
"scanner",
"static public void main(String[] args){\n\t\tm2();\n\t}",
"main",
"{\n\t\tm2();\n\t}",
"m2()",
"m2",
"String[] args",
"args",
"static public void m1(){\n\t\tString s = scanner.next();\n\t \tString result;\n\t\tif(s.endsWith(\"s\")){\n\t\t\tresult = s + \"es\";\n\t\t}else{\n\t\t\tresult = s + \"s\";\n\t\t}\n\t\tSystem.out.println(result);\n\n\t}",
"m1",
"{\n\t\tString s = scanner.next();\n\t \tString result;\n\t\tif(s.endsWith(\"s\")){\n\t\t\tresult = s + \"es\";\n\t\t}else{\n\t\t\tresult = s + \"s\";\n\t\t}\n\t\tSystem.out.println(result);\n\n\t}",
"String s = scanner.next();",
"s",
"scanner.next()",
"scanner.next",
"scanner",
"String result;",
"result",
"if(s.endsWith(\"s\")){\n\t\t\tresult = s + \"es\";\n\t\t}else{\n\t\t\tresult = s + \"s\";\n\t\t}",
"s.endsWith(\"s\")",
"s.endsWith",
"s",
"\"s\"",
"{\n\t\t\tresult = s + \"es\";\n\t\t}",
"result = s + \"es\"",
"result",
"s + \"es\"",
"s",
"\"es\"",
"{\n\t\t\tresult = s + \"s\";\n\t\t}",
"result = s + \"s\"",
"result",
"s + \"s\"",
"s",
"\"s\"",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"static public void m2(){\n\t\tint n = scanner.nextInt();\n\t\tboolean result = false;\n\t\tboolean[] ba = new boolean[]{false,false,false};\n\t\tString s;\n\t\tString[] sa;\n\t\tint d1;\n\t\tint d2;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t//s = scanner.next();\n\t\t\t//sa = s.split(\" \");\n\t\t\td1 = scanner.nextInt();//Integer.parseInt(sa[0]);\n\t\t\td2 = scanner.nextInt();//Integer.parseInt(sa[1]);\n\t\t\tif( d1 == d2 ){\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}\n\n\t\t}\n\t\tif(result == true){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}",
"m2",
"{\n\t\tint n = scanner.nextInt();\n\t\tboolean result = false;\n\t\tboolean[] ba = new boolean[]{false,false,false};\n\t\tString s;\n\t\tString[] sa;\n\t\tint d1;\n\t\tint d2;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t//s = scanner.next();\n\t\t\t//sa = s.split(\" \");\n\t\t\td1 = scanner.nextInt();//Integer.parseInt(sa[0]);\n\t\t\td2 = scanner.nextInt();//Integer.parseInt(sa[1]);\n\t\t\tif( d1 == d2 ){\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}\n\n\t\t}\n\t\tif(result == true){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"boolean result = false;",
"result",
"false",
"boolean[] ba = new boolean[]{false,false,false};",
"ba",
"new boolean[]{false,false,false}",
"String s;",
"s",
"String[] sa;",
"sa",
"int d1;",
"d1",
"int d2;",
"d2",
"for(int i = 0; i < n; i++){\n\t\t\t//s = scanner.next();\n\t\t\t//sa = s.split(\" \");\n\t\t\td1 = scanner.nextInt();//Integer.parseInt(sa[0]);\n\t\t\td2 = scanner.nextInt();//Integer.parseInt(sa[1]);\n\t\t\tif( d1 == d2 ){\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t//s = scanner.next();\n\t\t\t//sa = s.split(\" \");\n\t\t\td1 = scanner.nextInt();//Integer.parseInt(sa[0]);\n\t\t\td2 = scanner.nextInt();//Integer.parseInt(sa[1]);\n\t\t\tif( d1 == d2 ){\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}\n\n\t\t}",
"{\n\t\t\t//s = scanner.next();\n\t\t\t//sa = s.split(\" \");\n\t\t\td1 = scanner.nextInt();//Integer.parseInt(sa[0]);\n\t\t\td2 = scanner.nextInt();//Integer.parseInt(sa[1]);\n\t\t\tif( d1 == d2 ){\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}\n\n\t\t}",
"d1 = scanner.nextInt()",
"d1",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"d2 = scanner.nextInt()",
"d2",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if( d1 == d2 ){\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}",
"d1 == d2",
"d1",
"d2",
"{\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"if( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"ba[0] == false",
"ba[0]",
"ba",
"0",
"false",
"{\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}",
"ba[0] = true",
"ba[0]",
"ba",
"0",
"true",
"{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}",
"if( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"ba[1] == false",
"ba[1]",
"ba",
"1",
"false",
"{\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}",
"ba[1] = true",
"ba[1]",
"ba",
"1",
"true",
"{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"if( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}",
"ba[2] == false",
"ba[2]",
"ba",
"2",
"false",
"{\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}",
"ba[2] = true",
"ba[2]",
"ba",
"2",
"true",
"result = true",
"result",
"true",
"{\n\t\t\t\t\t\t}",
"{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}",
"ba = new boolean[]{false,false,false}",
"ba",
"new boolean[]{false,false,false}",
"if(result == true){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"result == true",
"result",
"true",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"public class Main{\n\tstatic private Scanner scanner;\n\tstatic{\n\t\tscanner = new Scanner(System.in);\n\t}\n\tstatic public void main(String[] args){\n\t\tm2();\n\t}\n\tstatic public void m1(){\n\t\tString s = scanner.next();\n\t \tString result;\n\t\tif(s.endsWith(\"s\")){\n\t\t\tresult = s + \"es\";\n\t\t}else{\n\t\t\tresult = s + \"s\";\n\t\t}\n\t\tSystem.out.println(result);\n\n\t}\n\tstatic public void m2(){\n\t\tint n = scanner.nextInt();\n\t\tboolean result = false;\n\t\tboolean[] ba = new boolean[]{false,false,false};\n\t\tString s;\n\t\tString[] sa;\n\t\tint d1;\n\t\tint d2;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t//s = scanner.next();\n\t\t\t//sa = s.split(\" \");\n\t\t\td1 = scanner.nextInt();//Integer.parseInt(sa[0]);\n\t\t\td2 = scanner.nextInt();//Integer.parseInt(sa[1]);\n\t\t\tif( d1 == d2 ){\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}\n\n\t\t}\n\t\tif(result == true){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}\n}",
"public class Main{\n\tstatic private Scanner scanner;\n\tstatic{\n\t\tscanner = new Scanner(System.in);\n\t}\n\tstatic public void main(String[] args){\n\t\tm2();\n\t}\n\tstatic public void m1(){\n\t\tString s = scanner.next();\n\t \tString result;\n\t\tif(s.endsWith(\"s\")){\n\t\t\tresult = s + \"es\";\n\t\t}else{\n\t\t\tresult = s + \"s\";\n\t\t}\n\t\tSystem.out.println(result);\n\n\t}\n\tstatic public void m2(){\n\t\tint n = scanner.nextInt();\n\t\tboolean result = false;\n\t\tboolean[] ba = new boolean[]{false,false,false};\n\t\tString s;\n\t\tString[] sa;\n\t\tint d1;\n\t\tint d2;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\t//s = scanner.next();\n\t\t\t//sa = s.split(\" \");\n\t\t\td1 = scanner.nextInt();//Integer.parseInt(sa[0]);\n\t\t\td2 = scanner.nextInt();//Integer.parseInt(sa[1]);\n\t\t\tif( d1 == d2 ){\n\t\t\t\tif( ba[0] == false ){\n\t\t\t\t\tba[0] = true;\n\t\t\t\t}else{\n\t\t\t\t\tif( ba[1] == false ){\n\t\t\t\t\t\tba[1] = true;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif( ba[2] == false ){\n\t\t\t\t\t\t\tba[2] = true;\n\t\t\t\t\t\t\tresult = true;\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tba = new boolean[]{false,false,false};\n\t\t\t}\n\n\t\t}\n\t\tif(result == true){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main{
static private Scanner scanner;
static{
scanner = new Scanner(System.in);
}
static public void main(String[] args){
m2();
}
static public void m1(){
String s = scanner.next();
String result;
if(s.endsWith("s")){
result = s + "es";
}else{
result = s + "s";
}
System.out.println(result);
}
static public void m2(){
int n = scanner.nextInt();
boolean result = false;
boolean[] ba = new boolean[]{false,false,false};
String s;
String[] sa;
int d1;
int d2;
for(int i = 0; i < n; i++){
//s = scanner.next();
//sa = s.split(" ");
d1 = scanner.nextInt();//Integer.parseInt(sa[0]);
d2 = scanner.nextInt();//Integer.parseInt(sa[1]);
if( d1 == d2 ){
if( ba[0] == false ){
ba[0] = true;
}else{
if( ba[1] == false ){
ba[1] = true;
}else{
if( ba[2] == false ){
ba[2] = true;
result = true;
}else{
}
}
}
}else{
ba = new boolean[]{false,false,false};
}
}
if(result == true){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
30,
0,
13,
17,
4,
18,
18,
13,
13,
17,
12,
13,
30,
20,
23,
13,
6,
13,
41,
13,
18,
13,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
14,
2,
13,
13,
30,
29,
17,
30,
0,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
30,
29,
17,
29,
17,
12,
13,
30,
14,
4,
13,
29,
18,
13,
40,
13,
29,
40,
17,
12,
13,
30,
29,
2,
2,
17,
13,
2,
13,
17,
23,
13,
12,
13,
30,
42,
2,
4,
13,
40,
4,
13,
18,
13,
13,
40,
13,
29,
4,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
14,
40,
4,
13,
37,
20,
41,
13,
17,
41,
13,
17,
41,
13,
4,
13,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
14,
2,
2,
13,
17,
2,
17,
13,
30,
37,
20,
42,
17,
30,
14,
2,
2,
17,
13,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
14,
2,
2,
13,
40,
17,
40,
4,
13,
13,
30,
29,
8,
13,
40,
13,
13,
30,
37,
20,
0,
13,
4,
13,
12,
13,
30,
41,
13,
4,
13,
14,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
37,
20,
29,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
335,
11
],
[
335,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
14,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
31,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
60,
67
],
[
49,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
14,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
335,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
78,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
84,
91
],
[
91,
92
],
[
91,
93
],
[
84,
95
],
[
95,
96
],
[
95,
97
],
[
84,
98
],
[
98,
99
],
[
98,
100
],
[
84,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
109,
110
],
[
104,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
115,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
111,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
133,
134
],
[
134,
135
],
[
103,
136
],
[
136,
137
],
[
84,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
141,
149
],
[
149,
150
],
[
150,
151
],
[
84,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
156,
160
],
[
160,
161
],
[
160,
162
],
[
152,
163
],
[
163,
164
],
[
84,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
169,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
175,
177
],
[
168,
178
],
[
178,
179
],
[
167,
180
],
[
180,
181
],
[
181,
182
],
[
84,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
186,
190
],
[
190,
191
],
[
185,
192
],
[
192,
193
],
[
192,
194
],
[
185,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
185,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
199,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
204,
207
],
[
203,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
185,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
84,
216
],
[
216,
217
],
[
216,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
221,
222
],
[
219,
223
],
[
223,
224
],
[
218,
225
],
[
225,
226
],
[
225,
227
],
[
218,
228
],
[
228,
229
],
[
228,
230
],
[
218,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
218,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
235,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
239,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
218,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
249,
251
],
[
248,
252
],
[
252,
253
],
[
252,
254
],
[
247,
255
],
[
255,
256
],
[
256,
257
],
[
218,
258
],
[
258,
259
],
[
258,
260
],
[
260,
261
],
[
261,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
262,
266
],
[
266,
267
],
[
266,
268
],
[
261,
269
],
[
269,
270
],
[
270,
271
],
[
270,
272
],
[
269,
273
],
[
273,
274
],
[
273,
275
],
[
275,
276
],
[
275,
277
],
[
261,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
279,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
278,
288
],
[
288,
289
],
[
289,
290
],
[
290,
291
],
[
290,
292
],
[
292,
293
],
[
290,
294
],
[
278,
295
],
[
295,
296
],
[
296,
297
],
[
260,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
84,
302
],
[
302,
303
],
[
302,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
304,
309
],
[
309,
310
],
[
310,
311
],
[
311,
312
],
[
311,
313
],
[
313,
314
],
[
313,
315
],
[
310,
316
],
[
316,
317
],
[
316,
318
],
[
318,
319
],
[
318,
320
],
[
309,
321
],
[
321,
322
],
[
304,
323
],
[
323,
324
],
[
84,
325
],
[
325,
326
],
[
325,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
330,
331
],
[
329,
332
],
[
332,
333
],
[
0,
334
],
[
334,
335
],
[
334,
336
]
]
| [
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.util.*;\n\npublic class Main {\n\t\n\tpublic Main() {\n\t\tFastScanner scanner = new FastScanner();\n\t\tint N = scanner.nextInt();\n\t\t\n\t\tint Z = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scanner.nextInt();\n\t\t\tint D2 = scanner.nextInt();\n\t\t\t\n\t\t\tif (D1 == D2) {\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tZ = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"No\");\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n}\n\nclass FastScanner {\n\tprivate final InputStream in = System.in;\n\tprivate final byte[] buffer = new byte[1024];\n\tprivate int ptr = 0;\n\tprivate int buflen = 0;\n\t\n\tprivate boolean hasNextByte() {\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tprivate int readByte() {\n\t\tif (hasNextByte()) return buffer[ptr++];\n\t\telse return -1;\n\t}\n\t\n\tprivate static boolean isPrintableChar(int c) {\n\t\treturn 33 <= c && c <= 126;\n\t}\n\t\n\tpublic boolean hasNext() {\n\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t\treturn hasNextByte();\n\t}\n\t\n\tpublic String next() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile (isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\t\n\tpublic long nextLong() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tlong n = 0;\n\t\tboolean minus = false;\n\t\tint b = readByte();\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\tif (b < '0' || '9' < b) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile (true) {\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\treturn minus ? -n : n;\n\t\t\t} else {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\t\n\tpublic int nextInt() {\n\t\tlong nl = nextLong();\n\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) nl;\n\t}\n\t\n\tpublic double nextDouble() {\n\t\treturn Double.parseDouble(next());\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\t\n\tpublic Main() {\n\t\tFastScanner scanner = new FastScanner();\n\t\tint N = scanner.nextInt();\n\t\t\n\t\tint Z = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scanner.nextInt();\n\t\t\tint D2 = scanner.nextInt();\n\t\t\t\n\t\t\tif (D1 == D2) {\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tZ = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"No\");\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n}",
"Main",
"public Main() {\n\t\tFastScanner scanner = new FastScanner();\n\t\tint N = scanner.nextInt();\n\t\t\n\t\tint Z = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scanner.nextInt();\n\t\t\tint D2 = scanner.nextInt();\n\t\t\t\n\t\t\tif (D1 == D2) {\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tZ = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"No\");\n\t}",
"Main",
"{\n\t\tFastScanner scanner = new FastScanner();\n\t\tint N = scanner.nextInt();\n\t\t\n\t\tint Z = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scanner.nextInt();\n\t\t\tint D2 = scanner.nextInt();\n\t\t\t\n\t\t\tif (D1 == D2) {\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tZ = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"No\");\n\t}",
"FastScanner scanner = new FastScanner();",
"scanner",
"new FastScanner()",
"int N = scanner.nextInt();",
"N",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int Z = 0;",
"Z",
"0",
"for (int i = 0; i < N; i++) {\n\t\t\tint D1 = scanner.nextInt();\n\t\t\tint D2 = scanner.nextInt();\n\t\t\t\n\t\t\tif (D1 == D2) {\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tZ = 0;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tint D1 = scanner.nextInt();\n\t\t\tint D2 = scanner.nextInt();\n\t\t\t\n\t\t\tif (D1 == D2) {\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tZ = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint D1 = scanner.nextInt();\n\t\t\tint D2 = scanner.nextInt();\n\t\t\t\n\t\t\tif (D1 == D2) {\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tZ = 0;\n\t\t\t}\n\t\t}",
"int D1 = scanner.nextInt();",
"D1",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int D2 = scanner.nextInt();",
"D2",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if (D1 == D2) {\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tZ = 0;\n\t\t\t}",
"D1 == D2",
"D1",
"D2",
"{\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}",
"Z++",
"Z",
"if (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"Z == 3",
"Z",
"3",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"{\n\t\t\t\tZ = 0;\n\t\t\t}",
"Z = 0",
"Z",
"0",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"public static void main(String[] args) {\n\t\tnew Main();\n\t}",
"main",
"{\n\t\tnew Main();\n\t}",
"new Main()",
"String[] args",
"args",
"class FastScanner {\n\tprivate final InputStream in = System.in;\n\tprivate final byte[] buffer = new byte[1024];\n\tprivate int ptr = 0;\n\tprivate int buflen = 0;\n\t\n\tprivate boolean hasNextByte() {\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\t\n\tprivate int readByte() {\n\t\tif (hasNextByte()) return buffer[ptr++];\n\t\telse return -1;\n\t}\n\t\n\tprivate static boolean isPrintableChar(int c) {\n\t\treturn 33 <= c && c <= 126;\n\t}\n\t\n\tpublic boolean hasNext() {\n\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t\treturn hasNextByte();\n\t}\n\t\n\tpublic String next() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile (isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\t\n\tpublic long nextLong() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tlong n = 0;\n\t\tboolean minus = false;\n\t\tint b = readByte();\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\tif (b < '0' || '9' < b) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile (true) {\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\treturn minus ? -n : n;\n\t\t\t} else {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\t\n\tpublic int nextInt() {\n\t\tlong nl = nextLong();\n\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) nl;\n\t}\n\t\n\tpublic double nextDouble() {\n\t\treturn Double.parseDouble(next());\n\t}\n}",
"FastScanner",
"private final InputStream in = System.in;",
"in",
"System.in",
"System",
"System.in",
"private final byte[] buffer = new byte[1024];",
"buffer",
"new byte[1024]",
"1024",
"private int ptr = 0;",
"ptr",
"0",
"private int buflen = 0;",
"buflen",
"0",
"private boolean hasNextByte() {\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"hasNextByte",
"{\n\t\tif (ptr < buflen) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"if (ptr < buflen) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"ptr < buflen",
"ptr",
"buflen",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"{\n\t\t\tptr = 0;\n\t\t\ttry {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"ptr = 0",
"ptr",
"0",
"try {\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"IOException e",
"{\n\t\t\t\te.printStackTrace();\n\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\tbuflen = in.read(buffer);\n\t\t\t}",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"buflen <= 0",
"buflen",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"private int readByte() {\n\t\tif (hasNextByte()) return buffer[ptr++];\n\t\telse return -1;\n\t}",
"readByte",
"{\n\t\tif (hasNextByte()) return buffer[ptr++];\n\t\telse return -1;\n\t}",
"if (hasNextByte()) return buffer[ptr++];\n\t\telse return -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) {\n\t\treturn 33 <= c && c <= 126;\n\t}",
"isPrintableChar",
"{\n\t\treturn 33 <= c && c <= 126;\n\t}",
"return 33 <= c && c <= 126;",
"33 <= c && c <= 126",
"33 <= c",
"33",
"c",
"c <= 126",
"c",
"126",
"int c",
"c",
"public boolean hasNext() {\n\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t\treturn hasNextByte();\n\t}",
"hasNext",
"{\n\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;\n\t\treturn hasNextByte();\n\t}",
"while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;",
"hasNextByte() && !isPrintableChar(buffer[ptr])",
"hasNextByte()",
"hasNextByte",
"!isPrintableChar(buffer[ptr])",
"isPrintableChar(buffer[ptr])",
"isPrintableChar",
"buffer[ptr]",
"buffer",
"ptr",
"ptr++",
"ptr",
"return hasNextByte();",
"hasNextByte()",
"hasNextByte",
"public String next() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile (isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}",
"next",
"{\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint b = readByte();\n\t\twhile (isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"while (isPrintableChar(b)) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public long nextLong() {\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tlong n = 0;\n\t\tboolean minus = false;\n\t\tint b = readByte();\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\tif (b < '0' || '9' < b) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile (true) {\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\treturn minus ? -n : n;\n\t\t\t} else {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}",
"nextLong",
"{\n\t\tif (!hasNext()) throw new NoSuchElementException();\n\t\tlong n = 0;\n\t\tboolean minus = false;\n\t\tint b = readByte();\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\tif (b < '0' || '9' < b) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile (true) {\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\treturn minus ? -n : n;\n\t\t\t} else {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}",
"if (!hasNext()) throw new NoSuchElementException();",
"!hasNext()",
"hasNext()",
"hasNext",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"long n = 0;",
"n",
"0",
"boolean minus = false;",
"minus",
"false",
"int b = readByte();",
"b",
"readByte()",
"readByte",
"if (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}",
"b == '-'",
"b",
"'-'",
"{\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"if (b < '0' || '9' < b) {\n\t\t\tthrow new NumberFormatException();\n\t\t}",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"{\n\t\t\tthrow new NumberFormatException();\n\t\t}",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while (true) {\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\treturn minus ? -n : n;\n\t\t\t} else {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}",
"true",
"{\n\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\treturn minus ? -n : n;\n\t\t\t} else {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}",
"if ('0' <= b && b <= '9') {\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\treturn minus ? -n : n;\n\t\t\t} else {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n\t\t\t\tn *= 10;\n\t\t\t\tn += b - '0';\n\t\t\t}",
"n *= 10",
"n",
"10",
"n += b - '0'",
"n",
"b - '0'",
"b",
"'0'",
"if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\treturn minus ? -n : n;\n\t\t\t} else {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t\t\t\treturn minus ? -n : n;\n\t\t\t}",
"return minus ? -n : n;",
"minus ? -n : n",
"minus",
"-n",
"n",
"n",
"{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"throw new NumberFormatException();",
"new NumberFormatException()",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public int nextInt() {\n\t\tlong nl = nextLong();\n\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) nl;\n\t}",
"nextInt",
"{\n\t\tlong nl = nextLong();\n\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) nl;\n\t}",
"long nl = nextLong();",
"nl",
"nextLong()",
"nextLong",
"if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();",
"nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE",
"nl < Integer.MIN_VALUE",
"nl",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"nl > Integer.MAX_VALUE",
"nl",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"throw new NumberFormatException();",
"new NumberFormatException()",
"return (int) nl;",
"(int) nl",
"public double nextDouble() {\n\t\treturn Double.parseDouble(next());\n\t}",
"nextDouble",
"{\n\t\treturn Double.parseDouble(next());\n\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public class Main {\n\t\n\tpublic Main() {\n\t\tFastScanner scanner = new FastScanner();\n\t\tint N = scanner.nextInt();\n\t\t\n\t\tint Z = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scanner.nextInt();\n\t\t\tint D2 = scanner.nextInt();\n\t\t\t\n\t\t\tif (D1 == D2) {\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tZ = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"No\");\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n}",
"public class Main {\n\t\n\tpublic Main() {\n\t\tFastScanner scanner = new FastScanner();\n\t\tint N = scanner.nextInt();\n\t\t\n\t\tint Z = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scanner.nextInt();\n\t\t\tint D2 = scanner.nextInt();\n\t\t\t\n\t\t\tif (D1 == D2) {\n\t\t\t\tZ++;\n\t\t\t\t\n\t\t\t\tif (Z == 3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tZ = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(\"No\");\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n}",
"Main"
]
| import java.io.IOException;
import java.io.InputStream;
import java.util.*;
public class Main {
public Main() {
FastScanner scanner = new FastScanner();
int N = scanner.nextInt();
int Z = 0;
for (int i = 0; i < N; i++) {
int D1 = scanner.nextInt();
int D2 = scanner.nextInt();
if (D1 == D2) {
Z++;
if (Z == 3) {
System.out.println("Yes");
return;
}
} else {
Z = 0;
}
}
System.out.println("No");
}
public static void main(String[] args) {
new Main();
}
}
class FastScanner {
private final InputStream in = System.in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
private boolean hasNextByte() {
if (ptr < buflen) {
return true;
} else {
ptr = 0;
try {
buflen = in.read(buffer);
} catch (IOException e) {
e.printStackTrace();
}
if (buflen <= 0) {
return false;
}
}
return true;
}
private int readByte() {
if (hasNextByte()) return buffer[ptr++];
else return -1;
}
private static boolean isPrintableChar(int c) {
return 33 <= c && c <= 126;
}
public boolean hasNext() {
while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;
return hasNextByte();
}
public String next() {
if (!hasNext()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while (isPrintableChar(b)) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
public long nextLong() {
if (!hasNext()) throw new NoSuchElementException();
long n = 0;
boolean minus = false;
int b = readByte();
if (b == '-') {
minus = true;
b = readByte();
}
if (b < '0' || '9' < b) {
throw new NumberFormatException();
}
while (true) {
if ('0' <= b && b <= '9') {
n *= 10;
n += b - '0';
} else if (b == -1 || !isPrintableChar(b)) {
return minus ? -n : n;
} else {
throw new NumberFormatException();
}
b = readByte();
}
}
public int nextInt() {
long nl = nextLong();
if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE) throw new NumberFormatException();
return (int) nl;
}
public double nextDouble() {
return Double.parseDouble(next());
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
2,
17,
17,
41,
13,
17,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
3,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
3,
14,
13,
4,
18,
13,
17,
4,
18,
13,
17,
4,
13,
23,
13,
12,
13,
30,
4,
18,
13,
4,
18,
13,
12,
13,
30,
0,
13,
17,
0,
13,
4,
18,
4,
18,
13,
17,
0,
13,
18,
13,
13,
12,
13,
30,
0,
13,
17,
0,
13,
4,
18,
4,
18,
13,
17,
0,
13,
18,
13,
13,
12,
13,
30,
14,
2,
13,
13,
4,
13,
29,
4,
18,
13,
18,
13,
40,
13,
12,
13,
30,
14,
2,
13,
13,
4,
13,
29,
4,
18,
13,
18,
13,
40,
13,
12,
13,
30,
14,
2,
13,
13,
4,
13,
29,
4,
18,
13,
18,
13,
40,
13,
12,
13,
30,
14,
2,
13,
13,
4,
13,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
2,
13,
17,
40,
13,
29,
13,
23,
13,
12,
13,
30,
0,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
20,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
2,
13,
13,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
13,
17,
29,
2,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
14,
2,
13,
17,
29,
13,
41,
13,
17,
41,
13,
41,
13,
0,
13,
8,
2,
13,
13,
13,
13,
0,
13,
8,
2,
13,
13,
13,
13,
0,
13,
13,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
2,
13,
17,
41,
13,
2,
13,
2,
13,
17,
29,
2,
2,
17,
13,
13,
12,
13,
30,
41,
13,
13,
29,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
17,
13,
17,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
2,
13,
17,
41,
13,
2,
13,
2,
13,
17,
29,
2,
2,
17,
13,
13,
12,
13,
30,
41,
13,
13,
29,
2,
2,
13,
18,
13,
13,
2,
13,
18,
13,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
17,
13,
17,
13,
17,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
635,
17
],
[
635,
18
],
[
18,
19
],
[
18,
20
],
[
635,
21
],
[
21,
22
],
[
21,
23
],
[
635,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
26,
28
],
[
635,
29
],
[
29,
30
],
[
29,
31
],
[
635,
32
],
[
32,
33
],
[
635,
34
],
[
34,
35
],
[
34,
36
],
[
635,
37
],
[
37,
38
],
[
37,
39
],
[
635,
40
],
[
40,
41
],
[
635,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
67,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
44,
88
],
[
88,
89
],
[
88,
90
],
[
44,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
91,
99
],
[
99,
100
],
[
100,
101
],
[
91,
102
],
[
103,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
107,
115
],
[
115,
116
],
[
116,
117
],
[
107,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
121,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
127,
131
],
[
120,
132
],
[
119,
133
],
[
133,
134
],
[
103,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
44,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
144,
150
],
[
150,
151
],
[
151,
152
],
[
150,
153
],
[
44,
154
],
[
154,
155
],
[
42,
156
],
[
156,
157
],
[
635,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
160,
164
],
[
164,
165
],
[
165,
166
],
[
635,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
169,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
175,
180
],
[
169,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
183,
185
],
[
635,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
188,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
194,
199
],
[
188,
200
],
[
200,
201
],
[
200,
202
],
[
202,
203
],
[
202,
204
],
[
635,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
209,
211
],
[
208,
212
],
[
212,
213
],
[
207,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
215,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
635,
222
],
[
222,
223
],
[
222,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
226,
228
],
[
225,
229
],
[
229,
230
],
[
224,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
232,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
635,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
243,
245
],
[
242,
246
],
[
246,
247
],
[
241,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
249,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
635,
256
],
[
256,
257
],
[
256,
258
],
[
258,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
259,
263
],
[
263,
264
],
[
258,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
268,
269
],
[
635,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
272,
276
],
[
276,
277
],
[
277,
278
],
[
276,
279
],
[
279,
280
],
[
280,
281
],
[
279,
282
],
[
270,
283
],
[
283,
284
],
[
635,
285
],
[
285,
286
],
[
285,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
287,
291
],
[
291,
292
],
[
292,
293
],
[
292,
294
],
[
291,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
298,
299
],
[
298,
300
],
[
295,
301
],
[
301,
302
],
[
287,
303
],
[
303,
304
],
[
285,
305
],
[
305,
306
],
[
635,
307
],
[
307,
308
],
[
307,
309
],
[
309,
310
],
[
310,
311
],
[
310,
312
],
[
309,
314
],
[
314,
315
],
[
315,
316
],
[
316,
317
],
[
316,
318
],
[
314,
319
],
[
319,
320
],
[
319,
321
],
[
314,
322
],
[
322,
323
],
[
323,
324
],
[
314,
325
],
[
325,
326
],
[
326,
327
],
[
327,
328
],
[
327,
329
],
[
326,
330
],
[
307,
331
],
[
331,
332
],
[
635,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
336,
341
],
[
333,
342
],
[
342,
343
],
[
333,
344
],
[
344,
345
],
[
635,
346
],
[
346,
347
],
[
346,
348
],
[
348,
349
],
[
349,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
349,
354
],
[
354,
355
],
[
355,
356
],
[
354,
357
],
[
346,
358
],
[
358,
359
],
[
635,
360
],
[
360,
361
],
[
360,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
362,
366
],
[
366,
367
],
[
366,
368
],
[
368,
369
],
[
368,
370
],
[
362,
371
],
[
371,
372
],
[
372,
373
],
[
372,
374
],
[
371,
375
],
[
375,
376
],
[
376,
377
],
[
377,
378
],
[
378,
379
],
[
378,
380
],
[
377,
381
],
[
376,
382
],
[
382,
383
],
[
382,
384
],
[
384,
385
],
[
385,
386
],
[
385,
387
],
[
384,
388
],
[
375,
389
],
[
389,
390
],
[
389,
391
],
[
391,
392
],
[
392,
393
],
[
392,
394
],
[
391,
395
],
[
375,
396
],
[
396,
397
],
[
396,
398
],
[
398,
399
],
[
398,
400
],
[
362,
401
],
[
401,
402
],
[
402,
403
],
[
402,
404
],
[
360,
405
],
[
405,
406
],
[
360,
407
],
[
407,
408
],
[
360,
409
],
[
409,
410
],
[
635,
411
],
[
411,
412
],
[
411,
413
],
[
413,
414
],
[
414,
415
],
[
415,
416
],
[
415,
417
],
[
414,
418
],
[
418,
419
],
[
413,
420
],
[
420,
421
],
[
421,
422
],
[
421,
423
],
[
420,
424
],
[
424,
425
],
[
413,
426
],
[
426,
427
],
[
426,
428
],
[
413,
429
],
[
429,
430
],
[
413,
431
],
[
431,
432
],
[
413,
433
],
[
433,
434
],
[
433,
435
],
[
435,
436
],
[
436,
437
],
[
436,
438
],
[
435,
439
],
[
435,
440
],
[
413,
441
],
[
441,
442
],
[
441,
443
],
[
443,
444
],
[
444,
445
],
[
444,
446
],
[
443,
447
],
[
443,
448
],
[
413,
449
],
[
449,
450
],
[
449,
451
],
[
413,
452
],
[
452,
453
],
[
453,
454
],
[
454,
455
],
[
454,
456
],
[
453,
457
],
[
452,
458
],
[
458,
459
],
[
459,
460
],
[
459,
461
],
[
461,
462
],
[
461,
463
],
[
458,
464
],
[
464,
465
],
[
464,
466
],
[
458,
467
],
[
467,
468
],
[
467,
469
],
[
413,
470
],
[
470,
471
],
[
411,
472
],
[
472,
473
],
[
411,
474
],
[
474,
475
],
[
635,
476
],
[
476,
477
],
[
476,
478
],
[
478,
479
],
[
476,
480
],
[
480,
481
],
[
476,
482
],
[
482,
483
],
[
482,
484
],
[
484,
485
],
[
485,
486
],
[
486,
487
],
[
486,
488
],
[
485,
489
],
[
484,
490
],
[
490,
491
],
[
491,
492
],
[
491,
493
],
[
490,
494
],
[
482,
495
],
[
495,
496
],
[
482,
497
],
[
497,
498
],
[
476,
499
],
[
499,
500
],
[
499,
501
],
[
501,
502
],
[
502,
503
],
[
502,
504
],
[
504,
505
],
[
504,
506
],
[
506,
507
],
[
506,
508
],
[
501,
509
],
[
509,
510
],
[
509,
511
],
[
511,
512
],
[
511,
513
],
[
513,
514
],
[
513,
515
],
[
501,
516
],
[
516,
517
],
[
517,
518
],
[
518,
519
],
[
518,
520
],
[
517,
521
],
[
476,
522
],
[
522,
523
],
[
522,
524
],
[
524,
525
],
[
525,
526
],
[
525,
527
],
[
524,
528
],
[
528,
529
],
[
529,
530
],
[
530,
531
],
[
530,
532
],
[
532,
533
],
[
532,
534
],
[
529,
535
],
[
535,
536
],
[
535,
537
],
[
537,
538
],
[
537,
539
],
[
522,
540
],
[
540,
541
],
[
476,
542
],
[
542,
543
],
[
542,
544
],
[
544,
545
],
[
545,
546
],
[
549,
547
],
[
547,
548
],
[
548,
549
],
[
549,
550
],
[
549,
551
],
[
548,
552
],
[
547,
553
],
[
549,
554
],
[
635,
555
],
[
555,
556
],
[
555,
557
],
[
557,
558
],
[
555,
559
],
[
559,
560
],
[
555,
561
],
[
561,
562
],
[
561,
563
],
[
563,
564
],
[
564,
565
],
[
565,
566
],
[
565,
567
],
[
564,
568
],
[
563,
569
],
[
569,
570
],
[
570,
571
],
[
570,
572
],
[
569,
573
],
[
561,
574
],
[
574,
575
],
[
561,
576
],
[
576,
577
],
[
555,
578
],
[
578,
579
],
[
578,
580
],
[
580,
581
],
[
581,
582
],
[
581,
583
],
[
583,
584
],
[
583,
585
],
[
585,
586
],
[
585,
587
],
[
580,
588
],
[
588,
589
],
[
588,
590
],
[
590,
591
],
[
590,
592
],
[
592,
593
],
[
592,
594
],
[
580,
595
],
[
595,
596
],
[
596,
597
],
[
597,
598
],
[
597,
599
],
[
596,
600
],
[
555,
601
],
[
601,
602
],
[
601,
603
],
[
603,
604
],
[
604,
605
],
[
604,
606
],
[
603,
607
],
[
607,
608
],
[
608,
609
],
[
609,
610
],
[
609,
611
],
[
611,
612
],
[
611,
613
],
[
608,
614
],
[
614,
615
],
[
614,
616
],
[
616,
617
],
[
616,
618
],
[
601,
619
],
[
619,
620
],
[
555,
621
],
[
621,
622
],
[
621,
623
],
[
623,
624
],
[
624,
625
],
[
628,
626
],
[
626,
627
],
[
627,
628
],
[
628,
629
],
[
628,
630
],
[
627,
631
],
[
626,
632
],
[
628,
633
],
[
0,
634
],
[
634,
635
],
[
634,
636
]
]
| [
"/******************Author: Satyajeet Singh************************************/\n import java.io.*;\n import java.util.*;\n import java.text.*; \n import java.lang.*;\n import java.math.*;\npublic class Main{\n/*********************************************Constants***********************************/\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out)); \n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n static long mod=(long)1e9+7;\n static long mod1=998244353;\n static ArrayList<Integer> graph[];\n static int pptr=0,pptrmax=0;\n static String st[];\n/*****************************************Solution Begins*********************************/\n \n public static void main(String args[]) throws Exception{\n int n=pi();\n int input[][]=new int[n][2];\n for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n input[i][j]=pi();\n }\n }\n boolean flag=false;\n for(int i=0;i<n;i++){\n int cnt=0;\n for(int j=i;j<n;j++){\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }\n if(cnt>=3){\n flag=true;\n break;\n }\n }\n if(flag)out.println(\"Yes\");\n else out.println(\"No\");\n/****************************************Solution Ends*************************************/\n clr();\n }\n static void clr(){\n out.flush();\n out.close();\n }\n static void nl() throws Exception{\n pptr=0;\n st=br.readLine().split(\" \");\n pptrmax=st.length;\n }\n static void nls() throws Exception{\n pptr=0;\n st=br.readLine().split(\"\");\n pptrmax=st.length;\n }\n static int pi() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Integer.parseInt(st[pptr++]);\n }\n static long pl() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Long.parseLong(st[pptr++]);\n }\n static double pd() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Double.parseDouble(st[pptr++]);\n }\n static String ps() throws Exception{\n if(pptr==pptrmax)\n nl();\n return st[pptr++];\n }\n/***************************************Precision Printing*********************************/\n static void printPrecision(double d){\n DecimalFormat ft = new DecimalFormat(\"0.00000000000\"); \n out.println(ft.format(d));\n }\n/**************************************Bit Manipulation************************************/\n static int countBit(long mask){\n int ans=0;\n while(mask!=0){\n mask&=(mask-1);\n ans++;\n }\n return ans;\n }\n/******************************************Graph******************************************/\n static void Makegraph(int n){\n graph=new ArrayList[n];\n for(int i=0;i<n;i++)\n graph[i]=new ArrayList<>();\n }\n static void addEdge(int a,int b){\n graph[a].add(b);\n }\n // static void addEdge(int a,int b,int c){\n // graph[a].add(new Pair(b,c));\n // } \n/*********************************************PAIR*****************************************/\n static class Pair{\n int u;\n int v;\n public Pair(int u, int v) {\n this.u = u;\n this.v = v;\n }\n public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }\n public boolean equals(Object o) {\n Pair other = (Pair) o;\n return u == other.u && v == other.v;\n }\n public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }\n }\n/******************************************Long Pair***************************************/\n static class Pairl{\n long u;\n long v;\n public Pairl(long u, long v) {\n this.u = u;\n this.v = v;\n }\n public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }\n public boolean equals(Object o) {\n Pairl other = (Pairl) o;\n return u == other.u && v == other.v;\n }\n public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }\n }\n/*****************************************DEBUG********************************************/\n public static void debug(Object... o){\n System.out.println(Arrays.deepToString(o));\n }\n/************************************MODULAR EXPONENTIATION********************************/\n static long modulo(long a,long b,long c){\n long x=1,y=a%c;\n while(b > 0){\n if(b%2 == 1)\n x=(x*y)%c;\n y = (y*y)%c;\n b = b>>1;\n }\n return x%c;\n }\n/********************************************GCD*******************************************/\n static long gcd(long x, long y){\n if(x==0)\n return y;\n if(y==0)\n return x;\n long r=0, a, b;\n a = (x > y) ? x : y; \n b = (x < y) ? x : y;\n r = b;\n while(a % b != 0){\n r = a % b;\n a = b;\n b = r;\n }\n return r;\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.text.*;",
"text.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main{\n/*********************************************Constants***********************************/\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out)); \n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n static long mod=(long)1e9+7;\n static long mod1=998244353;\n static ArrayList<Integer> graph[];\n static int pptr=0,pptrmax=0;\n static String st[];\n/*****************************************Solution Begins*********************************/\n \n public static void main(String args[]) throws Exception{\n int n=pi();\n int input[][]=new int[n][2];\n for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n input[i][j]=pi();\n }\n }\n boolean flag=false;\n for(int i=0;i<n;i++){\n int cnt=0;\n for(int j=i;j<n;j++){\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }\n if(cnt>=3){\n flag=true;\n break;\n }\n }\n if(flag)out.println(\"Yes\");\n else out.println(\"No\");\n/****************************************Solution Ends*************************************/\n clr();\n }\n static void clr(){\n out.flush();\n out.close();\n }\n static void nl() throws Exception{\n pptr=0;\n st=br.readLine().split(\" \");\n pptrmax=st.length;\n }\n static void nls() throws Exception{\n pptr=0;\n st=br.readLine().split(\"\");\n pptrmax=st.length;\n }\n static int pi() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Integer.parseInt(st[pptr++]);\n }\n static long pl() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Long.parseLong(st[pptr++]);\n }\n static double pd() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Double.parseDouble(st[pptr++]);\n }\n static String ps() throws Exception{\n if(pptr==pptrmax)\n nl();\n return st[pptr++];\n }\n/***************************************Precision Printing*********************************/\n static void printPrecision(double d){\n DecimalFormat ft = new DecimalFormat(\"0.00000000000\"); \n out.println(ft.format(d));\n }\n/**************************************Bit Manipulation************************************/\n static int countBit(long mask){\n int ans=0;\n while(mask!=0){\n mask&=(mask-1);\n ans++;\n }\n return ans;\n }\n/******************************************Graph******************************************/\n static void Makegraph(int n){\n graph=new ArrayList[n];\n for(int i=0;i<n;i++)\n graph[i]=new ArrayList<>();\n }\n static void addEdge(int a,int b){\n graph[a].add(b);\n }\n // static void addEdge(int a,int b,int c){\n // graph[a].add(new Pair(b,c));\n // } \n/*********************************************PAIR*****************************************/\n static class Pair{\n int u;\n int v;\n public Pair(int u, int v) {\n this.u = u;\n this.v = v;\n }\n public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }\n public boolean equals(Object o) {\n Pair other = (Pair) o;\n return u == other.u && v == other.v;\n }\n public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }\n }\n/******************************************Long Pair***************************************/\n static class Pairl{\n long u;\n long v;\n public Pairl(long u, long v) {\n this.u = u;\n this.v = v;\n }\n public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }\n public boolean equals(Object o) {\n Pairl other = (Pairl) o;\n return u == other.u && v == other.v;\n }\n public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }\n }\n/*****************************************DEBUG********************************************/\n public static void debug(Object... o){\n System.out.println(Arrays.deepToString(o));\n }\n/************************************MODULAR EXPONENTIATION********************************/\n static long modulo(long a,long b,long c){\n long x=1,y=a%c;\n while(b > 0){\n if(b%2 == 1)\n x=(x*y)%c;\n y = (y*y)%c;\n b = b>>1;\n }\n return x%c;\n }\n/********************************************GCD*******************************************/\n static long gcd(long x, long y){\n if(x==0)\n return y;\n if(y==0)\n return x;\n long r=0, a, b;\n a = (x > y) ? x : y; \n b = (x < y) ? x : y;\n r = b;\n while(a % b != 0){\n r = a % b;\n a = b;\n b = r;\n }\n return r;\n }\n}",
"Main",
"/*********************************************Constants***********************************/\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));",
"out",
"new PrintWriter(new OutputStreamWriter(System.out))",
"static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"static long mod=(long)1e9+7;",
"mod",
"(long)1e9+7",
"(long)1e9",
"7",
"static long mod1=998244353;",
"mod1",
"998244353",
"static ArrayList<Integer> graph[];",
"graph",
"static int pptr=0",
"pptr",
"0",
"pptrmax=0;",
"pptrmax",
"0",
"static String st[];",
"st",
"/*****************************************Solution Begins*********************************/\n \n public static void main(String args[]) throws Exception{\n int n=pi();\n int input[][]=new int[n][2];\n for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n input[i][j]=pi();\n }\n }\n boolean flag=false;\n for(int i=0;i<n;i++){\n int cnt=0;\n for(int j=i;j<n;j++){\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }\n if(cnt>=3){\n flag=true;\n break;\n }\n }\n if(flag)out.println(\"Yes\");\n else out.println(\"No\");\n/****************************************Solution Ends*************************************/\n clr();\n }",
"main",
"{\n int n=pi();\n int input[][]=new int[n][2];\n for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n input[i][j]=pi();\n }\n }\n boolean flag=false;\n for(int i=0;i<n;i++){\n int cnt=0;\n for(int j=i;j<n;j++){\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }\n if(cnt>=3){\n flag=true;\n break;\n }\n }\n if(flag)out.println(\"Yes\");\n else out.println(\"No\");\n/****************************************Solution Ends*************************************/\n clr();\n }",
"int n=pi();",
"n",
"pi()",
"pi",
"int input[][]=new int[n][2];",
"input",
"new int[n][2]",
"n",
"2",
"for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n input[i][j]=pi();\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n for(int j=0;j<2;j++){\n input[i][j]=pi();\n }\n }",
"{\n for(int j=0;j<2;j++){\n input[i][j]=pi();\n }\n }",
"for(int j=0;j<2;j++){\n input[i][j]=pi();\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<2",
"j",
"2",
"j++",
"j++",
"j",
"{\n input[i][j]=pi();\n }",
"{\n input[i][j]=pi();\n }",
"input[i][j]=pi()",
"input[i][j]",
"input[i]",
"input",
"i",
"j",
"pi()",
"pi",
"boolean flag=false;",
"flag",
"false",
"for(int i=0;i<n;i++){\n int cnt=0;\n for(int j=i;j<n;j++){\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }\n if(cnt>=3){\n flag=true;\n break;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int cnt=0;\n for(int j=i;j<n;j++){\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }\n if(cnt>=3){\n flag=true;\n break;\n }\n }",
"{\n int cnt=0;\n for(int j=i;j<n;j++){\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }\n if(cnt>=3){\n flag=true;\n break;\n }\n }",
"int cnt=0;",
"cnt",
"0",
"for(int j=i;j<n;j++){\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }",
"int j=i;",
"int j=i;",
"j",
"i",
"j<n",
"j",
"n",
"j++",
"j++",
"j",
"{\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }",
"{\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }",
"if(input[j][0]!=input[j][1])break;",
"input[j][0]!=input[j][1]",
"input[j][0]",
"input[j]",
"input",
"j",
"0",
"input[j][1]",
"input[j]",
"input",
"j",
"1",
"break;",
"cnt++",
"cnt",
"if(cnt>=3){\n flag=true;\n break;\n }",
"cnt>=3",
"cnt",
"3",
"{\n flag=true;\n break;\n }",
"flag=true",
"flag",
"true",
"break;",
"if(flag)out.println(\"Yes\");\n else out.println(\"No\");",
"flag",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"clr()",
"clr",
"String args[]",
"args",
"static void clr(){\n out.flush();\n out.close();\n }",
"clr",
"{\n out.flush();\n out.close();\n }",
"out.flush()",
"out.flush",
"out",
"out.close()",
"out.close",
"out",
"static void nl() throws Exception{\n pptr=0;\n st=br.readLine().split(\" \");\n pptrmax=st.length;\n }",
"nl",
"{\n pptr=0;\n st=br.readLine().split(\" \");\n pptrmax=st.length;\n }",
"pptr=0",
"pptr",
"0",
"st=br.readLine().split(\" \")",
"st",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"pptrmax=st.length",
"pptrmax",
"st.length",
"st",
"st.length",
"static void nls() throws Exception{\n pptr=0;\n st=br.readLine().split(\"\");\n pptrmax=st.length;\n }",
"nls",
"{\n pptr=0;\n st=br.readLine().split(\"\");\n pptrmax=st.length;\n }",
"pptr=0",
"pptr",
"0",
"st=br.readLine().split(\"\")",
"st",
"br.readLine().split(\"\")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\"\"",
"pptrmax=st.length",
"pptrmax",
"st.length",
"st",
"st.length",
"static int pi() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Integer.parseInt(st[pptr++]);\n }",
"pi",
"{\n if(pptr==pptrmax)\n nl();\n return Integer.parseInt(st[pptr++]);\n }",
"if(pptr==pptrmax)\n nl();",
"pptr==pptrmax",
"pptr",
"pptrmax",
"nl()",
"nl",
"return Integer.parseInt(st[pptr++]);",
"Integer.parseInt(st[pptr++])",
"Integer.parseInt",
"Integer",
"st[pptr++]",
"st",
"pptr++",
"pptr",
"static long pl() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Long.parseLong(st[pptr++]);\n }",
"pl",
"{\n if(pptr==pptrmax)\n nl();\n return Long.parseLong(st[pptr++]);\n }",
"if(pptr==pptrmax)\n nl();",
"pptr==pptrmax",
"pptr",
"pptrmax",
"nl()",
"nl",
"return Long.parseLong(st[pptr++]);",
"Long.parseLong(st[pptr++])",
"Long.parseLong",
"Long",
"st[pptr++]",
"st",
"pptr++",
"pptr",
"static double pd() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Double.parseDouble(st[pptr++]);\n }",
"pd",
"{\n if(pptr==pptrmax)\n nl();\n return Double.parseDouble(st[pptr++]);\n }",
"if(pptr==pptrmax)\n nl();",
"pptr==pptrmax",
"pptr",
"pptrmax",
"nl()",
"nl",
"return Double.parseDouble(st[pptr++]);",
"Double.parseDouble(st[pptr++])",
"Double.parseDouble",
"Double",
"st[pptr++]",
"st",
"pptr++",
"pptr",
"static String ps() throws Exception{\n if(pptr==pptrmax)\n nl();\n return st[pptr++];\n }",
"ps",
"{\n if(pptr==pptrmax)\n nl();\n return st[pptr++];\n }",
"if(pptr==pptrmax)\n nl();",
"pptr==pptrmax",
"pptr",
"pptrmax",
"nl()",
"nl",
"return st[pptr++];",
"st[pptr++]",
"st",
"pptr++",
"pptr",
"/***************************************Precision Printing*********************************/\n static void printPrecision(double d){\n DecimalFormat ft = new DecimalFormat(\"0.00000000000\"); \n out.println(ft.format(d));\n }",
"printPrecision",
"{\n DecimalFormat ft = new DecimalFormat(\"0.00000000000\"); \n out.println(ft.format(d));\n }",
"DecimalFormat ft = new DecimalFormat(\"0.00000000000\");",
"ft",
"new DecimalFormat(\"0.00000000000\")",
"out.println(ft.format(d))",
"out.println",
"out",
"ft.format(d)",
"ft.format",
"ft",
"d",
"double d",
"d",
"/**************************************Bit Manipulation************************************/\n static int countBit(long mask){\n int ans=0;\n while(mask!=0){\n mask&=(mask-1);\n ans++;\n }\n return ans;\n }",
"countBit",
"{\n int ans=0;\n while(mask!=0){\n mask&=(mask-1);\n ans++;\n }\n return ans;\n }",
"int ans=0;",
"ans",
"0",
"while(mask!=0){\n mask&=(mask-1);\n ans++;\n }",
"mask!=0",
"mask",
"0",
"{\n mask&=(mask-1);\n ans++;\n }",
"mask&=(mask-1)",
"mask",
"(mask-1)",
"mask",
"1",
"ans++",
"ans",
"return ans;",
"ans",
"long mask",
"mask",
"/******************************************Graph******************************************/\n static void Makegraph(int n){\n graph=new ArrayList[n];\n for(int i=0;i<n;i++)\n graph[i]=new ArrayList<>();\n }",
"Makegraph",
"{\n graph=new ArrayList[n];\n for(int i=0;i<n;i++)\n graph[i]=new ArrayList<>();\n }",
"graph=new ArrayList[n]",
"graph",
"new ArrayList[n]",
"n",
"for(int i=0;i<n;i++)\n graph[i]=new ArrayList<>();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"graph[i]=new ArrayList<>();",
"graph[i]=new ArrayList<>()",
"graph[i]",
"graph",
"i",
"new ArrayList<>()",
"int n",
"n",
"static void addEdge(int a,int b){\n graph[a].add(b);\n }",
"addEdge",
"{\n graph[a].add(b);\n }",
"graph[a].add(b)",
"graph[a].add",
"graph[a]",
"graph",
"a",
"b",
"int a",
"a",
"int b",
"b",
"/*****************************************DEBUG********************************************/\n public static void debug(Object... o){\n System.out.println(Arrays.deepToString(o));\n }",
"debug",
"{\n System.out.println(Arrays.deepToString(o));\n }",
"System.out.println(Arrays.deepToString(o))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.deepToString(o)",
"Arrays.deepToString",
"Arrays",
"o",
"Object... o",
"o",
"/************************************MODULAR EXPONENTIATION********************************/\n static long modulo(long a,long b,long c){\n long x=1,y=a%c;\n while(b > 0){\n if(b%2 == 1)\n x=(x*y)%c;\n y = (y*y)%c;\n b = b>>1;\n }\n return x%c;\n }",
"modulo",
"{\n long x=1,y=a%c;\n while(b > 0){\n if(b%2 == 1)\n x=(x*y)%c;\n y = (y*y)%c;\n b = b>>1;\n }\n return x%c;\n }",
"long x=1",
"x",
"1",
"y=a%c;",
"y",
"a%c",
"a",
"c",
"while(b > 0){\n if(b%2 == 1)\n x=(x*y)%c;\n y = (y*y)%c;\n b = b>>1;\n }",
"b > 0",
"b",
"0",
"{\n if(b%2 == 1)\n x=(x*y)%c;\n y = (y*y)%c;\n b = b>>1;\n }",
"if(b%2 == 1)\n x=(x*y)%c;",
"b%2 == 1",
"b%2",
"b",
"2",
"1",
"x=(x*y)%c",
"x",
"(x*y)%c",
"(x*y)",
"x",
"y",
"c",
"y = (y*y)%c",
"y",
"(y*y)%c",
"(y*y)",
"y",
"y",
"c",
"b = b>>1",
"b",
"b>>1",
"b",
"1",
"return x%c;",
"x%c",
"x",
"c",
"long a",
"a",
"long b",
"b",
"long c",
"c",
"/********************************************GCD*******************************************/\n static long gcd(long x, long y){\n if(x==0)\n return y;\n if(y==0)\n return x;\n long r=0, a, b;\n a = (x > y) ? x : y; \n b = (x < y) ? x : y;\n r = b;\n while(a % b != 0){\n r = a % b;\n a = b;\n b = r;\n }\n return r;\n }",
"gcd",
"{\n if(x==0)\n return y;\n if(y==0)\n return x;\n long r=0, a, b;\n a = (x > y) ? x : y; \n b = (x < y) ? x : y;\n r = b;\n while(a % b != 0){\n r = a % b;\n a = b;\n b = r;\n }\n return r;\n }",
"if(x==0)\n return y;",
"x==0",
"x",
"0",
"return y;",
"y",
"if(y==0)\n return x;",
"y==0",
"y",
"0",
"return x;",
"x",
"long r=0",
"r",
"0",
"a",
"a",
"b;",
"b",
"a = (x > y) ? x : y",
"a",
"(x > y) ? x : y",
"(x > y)",
"x",
"y",
"x",
"y",
"b = (x < y) ? x : y",
"b",
"(x < y) ? x : y",
"(x < y)",
"x",
"y",
"x",
"y",
"r = b",
"r",
"b",
"while(a % b != 0){\n r = a % b;\n a = b;\n b = r;\n }",
"a % b != 0",
"a % b",
"a",
"b",
"0",
"{\n r = a % b;\n a = b;\n b = r;\n }",
"r = a % b",
"r",
"a % b",
"a",
"b",
"a = b",
"a",
"b",
"b = r",
"b",
"r",
"return r;",
"r",
"long x",
"x",
"long y",
"y",
" static class Pair{\n int u;\n int v;\n public Pair(int u, int v) {\n this.u = u;\n this.v = v;\n }\n public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }\n public boolean equals(Object o) {\n Pair other = (Pair) o;\n return u == other.u && v == other.v;\n }\n public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }\n }",
"Pair",
"int u;",
"u",
"int v;",
"v",
"public Pair(int u, int v) {\n this.u = u;\n this.v = v;\n }",
"Pair",
"{\n this.u = u;\n this.v = v;\n }",
"this.u = u",
"this.u",
"this",
"this.u",
"u",
"this.v = v",
"this.v",
"this",
"this.v",
"v",
"int u",
"u",
"int v",
"v",
"public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }",
"hashCode",
"{\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }",
"int hu = (int) (u ^ (u >>> 32));",
"hu",
"(int) (u ^ (u >>> 32))",
"u",
"(u >>> 32)",
"u",
"32",
"int hv = (int) (v ^ (v >>> 32));",
"hv",
"(int) (v ^ (v >>> 32))",
"v",
"(v >>> 32)",
"v",
"32",
"return 31 * hu + hv;",
"31 * hu + hv",
"31 * hu",
"31",
"hu",
"hv",
"public boolean equals(Object o) {\n Pair other = (Pair) o;\n return u == other.u && v == other.v;\n }",
"equals",
"{\n Pair other = (Pair) o;\n return u == other.u && v == other.v;\n }",
"Pair other = (Pair) o;",
"other",
"(Pair) o",
"return u == other.u && v == other.v;",
"u == other.u && v == other.v",
"u == other.u",
"u",
"other.u",
"other",
"other.u",
"v == other.v",
"v",
"other.v",
"other",
"other.v",
"Object o",
"o",
"public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }",
"toString",
"{\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }",
"return \"[u=\" + u + \", v=\" + v + \"]\";",
"\"[u=\" + u + \", v=\" + v + \"]\"",
"v",
"\", v=\"",
"\"[u=\" + u + \", v=\" + v + \"]\"",
"\"[u=\"",
"u",
"\", v=\"",
"v",
"\"]\"",
" static class Pairl{\n long u;\n long v;\n public Pairl(long u, long v) {\n this.u = u;\n this.v = v;\n }\n public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }\n public boolean equals(Object o) {\n Pairl other = (Pairl) o;\n return u == other.u && v == other.v;\n }\n public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }\n }",
"Pairl",
"long u;",
"u",
"long v;",
"v",
"public Pairl(long u, long v) {\n this.u = u;\n this.v = v;\n }",
"Pairl",
"{\n this.u = u;\n this.v = v;\n }",
"this.u = u",
"this.u",
"this",
"this.u",
"u",
"this.v = v",
"this.v",
"this",
"this.v",
"v",
"long u",
"u",
"long v",
"v",
"public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }",
"hashCode",
"{\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }",
"int hu = (int) (u ^ (u >>> 32));",
"hu",
"(int) (u ^ (u >>> 32))",
"u",
"(u >>> 32)",
"u",
"32",
"int hv = (int) (v ^ (v >>> 32));",
"hv",
"(int) (v ^ (v >>> 32))",
"v",
"(v >>> 32)",
"v",
"32",
"return 31 * hu + hv;",
"31 * hu + hv",
"31 * hu",
"31",
"hu",
"hv",
"public boolean equals(Object o) {\n Pairl other = (Pairl) o;\n return u == other.u && v == other.v;\n }",
"equals",
"{\n Pairl other = (Pairl) o;\n return u == other.u && v == other.v;\n }",
"Pairl other = (Pairl) o;",
"other",
"(Pairl) o",
"return u == other.u && v == other.v;",
"u == other.u && v == other.v",
"u == other.u",
"u",
"other.u",
"other",
"other.u",
"v == other.v",
"v",
"other.v",
"other",
"other.v",
"Object o",
"o",
"public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }",
"toString",
"{\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }",
"return \"[u=\" + u + \", v=\" + v + \"]\";",
"\"[u=\" + u + \", v=\" + v + \"]\"",
"v",
"\", v=\"",
"\"[u=\" + u + \", v=\" + v + \"]\"",
"\"[u=\"",
"u",
"\", v=\"",
"v",
"\"]\"",
"public class Main{\n/*********************************************Constants***********************************/\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out)); \n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n static long mod=(long)1e9+7;\n static long mod1=998244353;\n static ArrayList<Integer> graph[];\n static int pptr=0,pptrmax=0;\n static String st[];\n/*****************************************Solution Begins*********************************/\n \n public static void main(String args[]) throws Exception{\n int n=pi();\n int input[][]=new int[n][2];\n for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n input[i][j]=pi();\n }\n }\n boolean flag=false;\n for(int i=0;i<n;i++){\n int cnt=0;\n for(int j=i;j<n;j++){\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }\n if(cnt>=3){\n flag=true;\n break;\n }\n }\n if(flag)out.println(\"Yes\");\n else out.println(\"No\");\n/****************************************Solution Ends*************************************/\n clr();\n }\n static void clr(){\n out.flush();\n out.close();\n }\n static void nl() throws Exception{\n pptr=0;\n st=br.readLine().split(\" \");\n pptrmax=st.length;\n }\n static void nls() throws Exception{\n pptr=0;\n st=br.readLine().split(\"\");\n pptrmax=st.length;\n }\n static int pi() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Integer.parseInt(st[pptr++]);\n }\n static long pl() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Long.parseLong(st[pptr++]);\n }\n static double pd() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Double.parseDouble(st[pptr++]);\n }\n static String ps() throws Exception{\n if(pptr==pptrmax)\n nl();\n return st[pptr++];\n }\n/***************************************Precision Printing*********************************/\n static void printPrecision(double d){\n DecimalFormat ft = new DecimalFormat(\"0.00000000000\"); \n out.println(ft.format(d));\n }\n/**************************************Bit Manipulation************************************/\n static int countBit(long mask){\n int ans=0;\n while(mask!=0){\n mask&=(mask-1);\n ans++;\n }\n return ans;\n }\n/******************************************Graph******************************************/\n static void Makegraph(int n){\n graph=new ArrayList[n];\n for(int i=0;i<n;i++)\n graph[i]=new ArrayList<>();\n }\n static void addEdge(int a,int b){\n graph[a].add(b);\n }\n // static void addEdge(int a,int b,int c){\n // graph[a].add(new Pair(b,c));\n // } \n/*********************************************PAIR*****************************************/\n static class Pair{\n int u;\n int v;\n public Pair(int u, int v) {\n this.u = u;\n this.v = v;\n }\n public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }\n public boolean equals(Object o) {\n Pair other = (Pair) o;\n return u == other.u && v == other.v;\n }\n public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }\n }\n/******************************************Long Pair***************************************/\n static class Pairl{\n long u;\n long v;\n public Pairl(long u, long v) {\n this.u = u;\n this.v = v;\n }\n public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }\n public boolean equals(Object o) {\n Pairl other = (Pairl) o;\n return u == other.u && v == other.v;\n }\n public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }\n }\n/*****************************************DEBUG********************************************/\n public static void debug(Object... o){\n System.out.println(Arrays.deepToString(o));\n }\n/************************************MODULAR EXPONENTIATION********************************/\n static long modulo(long a,long b,long c){\n long x=1,y=a%c;\n while(b > 0){\n if(b%2 == 1)\n x=(x*y)%c;\n y = (y*y)%c;\n b = b>>1;\n }\n return x%c;\n }\n/********************************************GCD*******************************************/\n static long gcd(long x, long y){\n if(x==0)\n return y;\n if(y==0)\n return x;\n long r=0, a, b;\n a = (x > y) ? x : y; \n b = (x < y) ? x : y;\n r = b;\n while(a % b != 0){\n r = a % b;\n a = b;\n b = r;\n }\n return r;\n }\n}",
"public class Main{\n/*********************************************Constants***********************************/\n static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out)); \n static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n static long mod=(long)1e9+7;\n static long mod1=998244353;\n static ArrayList<Integer> graph[];\n static int pptr=0,pptrmax=0;\n static String st[];\n/*****************************************Solution Begins*********************************/\n \n public static void main(String args[]) throws Exception{\n int n=pi();\n int input[][]=new int[n][2];\n for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n input[i][j]=pi();\n }\n }\n boolean flag=false;\n for(int i=0;i<n;i++){\n int cnt=0;\n for(int j=i;j<n;j++){\n if(input[j][0]!=input[j][1])break;\n cnt++;\n }\n if(cnt>=3){\n flag=true;\n break;\n }\n }\n if(flag)out.println(\"Yes\");\n else out.println(\"No\");\n/****************************************Solution Ends*************************************/\n clr();\n }\n static void clr(){\n out.flush();\n out.close();\n }\n static void nl() throws Exception{\n pptr=0;\n st=br.readLine().split(\" \");\n pptrmax=st.length;\n }\n static void nls() throws Exception{\n pptr=0;\n st=br.readLine().split(\"\");\n pptrmax=st.length;\n }\n static int pi() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Integer.parseInt(st[pptr++]);\n }\n static long pl() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Long.parseLong(st[pptr++]);\n }\n static double pd() throws Exception{\n if(pptr==pptrmax)\n nl();\n return Double.parseDouble(st[pptr++]);\n }\n static String ps() throws Exception{\n if(pptr==pptrmax)\n nl();\n return st[pptr++];\n }\n/***************************************Precision Printing*********************************/\n static void printPrecision(double d){\n DecimalFormat ft = new DecimalFormat(\"0.00000000000\"); \n out.println(ft.format(d));\n }\n/**************************************Bit Manipulation************************************/\n static int countBit(long mask){\n int ans=0;\n while(mask!=0){\n mask&=(mask-1);\n ans++;\n }\n return ans;\n }\n/******************************************Graph******************************************/\n static void Makegraph(int n){\n graph=new ArrayList[n];\n for(int i=0;i<n;i++)\n graph[i]=new ArrayList<>();\n }\n static void addEdge(int a,int b){\n graph[a].add(b);\n }\n // static void addEdge(int a,int b,int c){\n // graph[a].add(new Pair(b,c));\n // } \n/*********************************************PAIR*****************************************/\n static class Pair{\n int u;\n int v;\n public Pair(int u, int v) {\n this.u = u;\n this.v = v;\n }\n public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }\n public boolean equals(Object o) {\n Pair other = (Pair) o;\n return u == other.u && v == other.v;\n }\n public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }\n }\n/******************************************Long Pair***************************************/\n static class Pairl{\n long u;\n long v;\n public Pairl(long u, long v) {\n this.u = u;\n this.v = v;\n }\n public int hashCode() {\n int hu = (int) (u ^ (u >>> 32));\n int hv = (int) (v ^ (v >>> 32));\n return 31 * hu + hv;\n }\n public boolean equals(Object o) {\n Pairl other = (Pairl) o;\n return u == other.u && v == other.v;\n }\n public String toString() {\n return \"[u=\" + u + \", v=\" + v + \"]\";\n }\n }\n/*****************************************DEBUG********************************************/\n public static void debug(Object... o){\n System.out.println(Arrays.deepToString(o));\n }\n/************************************MODULAR EXPONENTIATION********************************/\n static long modulo(long a,long b,long c){\n long x=1,y=a%c;\n while(b > 0){\n if(b%2 == 1)\n x=(x*y)%c;\n y = (y*y)%c;\n b = b>>1;\n }\n return x%c;\n }\n/********************************************GCD*******************************************/\n static long gcd(long x, long y){\n if(x==0)\n return y;\n if(y==0)\n return x;\n long r=0, a, b;\n a = (x > y) ? x : y; \n b = (x < y) ? x : y;\n r = b;\n while(a % b != 0){\n r = a % b;\n a = b;\n b = r;\n }\n return r;\n }\n}",
"Main"
]
| /******************Author: Satyajeet Singh************************************/
import java.io.*;
import java.util.*;
import java.text.*;
import java.lang.*;
import java.math.*;
public class Main{
/*********************************************Constants***********************************/
static PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
static long mod=(long)1e9+7;
static long mod1=998244353;
static ArrayList<Integer> graph[];
static int pptr=0,pptrmax=0;
static String st[];
/*****************************************Solution Begins*********************************/
public static void main(String args[]) throws Exception{
int n=pi();
int input[][]=new int[n][2];
for(int i=0;i<n;i++){
for(int j=0;j<2;j++){
input[i][j]=pi();
}
}
boolean flag=false;
for(int i=0;i<n;i++){
int cnt=0;
for(int j=i;j<n;j++){
if(input[j][0]!=input[j][1])break;
cnt++;
}
if(cnt>=3){
flag=true;
break;
}
}
if(flag)out.println("Yes");
else out.println("No");
/****************************************Solution Ends*************************************/
clr();
}
static void clr(){
out.flush();
out.close();
}
static void nl() throws Exception{
pptr=0;
st=br.readLine().split(" ");
pptrmax=st.length;
}
static void nls() throws Exception{
pptr=0;
st=br.readLine().split("");
pptrmax=st.length;
}
static int pi() throws Exception{
if(pptr==pptrmax)
nl();
return Integer.parseInt(st[pptr++]);
}
static long pl() throws Exception{
if(pptr==pptrmax)
nl();
return Long.parseLong(st[pptr++]);
}
static double pd() throws Exception{
if(pptr==pptrmax)
nl();
return Double.parseDouble(st[pptr++]);
}
static String ps() throws Exception{
if(pptr==pptrmax)
nl();
return st[pptr++];
}
/***************************************Precision Printing*********************************/
static void printPrecision(double d){
DecimalFormat ft = new DecimalFormat("0.00000000000");
out.println(ft.format(d));
}
/**************************************Bit Manipulation************************************/
static int countBit(long mask){
int ans=0;
while(mask!=0){
mask&=(mask-1);
ans++;
}
return ans;
}
/******************************************Graph******************************************/
static void Makegraph(int n){
graph=new ArrayList[n];
for(int i=0;i<n;i++)
graph[i]=new ArrayList<>();
}
static void addEdge(int a,int b){
graph[a].add(b);
}
// static void addEdge(int a,int b,int c){
// graph[a].add(new Pair(b,c));
// }
/*********************************************PAIR*****************************************/
static class Pair{
int u;
int v;
public Pair(int u, int v) {
this.u = u;
this.v = v;
}
public int hashCode() {
int hu = (int) (u ^ (u >>> 32));
int hv = (int) (v ^ (v >>> 32));
return 31 * hu + hv;
}
public boolean equals(Object o) {
Pair other = (Pair) o;
return u == other.u && v == other.v;
}
public String toString() {
return "[u=" + u + ", v=" + v + "]";
}
}
/******************************************Long Pair***************************************/
static class Pairl{
long u;
long v;
public Pairl(long u, long v) {
this.u = u;
this.v = v;
}
public int hashCode() {
int hu = (int) (u ^ (u >>> 32));
int hv = (int) (v ^ (v >>> 32));
return 31 * hu + hv;
}
public boolean equals(Object o) {
Pairl other = (Pairl) o;
return u == other.u && v == other.v;
}
public String toString() {
return "[u=" + u + ", v=" + v + "]";
}
}
/*****************************************DEBUG********************************************/
public static void debug(Object... o){
System.out.println(Arrays.deepToString(o));
}
/************************************MODULAR EXPONENTIATION********************************/
static long modulo(long a,long b,long c){
long x=1,y=a%c;
while(b > 0){
if(b%2 == 1)
x=(x*y)%c;
y = (y*y)%c;
b = b>>1;
}
return x%c;
}
/********************************************GCD*******************************************/
static long gcd(long x, long y){
if(x==0)
return y;
if(y==0)
return x;
long r=0, a, b;
a = (x > y) ? x : y;
b = (x < y) ? x : y;
r = b;
while(a % b != 0){
r = a % b;
a = b;
b = r;
}
return r;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
20,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
13,
13,
30,
0,
18,
13,
13,
17,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
18,
13,
13,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
27
],
[
27,
28
],
[
27,
29
],
[
8,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
42,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
53,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
69,
79
],
[
79,
80
],
[
80,
81
],
[
69,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
86,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
84,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
8,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
104,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
6,
122
],
[
122,
123
]
]
| [
"import java.util.Scanner;\n\nclass Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int d1 = 0;\n int d2 = 0;\n boolean[] boo = new boolean[n];\n boolean result = false;\n\n for(int i = 0; i < n; i++){\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n\n if(d1 == d2){\n boo[i] = true;\n }\n else{\n boo[i] = false;\n }\n }\n\n for(int i = 0; i < n-2; i++){\n if(boo[i] && boo[i+1] && boo[i+2]){\n result = true;\n }\n }\n\n if(result == true){\n System.out.println(\"Yes\");\n }\n else{\n System.out.println(\"No\");\n }\n } \n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int d1 = 0;\n int d2 = 0;\n boolean[] boo = new boolean[n];\n boolean result = false;\n\n for(int i = 0; i < n; i++){\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n\n if(d1 == d2){\n boo[i] = true;\n }\n else{\n boo[i] = false;\n }\n }\n\n for(int i = 0; i < n-2; i++){\n if(boo[i] && boo[i+1] && boo[i+2]){\n result = true;\n }\n }\n\n if(result == true){\n System.out.println(\"Yes\");\n }\n else{\n System.out.println(\"No\");\n }\n } \n}",
"Main",
"public static void main(String args[]){\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int d1 = 0;\n int d2 = 0;\n boolean[] boo = new boolean[n];\n boolean result = false;\n\n for(int i = 0; i < n; i++){\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n\n if(d1 == d2){\n boo[i] = true;\n }\n else{\n boo[i] = false;\n }\n }\n\n for(int i = 0; i < n-2; i++){\n if(boo[i] && boo[i+1] && boo[i+2]){\n result = true;\n }\n }\n\n if(result == true){\n System.out.println(\"Yes\");\n }\n else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n int d1 = 0;\n int d2 = 0;\n boolean[] boo = new boolean[n];\n boolean result = false;\n\n for(int i = 0; i < n; i++){\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n\n if(d1 == d2){\n boo[i] = true;\n }\n else{\n boo[i] = false;\n }\n }\n\n for(int i = 0; i < n-2; i++){\n if(boo[i] && boo[i+1] && boo[i+2]){\n result = true;\n }\n }\n\n if(result == true){\n System.out.println(\"Yes\");\n }\n else{\n System.out.println(\"No\");\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d1 = 0;",
"d1",
"0",
"int d2 = 0;",
"d2",
"0",
"boolean[] boo = new boolean[n];",
"boo",
"new boolean[n]",
"n",
"boolean result = false;",
"result",
"false",
"for(int i = 0; i < n; i++){\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n\n if(d1 == d2){\n boo[i] = true;\n }\n else{\n boo[i] = false;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n\n if(d1 == d2){\n boo[i] = true;\n }\n else{\n boo[i] = false;\n }\n }",
"{\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n\n if(d1 == d2){\n boo[i] = true;\n }\n else{\n boo[i] = false;\n }\n }",
"d1 = sc.nextInt()",
"d1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d2 = sc.nextInt()",
"d2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(d1 == d2){\n boo[i] = true;\n }\n else{\n boo[i] = false;\n }",
"d1 == d2",
"d1",
"d2",
"{\n boo[i] = true;\n }",
"boo[i] = true",
"boo[i]",
"boo",
"i",
"true",
"{\n boo[i] = false;\n }",
"boo[i] = false",
"boo[i]",
"boo",
"i",
"false",
"for(int i = 0; i < n-2; i++){\n if(boo[i] && boo[i+1] && boo[i+2]){\n result = true;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n-2",
"i",
"n-2",
"n",
"2",
"i++",
"i++",
"i",
"{\n if(boo[i] && boo[i+1] && boo[i+2]){\n result = true;\n }\n }",
"{\n if(boo[i] && boo[i+1] && boo[i+2]){\n result = true;\n }\n }",
"if(boo[i] && boo[i+1] && boo[i+2]){\n result = true;\n }",
"boo[i] && boo[i+1] && boo[i+2]",
"boo[i] && boo[i+1] && boo[i+2]",
"boo[i]",
"boo",
"i",
"boo[i+1]",
"boo",
"i+1",
"i",
"1",
"boo[i+2]",
"boo",
"i+2",
"i",
"2",
"{\n result = true;\n }",
"result = true",
"result",
"true",
"if(result == true){\n System.out.println(\"Yes\");\n }\n else{\n System.out.println(\"No\");\n }",
"result == true",
"result",
"true",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String args[]",
"args"
]
| import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int d1 = 0;
int d2 = 0;
boolean[] boo = new boolean[n];
boolean result = false;
for(int i = 0; i < n; i++){
d1 = sc.nextInt();
d2 = sc.nextInt();
if(d1 == d2){
boo[i] = true;
}
else{
boo[i] = false;
}
}
for(int i = 0; i < n-2; i++){
if(boo[i] && boo[i+1] && boo[i+2]){
result = true;
}
}
if(result == true){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
0,
13,
17,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
135,
5
],
[
135,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
34,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
53,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
56,
66
],
[
66,
67
],
[
67,
68
],
[
56,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
73,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
85,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
93,
99
],
[
73,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
101,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
71,
115
],
[
115,
116
],
[
115,
117
],
[
8,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
118,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
6,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
]
| [
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n int d = sc.nextInt();\n int[][] t = new int[d][2];\n for(int i=0;i<d;i++){\n \tt[i][0] = sc.nextInt();\n \tt[i][1] = sc.nextInt();\n }\n boolean flag = false;\n for(int i=0;i<d-2;i++){\n \tif(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;\n }\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n int d = sc.nextInt();\n int[][] t = new int[d][2];\n for(int i=0;i<d;i++){\n \tt[i][0] = sc.nextInt();\n \tt[i][1] = sc.nextInt();\n }\n boolean flag = false;\n for(int i=0;i<d-2;i++){\n \tif(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;\n }\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n int d = sc.nextInt();\n int[][] t = new int[d][2];\n for(int i=0;i<d;i++){\n \tt[i][0] = sc.nextInt();\n \tt[i][1] = sc.nextInt();\n }\n boolean flag = false;\n for(int i=0;i<d-2;i++){\n \tif(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;\n }\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"main",
"{\n \tScanner sc = new Scanner(System.in);\n int d = sc.nextInt();\n int[][] t = new int[d][2];\n for(int i=0;i<d;i++){\n \tt[i][0] = sc.nextInt();\n \tt[i][1] = sc.nextInt();\n }\n boolean flag = false;\n for(int i=0;i<d-2;i++){\n \tif(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;\n }\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int d = sc.nextInt();",
"d",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] t = new int[d][2];",
"t",
"new int[d][2]",
"d",
"2",
"for(int i=0;i<d;i++){\n \tt[i][0] = sc.nextInt();\n \tt[i][1] = sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<d",
"i",
"d",
"i++",
"i++",
"i",
"{\n \tt[i][0] = sc.nextInt();\n \tt[i][1] = sc.nextInt();\n }",
"{\n \tt[i][0] = sc.nextInt();\n \tt[i][1] = sc.nextInt();\n }",
"t[i][0] = sc.nextInt()",
"t[i][0]",
"t[i]",
"t",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"t[i][1] = sc.nextInt()",
"t[i][1]",
"t[i]",
"t",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean flag = false;",
"flag",
"false",
"for(int i=0;i<d-2;i++){\n \tif(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<d-2",
"i",
"d-2",
"d",
"2",
"i++",
"i++",
"i",
"{\n \tif(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;\n }",
"{\n \tif(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;\n }",
"if(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;",
"t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]",
"t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]",
"t[i][0] == t[i][1]",
"t[i][0]",
"t[i]",
"t",
"i",
"0",
"t[i][1]",
"t[i]",
"t",
"i",
"1",
"t[i+1][0] == t[i+1][1]",
"t[i+1][0]",
"t[i+1]",
"t",
"i+1",
"i",
"1",
"0",
"t[i+1][1]",
"t[i+1]",
"t",
"i+1",
"i",
"1",
"1",
"t[i+2][0] == t[i+2][1]",
"t[i+2][0]",
"t[i+2]",
"t",
"i+2",
"i",
"2",
"0",
"t[i+2][1]",
"t[i+2]",
"t",
"i+2",
"i",
"2",
"1",
"flag = true",
"flag",
"true",
"if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");",
"flag",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n int d = sc.nextInt();\n int[][] t = new int[d][2];\n for(int i=0;i<d;i++){\n \tt[i][0] = sc.nextInt();\n \tt[i][1] = sc.nextInt();\n }\n boolean flag = false;\n for(int i=0;i<d-2;i++){\n \tif(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;\n }\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"public class Main{\n public static void main(String[] args){\n \tScanner sc = new Scanner(System.in);\n int d = sc.nextInt();\n int[][] t = new int[d][2];\n for(int i=0;i<d;i++){\n \tt[i][0] = sc.nextInt();\n \tt[i][1] = sc.nextInt();\n }\n boolean flag = false;\n for(int i=0;i<d-2;i++){\n \tif(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;\n }\n if(flag) System.out.println(\"Yes\");\n else System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int d = sc.nextInt();
int[][] t = new int[d][2];
for(int i=0;i<d;i++){
t[i][0] = sc.nextInt();
t[i][1] = sc.nextInt();
}
boolean flag = false;
for(int i=0;i<d-2;i++){
if(t[i][0] == t[i][1] && t[i+1][0] == t[i+1][1] && t[i+2][0] == t[i+2][1]) flag = true;
}
if(flag) System.out.println("Yes");
else System.out.println("No");
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
104,
17
],
[
104,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
29,
30
],
[
30,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
20,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
50,
55
],
[
47,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
61,
63
],
[
47,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
69,
71
],
[
47,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
72,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
47,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
87,
94
],
[
20,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
18,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.HashMap;\nimport java.util.Map;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str[] = br.readLine().split(\" \");\n\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\n\t\t\tif (a == b) {\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif (count >= 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.HashMap;",
"HashMap",
"java.util",
"import java.util.Map;",
"Map",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str[] = br.readLine().split(\" \");\n\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\n\t\t\tif (a == b) {\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif (count >= 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str[] = br.readLine().split(\" \");\n\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\n\t\t\tif (a == b) {\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif (count >= 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str[] = br.readLine().split(\" \");\n\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\n\t\t\tif (a == b) {\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif (count >= 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\tString str[] = br.readLine().split(\" \");\n\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\n\t\t\tif (a == b) {\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif (count >= 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString str[] = br.readLine().split(\" \");\n\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\n\t\t\tif (a == b) {\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif (count >= 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"{\n\t\t\tString str[] = br.readLine().split(\" \");\n\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\n\t\t\tif (a == b) {\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif (count >= 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"String str[] = br.readLine().split(\" \");",
"str",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int a = Integer.parseInt(str[0]);",
"a",
"Integer.parseInt(str[0])",
"Integer.parseInt",
"Integer",
"str[0]",
"str",
"0",
"int b = Integer.parseInt(str[1]);",
"b",
"Integer.parseInt(str[1])",
"Integer.parseInt",
"Integer",
"str[1]",
"str",
"1",
"if (a == b) {\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}",
"a == b",
"a",
"b",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"{\n\t\t\t\tcount = 0;\n\t\t\t}",
"count = 0",
"count",
"0",
"if (count >= 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"count >= 3",
"count",
"3",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str[] = br.readLine().split(\" \");\n\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\n\t\t\tif (a == b) {\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif (count >= 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tint n = Integer.parseInt(br.readLine());\n\n\t\tint count = 0;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tString str[] = br.readLine().split(\" \");\n\n\t\t\tint a = Integer.parseInt(str[0]);\n\t\t\tint b = Integer.parseInt(str[1]);\n\n\t\t\tif (a == b) {\n\t\t\t\tcount++;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif (count >= 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
int count = 0;
for (int i = 0; i < n; i++) {
String str[] = br.readLine().split(" ");
int a = Integer.parseInt(str[0]);
int b = Integer.parseInt(str[1]);
if (a == b) {
count++;
} else {
count = 0;
}
if (count >= 3) {
System.out.println("Yes");
return;
}
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
13,
13,
18,
13,
13,
2,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
2,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
3,
14,
2,
13,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
128,
5
],
[
128,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
25,
35
],
[
35,
36
],
[
36,
37
],
[
25,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
8,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
54,
64
],
[
64,
65
],
[
65,
66
],
[
54,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
79,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
71,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
90,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
69,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
101,
108
],
[
69,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
116,
121
],
[
8,
122
],
[
122,
123
],
[
123,
124
],
[
6,
125
],
[
125,
126
],
[
0,
127
],
[
127,
128
],
[
127,
129
]
]
| [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\n\t\tint n=sc.nextInt();\n\t\tint[] d1=new int[n];\n\t\tint[] d2=new int[n];\n\t\tfor(int i=0;i<=n-1;i++) {\n\t\t\td1[i]=sc.nextInt();\n\t\t\td2[i]=sc.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=n-3;i++) {\n\t\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\t\t\n\t\t}\n\t\tsc.close();\n\t\t}\n\t}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\n\t\tint n=sc.nextInt();\n\t\tint[] d1=new int[n];\n\t\tint[] d2=new int[n];\n\t\tfor(int i=0;i<=n-1;i++) {\n\t\t\td1[i]=sc.nextInt();\n\t\t\td2[i]=sc.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=n-3;i++) {\n\t\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\t\t\n\t\t}\n\t\tsc.close();\n\t\t}\n\t}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\n\t\tint n=sc.nextInt();\n\t\tint[] d1=new int[n];\n\t\tint[] d2=new int[n];\n\t\tfor(int i=0;i<=n-1;i++) {\n\t\t\td1[i]=sc.nextInt();\n\t\t\td2[i]=sc.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=n-3;i++) {\n\t\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\t\t\n\t\t}\n\t\tsc.close();\n\t\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\n\t\tint n=sc.nextInt();\n\t\tint[] d1=new int[n];\n\t\tint[] d2=new int[n];\n\t\tfor(int i=0;i<=n-1;i++) {\n\t\t\td1[i]=sc.nextInt();\n\t\t\td2[i]=sc.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=n-3;i++) {\n\t\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\t\t\n\t\t}\n\t\tsc.close();\n\t\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] d1=new int[n];",
"d1",
"new int[n]",
"n",
"int[] d2=new int[n];",
"d2",
"new int[n]",
"n",
"for(int i=0;i<=n-1;i++) {\n\t\t\td1[i]=sc.nextInt();\n\t\t\td2[i]=sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=n-1",
"i",
"n-1",
"n",
"1",
"i++",
"i++",
"i",
"{\n\t\t\td1[i]=sc.nextInt();\n\t\t\td2[i]=sc.nextInt();\n\t\t}",
"{\n\t\t\td1[i]=sc.nextInt();\n\t\t\td2[i]=sc.nextInt();\n\t\t}",
"d1[i]=sc.nextInt()",
"d1[i]",
"d1",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d2[i]=sc.nextInt()",
"d2[i]",
"d2",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<=n-3;i++) {\n\t\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\t\t\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=n-3",
"i",
"n-3",
"n",
"3",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\t\t\n\t\t}",
"{\n\t\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\t\t\n\t\t}",
"if(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}",
"d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]",
"d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]",
"d1[i]==d2[i]",
"d1[i]",
"d1",
"i",
"d2[i]",
"d2",
"i",
"d1[i+1]==d2[i+1]",
"d1[i+1]",
"d1",
"i+1",
"i",
"1",
"d2[i+1]",
"d2",
"i+1",
"i",
"1",
"d1[i+2]==d2[i+2]",
"d1[i+2]",
"d1",
"i+2",
"i",
"2",
"d2[i+2]",
"d2",
"i+2",
"i",
"2",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"break;",
"if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}",
"i==n-3",
"i",
"n-3",
"n",
"3",
"{\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\n\t\tint n=sc.nextInt();\n\t\tint[] d1=new int[n];\n\t\tint[] d2=new int[n];\n\t\tfor(int i=0;i<=n-1;i++) {\n\t\t\td1[i]=sc.nextInt();\n\t\t\td2[i]=sc.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=n-3;i++) {\n\t\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\t\t\n\t\t}\n\t\tsc.close();\n\t\t}\n\t}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\n\t\tint n=sc.nextInt();\n\t\tint[] d1=new int[n];\n\t\tint[] d2=new int[n];\n\t\tfor(int i=0;i<=n-1;i++) {\n\t\t\td1[i]=sc.nextInt();\n\t\t\td2[i]=sc.nextInt();\n\t\t}\n\t\t\n\t\tfor(int i=0;i<=n-3;i++) {\n\t\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\telse if(i==n-3) {\n\t\t\t\t\tSystem.out.println(\"No\");\n\t\t\t\t}\t\t\n\t\t}\n\t\tsc.close();\n\t\t}\n\t}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int[] d1=new int[n];
int[] d2=new int[n];
for(int i=0;i<=n-1;i++) {
d1[i]=sc.nextInt();
d2[i]=sc.nextInt();
}
for(int i=0;i<=n-3;i++) {
if(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]) {
System.out.println("Yes");
break;
}
else if(i==n-3) {
System.out.println("No");
}
}
sc.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
0,
13,
17,
40,
13,
30,
0,
13,
17,
0,
13,
17,
14,
2,
13,
17,
3,
14,
2,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
131,
11
],
[
131,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
14,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
41,
46
],
[
46,
47
],
[
46,
48
],
[
41,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
53,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
54,
60
],
[
60,
61
],
[
61,
62
],
[
14,
63
],
[
63,
64
],
[
63,
65
],
[
14,
66
],
[
66,
67
],
[
66,
68
],
[
14,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
82,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
82,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
104,
106
],
[
81,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
107,
111
],
[
14,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
116,
118
],
[
14,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
119,
124
],
[
124,
125
],
[
124,
126
],
[
124,
127
],
[
12,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
]
| [
"import java.util.*;\nimport java.math.RoundingMode;\nimport java.math.BigDecimal;\n \n \npublic class Main{\n\tpublic static void main (String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tboolean cont = false;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}\n\t\t\tif(num>=3) break;\n\t\t}\n\t\tif(num<3)cont=false;\n\t\tSystem.out.println(cont? \"Yes\":\"No\");\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.math.RoundingMode;",
"RoundingMode",
"java.math",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"public class Main{\n\tpublic static void main (String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tboolean cont = false;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}\n\t\t\tif(num>=3) break;\n\t\t}\n\t\tif(num<3)cont=false;\n\t\tSystem.out.println(cont? \"Yes\":\"No\");\n\t}\n}",
"Main",
"public static void main (String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tboolean cont = false;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}\n\t\t\tif(num>=3) break;\n\t\t}\n\t\tif(num<3)cont=false;\n\t\tSystem.out.println(cont? \"Yes\":\"No\");\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tboolean cont = false;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}\n\t\t\tif(num>=3) break;\n\t\t}\n\t\tif(num<3)cont=false;\n\t\tSystem.out.println(cont? \"Yes\":\"No\");\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] d = new int[n][2];",
"d",
"new int[n][2]",
"n",
"2",
"for(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}",
"for(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < 2",
"j",
"2",
"j++",
"j++",
"j",
"{\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}",
"{\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}",
"d[i][j] = sc.nextInt()",
"d[i][j]",
"d[i]",
"d",
"i",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int num = 0;",
"num",
"0",
"boolean cont = false;",
"cont",
"false",
"for(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}\n\t\t\tif(num>=3) break;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}\n\t\t\tif(num>=3) break;\n\t\t}",
"{\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}\n\t\t\tif(num>=3) break;\n\t\t}",
"if(d[i][0]==d[i][1]) {\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}",
"d[i][0]==d[i][1]",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"{\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}",
"cont = true",
"cont",
"true",
"num++",
"num",
"{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}",
"cont = false",
"cont",
"false",
"num=0",
"num",
"0",
"if(num>=3) break;",
"num>=3",
"num",
"3",
"break;",
"if(num<3)cont=false;",
"num<3",
"num",
"3",
"cont=false",
"cont",
"false",
"System.out.println(cont? \"Yes\":\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"cont? \"Yes\":\"No\"",
"cont",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public class Main{\n\tpublic static void main (String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tboolean cont = false;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}\n\t\t\tif(num>=3) break;\n\t\t}\n\t\tif(num<3)cont=false;\n\t\tSystem.out.println(cont? \"Yes\":\"No\");\n\t}\n}",
"public class Main{\n\tpublic static void main (String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint num = 0;\n\t\tboolean cont = false;\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcont = true;\n\t\t\t\tnum++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tcont = false;\n\t\t\t\tnum=0;\n\t\t\t}\n\t\t\tif(num>=3) break;\n\t\t}\n\t\tif(num<3)cont=false;\n\t\tSystem.out.println(cont? \"Yes\":\"No\");\n\t}\n}",
"Main"
]
| import java.util.*;
import java.math.RoundingMode;
import java.math.BigDecimal;
public class Main{
public static void main (String[] args){
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[][] d = new int[n][2];
for(int i = 0; i < n; i++) {
for(int j = 0; j < 2; j++) {
d[i][j] = sc.nextInt();
}
}
int num = 0;
boolean cont = false;
for(int i = 0; i < n; i++) {
if(d[i][0]==d[i][1]) {
cont = true;
num++;
}
else{
cont = false;
num=0;
}
if(num>=3) break;
}
if(num<3)cont=false;
System.out.println(cont? "Yes":"No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
78,
5
],
[
78,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
54,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
43,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
6,
75
],
[
75,
76
],
[
0,
77
],
[
77,
78
],
[
77,
79
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint dd = 0;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif ( d1 == d2 ) {\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdd=0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\t}\n\t\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint dd = 0;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif ( d1 == d2 ) {\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdd=0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\t}\n\t\n}",
"Main",
"public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint dd = 0;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif ( d1 == d2 ) {\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdd=0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\t}",
"main",
"{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint dd = 0;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif ( d1 == d2 ) {\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdd=0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int dd = 0;",
"dd",
"0",
"for(int i=0; i<n;i++) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif ( d1 == d2 ) {\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdd=0;\n\t\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif ( d1 == d2 ) {\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdd=0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif ( d1 == d2 ) {\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdd=0;\n\t\t\t}\n\t\t}",
"int d1 = sc.nextInt();",
"d1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d2 = sc.nextInt();",
"d2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if ( d1 == d2 ) {\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdd=0;\n\t\t\t}",
"d1 == d2",
"d1",
"d2",
"{\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}",
"dd++",
"dd",
"if(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}",
"dd>=3",
"dd",
"3",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.exit(0)",
"System.exit",
"System",
"0",
"{\n\t\t\t\tdd=0;\n\t\t\t}",
"dd=0",
"dd",
"0",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint dd = 0;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif ( d1 == d2 ) {\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdd=0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\t}\n\t\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\t\n\t\tint dd = 0;\n\t\tfor(int i=0; i<n;i++) {\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif ( d1 == d2 ) {\n\t\t\t\tdd++;\n\t\t\t\tif(dd>=3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tdd=0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\n\t}\n\t\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int dd = 0;
for(int i=0; i<n;i++) {
int d1 = sc.nextInt();
int d2 = sc.nextInt();
if ( d1 == d2 ) {
dd++;
if(dd>=3) {
System.out.println("Yes");
System.exit(0);
}
}else{
dd=0;
}
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
4,
18,
13,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
30,
0,
13,
17,
4,
18,
18,
13,
13,
17,
29,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
103,
5
],
[
103,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
38,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
48,
49
],
[
37,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
60,
61
],
[
37,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
62,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
81,
88
],
[
62,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
8,
99
],
[
6,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N= scan.nextInt();\n\t\tint[][] darr = new int[N][2];\n\t\tint zorome = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tdarr[i][0] = Integer.parseInt(scan.next());\n\t\t\tdarr[i][1] = Integer.parseInt(scan.next());\n\t\t\tif (darr[i][0]==darr[i][1]) {\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzorome = 0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t\treturn;\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N= scan.nextInt();\n\t\tint[][] darr = new int[N][2];\n\t\tint zorome = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tdarr[i][0] = Integer.parseInt(scan.next());\n\t\t\tdarr[i][1] = Integer.parseInt(scan.next());\n\t\t\tif (darr[i][0]==darr[i][1]) {\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzorome = 0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t\treturn;\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N= scan.nextInt();\n\t\tint[][] darr = new int[N][2];\n\t\tint zorome = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tdarr[i][0] = Integer.parseInt(scan.next());\n\t\t\tdarr[i][1] = Integer.parseInt(scan.next());\n\t\t\tif (darr[i][0]==darr[i][1]) {\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzorome = 0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t\treturn;\n\t}",
"main",
"{\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N= scan.nextInt();\n\t\tint[][] darr = new int[N][2];\n\t\tint zorome = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tdarr[i][0] = Integer.parseInt(scan.next());\n\t\t\tdarr[i][1] = Integer.parseInt(scan.next());\n\t\t\tif (darr[i][0]==darr[i][1]) {\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzorome = 0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t\treturn;\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N= scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[][] darr = new int[N][2];",
"darr",
"new int[N][2]",
"N",
"2",
"int zorome = 0;",
"zorome",
"0",
"for (int i = 0; i < N; i++) {\n\t\t\tdarr[i][0] = Integer.parseInt(scan.next());\n\t\t\tdarr[i][1] = Integer.parseInt(scan.next());\n\t\t\tif (darr[i][0]==darr[i][1]) {\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzorome = 0;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tdarr[i][0] = Integer.parseInt(scan.next());\n\t\t\tdarr[i][1] = Integer.parseInt(scan.next());\n\t\t\tif (darr[i][0]==darr[i][1]) {\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzorome = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tdarr[i][0] = Integer.parseInt(scan.next());\n\t\t\tdarr[i][1] = Integer.parseInt(scan.next());\n\t\t\tif (darr[i][0]==darr[i][1]) {\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzorome = 0;\n\t\t\t}\n\t\t}",
"darr[i][0] = Integer.parseInt(scan.next())",
"darr[i][0]",
"darr[i]",
"darr",
"i",
"0",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"darr[i][1] = Integer.parseInt(scan.next())",
"darr[i][1]",
"darr[i]",
"darr",
"i",
"1",
"Integer.parseInt(scan.next())",
"Integer.parseInt",
"Integer",
"scan.next()",
"scan.next",
"scan",
"if (darr[i][0]==darr[i][1]) {\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzorome = 0;\n\t\t\t}",
"darr[i][0]==darr[i][1]",
"darr[i][0]",
"darr[i]",
"darr",
"i",
"0",
"darr[i][1]",
"darr[i]",
"darr",
"i",
"1",
"{\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}",
"zorome++",
"zorome",
"if (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"zorome ==3",
"zorome",
"3",
"{\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"{\n\t\t\t\tzorome = 0;\n\t\t\t}",
"zorome = 0",
"zorome",
"0",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"return;",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N= scan.nextInt();\n\t\tint[][] darr = new int[N][2];\n\t\tint zorome = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tdarr[i][0] = Integer.parseInt(scan.next());\n\t\t\tdarr[i][1] = Integer.parseInt(scan.next());\n\t\t\tif (darr[i][0]==darr[i][1]) {\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzorome = 0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t\treturn;\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N= scan.nextInt();\n\t\tint[][] darr = new int[N][2];\n\t\tint zorome = 0;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tdarr[i][0] = Integer.parseInt(scan.next());\n\t\t\tdarr[i][1] = Integer.parseInt(scan.next());\n\t\t\tif (darr[i][0]==darr[i][1]) {\n\t\t\t\tzorome++;\n\t\t\t\tif (zorome ==3) {\n\t\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tzorome = 0;\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"No\");\n\t\treturn;\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N= scan.nextInt();
int[][] darr = new int[N][2];
int zorome = 0;
for (int i = 0; i < N; i++) {
darr[i][0] = Integer.parseInt(scan.next());
darr[i][1] = Integer.parseInt(scan.next());
if (darr[i][0]==darr[i][1]) {
zorome++;
if (zorome ==3) {
System.out.println("Yes");
return;
}
} else {
zorome = 0;
}
}
System.out.println("No");
return;
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
2,
2,
13,
13,
13,
13,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
17,
0,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
84,
5
],
[
84,
6
],
[
6,
7
],
[
84,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
10,
19
],
[
19,
20
],
[
19,
21
],
[
10,
22
],
[
22,
23
],
[
22,
24
],
[
10,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
48,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
50,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
56,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
37,
67
],
[
67,
68
],
[
67,
69
],
[
37,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
10,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
8,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static long[] nums;\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tboolean flag1 = false;\n\t\tboolean flag2 = false;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scan.nextInt();\n\t\t\tint D2 = scan.nextInt();\n\n\t\t\tif (D1 == D2 && flag1 && flag2) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tflag1 = flag2;\n\t\t\tflag2 = D1 == D2;\n\t\t}\n\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static long[] nums;\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tboolean flag1 = false;\n\t\tboolean flag2 = false;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scan.nextInt();\n\t\t\tint D2 = scan.nextInt();\n\n\t\t\tif (D1 == D2 && flag1 && flag2) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tflag1 = flag2;\n\t\t\tflag2 = D1 == D2;\n\t\t}\n\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main",
"public static long[] nums;",
"nums",
"public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tboolean flag1 = false;\n\t\tboolean flag2 = false;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scan.nextInt();\n\t\t\tint D2 = scan.nextInt();\n\n\t\t\tif (D1 == D2 && flag1 && flag2) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tflag1 = flag2;\n\t\t\tflag2 = D1 == D2;\n\t\t}\n\n\t\tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tboolean flag1 = false;\n\t\tboolean flag2 = false;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scan.nextInt();\n\t\t\tint D2 = scan.nextInt();\n\n\t\t\tif (D1 == D2 && flag1 && flag2) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tflag1 = flag2;\n\t\t\tflag2 = D1 == D2;\n\t\t}\n\n\t\tSystem.out.println(\"No\");\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"boolean flag1 = false;",
"flag1",
"false",
"boolean flag2 = false;",
"flag2",
"false",
"for (int i = 0; i < N; i++) {\n\t\t\tint D1 = scan.nextInt();\n\t\t\tint D2 = scan.nextInt();\n\n\t\t\tif (D1 == D2 && flag1 && flag2) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tflag1 = flag2;\n\t\t\tflag2 = D1 == D2;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tint D1 = scan.nextInt();\n\t\t\tint D2 = scan.nextInt();\n\n\t\t\tif (D1 == D2 && flag1 && flag2) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tflag1 = flag2;\n\t\t\tflag2 = D1 == D2;\n\t\t}",
"{\n\t\t\tint D1 = scan.nextInt();\n\t\t\tint D2 = scan.nextInt();\n\n\t\t\tif (D1 == D2 && flag1 && flag2) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tflag1 = flag2;\n\t\t\tflag2 = D1 == D2;\n\t\t}",
"int D1 = scan.nextInt();",
"D1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int D2 = scan.nextInt();",
"D2",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if (D1 == D2 && flag1 && flag2) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"D1 == D2 && flag1 && flag2",
"D1 == D2 && flag1 && flag2",
"D1 == D2",
"D1",
"D2",
"flag1",
"flag2",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.exit(0)",
"System.exit",
"System",
"0",
"flag1 = flag2",
"flag1",
"flag2",
"flag2 = D1 == D2",
"flag2",
"D1 == D2",
"D1",
"D2",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static long[] nums;\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tboolean flag1 = false;\n\t\tboolean flag2 = false;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scan.nextInt();\n\t\t\tint D2 = scan.nextInt();\n\n\t\t\tif (D1 == D2 && flag1 && flag2) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tflag1 = flag2;\n\t\t\tflag2 = D1 == D2;\n\t\t}\n\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"public class Main {\n\n\tpublic static long[] nums;\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\t\tint N = scan.nextInt();\n\t\tboolean flag1 = false;\n\t\tboolean flag2 = false;\n\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint D1 = scan.nextInt();\n\t\t\tint D2 = scan.nextInt();\n\n\t\t\tif (D1 == D2 && flag1 && flag2) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tflag1 = flag2;\n\t\t\tflag2 = D1 == D2;\n\t\t}\n\n\t\tSystem.out.println(\"No\");\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static long[] nums;
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
boolean flag1 = false;
boolean flag2 = false;
for (int i = 0; i < N; i++) {
int D1 = scan.nextInt();
int D2 = scan.nextInt();
if (D1 == D2 && flag1 && flag2) {
System.out.println("Yes");
System.exit(0);
}
flag1 = flag2;
flag2 = D1 == D2;
}
System.out.println("No");
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
73,
5
],
[
73,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
24,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
24,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
35,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
24,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
52,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
6,
70
],
[
70,
71
],
[
0,
72
],
[
72,
73
],
[
72,
74
]
]
| [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n int count=0;\n while(n!=0)\n {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a==b)\n {\n count++;\n }\n else if(count<3)\n {\n count=0;\n }\n n--;\n }\n if(count>=3)\n {\n System.out.println(\"Yes\");\n }\n else\n {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n int count=0;\n while(n!=0)\n {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a==b)\n {\n count++;\n }\n else if(count<3)\n {\n count=0;\n }\n n--;\n }\n if(count>=3)\n {\n System.out.println(\"Yes\");\n }\n else\n {\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n int count=0;\n while(n!=0)\n {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a==b)\n {\n count++;\n }\n else if(count<3)\n {\n count=0;\n }\n n--;\n }\n if(count>=3)\n {\n System.out.println(\"Yes\");\n }\n else\n {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n int count=0;\n while(n!=0)\n {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a==b)\n {\n count++;\n }\n else if(count<3)\n {\n count=0;\n }\n n--;\n }\n if(count>=3)\n {\n System.out.println(\"Yes\");\n }\n else\n {\n System.out.println(\"No\");\n }\n }",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"int n = scn.nextInt();",
"n",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int count=0;",
"count",
"0",
"while(n!=0)\n {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a==b)\n {\n count++;\n }\n else if(count<3)\n {\n count=0;\n }\n n--;\n }",
"n!=0",
"n",
"0",
"{\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a==b)\n {\n count++;\n }\n else if(count<3)\n {\n count=0;\n }\n n--;\n }",
"int a = scn.nextInt();",
"a",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int b = scn.nextInt();",
"b",
"scn.nextInt()",
"scn.nextInt",
"scn",
"if(a==b)\n {\n count++;\n }\n else if(count<3)\n {\n count=0;\n }",
"a==b",
"a",
"b",
"{\n count++;\n }",
"count++",
"count",
"if(count<3)\n {\n count=0;\n }",
"count<3",
"count",
"3",
"{\n count=0;\n }",
"count=0",
"count",
"0",
"n--",
"n",
"if(count>=3)\n {\n System.out.println(\"Yes\");\n }\n else\n {\n System.out.println(\"No\");\n }",
"count>=3",
"count",
"3",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n int count=0;\n while(n!=0)\n {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a==b)\n {\n count++;\n }\n else if(count<3)\n {\n count=0;\n }\n n--;\n }\n if(count>=3)\n {\n System.out.println(\"Yes\");\n }\n else\n {\n System.out.println(\"No\");\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner scn = new Scanner(System.in);\n int n = scn.nextInt();\n int count=0;\n while(n!=0)\n {\n int a = scn.nextInt();\n int b = scn.nextInt();\n if(a==b)\n {\n count++;\n }\n else if(count<3)\n {\n count=0;\n }\n n--;\n }\n if(count>=3)\n {\n System.out.println(\"Yes\");\n }\n else\n {\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String[] args){
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int count=0;
while(n!=0)
{
int a = scn.nextInt();
int b = scn.nextInt();
if(a==b)
{
count++;
}
else if(count<3)
{
count=0;
}
n--;
}
if(count>=3)
{
System.out.println("Yes");
}
else
{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
20,
41,
13,
20,
12,
13,
30,
4,
18,
13,
4,
18,
2,
13,
17,
23,
13,
12,
13,
30,
4,
18,
13,
4,
18,
2,
13,
17,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
4,
18,
13,
4,
18,
2,
18,
13,
13,
17,
4,
18,
13,
4,
18,
17,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
4,
18,
13,
4,
18,
2,
18,
13,
13,
17,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
23,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
23,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
42,
2,
40,
13,
17,
30,
4,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
13,
17,
4,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
351,
11
],
[
351,
12
],
[
12,
13
],
[
12,
14
],
[
351,
15
],
[
15,
16
],
[
15,
17
],
[
351,
18
],
[
18,
19
],
[
18,
20
],
[
351,
21
],
[
21,
22
],
[
21,
23
],
[
351,
24
],
[
24,
25
],
[
24,
26
],
[
351,
27
],
[
27,
28
],
[
27,
29
],
[
351,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
30,
41
],
[
41,
42
],
[
351,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
43,
54
],
[
54,
55
],
[
351,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
59,
69
],
[
69,
70
],
[
70,
71
],
[
59,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
58,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
87,
88
],
[
56,
89
],
[
89,
90
],
[
351,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
94,
104
],
[
104,
105
],
[
105,
106
],
[
94,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
91,
118
],
[
118,
119
],
[
351,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
128,
130
],
[
123,
131
],
[
131,
132
],
[
132,
133
],
[
123,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
140,
141
],
[
120,
142
],
[
142,
143
],
[
120,
144
],
[
144,
145
],
[
351,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
149,
154
],
[
154,
155
],
[
154,
156
],
[
149,
157
],
[
157,
158
],
[
158,
159
],
[
149,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
165,
166
],
[
166,
167
],
[
146,
168
],
[
168,
169
],
[
146,
170
],
[
170,
171
],
[
351,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
175,
180
],
[
180,
181
],
[
180,
182
],
[
175,
183
],
[
183,
184
],
[
184,
185
],
[
175,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
187,
192
],
[
192,
193
],
[
192,
194
],
[
187,
195
],
[
195,
196
],
[
196,
197
],
[
187,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
201,
203
],
[
200,
204
],
[
199,
205
],
[
205,
206
],
[
206,
207
],
[
172,
208
],
[
208,
209
],
[
172,
210
],
[
210,
211
],
[
172,
212
],
[
212,
213
],
[
351,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
216,
222
],
[
222,
223
],
[
222,
224
],
[
216,
225
],
[
225,
226
],
[
225,
227
],
[
216,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
229,
232
],
[
228,
233
],
[
233,
234
],
[
234,
235
],
[
216,
236
],
[
236,
237
],
[
237,
238
],
[
214,
239
],
[
239,
240
],
[
351,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
247,
248
],
[
243,
249
],
[
249,
250
],
[
249,
251
],
[
243,
254
],
[
254,
255
],
[
254,
256
],
[
243,
257
],
[
257,
258
],
[
257,
259
],
[
243,
260
],
[
260,
261
],
[
261,
262
],
[
262,
263
],
[
262,
264
],
[
260,
265
],
[
265,
266
],
[
265,
267
],
[
260,
268
],
[
268,
269
],
[
269,
270
],
[
260,
271
],
[
272,
272
],
[
272,
273
],
[
273,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
274,
278
],
[
273,
279
],
[
279,
280
],
[
280,
281
],
[
272,
282
],
[
282,
283
],
[
283,
284
],
[
284,
285
],
[
284,
286
],
[
283,
287
],
[
282,
288
],
[
288,
289
],
[
289,
290
],
[
272,
291
],
[
291,
292
],
[
292,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
293,
297
],
[
292,
298
],
[
298,
299
],
[
299,
300
],
[
299,
301
],
[
298,
302
],
[
291,
303
],
[
303,
304
],
[
304,
305
],
[
291,
306
],
[
306,
307
],
[
307,
308
],
[
307,
309
],
[
272,
310
],
[
310,
311
],
[
311,
312
],
[
311,
313
],
[
310,
314
],
[
314,
315
],
[
315,
316
],
[
315,
317
],
[
243,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
318,
324
],
[
324,
325
],
[
324,
326
],
[
0,
327
],
[
327,
328
],
[
327,
329
],
[
329,
330
],
[
327,
331
],
[
331,
332
],
[
327,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
337,
338
],
[
337,
339
],
[
336,
340
],
[
335,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
341,
345
],
[
333,
346
],
[
346,
347
],
[
333,
348
],
[
348,
349
],
[
0,
350
],
[
350,
351
],
[
350,
352
]
]
| [
"import java.util.*;\nimport java.io.*;\nimport java.math.*;\n\npublic class Main{\n\n\n\n public static OutputStream out=new BufferedOutputStream(System.out);\n static Scanner sc=new Scanner(System.in);\n static long MOD=1000000007l;\n static int INF=10000000;\n static int[] rr=new int[]{1, 0, -1, 0}; //rook row move\n static int[] rc=new int[]{0, 1, 0, -1}; //rook col move\n\n //nl-->neew line; //l-->line; //arp-->array print; //arpnl-->array print new line\n public static void nl(Object o) throws IOException{out.write((o+\"\\n\").getBytes()); }\n public static void l(Object o) throws IOException{out.write((o+\"\").getBytes());}\n public static void arp(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+\" \").getBytes()); out.write((\"\\n\").getBytes());}\n public static void arpnl(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+\"\\n\").getBytes());}\n public static void scanl(long[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextLong();}\n public static void scani(int[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextInt();}\n public static void scan2D(int[][] a,int n,int m) {for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=sc.nextInt();}\n //static variables\n\n //\n\n\n public static void main(String[] args) throws IOException{\n long sttm=System.currentTimeMillis();\n long mod=1000000007l;\n\n // int k=sc.nextInt();\n int k=1;\n while(k-->0){\n solve();\n }\n\n out.flush();\n }\n\n public static void solve() throws IOException{\n int n=sc.nextInt();\n int[][] a=new int[n][2];\n int cnt=0;\n boolean con=false;\n for(int i=0;i<n;i++){\n a[i][0]=sc.nextInt(); a[i][1]=sc.nextInt();\n if(a[i][0]==a[i][1]){\n cnt++;\n }\n else{\n cnt=0;\n }\n if(cnt==3){\n con=true;\n // break;\n }\n }\n if(con){\n nl(\"Yes\");\n }\n else nl(\"No\");\n }\n\n}\n\nclass Pair{\n int x; int y;\n Pair(int x,int y){\n this.x=x;\n this.y=y;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main{\n\n\n\n public static OutputStream out=new BufferedOutputStream(System.out);\n static Scanner sc=new Scanner(System.in);\n static long MOD=1000000007l;\n static int INF=10000000;\n static int[] rr=new int[]{1, 0, -1, 0}; //rook row move\n static int[] rc=new int[]{0, 1, 0, -1}; //rook col move\n\n //nl-->neew line; //l-->line; //arp-->array print; //arpnl-->array print new line\n public static void nl(Object o) throws IOException{out.write((o+\"\\n\").getBytes()); }\n public static void l(Object o) throws IOException{out.write((o+\"\").getBytes());}\n public static void arp(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+\" \").getBytes()); out.write((\"\\n\").getBytes());}\n public static void arpnl(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+\"\\n\").getBytes());}\n public static void scanl(long[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextLong();}\n public static void scani(int[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextInt();}\n public static void scan2D(int[][] a,int n,int m) {for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=sc.nextInt();}\n //static variables\n\n //\n\n\n public static void main(String[] args) throws IOException{\n long sttm=System.currentTimeMillis();\n long mod=1000000007l;\n\n // int k=sc.nextInt();\n int k=1;\n while(k-->0){\n solve();\n }\n\n out.flush();\n }\n\n public static void solve() throws IOException{\n int n=sc.nextInt();\n int[][] a=new int[n][2];\n int cnt=0;\n boolean con=false;\n for(int i=0;i<n;i++){\n a[i][0]=sc.nextInt(); a[i][1]=sc.nextInt();\n if(a[i][0]==a[i][1]){\n cnt++;\n }\n else{\n cnt=0;\n }\n if(cnt==3){\n con=true;\n // break;\n }\n }\n if(con){\n nl(\"Yes\");\n }\n else nl(\"No\");\n }\n\n}",
"Main",
"public static OutputStream out=new BufferedOutputStream(System.out);",
"out",
"new BufferedOutputStream(System.out)",
"static Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"static long MOD=1000000007l;",
"MOD",
"1000000007l",
"static int INF=10000000;",
"INF",
"10000000",
"static int[] rr=new int[]{1, 0, -1, 0}; //rook row move",
"rr",
"new int[]{1, 0, -1, 0}",
"static int[] rc=new int[]{0, 1, 0, -1}; //rook col move",
"rc",
"new int[]{0, 1, 0, -1}",
"//nl-->neew line; //l-->line; //arp-->array print; //arpnl-->array print new line\n public static void nl(Object o) throws IOException{out.write((o+\"\\n\").getBytes()); }",
"nl",
"{out.write((o+\"\\n\").getBytes()); }",
"out.write((o+\"\\n\").getBytes())",
"out.write",
"out",
"(o+\"\\n\").getBytes()",
"(o+\"\\n\").getBytes",
"(o+\"\\n\")",
"o",
"\"\\n\"",
"Object o",
"o",
"public static void l(Object o) throws IOException{out.write((o+\"\").getBytes());}",
"l",
"{out.write((o+\"\").getBytes());}",
"out.write((o+\"\").getBytes())",
"out.write",
"out",
"(o+\"\").getBytes()",
"(o+\"\").getBytes",
"(o+\"\")",
"o",
"\"\"",
"Object o",
"o",
"public static void arp(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+\" \").getBytes()); out.write((\"\\n\").getBytes());}",
"arp",
"{for(int i=0;i<o.length;i++) out.write((o[i]+\" \").getBytes()); out.write((\"\\n\").getBytes());}",
"for(int i=0;i<o.length;i++) out.write((o[i]+\" \").getBytes());",
"int i=0;",
"int i=0;",
"i",
"0",
"i<o.length",
"i",
"o.length",
"o",
"o.length",
"i++",
"i++",
"i",
"out.write((o[i]+\" \").getBytes());",
"out.write((o[i]+\" \").getBytes())",
"out.write",
"out",
"(o[i]+\" \").getBytes()",
"(o[i]+\" \").getBytes",
"(o[i]+\" \")",
"o[i]",
"o",
"i",
"\" \"",
"out.write((\"\\n\").getBytes())",
"out.write",
"out",
"(\"\\n\").getBytes()",
"(\"\\n\").getBytes",
"(\"\\n\")",
"int[] o",
"o",
"public static void arpnl(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+\"\\n\").getBytes());}",
"arpnl",
"{for(int i=0;i<o.length;i++) out.write((o[i]+\"\\n\").getBytes());}",
"for(int i=0;i<o.length;i++) out.write((o[i]+\"\\n\").getBytes());",
"int i=0;",
"int i=0;",
"i",
"0",
"i<o.length",
"i",
"o.length",
"o",
"o.length",
"i++",
"i++",
"i",
"out.write((o[i]+\"\\n\").getBytes());",
"out.write((o[i]+\"\\n\").getBytes())",
"out.write",
"out",
"(o[i]+\"\\n\").getBytes()",
"(o[i]+\"\\n\").getBytes",
"(o[i]+\"\\n\")",
"o[i]",
"o",
"i",
"\"\\n\"",
"int[] o",
"o",
"public static void scanl(long[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextLong();}",
"scanl",
"{for(int i=0;i<n;i++) a[i]=sc.nextLong();}",
"for(int i=0;i<n;i++) a[i]=sc.nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=sc.nextLong();",
"a[i]=sc.nextLong()",
"a[i]",
"a",
"i",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long[] a",
"a",
"int n",
"n",
"public static void scani(int[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextInt();}",
"scani",
"{for(int i=0;i<n;i++) a[i]=sc.nextInt();}",
"for(int i=0;i<n;i++) a[i]=sc.nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=sc.nextInt();",
"a[i]=sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a",
"a",
"int n",
"n",
"public static void scan2D(int[][] a,int n,int m) {for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=sc.nextInt();}",
"scan2D",
"{for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=sc.nextInt();}",
"for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=sc.nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"for(int j=0;j<m;j++) a[i][j]=sc.nextInt();",
"for(int j=0;j<m;j++) a[i][j]=sc.nextInt();",
"int j=0;",
"int j=0;",
"j",
"0",
"j<m",
"j",
"m",
"j++",
"j++",
"j",
"a[i][j]=sc.nextInt();",
"a[i][j]=sc.nextInt()",
"a[i][j]",
"a[i]",
"a",
"i",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] a",
"a",
"int n",
"n",
"int m",
"m",
"public static void main(String[] args) throws IOException{\n long sttm=System.currentTimeMillis();\n long mod=1000000007l;\n\n // int k=sc.nextInt();\n int k=1;\n while(k-->0){\n solve();\n }\n\n out.flush();\n }",
"main",
"{\n long sttm=System.currentTimeMillis();\n long mod=1000000007l;\n\n // int k=sc.nextInt();\n int k=1;\n while(k-->0){\n solve();\n }\n\n out.flush();\n }",
"long sttm=System.currentTimeMillis();",
"sttm",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"long mod=1000000007l;",
"mod",
"1000000007l",
"int k=1;",
"k",
"1",
"while(k-->0){\n solve();\n }",
"k-->0",
"k--",
"k",
"0",
"{\n solve();\n }",
"solve()",
"solve",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"public static void solve() throws IOException{\n int n=sc.nextInt();\n int[][] a=new int[n][2];\n int cnt=0;\n boolean con=false;\n for(int i=0;i<n;i++){\n a[i][0]=sc.nextInt(); a[i][1]=sc.nextInt();\n if(a[i][0]==a[i][1]){\n cnt++;\n }\n else{\n cnt=0;\n }\n if(cnt==3){\n con=true;\n // break;\n }\n }\n if(con){\n nl(\"Yes\");\n }\n else nl(\"No\");\n }",
"solve",
"{\n int n=sc.nextInt();\n int[][] a=new int[n][2];\n int cnt=0;\n boolean con=false;\n for(int i=0;i<n;i++){\n a[i][0]=sc.nextInt(); a[i][1]=sc.nextInt();\n if(a[i][0]==a[i][1]){\n cnt++;\n }\n else{\n cnt=0;\n }\n if(cnt==3){\n con=true;\n // break;\n }\n }\n if(con){\n nl(\"Yes\");\n }\n else nl(\"No\");\n }",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] a=new int[n][2];",
"a",
"new int[n][2]",
"n",
"2",
"int cnt=0;",
"cnt",
"0",
"boolean con=false;",
"con",
"false",
"for(int i=0;i<n;i++){\n a[i][0]=sc.nextInt(); a[i][1]=sc.nextInt();\n if(a[i][0]==a[i][1]){\n cnt++;\n }\n else{\n cnt=0;\n }\n if(cnt==3){\n con=true;\n // break;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i][0]=sc.nextInt(); a[i][1]=sc.nextInt();\n if(a[i][0]==a[i][1]){\n cnt++;\n }\n else{\n cnt=0;\n }\n if(cnt==3){\n con=true;\n // break;\n }\n }",
"{\n a[i][0]=sc.nextInt(); a[i][1]=sc.nextInt();\n if(a[i][0]==a[i][1]){\n cnt++;\n }\n else{\n cnt=0;\n }\n if(cnt==3){\n con=true;\n // break;\n }\n }",
"a[i][0]=sc.nextInt()",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a[i][1]=sc.nextInt()",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a[i][0]==a[i][1]){\n cnt++;\n }\n else{\n cnt=0;\n }",
"a[i][0]==a[i][1]",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"{\n cnt++;\n }",
"cnt++",
"cnt",
"{\n cnt=0;\n }",
"cnt=0",
"cnt",
"0",
"if(cnt==3){\n con=true;\n // break;\n }",
"cnt==3",
"cnt",
"3",
"{\n con=true;\n // break;\n }",
"con=true",
"con",
"true",
"if(con){\n nl(\"Yes\");\n }\n else nl(\"No\");",
"con",
"{\n nl(\"Yes\");\n }",
"nl(\"Yes\")",
"nl",
"\"Yes\"",
"nl(\"No\")",
"nl",
"\"No\"",
"class Pair{\n int x; int y;\n Pair(int x,int y){\n this.x=x;\n this.y=y;\n }\n}",
"Pair",
"int x;",
"x",
"int y;",
"y",
"Pair(int x,int y){\n this.x=x;\n this.y=y;\n }",
"Pair",
"{\n this.x=x;\n this.y=y;\n }",
"this.x=x",
"this.x",
"this",
"this.x",
"x",
"this.y=y",
"this.y",
"this",
"this.y",
"y",
"int x",
"x",
"int y",
"y",
"public class Main{\n\n\n\n public static OutputStream out=new BufferedOutputStream(System.out);\n static Scanner sc=new Scanner(System.in);\n static long MOD=1000000007l;\n static int INF=10000000;\n static int[] rr=new int[]{1, 0, -1, 0}; //rook row move\n static int[] rc=new int[]{0, 1, 0, -1}; //rook col move\n\n //nl-->neew line; //l-->line; //arp-->array print; //arpnl-->array print new line\n public static void nl(Object o) throws IOException{out.write((o+\"\\n\").getBytes()); }\n public static void l(Object o) throws IOException{out.write((o+\"\").getBytes());}\n public static void arp(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+\" \").getBytes()); out.write((\"\\n\").getBytes());}\n public static void arpnl(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+\"\\n\").getBytes());}\n public static void scanl(long[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextLong();}\n public static void scani(int[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextInt();}\n public static void scan2D(int[][] a,int n,int m) {for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=sc.nextInt();}\n //static variables\n\n //\n\n\n public static void main(String[] args) throws IOException{\n long sttm=System.currentTimeMillis();\n long mod=1000000007l;\n\n // int k=sc.nextInt();\n int k=1;\n while(k-->0){\n solve();\n }\n\n out.flush();\n }\n\n public static void solve() throws IOException{\n int n=sc.nextInt();\n int[][] a=new int[n][2];\n int cnt=0;\n boolean con=false;\n for(int i=0;i<n;i++){\n a[i][0]=sc.nextInt(); a[i][1]=sc.nextInt();\n if(a[i][0]==a[i][1]){\n cnt++;\n }\n else{\n cnt=0;\n }\n if(cnt==3){\n con=true;\n // break;\n }\n }\n if(con){\n nl(\"Yes\");\n }\n else nl(\"No\");\n }\n\n}",
"public class Main{\n\n\n\n public static OutputStream out=new BufferedOutputStream(System.out);\n static Scanner sc=new Scanner(System.in);\n static long MOD=1000000007l;\n static int INF=10000000;\n static int[] rr=new int[]{1, 0, -1, 0}; //rook row move\n static int[] rc=new int[]{0, 1, 0, -1}; //rook col move\n\n //nl-->neew line; //l-->line; //arp-->array print; //arpnl-->array print new line\n public static void nl(Object o) throws IOException{out.write((o+\"\\n\").getBytes()); }\n public static void l(Object o) throws IOException{out.write((o+\"\").getBytes());}\n public static void arp(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+\" \").getBytes()); out.write((\"\\n\").getBytes());}\n public static void arpnl(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+\"\\n\").getBytes());}\n public static void scanl(long[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextLong();}\n public static void scani(int[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextInt();}\n public static void scan2D(int[][] a,int n,int m) {for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=sc.nextInt();}\n //static variables\n\n //\n\n\n public static void main(String[] args) throws IOException{\n long sttm=System.currentTimeMillis();\n long mod=1000000007l;\n\n // int k=sc.nextInt();\n int k=1;\n while(k-->0){\n solve();\n }\n\n out.flush();\n }\n\n public static void solve() throws IOException{\n int n=sc.nextInt();\n int[][] a=new int[n][2];\n int cnt=0;\n boolean con=false;\n for(int i=0;i<n;i++){\n a[i][0]=sc.nextInt(); a[i][1]=sc.nextInt();\n if(a[i][0]==a[i][1]){\n cnt++;\n }\n else{\n cnt=0;\n }\n if(cnt==3){\n con=true;\n // break;\n }\n }\n if(con){\n nl(\"Yes\");\n }\n else nl(\"No\");\n }\n\n}",
"Main"
]
| import java.util.*;
import java.io.*;
import java.math.*;
public class Main{
public static OutputStream out=new BufferedOutputStream(System.out);
static Scanner sc=new Scanner(System.in);
static long MOD=1000000007l;
static int INF=10000000;
static int[] rr=new int[]{1, 0, -1, 0}; //rook row move
static int[] rc=new int[]{0, 1, 0, -1}; //rook col move
//nl-->neew line; //l-->line; //arp-->array print; //arpnl-->array print new line
public static void nl(Object o) throws IOException{out.write((o+"\n").getBytes()); }
public static void l(Object o) throws IOException{out.write((o+"").getBytes());}
public static void arp(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+" ").getBytes()); out.write(("\n").getBytes());}
public static void arpnl(int[] o) throws IOException{for(int i=0;i<o.length;i++) out.write((o[i]+"\n").getBytes());}
public static void scanl(long[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextLong();}
public static void scani(int[] a,int n) {for(int i=0;i<n;i++) a[i]=sc.nextInt();}
public static void scan2D(int[][] a,int n,int m) {for(int i=0;i<n;i++) for(int j=0;j<m;j++) a[i][j]=sc.nextInt();}
//static variables
//
public static void main(String[] args) throws IOException{
long sttm=System.currentTimeMillis();
long mod=1000000007l;
// int k=sc.nextInt();
int k=1;
while(k-->0){
solve();
}
out.flush();
}
public static void solve() throws IOException{
int n=sc.nextInt();
int[][] a=new int[n][2];
int cnt=0;
boolean con=false;
for(int i=0;i<n;i++){
a[i][0]=sc.nextInt(); a[i][1]=sc.nextInt();
if(a[i][0]==a[i][1]){
cnt++;
}
else{
cnt=0;
}
if(cnt==3){
con=true;
// break;
}
}
if(con){
nl("Yes");
}
else nl("No");
}
}
class Pair{
int x; int y;
Pair(int x,int y){
this.x=x;
this.y=y;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
3,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
118,
5
],
[
118,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
34,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
53,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
76,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
75,
87
],
[
87,
88
],
[
88,
89
],
[
75,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
8,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
94,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
8,
112
],
[
112,
113
],
[
113,
114
],
[
6,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
]
| [
"import java.util.Scanner;\n \npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n int attempt = in.nextInt();\n int[][] diceArr = new int[attempt][2];\n for (int i = 0; i < attempt; i++) {\n diceArr[i][0] = in.nextInt();\n diceArr[i][1] = in.nextInt();\n }\n int counter = 0;\n for (int i = 0; i < attempt; i++) {\n if (counter == 3) {\n break;\n } else if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }\n }\n if (counter >= 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \n in.close();\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n int attempt = in.nextInt();\n int[][] diceArr = new int[attempt][2];\n for (int i = 0; i < attempt; i++) {\n diceArr[i][0] = in.nextInt();\n diceArr[i][1] = in.nextInt();\n }\n int counter = 0;\n for (int i = 0; i < attempt; i++) {\n if (counter == 3) {\n break;\n } else if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }\n }\n if (counter >= 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \n in.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n int attempt = in.nextInt();\n int[][] diceArr = new int[attempt][2];\n for (int i = 0; i < attempt; i++) {\n diceArr[i][0] = in.nextInt();\n diceArr[i][1] = in.nextInt();\n }\n int counter = 0;\n for (int i = 0; i < attempt; i++) {\n if (counter == 3) {\n break;\n } else if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }\n }\n if (counter >= 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \n in.close();\n }",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n int attempt = in.nextInt();\n int[][] diceArr = new int[attempt][2];\n for (int i = 0; i < attempt; i++) {\n diceArr[i][0] = in.nextInt();\n diceArr[i][1] = in.nextInt();\n }\n int counter = 0;\n for (int i = 0; i < attempt; i++) {\n if (counter == 3) {\n break;\n } else if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }\n }\n if (counter >= 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \n in.close();\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int attempt = in.nextInt();",
"attempt",
"in.nextInt()",
"in.nextInt",
"in",
"int[][] diceArr = new int[attempt][2];",
"diceArr",
"new int[attempt][2]",
"attempt",
"2",
"for (int i = 0; i < attempt; i++) {\n diceArr[i][0] = in.nextInt();\n diceArr[i][1] = in.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < attempt",
"i",
"attempt",
"i++",
"i++",
"i",
"{\n diceArr[i][0] = in.nextInt();\n diceArr[i][1] = in.nextInt();\n }",
"{\n diceArr[i][0] = in.nextInt();\n diceArr[i][1] = in.nextInt();\n }",
"diceArr[i][0] = in.nextInt()",
"diceArr[i][0]",
"diceArr[i]",
"diceArr",
"i",
"0",
"in.nextInt()",
"in.nextInt",
"in",
"diceArr[i][1] = in.nextInt()",
"diceArr[i][1]",
"diceArr[i]",
"diceArr",
"i",
"1",
"in.nextInt()",
"in.nextInt",
"in",
"int counter = 0;",
"counter",
"0",
"for (int i = 0; i < attempt; i++) {\n if (counter == 3) {\n break;\n } else if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < attempt",
"i",
"attempt",
"i++",
"i++",
"i",
"{\n if (counter == 3) {\n break;\n } else if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }\n }",
"{\n if (counter == 3) {\n break;\n } else if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }\n }",
"if (counter == 3) {\n break;\n } else if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }",
"counter == 3",
"counter",
"3",
"{\n break;\n }",
"break;",
"if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }",
"diceArr[i][0] == diceArr[i][1]",
"diceArr[i][0]",
"diceArr[i]",
"diceArr",
"i",
"0",
"diceArr[i][1]",
"diceArr[i]",
"diceArr",
"i",
"1",
"{\n counter++;\n }",
"counter++",
"counter",
"{\n counter = 0;\n }",
"counter = 0",
"counter",
"0",
"if (counter >= 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"counter >= 3",
"counter",
"3",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"in.close()",
"in.close",
"in",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n int attempt = in.nextInt();\n int[][] diceArr = new int[attempt][2];\n for (int i = 0; i < attempt; i++) {\n diceArr[i][0] = in.nextInt();\n diceArr[i][1] = in.nextInt();\n }\n int counter = 0;\n for (int i = 0; i < attempt; i++) {\n if (counter == 3) {\n break;\n } else if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }\n }\n if (counter >= 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \n in.close();\n }\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n int attempt = in.nextInt();\n int[][] diceArr = new int[attempt][2];\n for (int i = 0; i < attempt; i++) {\n diceArr[i][0] = in.nextInt();\n diceArr[i][1] = in.nextInt();\n }\n int counter = 0;\n for (int i = 0; i < attempt; i++) {\n if (counter == 3) {\n break;\n } else if (diceArr[i][0] == diceArr[i][1]) {\n counter++;\n } else {\n counter = 0;\n }\n }\n if (counter >= 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n \n in.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int attempt = in.nextInt();
int[][] diceArr = new int[attempt][2];
for (int i = 0; i < attempt; i++) {
diceArr[i][0] = in.nextInt();
diceArr[i][1] = in.nextInt();
}
int counter = 0;
for (int i = 0; i < attempt; i++) {
if (counter == 3) {
break;
} else if (diceArr[i][0] == diceArr[i][1]) {
counter++;
} else {
counter = 0;
}
}
if (counter >= 3) {
System.out.println("Yes");
} else {
System.out.println("No");
}
in.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
13,
13,
18,
13,
13,
2,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
2,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
30,
0,
13,
17,
3,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
25,
26
],
[
25,
27
],
[
0,
28
],
[
28,
29
],
[
28,
30
],
[
0,
31
],
[
31,
32
],
[
31,
33
],
[
0,
34
],
[
156,
35
],
[
156,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
38,
47
],
[
47,
48
],
[
47,
49
],
[
38,
51
],
[
51,
52
],
[
51,
53
],
[
38,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
38,
82
],
[
82,
83
],
[
82,
84
],
[
38,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
85,
95
],
[
95,
96
],
[
96,
97
],
[
85,
98
],
[
99,
99
],
[
99,
100
],
[
100,
101
],
[
102,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
107,
108
],
[
107,
109
],
[
102,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
110,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
118,
120
],
[
102,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
121,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
100,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
136
],
[
38,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
141,
146
],
[
137,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
147,
152
],
[
36,
153
],
[
153,
154
],
[
0,
155
],
[
155,
156
],
[
155,
157
]
]
| [
"import java.io.*;\nimport java.math.*;\nimport java.security.*;\nimport java.text.*;\nimport java.util.*;\nimport java.util.concurrent.*;\nimport java.util.function.*;\nimport java.util.regex.*;\nimport java.util.stream.*;\nimport static java.util.stream.Collectors.joining;\nimport static java.util.stream.Collectors.toList;\n\npublic class Main\n{\n public static void main(String[] args)\n {\n Scanner in = new Scanner(System.in);\n int n=in.nextInt();\n int[] d1=new int[n];\n int[] d2=new int[n];\n for(int i=0;i<n;i++)\n {\n d1[i]=in.nextInt();\n d2[i]=in.nextInt();\n }\n boolean flag=false;\n for(int i=0;i<=n-3;i++)\n {\n if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])\n {\n flag=true;\n break;\n }\n }\n if(flag==true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.security.*;",
"security.*",
"java",
"import java.text.*;",
"text.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.util.concurrent.*;",
"concurrent.*",
"java.util",
"import java.util.function.*;",
"function.*",
"java.util",
"import java.util.regex.*;",
"regex.*",
"java.util",
"import java.util.stream.*;",
"stream.*",
"java.util",
"import static java.util.stream.Collectors.joining;",
"import static java.util.stream.Collectors.joining;",
"import static java.util.stream.Collectors.joining;",
"import static java.util.stream.Collectors.toList;",
"import static java.util.stream.Collectors.toList;",
"import static java.util.stream.Collectors.toList;",
"public class Main\n{\n public static void main(String[] args)\n {\n Scanner in = new Scanner(System.in);\n int n=in.nextInt();\n int[] d1=new int[n];\n int[] d2=new int[n];\n for(int i=0;i<n;i++)\n {\n d1[i]=in.nextInt();\n d2[i]=in.nextInt();\n }\n boolean flag=false;\n for(int i=0;i<=n-3;i++)\n {\n if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])\n {\n flag=true;\n break;\n }\n }\n if(flag==true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n\n}",
"Main",
"public static void main(String[] args)\n {\n Scanner in = new Scanner(System.in);\n int n=in.nextInt();\n int[] d1=new int[n];\n int[] d2=new int[n];\n for(int i=0;i<n;i++)\n {\n d1[i]=in.nextInt();\n d2[i]=in.nextInt();\n }\n boolean flag=false;\n for(int i=0;i<=n-3;i++)\n {\n if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])\n {\n flag=true;\n break;\n }\n }\n if(flag==true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"main",
"{\n Scanner in = new Scanner(System.in);\n int n=in.nextInt();\n int[] d1=new int[n];\n int[] d2=new int[n];\n for(int i=0;i<n;i++)\n {\n d1[i]=in.nextInt();\n d2[i]=in.nextInt();\n }\n boolean flag=false;\n for(int i=0;i<=n-3;i++)\n {\n if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])\n {\n flag=true;\n break;\n }\n }\n if(flag==true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int n=in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int[] d1=new int[n];",
"d1",
"new int[n]",
"n",
"int[] d2=new int[n];",
"d2",
"new int[n]",
"n",
"for(int i=0;i<n;i++)\n {\n d1[i]=in.nextInt();\n d2[i]=in.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n d1[i]=in.nextInt();\n d2[i]=in.nextInt();\n }",
"{\n d1[i]=in.nextInt();\n d2[i]=in.nextInt();\n }",
"d1[i]=in.nextInt()",
"d1[i]",
"d1",
"i",
"in.nextInt()",
"in.nextInt",
"in",
"d2[i]=in.nextInt()",
"d2[i]",
"d2",
"i",
"in.nextInt()",
"in.nextInt",
"in",
"boolean flag=false;",
"flag",
"false",
"for(int i=0;i<=n-3;i++)\n {\n if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])\n {\n flag=true;\n break;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=n-3",
"i",
"n-3",
"n",
"3",
"i++",
"i++",
"i",
"{\n if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])\n {\n flag=true;\n break;\n }\n }",
"{\n if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])\n {\n flag=true;\n break;\n }\n }",
"if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])\n {\n flag=true;\n break;\n }",
"d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2]",
"d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2]",
"d1[i]==d2[i]",
"d1[i]",
"d1",
"i",
"d2[i]",
"d2",
"i",
"d1[i+1]==d2[i+1]",
"d1[i+1]",
"d1",
"i+1",
"i",
"1",
"d2[i+1]",
"d2",
"i+1",
"i",
"1",
"d1[i+2]==d2[i+2]",
"d1[i+2]",
"d1",
"i+2",
"i",
"2",
"d2[i+2]",
"d2",
"i+2",
"i",
"2",
"{\n flag=true;\n break;\n }",
"flag=true",
"flag",
"true",
"break;",
"if(flag==true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");",
"flag==true",
"flag",
"true",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main\n{\n public static void main(String[] args)\n {\n Scanner in = new Scanner(System.in);\n int n=in.nextInt();\n int[] d1=new int[n];\n int[] d2=new int[n];\n for(int i=0;i<n;i++)\n {\n d1[i]=in.nextInt();\n d2[i]=in.nextInt();\n }\n boolean flag=false;\n for(int i=0;i<=n-3;i++)\n {\n if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])\n {\n flag=true;\n break;\n }\n }\n if(flag==true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n\n}",
"public class Main\n{\n public static void main(String[] args)\n {\n Scanner in = new Scanner(System.in);\n int n=in.nextInt();\n int[] d1=new int[n];\n int[] d2=new int[n];\n for(int i=0;i<n;i++)\n {\n d1[i]=in.nextInt();\n d2[i]=in.nextInt();\n }\n boolean flag=false;\n for(int i=0;i<=n-3;i++)\n {\n if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])\n {\n flag=true;\n break;\n }\n }\n if(flag==true)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n\n}",
"Main"
]
| import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.function.*;
import java.util.regex.*;
import java.util.stream.*;
import static java.util.stream.Collectors.joining;
import static java.util.stream.Collectors.toList;
public class Main
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
int n=in.nextInt();
int[] d1=new int[n];
int[] d2=new int[n];
for(int i=0;i<n;i++)
{
d1[i]=in.nextInt();
d2[i]=in.nextInt();
}
boolean flag=false;
for(int i=0;i<=n-3;i++)
{
if(d1[i]==d2[i] && d1[i+1]==d2[i+1] && d1[i+2]==d2[i+2])
{
flag=true;
break;
}
}
if(flag==true)
System.out.println("Yes");
else
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
4,
18,
13,
30,
14,
2,
40,
13,
17,
30,
4,
18,
18,
13,
13,
13,
29,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
174,
23
],
[
174,
24
],
[
24,
25
],
[
24,
26
],
[
174,
27
],
[
27,
28
],
[
27,
29
],
[
174,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
32,
41
],
[
41,
42
],
[
41,
43
],
[
32,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
66,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
71,
78
],
[
57,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
32,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
30,
89
],
[
89,
90
],
[
174,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
91,
95
],
[
95,
96
],
[
91,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
97,
103
],
[
103,
104
],
[
91,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
105,
111
],
[
111,
112
],
[
91,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
116,
125
],
[
125,
126
],
[
125,
127
],
[
115,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
91,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
139,
140
],
[
91,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
145,
148
],
[
148,
149
],
[
91,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
91,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
161,
164
],
[
164,
165
],
[
91,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
0,
173
],
[
173,
174
],
[
173,
175
]
]
| [
"import java.io.BufferedReader;\nimport java.io.FileNotFoundException;\nimport java.io.FileReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.util.*;\n\npublic class Main{\n static String YES = \"Yes\", NO= \"No\";\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for(int i=0; i<n; i++){\n if(sc.nextInt() == sc.nextInt()){\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }\n else{\n count =0;\n }\n }\n System.out.println(NO);\n }\n\n static class Scanner {\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }\n\n public Scanner(FileReader s) throws FileNotFoundException {\n br = new BufferedReader(s);\n }\n\n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n public long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public String nextLine() throws IOException {\n return br.readLine();\n }\n\n public double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n public boolean ready() throws IOException {\n return br.ready();\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.FileNotFoundException;",
"FileNotFoundException",
"java.io",
"import java.io.FileReader;",
"FileReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n static String YES = \"Yes\", NO= \"No\";\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for(int i=0; i<n; i++){\n if(sc.nextInt() == sc.nextInt()){\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }\n else{\n count =0;\n }\n }\n System.out.println(NO);\n }\n\n static class Scanner {\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }\n\n public Scanner(FileReader s) throws FileNotFoundException {\n br = new BufferedReader(s);\n }\n\n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n public long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public String nextLine() throws IOException {\n return br.readLine();\n }\n\n public double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n public boolean ready() throws IOException {\n return br.ready();\n }\n }\n}",
"Main",
"static String YES = \"Yes\"",
"YES",
"\"Yes\"",
"NO= \"No\";",
"NO",
"\"No\"",
"public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for(int i=0; i<n; i++){\n if(sc.nextInt() == sc.nextInt()){\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }\n else{\n count =0;\n }\n }\n System.out.println(NO);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for(int i=0; i<n; i++){\n if(sc.nextInt() == sc.nextInt()){\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }\n else{\n count =0;\n }\n }\n System.out.println(NO);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"count = 0;",
"count",
"0",
"for(int i=0; i<n; i++){\n if(sc.nextInt() == sc.nextInt()){\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }\n else{\n count =0;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(sc.nextInt() == sc.nextInt()){\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }\n else{\n count =0;\n }\n }",
"{\n if(sc.nextInt() == sc.nextInt()){\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }\n else{\n count =0;\n }\n }",
"if(sc.nextInt() == sc.nextInt()){\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }\n else{\n count =0;\n }",
"sc.nextInt() == sc.nextInt()",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.nextInt()",
"sc.nextInt",
"sc",
"{\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }",
"if(++count == 3){\n System.out.println(YES);\n return;\n }",
"++count == 3",
"++count",
"count",
"3",
"{\n System.out.println(YES);\n return;\n }",
"System.out.println(YES)",
"System.out.println",
"System.out",
"System",
"System.out",
"YES",
"return;",
"{\n count =0;\n }",
"count =0",
"count",
"0",
"System.out.println(NO)",
"System.out.println",
"System.out",
"System",
"System.out",
"NO",
"String[] args",
"args",
"static class Scanner {\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }\n\n public Scanner(FileReader s) throws FileNotFoundException {\n br = new BufferedReader(s);\n }\n\n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n public long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public String nextLine() throws IOException {\n return br.readLine();\n }\n\n public double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n public boolean ready() throws IOException {\n return br.ready();\n }\n }",
"Scanner",
"StringTokenizer st;",
"st",
"BufferedReader br;",
"br",
"public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }",
"Scanner",
"{\n br = new BufferedReader(new InputStreamReader(s));\n }",
"br = new BufferedReader(new InputStreamReader(s))",
"br",
"new BufferedReader(new InputStreamReader(s))",
"InputStream s",
"s",
"public Scanner(FileReader s) throws FileNotFoundException {\n br = new BufferedReader(s);\n }",
"Scanner",
"{\n br = new BufferedReader(s);\n }",
"br = new BufferedReader(s)",
"br",
"new BufferedReader(s)",
"FileReader s",
"s",
"public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nextLong() throws IOException {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public String nextLine() throws IOException {\n return br.readLine();\n }",
"nextLine",
"{\n return br.readLine();\n }",
"return br.readLine();",
"br.readLine()",
"br.readLine",
"br",
"public double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public boolean ready() throws IOException {\n return br.ready();\n }",
"ready",
"{\n return br.ready();\n }",
"return br.ready();",
"br.ready()",
"br.ready",
"br",
"public class Main{\n static String YES = \"Yes\", NO= \"No\";\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for(int i=0; i<n; i++){\n if(sc.nextInt() == sc.nextInt()){\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }\n else{\n count =0;\n }\n }\n System.out.println(NO);\n }\n\n static class Scanner {\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }\n\n public Scanner(FileReader s) throws FileNotFoundException {\n br = new BufferedReader(s);\n }\n\n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n public long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public String nextLine() throws IOException {\n return br.readLine();\n }\n\n public double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n public boolean ready() throws IOException {\n return br.ready();\n }\n }\n}",
"public class Main{\n static String YES = \"Yes\", NO= \"No\";\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for(int i=0; i<n; i++){\n if(sc.nextInt() == sc.nextInt()){\n if(++count == 3){\n System.out.println(YES);\n return;\n }\n }\n else{\n count =0;\n }\n }\n System.out.println(NO);\n }\n\n static class Scanner {\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s) {\n br = new BufferedReader(new InputStreamReader(s));\n }\n\n public Scanner(FileReader s) throws FileNotFoundException {\n br = new BufferedReader(s);\n }\n\n public String next() throws IOException {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {\n return Integer.parseInt(next());\n }\n\n public long nextLong() throws IOException {\n return Long.parseLong(next());\n }\n\n public String nextLine() throws IOException {\n return br.readLine();\n }\n\n public double nextDouble() throws IOException {\n return Double.parseDouble(next());\n }\n\n public boolean ready() throws IOException {\n return br.ready();\n }\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.*;
public class Main{
static String YES = "Yes", NO= "No";
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt(), count = 0;
for(int i=0; i<n; i++){
if(sc.nextInt() == sc.nextInt()){
if(++count == 3){
System.out.println(YES);
return;
}
}
else{
count =0;
}
}
System.out.println(NO);
}
static class Scanner {
StringTokenizer st;
BufferedReader br;
public Scanner(InputStream s) {
br = new BufferedReader(new InputStreamReader(s));
}
public Scanner(FileReader s) throws FileNotFoundException {
br = new BufferedReader(s);
}
public String next() throws IOException {
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine());
return st.nextToken();
}
public int nextInt() throws IOException {
return Integer.parseInt(next());
}
public long nextLong() throws IOException {
return Long.parseLong(next());
}
public String nextLine() throws IOException {
return br.readLine();
}
public double nextDouble() throws IOException {
return Double.parseDouble(next());
}
public boolean ready() throws IOException {
return br.ready();
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
4,
13,
2,
13,
17,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
40,
13,
14,
2,
13,
17,
0,
13,
17,
4,
18,
13,
8,
13,
17,
17,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
13,
14,
2,
2,
13,
13,
17,
40,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
29,
4,
13,
13,
13,
29,
4,
13,
4,
13,
13,
13,
2,
4,
13,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
0,
13,
13,
0,
13,
17,
0,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
13,
13,
2,
13,
17,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
40,
13,
0,
13,
17,
29,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
6,
13,
41,
13,
20,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
612,
11
],
[
612,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
14,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
53,
59
],
[
59,
60
],
[
60,
61
],
[
14,
62
],
[
62,
63
],
[
62,
64
],
[
14,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
65,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
81,
94
],
[
94,
95
],
[
95,
96
],
[
81,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
100,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
99,
111
],
[
111,
112
],
[
77,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
117,
119
],
[
14,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
123,
124
],
[
123,
125
],
[
123,
126
],
[
12,
127
],
[
127,
128
],
[
612,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
133,
137
],
[
129,
138
],
[
138,
139
],
[
129,
140
],
[
140,
141
],
[
612,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
146,
150
],
[
142,
151
],
[
151,
152
],
[
142,
153
],
[
153,
154
],
[
612,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
158,
159
],
[
159,
160
],
[
160,
161
],
[
159,
162
],
[
159,
163
],
[
155,
164
],
[
164,
165
],
[
155,
166
],
[
166,
167
],
[
612,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
172,
176
],
[
168,
177
],
[
177,
178
],
[
168,
179
],
[
179,
180
],
[
612,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
185,
189
],
[
181,
190
],
[
190,
191
],
[
181,
192
],
[
192,
193
],
[
612,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
198,
201
],
[
198,
202
],
[
194,
203
],
[
203,
204
],
[
194,
205
],
[
205,
206
],
[
612,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
211,
214
],
[
207,
215
],
[
215,
216
],
[
612,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
222,
224
],
[
219,
225
],
[
225,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
226,
230
],
[
225,
231
],
[
231,
232
],
[
219,
233
],
[
233,
234
],
[
217,
235
],
[
235,
236
],
[
217,
237
],
[
237,
238
],
[
612,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
243,
247
],
[
247,
248
],
[
247,
249
],
[
242,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
251,
254
],
[
241,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
258,
259
],
[
258,
260
],
[
258,
261
],
[
256,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
263,
266
],
[
262,
267
],
[
267,
268
],
[
267,
269
],
[
267,
270
],
[
239,
271
],
[
271,
272
],
[
239,
273
],
[
273,
274
],
[
612,
275
],
[
275,
276
],
[
275,
277
],
[
277,
278
],
[
278,
279
],
[
278,
280
],
[
277,
281
],
[
281,
282
],
[
282,
283
],
[
282,
284
],
[
281,
285
],
[
285,
286
],
[
286,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
287,
291
],
[
286,
292
],
[
292,
293
],
[
292,
294
],
[
285,
295
],
[
295,
296
],
[
295,
297
],
[
285,
298
],
[
298,
299
],
[
298,
300
],
[
285,
301
],
[
301,
302
],
[
301,
303
],
[
285,
304
],
[
304,
305
],
[
304,
306
],
[
277,
307
],
[
307,
308
],
[
275,
309
],
[
309,
310
],
[
275,
311
],
[
311,
312
],
[
275,
313
],
[
313,
314
],
[
612,
315
],
[
315,
316
],
[
315,
317
],
[
317,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
319,
322
],
[
322,
323
],
[
322,
324
],
[
319,
325
],
[
315,
326
],
[
326,
327
],
[
315,
328
],
[
328,
329
],
[
612,
330
],
[
330,
331
],
[
330,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
332,
336
],
[
336,
337
],
[
337,
338
],
[
337,
339
],
[
336,
340
],
[
340,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
342,
346
],
[
341,
347
],
[
347,
348
],
[
340,
349
],
[
349,
350
],
[
349,
351
],
[
332,
352
],
[
352,
353
],
[
330,
354
],
[
354,
355
],
[
612,
356
],
[
356,
357
],
[
356,
358
],
[
358,
359
],
[
358,
360
],
[
356,
361
],
[
361,
362
],
[
361,
363
],
[
356,
364
],
[
364,
365
],
[
364,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
369,
370
],
[
370,
371
],
[
367,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
375,
376
],
[
376,
377
],
[
377,
378
],
[
372,
379
],
[
379,
380
],
[
380,
381
],
[
380,
382
],
[
366,
383
],
[
383,
384
],
[
384,
385
],
[
385,
386
],
[
356,
387
],
[
387,
388
],
[
387,
389
],
[
389,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
391,
394
],
[
394,
395
],
[
356,
396
],
[
396,
397
],
[
396,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
401,
402
],
[
400,
403
],
[
403,
404
],
[
356,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
408,
409
],
[
409,
410
],
[
410,
411
],
[
409,
412
],
[
412,
413
],
[
612,
414
],
[
414,
415
],
[
414,
416
],
[
416,
417
],
[
416,
418
],
[
414,
419
],
[
419,
420
],
[
419,
421
],
[
421,
422
],
[
422,
423
],
[
423,
424
],
[
422,
425
],
[
421,
426
],
[
426,
427
],
[
427,
428
],
[
419,
429
],
[
429,
430
],
[
414,
431
],
[
431,
432
],
[
431,
433
],
[
433,
434
],
[
434,
435
],
[
435,
436
],
[
434,
437
],
[
433,
438
],
[
438,
439
],
[
439,
440
],
[
431,
441
],
[
441,
442
],
[
414,
443
],
[
443,
444
],
[
443,
445
],
[
445,
446
],
[
446,
447
],
[
447,
448
],
[
446,
449
],
[
445,
450
],
[
450,
451
],
[
451,
452
],
[
443,
453
],
[
453,
454
],
[
414,
455
],
[
455,
456
],
[
455,
457
],
[
457,
458
],
[
458,
459
],
[
459,
460
],
[
458,
461
],
[
457,
462
],
[
462,
463
],
[
463,
464
],
[
455,
465
],
[
465,
466
],
[
414,
467
],
[
467,
468
],
[
467,
469
],
[
469,
470
],
[
470,
471
],
[
471,
472
],
[
470,
473
],
[
469,
474
],
[
474,
475
],
[
475,
476
],
[
467,
477
],
[
477,
478
],
[
414,
479
],
[
479,
480
],
[
479,
481
],
[
481,
482
],
[
482,
483
],
[
483,
484
],
[
482,
485
],
[
481,
486
],
[
486,
487
],
[
487,
488
],
[
479,
489
],
[
489,
490
],
[
414,
491
],
[
491,
492
],
[
491,
493
],
[
493,
494
],
[
494,
495
],
[
495,
496
],
[
494,
497
],
[
493,
498
],
[
498,
499
],
[
499,
500
],
[
491,
501
],
[
501,
502
],
[
414,
503
],
[
503,
504
],
[
503,
505
],
[
505,
506
],
[
506,
507
],
[
507,
508
],
[
506,
509
],
[
505,
510
],
[
510,
511
],
[
511,
512
],
[
503,
513
],
[
513,
514
],
[
414,
515
],
[
515,
516
],
[
515,
517
],
[
517,
518
],
[
518,
519
],
[
519,
520
],
[
518,
521
],
[
517,
522
],
[
522,
523
],
[
523,
524
],
[
515,
525
],
[
525,
526
],
[
414,
527
],
[
527,
528
],
[
527,
529
],
[
529,
530
],
[
530,
531
],
[
531,
532
],
[
530,
533
],
[
529,
534
],
[
534,
535
],
[
535,
536
],
[
527,
537
],
[
537,
538
],
[
414,
539
],
[
539,
540
],
[
539,
541
],
[
541,
542
],
[
542,
543
],
[
543,
544
],
[
542,
545
],
[
541,
546
],
[
546,
547
],
[
547,
548
],
[
539,
549
],
[
549,
550
],
[
414,
551
],
[
551,
552
],
[
551,
553
],
[
553,
554
],
[
554,
555
],
[
555,
556
],
[
554,
557
],
[
553,
558
],
[
558,
559
],
[
559,
560
],
[
551,
561
],
[
561,
562
],
[
414,
563
],
[
563,
564
],
[
563,
565
],
[
565,
566
],
[
566,
567
],
[
567,
568
],
[
566,
569
],
[
565,
570
],
[
570,
571
],
[
571,
572
],
[
563,
573
],
[
573,
574
],
[
414,
575
],
[
575,
576
],
[
575,
577
],
[
577,
578
],
[
578,
579
],
[
579,
580
],
[
578,
581
],
[
577,
582
],
[
582,
583
],
[
583,
584
],
[
575,
585
],
[
585,
586
],
[
414,
587
],
[
587,
588
],
[
587,
589
],
[
589,
590
],
[
590,
591
],
[
591,
592
],
[
590,
593
],
[
589,
594
],
[
594,
595
],
[
595,
596
],
[
587,
597
],
[
597,
598
],
[
414,
599
],
[
599,
600
],
[
599,
601
],
[
601,
602
],
[
602,
603
],
[
603,
604
],
[
602,
605
],
[
601,
606
],
[
606,
607
],
[
607,
608
],
[
599,
609
],
[
609,
610
],
[
0,
611
],
[
611,
612
],
[
611,
613
]
]
| [
"import java.io.*;\nimport java.math.*;\nimport java.util.*;\npublic class Main {\n\tpublic static void main(String[] args) { \n\t\t/*\n\t\t * */\n\t\tFastScanner I = new FastScanner(); //Input\n\t\tOutPut O = new OutPut(); //Output\n\t\tint N = I.nextInt();\n\t\tint[][] a = new int[N][2];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\ta[i][0] = I.nextInt();\n\t\t\ta[i][1] = I.nextInt();\n\t\t}\n\t\tboolean good=false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor (int j = i; j < min(i+3,N); j++) {\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}\n\t\t\tif (cnt==3) good=true;\n\t\t}\n\t\tO.pln(good?\"Yes\":\"No\");\n\t}\n\tpublic static double max(double a, double b) {return Math.max(a, b);}\n\tpublic static double min(double a, double b) {return Math.min(a, b);}\n\tpublic static long min(long a, long b) {return Math.min(a,b);}\n\tpublic static long max(long a, long b) {return Math.max(a,b);}\n\tpublic static int min(int a, int b) {return Math.min(a,b);}\n\tpublic static int max(int a, int b) {return Math.max(a,b);}\n\tpublic static long abs(long x) {return Math.abs(x);}\n\tpublic static long ceil(long num, long den) {long ans = num/den; if (num%den!=0) \n\tans++; return ans;}\n\tpublic static long GCD(long a, long b) {\n\t\tif (a==0||b==0) return max(a,b);\n\t\treturn GCD(min(a,b),max(a,b)%min(a,b));\n\t}\n\tpublic static long FastExp(long base, long exp, long mod) {\n\t\tlong ans=1;\n\t\twhile (exp>0) {\n\t\t\tif (exp%2==1) ans*=base;\n\t\t\texp/=2;\n\t\t\tbase*=base;\n\t\t\tbase%=mod;\n\t\t\tans%=mod;\n\t\t}\n\t\treturn ans;\n\t}\n\tpublic static long ModInv(long num,long mod) {return FastExp(num,mod-2,mod);}\n\tpublic static int pop(long x) { //Returns number of bits within a number\n\t\tint cnt = 0;\n\t\twhile (x>0) {\n\t\t\tif (x%2==1) cnt++;\n\t\t\tx/=2;\n\t\t}\n\t\treturn cnt;\n\t}\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tint nextInt() {return Integer.parseInt(next());}\n\t\tlong nextLong() {return Long.parseLong(next());};\n\t\tdouble nextDouble() {return Double.parseDouble(next());}\n\t}\n\tstatic class OutPut{\n\t\tPrintWriter w = new PrintWriter(System.out);\n\t\tvoid pln(double x) {w.println(x);w.flush();}\n\t\tvoid pln(boolean x) {w.println(x);w.flush();}\n\t\tvoid pln(int x) {w.println(x);w.flush();}\n\t\tvoid pln(long x) {w.println(x);w.flush();}\n\t\tvoid pln(String x) {w.println(x);w.flush();}\n\t\tvoid pln(char x) {w.println(x);w.flush();}\n\t\tvoid pln(StringBuilder x) {w.println(x);w.flush();}\n\t\tvoid pln(BigInteger x) {w.println(x);w.flush();}\n\t\tvoid p(int x) {w.print(x);w.flush();}\n\t\tvoid p(long x) {w.print(x);w.flush();}\n\t\tvoid p(String x) {w.print(x);w.flush();}\n\t\tvoid p(char x) {w.print(x);w.flush();}\n\t\tvoid p(StringBuilder x) {w.print(x);w.flush();}\n\t\tvoid p(BigInteger x) {w.print(x);w.flush();}\n\t\tvoid p(double x) {w.print(x);w.flush();}\n\t\tvoid p(boolean x) {w.print(x);w.flush();}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) { \n\t\t/*\n\t\t * */\n\t\tFastScanner I = new FastScanner(); //Input\n\t\tOutPut O = new OutPut(); //Output\n\t\tint N = I.nextInt();\n\t\tint[][] a = new int[N][2];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\ta[i][0] = I.nextInt();\n\t\t\ta[i][1] = I.nextInt();\n\t\t}\n\t\tboolean good=false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor (int j = i; j < min(i+3,N); j++) {\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}\n\t\t\tif (cnt==3) good=true;\n\t\t}\n\t\tO.pln(good?\"Yes\":\"No\");\n\t}\n\tpublic static double max(double a, double b) {return Math.max(a, b);}\n\tpublic static double min(double a, double b) {return Math.min(a, b);}\n\tpublic static long min(long a, long b) {return Math.min(a,b);}\n\tpublic static long max(long a, long b) {return Math.max(a,b);}\n\tpublic static int min(int a, int b) {return Math.min(a,b);}\n\tpublic static int max(int a, int b) {return Math.max(a,b);}\n\tpublic static long abs(long x) {return Math.abs(x);}\n\tpublic static long ceil(long num, long den) {long ans = num/den; if (num%den!=0) \n\tans++; return ans;}\n\tpublic static long GCD(long a, long b) {\n\t\tif (a==0||b==0) return max(a,b);\n\t\treturn GCD(min(a,b),max(a,b)%min(a,b));\n\t}\n\tpublic static long FastExp(long base, long exp, long mod) {\n\t\tlong ans=1;\n\t\twhile (exp>0) {\n\t\t\tif (exp%2==1) ans*=base;\n\t\t\texp/=2;\n\t\t\tbase*=base;\n\t\t\tbase%=mod;\n\t\t\tans%=mod;\n\t\t}\n\t\treturn ans;\n\t}\n\tpublic static long ModInv(long num,long mod) {return FastExp(num,mod-2,mod);}\n\tpublic static int pop(long x) { //Returns number of bits within a number\n\t\tint cnt = 0;\n\t\twhile (x>0) {\n\t\t\tif (x%2==1) cnt++;\n\t\t\tx/=2;\n\t\t}\n\t\treturn cnt;\n\t}\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tint nextInt() {return Integer.parseInt(next());}\n\t\tlong nextLong() {return Long.parseLong(next());};\n\t\tdouble nextDouble() {return Double.parseDouble(next());}\n\t}\n\tstatic class OutPut{\n\t\tPrintWriter w = new PrintWriter(System.out);\n\t\tvoid pln(double x) {w.println(x);w.flush();}\n\t\tvoid pln(boolean x) {w.println(x);w.flush();}\n\t\tvoid pln(int x) {w.println(x);w.flush();}\n\t\tvoid pln(long x) {w.println(x);w.flush();}\n\t\tvoid pln(String x) {w.println(x);w.flush();}\n\t\tvoid pln(char x) {w.println(x);w.flush();}\n\t\tvoid pln(StringBuilder x) {w.println(x);w.flush();}\n\t\tvoid pln(BigInteger x) {w.println(x);w.flush();}\n\t\tvoid p(int x) {w.print(x);w.flush();}\n\t\tvoid p(long x) {w.print(x);w.flush();}\n\t\tvoid p(String x) {w.print(x);w.flush();}\n\t\tvoid p(char x) {w.print(x);w.flush();}\n\t\tvoid p(StringBuilder x) {w.print(x);w.flush();}\n\t\tvoid p(BigInteger x) {w.print(x);w.flush();}\n\t\tvoid p(double x) {w.print(x);w.flush();}\n\t\tvoid p(boolean x) {w.print(x);w.flush();}\n\t}\n}",
"Main",
"public static void main(String[] args) { \n\t\t/*\n\t\t * */\n\t\tFastScanner I = new FastScanner(); //Input\n\t\tOutPut O = new OutPut(); //Output\n\t\tint N = I.nextInt();\n\t\tint[][] a = new int[N][2];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\ta[i][0] = I.nextInt();\n\t\t\ta[i][1] = I.nextInt();\n\t\t}\n\t\tboolean good=false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor (int j = i; j < min(i+3,N); j++) {\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}\n\t\t\tif (cnt==3) good=true;\n\t\t}\n\t\tO.pln(good?\"Yes\":\"No\");\n\t}",
"main",
"{ \n\t\t/*\n\t\t * */\n\t\tFastScanner I = new FastScanner(); //Input\n\t\tOutPut O = new OutPut(); //Output\n\t\tint N = I.nextInt();\n\t\tint[][] a = new int[N][2];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\ta[i][0] = I.nextInt();\n\t\t\ta[i][1] = I.nextInt();\n\t\t}\n\t\tboolean good=false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor (int j = i; j < min(i+3,N); j++) {\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}\n\t\t\tif (cnt==3) good=true;\n\t\t}\n\t\tO.pln(good?\"Yes\":\"No\");\n\t}",
"FastScanner I = new FastScanner();",
"I",
"new FastScanner()",
"OutPut O = new OutPut();",
"O",
"new OutPut()",
"int N = I.nextInt();",
"N",
"I.nextInt()",
"I.nextInt",
"I",
"int[][] a = new int[N][2];",
"a",
"new int[N][2]",
"N",
"2",
"for (int i = 0; i < N; i++) {\n\t\t\ta[i][0] = I.nextInt();\n\t\t\ta[i][1] = I.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\ta[i][0] = I.nextInt();\n\t\t\ta[i][1] = I.nextInt();\n\t\t}",
"{\n\t\t\ta[i][0] = I.nextInt();\n\t\t\ta[i][1] = I.nextInt();\n\t\t}",
"a[i][0] = I.nextInt()",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"I.nextInt()",
"I.nextInt",
"I",
"a[i][1] = I.nextInt()",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"I.nextInt()",
"I.nextInt",
"I",
"boolean good=false;",
"good",
"false",
"for (int i = 0; i < N; i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor (int j = i; j < min(i+3,N); j++) {\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}\n\t\t\tif (cnt==3) good=true;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tint cnt = 0;\n\t\t\tfor (int j = i; j < min(i+3,N); j++) {\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}\n\t\t\tif (cnt==3) good=true;\n\t\t}",
"{\n\t\t\tint cnt = 0;\n\t\t\tfor (int j = i; j < min(i+3,N); j++) {\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}\n\t\t\tif (cnt==3) good=true;\n\t\t}",
"int cnt = 0;",
"cnt",
"0",
"for (int j = i; j < min(i+3,N); j++) {\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}",
"int j = i;",
"int j = i;",
"j",
"i",
"j < min(i+3,N)",
"j",
"min(i+3,N)",
"min",
"i+3",
"i",
"3",
"N",
"j++",
"j++",
"j",
"{\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}",
"{\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}",
"if (a[j][0]==a[j][1]) cnt++;",
"a[j][0]==a[j][1]",
"a[j][0]",
"a[j]",
"a",
"j",
"0",
"a[j][1]",
"a[j]",
"a",
"j",
"1",
"cnt++",
"cnt",
"if (cnt==3) good=true;",
"cnt==3",
"cnt",
"3",
"good=true",
"good",
"true",
"O.pln(good?\"Yes\":\"No\")",
"O.pln",
"O",
"good?\"Yes\":\"No\"",
"good",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public static double max(double a, double b) {return Math.max(a, b);}",
"max",
"{return Math.max(a, b);}",
"return Math.max(a, b);",
"Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"double a",
"a",
"double b",
"b",
"public static double min(double a, double b) {return Math.min(a, b);}",
"min",
"{return Math.min(a, b);}",
"return Math.min(a, b);",
"Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"double a",
"a",
"double b",
"b",
"public static long min(long a, long b) {return Math.min(a,b);}",
"min",
"{return Math.min(a,b);}",
"return Math.min(a,b);",
"Math.min(a,b)",
"Math.min",
"Math",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public static long max(long a, long b) {return Math.max(a,b);}",
"max",
"{return Math.max(a,b);}",
"return Math.max(a,b);",
"Math.max(a,b)",
"Math.max",
"Math",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public static int min(int a, int b) {return Math.min(a,b);}",
"min",
"{return Math.min(a,b);}",
"return Math.min(a,b);",
"Math.min(a,b)",
"Math.min",
"Math",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public static int max(int a, int b) {return Math.max(a,b);}",
"max",
"{return Math.max(a,b);}",
"return Math.max(a,b);",
"Math.max(a,b)",
"Math.max",
"Math",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public static long abs(long x) {return Math.abs(x);}",
"abs",
"{return Math.abs(x);}",
"return Math.abs(x);",
"Math.abs(x)",
"Math.abs",
"Math",
"x",
"long x",
"x",
"public static long ceil(long num, long den) {long ans = num/den; if (num%den!=0) \n\tans++; return ans;}",
"ceil",
"{long ans = num/den; if (num%den!=0) \n\tans++; return ans;}",
"long ans = num/den;",
"ans",
"num/den",
"num",
"den",
"if (num%den!=0) \n\tans++;",
"num%den!=0",
"num%den",
"num",
"den",
"0",
"ans++",
"ans",
"return ans;",
"ans",
"long num",
"num",
"long den",
"den",
"public static long GCD(long a, long b) {\n\t\tif (a==0||b==0) return max(a,b);\n\t\treturn GCD(min(a,b),max(a,b)%min(a,b));\n\t}",
"GCD",
"{\n\t\tif (a==0||b==0) return max(a,b);\n\t\treturn GCD(min(a,b),max(a,b)%min(a,b));\n\t}",
"if (a==0||b==0) return max(a,b);",
"a==0||b==0",
"a==0",
"a",
"0",
"b==0",
"b",
"0",
"return max(a,b);",
"max(a,b)",
"max",
"a",
"b",
"return GCD(min(a,b),max(a,b)%min(a,b));",
"GCD(min(a,b),max(a,b)%min(a,b))",
"GCD",
"min(a,b)",
"min",
"a",
"b",
"max(a,b)%min(a,b)",
"max(a,b)",
"max",
"a",
"b",
"min(a,b)",
"min",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public static long FastExp(long base, long exp, long mod) {\n\t\tlong ans=1;\n\t\twhile (exp>0) {\n\t\t\tif (exp%2==1) ans*=base;\n\t\t\texp/=2;\n\t\t\tbase*=base;\n\t\t\tbase%=mod;\n\t\t\tans%=mod;\n\t\t}\n\t\treturn ans;\n\t}",
"FastExp",
"{\n\t\tlong ans=1;\n\t\twhile (exp>0) {\n\t\t\tif (exp%2==1) ans*=base;\n\t\t\texp/=2;\n\t\t\tbase*=base;\n\t\t\tbase%=mod;\n\t\t\tans%=mod;\n\t\t}\n\t\treturn ans;\n\t}",
"long ans=1;",
"ans",
"1",
"while (exp>0) {\n\t\t\tif (exp%2==1) ans*=base;\n\t\t\texp/=2;\n\t\t\tbase*=base;\n\t\t\tbase%=mod;\n\t\t\tans%=mod;\n\t\t}",
"exp>0",
"exp",
"0",
"{\n\t\t\tif (exp%2==1) ans*=base;\n\t\t\texp/=2;\n\t\t\tbase*=base;\n\t\t\tbase%=mod;\n\t\t\tans%=mod;\n\t\t}",
"if (exp%2==1) ans*=base;",
"exp%2==1",
"exp%2",
"exp",
"2",
"1",
"ans*=base",
"ans",
"base",
"exp/=2",
"exp",
"2",
"base*=base",
"base",
"base",
"base%=mod",
"base",
"mod",
"ans%=mod",
"ans",
"mod",
"return ans;",
"ans",
"long base",
"base",
"long exp",
"exp",
"long mod",
"mod",
"public static long ModInv(long num,long mod) {return FastExp(num,mod-2,mod);}",
"ModInv",
"{return FastExp(num,mod-2,mod);}",
"return FastExp(num,mod-2,mod);",
"FastExp(num,mod-2,mod)",
"FastExp",
"num",
"mod-2",
"mod",
"2",
"mod",
"long num",
"num",
"long mod",
"mod",
"public static int pop(long x) { //Returns number of bits within a number\n\t\tint cnt = 0;\n\t\twhile (x>0) {\n\t\t\tif (x%2==1) cnt++;\n\t\t\tx/=2;\n\t\t}\n\t\treturn cnt;\n\t}",
"pop",
"{ //Returns number of bits within a number\n\t\tint cnt = 0;\n\t\twhile (x>0) {\n\t\t\tif (x%2==1) cnt++;\n\t\t\tx/=2;\n\t\t}\n\t\treturn cnt;\n\t}",
"int cnt = 0;",
"cnt",
"0",
"while (x>0) {\n\t\t\tif (x%2==1) cnt++;\n\t\t\tx/=2;\n\t\t}",
"x>0",
"x",
"0",
"{\n\t\t\tif (x%2==1) cnt++;\n\t\t\tx/=2;\n\t\t}",
"if (x%2==1) cnt++;",
"x%2==1",
"x%2",
"x",
"2",
"1",
"cnt++",
"cnt",
"x/=2",
"x",
"2",
"return cnt;",
"cnt",
"long x",
"x",
"static class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tint nextInt() {return Integer.parseInt(next());}\n\t\tlong nextLong() {return Long.parseLong(next());};\n\t\tdouble nextDouble() {return Double.parseDouble(next());}\n\t}",
"FastScanner",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st=new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"next",
"{\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}",
"while (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t}",
"st=new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {return Integer.parseInt(next());}",
"nextInt",
"{return Integer.parseInt(next());}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {return Long.parseLong(next());}",
"nextLong",
"{return Long.parseLong(next());}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {return Double.parseDouble(next());}",
"nextDouble",
"{return Double.parseDouble(next());}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"static class OutPut{\n\t\tPrintWriter w = new PrintWriter(System.out);\n\t\tvoid pln(double x) {w.println(x);w.flush();}\n\t\tvoid pln(boolean x) {w.println(x);w.flush();}\n\t\tvoid pln(int x) {w.println(x);w.flush();}\n\t\tvoid pln(long x) {w.println(x);w.flush();}\n\t\tvoid pln(String x) {w.println(x);w.flush();}\n\t\tvoid pln(char x) {w.println(x);w.flush();}\n\t\tvoid pln(StringBuilder x) {w.println(x);w.flush();}\n\t\tvoid pln(BigInteger x) {w.println(x);w.flush();}\n\t\tvoid p(int x) {w.print(x);w.flush();}\n\t\tvoid p(long x) {w.print(x);w.flush();}\n\t\tvoid p(String x) {w.print(x);w.flush();}\n\t\tvoid p(char x) {w.print(x);w.flush();}\n\t\tvoid p(StringBuilder x) {w.print(x);w.flush();}\n\t\tvoid p(BigInteger x) {w.print(x);w.flush();}\n\t\tvoid p(double x) {w.print(x);w.flush();}\n\t\tvoid p(boolean x) {w.print(x);w.flush();}\n\t}",
"OutPut",
"PrintWriter w = new PrintWriter(System.out);",
"w",
"new PrintWriter(System.out)",
"void pln(double x) {w.println(x);w.flush();}",
"pln",
"{w.println(x);w.flush();}",
"w.println(x)",
"w.println",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"double x",
"x",
"void pln(boolean x) {w.println(x);w.flush();}",
"pln",
"{w.println(x);w.flush();}",
"w.println(x)",
"w.println",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"boolean x",
"x",
"void pln(int x) {w.println(x);w.flush();}",
"pln",
"{w.println(x);w.flush();}",
"w.println(x)",
"w.println",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"int x",
"x",
"void pln(long x) {w.println(x);w.flush();}",
"pln",
"{w.println(x);w.flush();}",
"w.println(x)",
"w.println",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"long x",
"x",
"void pln(String x) {w.println(x);w.flush();}",
"pln",
"{w.println(x);w.flush();}",
"w.println(x)",
"w.println",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"String x",
"x",
"void pln(char x) {w.println(x);w.flush();}",
"pln",
"{w.println(x);w.flush();}",
"w.println(x)",
"w.println",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"char x",
"x",
"void pln(StringBuilder x) {w.println(x);w.flush();}",
"pln",
"{w.println(x);w.flush();}",
"w.println(x)",
"w.println",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"StringBuilder x",
"x",
"void pln(BigInteger x) {w.println(x);w.flush();}",
"pln",
"{w.println(x);w.flush();}",
"w.println(x)",
"w.println",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"BigInteger x",
"x",
"void p(int x) {w.print(x);w.flush();}",
"p",
"{w.print(x);w.flush();}",
"w.print(x)",
"w.print",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"int x",
"x",
"void p(long x) {w.print(x);w.flush();}",
"p",
"{w.print(x);w.flush();}",
"w.print(x)",
"w.print",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"long x",
"x",
"void p(String x) {w.print(x);w.flush();}",
"p",
"{w.print(x);w.flush();}",
"w.print(x)",
"w.print",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"String x",
"x",
"void p(char x) {w.print(x);w.flush();}",
"p",
"{w.print(x);w.flush();}",
"w.print(x)",
"w.print",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"char x",
"x",
"void p(StringBuilder x) {w.print(x);w.flush();}",
"p",
"{w.print(x);w.flush();}",
"w.print(x)",
"w.print",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"StringBuilder x",
"x",
"void p(BigInteger x) {w.print(x);w.flush();}",
"p",
"{w.print(x);w.flush();}",
"w.print(x)",
"w.print",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"BigInteger x",
"x",
"void p(double x) {w.print(x);w.flush();}",
"p",
"{w.print(x);w.flush();}",
"w.print(x)",
"w.print",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"double x",
"x",
"void p(boolean x) {w.print(x);w.flush();}",
"p",
"{w.print(x);w.flush();}",
"w.print(x)",
"w.print",
"w",
"x",
"w.flush()",
"w.flush",
"w",
"boolean x",
"x",
"public class Main {\n\tpublic static void main(String[] args) { \n\t\t/*\n\t\t * */\n\t\tFastScanner I = new FastScanner(); //Input\n\t\tOutPut O = new OutPut(); //Output\n\t\tint N = I.nextInt();\n\t\tint[][] a = new int[N][2];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\ta[i][0] = I.nextInt();\n\t\t\ta[i][1] = I.nextInt();\n\t\t}\n\t\tboolean good=false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor (int j = i; j < min(i+3,N); j++) {\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}\n\t\t\tif (cnt==3) good=true;\n\t\t}\n\t\tO.pln(good?\"Yes\":\"No\");\n\t}\n\tpublic static double max(double a, double b) {return Math.max(a, b);}\n\tpublic static double min(double a, double b) {return Math.min(a, b);}\n\tpublic static long min(long a, long b) {return Math.min(a,b);}\n\tpublic static long max(long a, long b) {return Math.max(a,b);}\n\tpublic static int min(int a, int b) {return Math.min(a,b);}\n\tpublic static int max(int a, int b) {return Math.max(a,b);}\n\tpublic static long abs(long x) {return Math.abs(x);}\n\tpublic static long ceil(long num, long den) {long ans = num/den; if (num%den!=0) \n\tans++; return ans;}\n\tpublic static long GCD(long a, long b) {\n\t\tif (a==0||b==0) return max(a,b);\n\t\treturn GCD(min(a,b),max(a,b)%min(a,b));\n\t}\n\tpublic static long FastExp(long base, long exp, long mod) {\n\t\tlong ans=1;\n\t\twhile (exp>0) {\n\t\t\tif (exp%2==1) ans*=base;\n\t\t\texp/=2;\n\t\t\tbase*=base;\n\t\t\tbase%=mod;\n\t\t\tans%=mod;\n\t\t}\n\t\treturn ans;\n\t}\n\tpublic static long ModInv(long num,long mod) {return FastExp(num,mod-2,mod);}\n\tpublic static int pop(long x) { //Returns number of bits within a number\n\t\tint cnt = 0;\n\t\twhile (x>0) {\n\t\t\tif (x%2==1) cnt++;\n\t\t\tx/=2;\n\t\t}\n\t\treturn cnt;\n\t}\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tint nextInt() {return Integer.parseInt(next());}\n\t\tlong nextLong() {return Long.parseLong(next());};\n\t\tdouble nextDouble() {return Double.parseDouble(next());}\n\t}\n\tstatic class OutPut{\n\t\tPrintWriter w = new PrintWriter(System.out);\n\t\tvoid pln(double x) {w.println(x);w.flush();}\n\t\tvoid pln(boolean x) {w.println(x);w.flush();}\n\t\tvoid pln(int x) {w.println(x);w.flush();}\n\t\tvoid pln(long x) {w.println(x);w.flush();}\n\t\tvoid pln(String x) {w.println(x);w.flush();}\n\t\tvoid pln(char x) {w.println(x);w.flush();}\n\t\tvoid pln(StringBuilder x) {w.println(x);w.flush();}\n\t\tvoid pln(BigInteger x) {w.println(x);w.flush();}\n\t\tvoid p(int x) {w.print(x);w.flush();}\n\t\tvoid p(long x) {w.print(x);w.flush();}\n\t\tvoid p(String x) {w.print(x);w.flush();}\n\t\tvoid p(char x) {w.print(x);w.flush();}\n\t\tvoid p(StringBuilder x) {w.print(x);w.flush();}\n\t\tvoid p(BigInteger x) {w.print(x);w.flush();}\n\t\tvoid p(double x) {w.print(x);w.flush();}\n\t\tvoid p(boolean x) {w.print(x);w.flush();}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) { \n\t\t/*\n\t\t * */\n\t\tFastScanner I = new FastScanner(); //Input\n\t\tOutPut O = new OutPut(); //Output\n\t\tint N = I.nextInt();\n\t\tint[][] a = new int[N][2];\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\ta[i][0] = I.nextInt();\n\t\t\ta[i][1] = I.nextInt();\n\t\t}\n\t\tboolean good=false;\n\t\tfor (int i = 0; i < N; i++) {\n\t\t\tint cnt = 0;\n\t\t\tfor (int j = i; j < min(i+3,N); j++) {\n\t\t\t\tif (a[j][0]==a[j][1]) cnt++;\n\t\t\t}\n\t\t\tif (cnt==3) good=true;\n\t\t}\n\t\tO.pln(good?\"Yes\":\"No\");\n\t}\n\tpublic static double max(double a, double b) {return Math.max(a, b);}\n\tpublic static double min(double a, double b) {return Math.min(a, b);}\n\tpublic static long min(long a, long b) {return Math.min(a,b);}\n\tpublic static long max(long a, long b) {return Math.max(a,b);}\n\tpublic static int min(int a, int b) {return Math.min(a,b);}\n\tpublic static int max(int a, int b) {return Math.max(a,b);}\n\tpublic static long abs(long x) {return Math.abs(x);}\n\tpublic static long ceil(long num, long den) {long ans = num/den; if (num%den!=0) \n\tans++; return ans;}\n\tpublic static long GCD(long a, long b) {\n\t\tif (a==0||b==0) return max(a,b);\n\t\treturn GCD(min(a,b),max(a,b)%min(a,b));\n\t}\n\tpublic static long FastExp(long base, long exp, long mod) {\n\t\tlong ans=1;\n\t\twhile (exp>0) {\n\t\t\tif (exp%2==1) ans*=base;\n\t\t\texp/=2;\n\t\t\tbase*=base;\n\t\t\tbase%=mod;\n\t\t\tans%=mod;\n\t\t}\n\t\treturn ans;\n\t}\n\tpublic static long ModInv(long num,long mod) {return FastExp(num,mod-2,mod);}\n\tpublic static int pop(long x) { //Returns number of bits within a number\n\t\tint cnt = 0;\n\t\twhile (x>0) {\n\t\t\tif (x%2==1) cnt++;\n\t\t\tx/=2;\n\t\t}\n\t\treturn cnt;\n\t}\n\tstatic class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\tString next() {\n\t\t\twhile (!st.hasMoreTokens())\n\t\t\t\ttry {\n\t\t\t\t\tst=new StringTokenizer(br.readLine());\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\treturn st.nextToken();\n\t\t}\n\t\tint nextInt() {return Integer.parseInt(next());}\n\t\tlong nextLong() {return Long.parseLong(next());};\n\t\tdouble nextDouble() {return Double.parseDouble(next());}\n\t}\n\tstatic class OutPut{\n\t\tPrintWriter w = new PrintWriter(System.out);\n\t\tvoid pln(double x) {w.println(x);w.flush();}\n\t\tvoid pln(boolean x) {w.println(x);w.flush();}\n\t\tvoid pln(int x) {w.println(x);w.flush();}\n\t\tvoid pln(long x) {w.println(x);w.flush();}\n\t\tvoid pln(String x) {w.println(x);w.flush();}\n\t\tvoid pln(char x) {w.println(x);w.flush();}\n\t\tvoid pln(StringBuilder x) {w.println(x);w.flush();}\n\t\tvoid pln(BigInteger x) {w.println(x);w.flush();}\n\t\tvoid p(int x) {w.print(x);w.flush();}\n\t\tvoid p(long x) {w.print(x);w.flush();}\n\t\tvoid p(String x) {w.print(x);w.flush();}\n\t\tvoid p(char x) {w.print(x);w.flush();}\n\t\tvoid p(StringBuilder x) {w.print(x);w.flush();}\n\t\tvoid p(BigInteger x) {w.print(x);w.flush();}\n\t\tvoid p(double x) {w.print(x);w.flush();}\n\t\tvoid p(boolean x) {w.print(x);w.flush();}\n\t}\n}",
"Main"
]
| import java.io.*;
import java.math.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
/*
* */
FastScanner I = new FastScanner(); //Input
OutPut O = new OutPut(); //Output
int N = I.nextInt();
int[][] a = new int[N][2];
for (int i = 0; i < N; i++) {
a[i][0] = I.nextInt();
a[i][1] = I.nextInt();
}
boolean good=false;
for (int i = 0; i < N; i++) {
int cnt = 0;
for (int j = i; j < min(i+3,N); j++) {
if (a[j][0]==a[j][1]) cnt++;
}
if (cnt==3) good=true;
}
O.pln(good?"Yes":"No");
}
public static double max(double a, double b) {return Math.max(a, b);}
public static double min(double a, double b) {return Math.min(a, b);}
public static long min(long a, long b) {return Math.min(a,b);}
public static long max(long a, long b) {return Math.max(a,b);}
public static int min(int a, int b) {return Math.min(a,b);}
public static int max(int a, int b) {return Math.max(a,b);}
public static long abs(long x) {return Math.abs(x);}
public static long ceil(long num, long den) {long ans = num/den; if (num%den!=0)
ans++; return ans;}
public static long GCD(long a, long b) {
if (a==0||b==0) return max(a,b);
return GCD(min(a,b),max(a,b)%min(a,b));
}
public static long FastExp(long base, long exp, long mod) {
long ans=1;
while (exp>0) {
if (exp%2==1) ans*=base;
exp/=2;
base*=base;
base%=mod;
ans%=mod;
}
return ans;
}
public static long ModInv(long num,long mod) {return FastExp(num,mod-2,mod);}
public static int pop(long x) { //Returns number of bits within a number
int cnt = 0;
while (x>0) {
if (x%2==1) cnt++;
x/=2;
}
return cnt;
}
static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
String next() {
while (!st.hasMoreTokens())
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
int nextInt() {return Integer.parseInt(next());}
long nextLong() {return Long.parseLong(next());};
double nextDouble() {return Double.parseDouble(next());}
}
static class OutPut{
PrintWriter w = new PrintWriter(System.out);
void pln(double x) {w.println(x);w.flush();}
void pln(boolean x) {w.println(x);w.flush();}
void pln(int x) {w.println(x);w.flush();}
void pln(long x) {w.println(x);w.flush();}
void pln(String x) {w.println(x);w.flush();}
void pln(char x) {w.println(x);w.flush();}
void pln(StringBuilder x) {w.println(x);w.flush();}
void pln(BigInteger x) {w.println(x);w.flush();}
void p(int x) {w.print(x);w.flush();}
void p(long x) {w.print(x);w.flush();}
void p(String x) {w.print(x);w.flush();}
void p(char x) {w.print(x);w.flush();}
void p(StringBuilder x) {w.print(x);w.flush();}
void p(BigInteger x) {w.print(x);w.flush();}
void p(double x) {w.print(x);w.flush();}
void p(boolean x) {w.print(x);w.flush();}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
2,
17,
17,
41,
13,
20,
13,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
13,
0,
18,
18,
13,
13,
17,
4,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
0,
13,
17,
4,
13,
8,
13,
17,
17,
23,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
14,
40,
13,
37,
20,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
29,
17,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
17,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
2,
13,
17,
2,
13,
17,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
17,
17,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
0,
13,
8,
4,
18,
13,
18,
13,
13,
20,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
8,
13,
4,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
13,
13,
4,
18,
13,
14,
40,
4,
18,
13,
4,
13,
2,
2,
4,
18,
13,
13,
17,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
17,
42,
2,
2,
0,
13,
4,
13,
40,
17,
40,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
42,
17,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
2,
13,
17,
30,
29,
8,
13,
40,
13,
13,
0,
13,
4,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
17,
42,
2,
2,
0,
13,
4,
13,
40,
17,
40,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
0,
13,
4,
13,
42,
17,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
2,
2,
13,
17,
2,
13,
17,
30,
29,
8,
13,
40,
13,
13,
0,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
13,
12,
13,
30,
14,
2,
13,
40,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
38,
5,
13,
30,
37,
20,
30,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
29,
40,
2,
2,
13,
17,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
42,
2,
2,
0,
13,
4,
13,
40,
17,
4,
13,
13,
29,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
13,
41,
13,
4,
13,
41,
13,
17,
42,
2,
2,
13,
13,
40,
4,
13,
13,
30,
0,
18,
13,
40,
13,
13,
0,
13,
4,
13,
29,
8,
2,
13,
13,
13,
4,
18,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
4,
18,
13,
17,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
761,
8
],
[
761,
9
],
[
9,
10
],
[
761,
11
],
[
11,
12
],
[
761,
13
],
[
13,
14
],
[
13,
15
],
[
761,
16
],
[
16,
17
],
[
16,
18
],
[
761,
19
],
[
19,
20
],
[
19,
21
],
[
761,
22
],
[
22,
23
],
[
22,
24
],
[
761,
25
],
[
25,
26
],
[
25,
27
],
[
761,
28
],
[
28,
29
],
[
28,
30
],
[
761,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
761,
36
],
[
36,
37
],
[
36,
38
],
[
761,
40
],
[
40,
41
],
[
40,
42
],
[
761,
43
],
[
43,
44
],
[
43,
45
],
[
761,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
71,
77
],
[
77,
78
],
[
70,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
79,
85
],
[
85,
86
],
[
48,
87
],
[
87,
88
],
[
87,
89
],
[
48,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
90,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
90,
100
],
[
100,
101
],
[
101,
102
],
[
90,
103
],
[
104,
104
],
[
104,
105
],
[
105,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
109,
115
],
[
108,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
116,
122
],
[
107,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
123,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
107,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
138,
140
],
[
135,
141
],
[
134,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
145,
147
],
[
142,
148
],
[
105,
149
],
[
149,
150
],
[
149,
151
],
[
48,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
154,
156
],
[
154,
157
],
[
46,
158
],
[
158,
159
],
[
761,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
160,
166
],
[
166,
167
],
[
761,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
171,
174
],
[
174,
175
],
[
168,
176
],
[
176,
177
],
[
761,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
181,
186
],
[
186,
187
],
[
187,
188
],
[
186,
189
],
[
178,
190
],
[
190,
191
],
[
761,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
197,
199
],
[
196,
200
],
[
200,
201
],
[
200,
202
],
[
195,
203
],
[
203,
204
],
[
194,
205
],
[
205,
206
],
[
205,
207
],
[
194,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
208,
213
],
[
213,
214
],
[
213,
215
],
[
208,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
208,
220
],
[
221,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
224,
226
],
[
223,
227
],
[
222,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
230,
234
],
[
221,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
237,
241
],
[
194,
242
],
[
242,
243
],
[
192,
244
],
[
244,
245
],
[
192,
246
],
[
246,
247
],
[
761,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
250,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
258,
259
],
[
258,
260
],
[
254,
261
],
[
261,
262
],
[
261,
263
],
[
254,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
254,
268
],
[
269,
269
],
[
269,
270
],
[
270,
271
],
[
271,
272
],
[
272,
273
],
[
272,
274
],
[
271,
275
],
[
270,
276
],
[
276,
277
],
[
276,
278
],
[
278,
279
],
[
279,
280
],
[
279,
281
],
[
278,
282
],
[
269,
283
],
[
283,
284
],
[
283,
285
],
[
285,
286
],
[
286,
287
],
[
286,
288
],
[
285,
289
],
[
250,
290
],
[
290,
291
],
[
248,
292
],
[
292,
293
],
[
761,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
299,
300
],
[
299,
301
],
[
298,
302
],
[
298,
303
],
[
303,
304
],
[
303,
305
],
[
303,
306
],
[
306,
307
],
[
306,
308
],
[
294,
309
],
[
309,
310
],
[
294,
311
],
[
311,
312
],
[
761,
313
],
[
313,
314
],
[
313,
315
],
[
315,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
317,
321
],
[
317,
322
],
[
322,
323
],
[
322,
324
],
[
322,
325
],
[
325,
326
],
[
325,
327
],
[
313,
328
],
[
328,
329
],
[
313,
330
],
[
330,
331
],
[
761,
332
],
[
332,
333
],
[
332,
334
],
[
334,
335
],
[
335,
336
],
[
335,
337
],
[
337,
338
],
[
338,
339
],
[
339,
340
],
[
337,
341
],
[
341,
342
],
[
341,
343
],
[
337,
344
],
[
334,
345
],
[
345,
346
],
[
345,
347
],
[
334,
348
],
[
348,
349
],
[
348,
350
],
[
350,
351
],
[
351,
352
],
[
334,
353
],
[
353,
354
],
[
353,
355
],
[
355,
356
],
[
355,
357
],
[
357,
358
],
[
355,
359
],
[
334,
360
],
[
360,
361
],
[
361,
362
],
[
362,
363
],
[
362,
364
],
[
360,
365
],
[
365,
366
],
[
365,
367
],
[
360,
368
],
[
368,
369
],
[
369,
370
],
[
360,
371
],
[
371,
372
],
[
372,
373
],
[
372,
374
],
[
334,
375
],
[
375,
376
],
[
376,
377
],
[
334,
378
],
[
378,
379
],
[
379,
380
],
[
380,
381
],
[
381,
382
],
[
378,
383
],
[
383,
384
],
[
383,
385
],
[
385,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
386,
390
],
[
385,
391
],
[
761,
392
],
[
392,
393
],
[
392,
394
],
[
394,
395
],
[
395,
396
],
[
396,
397
],
[
395,
398
],
[
392,
399
],
[
399,
400
],
[
761,
401
],
[
401,
402
],
[
401,
403
],
[
403,
404
],
[
404,
405
],
[
405,
406
],
[
404,
407
],
[
401,
408
],
[
408,
409
],
[
761,
410
],
[
410,
411
],
[
410,
412
],
[
412,
413
],
[
413,
414
],
[
414,
415
],
[
413,
416
],
[
412,
417
],
[
417,
418
],
[
418,
419
],
[
410,
420
],
[
420,
421
],
[
761,
422
],
[
422,
423
],
[
422,
424
],
[
424,
425
],
[
425,
426
],
[
425,
427
],
[
424,
428
],
[
428,
429
],
[
424,
430
],
[
430,
431
],
[
430,
432
],
[
424,
433
],
[
433,
434
],
[
434,
435
],
[
435,
436
],
[
436,
437
],
[
436,
438
],
[
438,
439
],
[
435,
440
],
[
440,
441
],
[
434,
442
],
[
442,
443
],
[
443,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
444,
448
],
[
448,
449
],
[
448,
450
],
[
443,
451
],
[
451,
452
],
[
451,
453
],
[
424,
454
],
[
454,
455
],
[
455,
456
],
[
455,
457
],
[
454,
458
],
[
458,
459
],
[
459,
460
],
[
459,
461
],
[
458,
462
],
[
462,
463
],
[
462,
464
],
[
464,
465
],
[
424,
466
],
[
466,
467
],
[
466,
468
],
[
468,
469
],
[
469,
470
],
[
470,
471
],
[
471,
472
],
[
471,
473
],
[
470,
474
],
[
474,
475
],
[
474,
476
],
[
469,
477
],
[
477,
478
],
[
478,
479
],
[
478,
480
],
[
480,
481
],
[
481,
482
],
[
481,
483
],
[
480,
484
],
[
484,
485
],
[
484,
486
],
[
469,
487
],
[
487,
488
],
[
488,
489
],
[
489,
490
],
[
489,
491
],
[
491,
492
],
[
489,
493
],
[
468,
494
],
[
494,
495
],
[
494,
496
],
[
496,
497
],
[
761,
498
],
[
498,
499
],
[
498,
500
],
[
500,
501
],
[
501,
502
],
[
501,
503
],
[
500,
504
],
[
504,
505
],
[
500,
506
],
[
506,
507
],
[
506,
508
],
[
500,
509
],
[
509,
510
],
[
510,
511
],
[
511,
512
],
[
512,
513
],
[
512,
514
],
[
514,
515
],
[
511,
516
],
[
516,
517
],
[
510,
518
],
[
518,
519
],
[
519,
520
],
[
520,
521
],
[
521,
522
],
[
521,
523
],
[
520,
524
],
[
524,
525
],
[
524,
526
],
[
519,
527
],
[
527,
528
],
[
527,
529
],
[
500,
530
],
[
530,
531
],
[
531,
532
],
[
531,
533
],
[
530,
534
],
[
534,
535
],
[
535,
536
],
[
535,
537
],
[
534,
538
],
[
538,
539
],
[
538,
540
],
[
540,
541
],
[
500,
542
],
[
542,
543
],
[
542,
544
],
[
544,
545
],
[
545,
546
],
[
546,
547
],
[
547,
548
],
[
547,
549
],
[
546,
550
],
[
550,
551
],
[
550,
552
],
[
545,
553
],
[
553,
554
],
[
554,
555
],
[
554,
556
],
[
556,
557
],
[
557,
558
],
[
557,
559
],
[
556,
560
],
[
560,
561
],
[
560,
562
],
[
545,
563
],
[
563,
564
],
[
564,
565
],
[
565,
566
],
[
565,
567
],
[
567,
568
],
[
565,
569
],
[
544,
570
],
[
570,
571
],
[
570,
572
],
[
572,
573
],
[
761,
574
],
[
574,
575
],
[
574,
576
],
[
576,
577
],
[
577,
578
],
[
578,
579
],
[
579,
580
],
[
578,
581
],
[
581,
582
],
[
761,
583
],
[
583,
584
],
[
583,
585
],
[
585,
586
],
[
586,
587
],
[
587,
588
],
[
761,
589
],
[
589,
590
],
[
589,
591
],
[
591,
592
],
[
592,
593
],
[
593,
594
],
[
593,
595
],
[
595,
596
],
[
592,
597
],
[
597,
598
],
[
591,
599
],
[
599,
600
],
[
600,
601
],
[
600,
602
],
[
599,
603
],
[
603,
604
],
[
604,
605
],
[
604,
606
],
[
603,
607
],
[
607,
608
],
[
608,
609
],
[
608,
610
],
[
610,
611
],
[
611,
612
],
[
607,
613
],
[
613,
614
],
[
614,
615
],
[
614,
616
],
[
616,
617
],
[
617,
618
],
[
616,
619
],
[
603,
620
],
[
620,
621
],
[
621,
622
],
[
621,
623
],
[
620,
624
],
[
624,
625
],
[
625,
626
],
[
591,
627
],
[
627,
628
],
[
628,
629
],
[
628,
630
],
[
630,
631
],
[
761,
632
],
[
632,
633
],
[
632,
634
],
[
634,
635
],
[
635,
636
],
[
636,
637
],
[
637,
638
],
[
638,
639
],
[
638,
640
],
[
637,
641
],
[
641,
642
],
[
641,
643
],
[
632,
644
],
[
644,
645
],
[
761,
646
],
[
646,
647
],
[
646,
648
],
[
648,
649
],
[
649,
650
],
[
648,
651
],
[
651,
652
],
[
652,
653
],
[
653,
654
],
[
654,
655
],
[
654,
656
],
[
656,
657
],
[
653,
658
],
[
658,
659
],
[
652,
660
],
[
660,
661
],
[
660,
662
],
[
648,
663
],
[
663,
664
],
[
761,
665
],
[
665,
666
],
[
665,
667
],
[
667,
668
],
[
668,
669
],
[
668,
670
],
[
670,
671
],
[
667,
672
],
[
672,
673
],
[
672,
674
],
[
667,
675
],
[
675,
676
],
[
676,
677
],
[
677,
678
],
[
677,
679
],
[
675,
680
],
[
680,
681
],
[
681,
682
],
[
682,
683
],
[
681,
684
],
[
680,
685
],
[
685,
686
],
[
685,
687
],
[
687,
688
],
[
667,
689
],
[
689,
690
],
[
690,
691
],
[
691,
692
],
[
761,
693
],
[
693,
694
],
[
693,
695
],
[
695,
696
],
[
696,
697
],
[
696,
698
],
[
695,
700
],
[
700,
701
],
[
700,
702
],
[
702,
703
],
[
695,
704
],
[
704,
705
],
[
704,
706
],
[
695,
707
],
[
707,
708
],
[
708,
709
],
[
709,
710
],
[
709,
711
],
[
708,
712
],
[
712,
713
],
[
713,
714
],
[
713,
715
],
[
707,
716
],
[
716,
717
],
[
717,
718
],
[
718,
719
],
[
718,
720
],
[
720,
721
],
[
717,
722
],
[
716,
723
],
[
723,
724
],
[
723,
725
],
[
725,
726
],
[
695,
727
],
[
727,
728
],
[
728,
729
],
[
729,
730
],
[
729,
731
],
[
728,
732
],
[
728,
733
],
[
733,
734
],
[
734,
735
],
[
733,
736
],
[
733,
737
],
[
693,
738
],
[
738,
739
],
[
761,
740
],
[
740,
741
],
[
740,
742
],
[
742,
743
],
[
743,
744
],
[
744,
745
],
[
745,
746
],
[
746,
747
],
[
744,
748
],
[
743,
749
],
[
749,
750
],
[
750,
751
],
[
751,
752
],
[
751,
753
],
[
749,
754
],
[
754,
755
],
[
755,
756
],
[
754,
757
],
[
740,
758
],
[
758,
759
],
[
0,
760
],
[
760,
761
],
[
760,
762
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n \n long MAX = 100000L, MOD = 1000000007L, INF = (long) 1e18;\n \n void solve(int TC) throws Exception {\n int n = ni();\n int[][] a = new int[n][2];\n for(int i=0;i<n;i++) {\n \ta[i][0] = ni();\n \ta[i][1] = ni();\n }\n boolean ok = false;\n for(int i=1;i<n-1;++i) {\n \tif(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;\n }\n pn( ok ? \"Yes\" : \"No\");\n }\n \n boolean TestCases = false;\n public static void main(String[] args) throws Exception { new Main().run(); }\n \n void hold(boolean b)throws Exception{if(!b)throw new Exception(\"Hold right there, Sparky!\");}\n static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}\n \n long pow(long a, long b) {\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }\n \n long inv(long x) {\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }\n long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }\n int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }\n \n void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n \n void p(Object o) { out.print(o); }\n void pn(Object o) { out.println(o); }\n void pni(Object o) { out.println(o);out.flush(); }\n double PI = 3.141592653589793238462643383279502884197169399;\n \n int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n double nd() { return Double.parseDouble(ns()); }\n char nc() { return (char)skip(); }\n \n int BUF_SIZE = 1024 * 8;\n byte[] inbuf = new byte[BUF_SIZE];\n int lenbuf = 0, ptrbuf = 0;\n \n int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }\n \n boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n \n String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) {\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }\n \n char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }\n \n void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n \n long MAX = 100000L, MOD = 1000000007L, INF = (long) 1e18;\n \n void solve(int TC) throws Exception {\n int n = ni();\n int[][] a = new int[n][2];\n for(int i=0;i<n;i++) {\n \ta[i][0] = ni();\n \ta[i][1] = ni();\n }\n boolean ok = false;\n for(int i=1;i<n-1;++i) {\n \tif(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;\n }\n pn( ok ? \"Yes\" : \"No\");\n }\n \n boolean TestCases = false;\n public static void main(String[] args) throws Exception { new Main().run(); }\n \n void hold(boolean b)throws Exception{if(!b)throw new Exception(\"Hold right there, Sparky!\");}\n static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}\n \n long pow(long a, long b) {\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }\n \n long inv(long x) {\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }\n long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }\n int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }\n \n void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n \n void p(Object o) { out.print(o); }\n void pn(Object o) { out.println(o); }\n void pni(Object o) { out.println(o);out.flush(); }\n double PI = 3.141592653589793238462643383279502884197169399;\n \n int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n double nd() { return Double.parseDouble(ns()); }\n char nc() { return (char)skip(); }\n \n int BUF_SIZE = 1024 * 8;\n byte[] inbuf = new byte[BUF_SIZE];\n int lenbuf = 0, ptrbuf = 0;\n \n int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }\n \n boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n \n String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) {\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }\n \n char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }\n \n void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n}",
"Main",
"InputStream is;",
"is",
"PrintWriter out;",
"out",
"String INPUT = \"\";",
"INPUT",
"\"\"",
"long MAX = 100000L",
"MAX",
"100000L",
"MOD = 1000000007L",
"MOD",
"1000000007L",
"INF = (long) 1e18;",
"INF",
"(long) 1e18",
"boolean TestCases = false;",
"TestCases",
"false",
"double PI = 3.141592653589793238462643383279502884197169399;",
"PI",
"3.141592653589793238462643383279502884197169399",
"int BUF_SIZE = 1024 * 8;",
"BUF_SIZE",
"1024 * 8",
"1024",
"8",
"byte[] inbuf = new byte[BUF_SIZE];",
"inbuf",
"new byte[BUF_SIZE]",
"BUF_SIZE",
"int lenbuf = 0",
"lenbuf",
"0",
"ptrbuf = 0;",
"ptrbuf",
"0",
"void solve(int TC) throws Exception {\n int n = ni();\n int[][] a = new int[n][2];\n for(int i=0;i<n;i++) {\n \ta[i][0] = ni();\n \ta[i][1] = ni();\n }\n boolean ok = false;\n for(int i=1;i<n-1;++i) {\n \tif(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;\n }\n pn( ok ? \"Yes\" : \"No\");\n }",
"solve",
"{\n int n = ni();\n int[][] a = new int[n][2];\n for(int i=0;i<n;i++) {\n \ta[i][0] = ni();\n \ta[i][1] = ni();\n }\n boolean ok = false;\n for(int i=1;i<n-1;++i) {\n \tif(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;\n }\n pn( ok ? \"Yes\" : \"No\");\n }",
"int n = ni();",
"n",
"ni()",
"ni",
"int[][] a = new int[n][2];",
"a",
"new int[n][2]",
"n",
"2",
"for(int i=0;i<n;i++) {\n \ta[i][0] = ni();\n \ta[i][1] = ni();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \ta[i][0] = ni();\n \ta[i][1] = ni();\n }",
"{\n \ta[i][0] = ni();\n \ta[i][1] = ni();\n }",
"a[i][0] = ni()",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"ni()",
"ni",
"a[i][1] = ni()",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"ni()",
"ni",
"boolean ok = false;",
"ok",
"false",
"for(int i=1;i<n-1;++i) {\n \tif(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;\n }",
"int i=1;",
"int i=1;",
"i",
"1",
"i<n-1",
"i",
"n-1",
"n",
"1",
"++i",
"++i",
"i",
"{\n \tif(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;\n }",
"{\n \tif(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;\n }",
"if(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;",
"a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]",
"a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]",
"a[i-1][0] == a[i-1][1]",
"a[i-1][0]",
"a[i-1]",
"a",
"i-1",
"i",
"1",
"0",
"a[i-1][1]",
"a[i-1]",
"a",
"i-1",
"i",
"1",
"1",
"a[i][0] == a[i][1]",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"a[i+1][0] == a[i+1][1]",
"a[i+1][0]",
"a[i+1]",
"a",
"i+1",
"i",
"1",
"0",
"a[i+1][1]",
"a[i+1]",
"a",
"i+1",
"i",
"1",
"1",
"ok = true",
"ok",
"true",
"pn( ok ? \"Yes\" : \"No\")",
"pn",
"ok ? \"Yes\" : \"No\"",
"ok",
"\"Yes\"",
"\"No\"",
"int TC",
"TC",
"public static void main(String[] args) throws Exception { new Main().run(); }",
"main",
"{ new Main().run(); }",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"void hold(boolean b)throws Exception{if(!b)throw new Exception(\"Hold right there, Sparky!\");}",
"hold",
"{if(!b)throw new Exception(\"Hold right there, Sparky!\");}",
"if(!b)throw new Exception(\"Hold right there, Sparky!\");",
"!b",
"b",
"throw new Exception(\"Hold right there, Sparky!\");",
"new Exception(\"Hold right there, Sparky!\")",
"boolean b",
"b",
"static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}",
"dbg",
"{System.err.println(Arrays.deepToString(o));}",
"System.err.println(Arrays.deepToString(o))",
"System.err.println",
"System.err",
"System",
"System.err",
"Arrays.deepToString(o)",
"Arrays.deepToString",
"Arrays",
"o",
"Object... o",
"o",
"long pow(long a, long b) {\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }",
"pow",
"{\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }",
"if(b==0 || a==1) return 1;",
"b==0 || a==1",
"b==0",
"b",
"0",
"a==1",
"a",
"1",
"return 1;",
"1",
"long o = 1;",
"o",
"1",
"for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n }",
"long p = b;",
"long p = b;",
"p",
"b",
"p > 0",
"p",
"0",
"p>>=1",
"p>>=1",
"p",
"1",
"{\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n }",
"{\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n }",
"if((p&1)==1) o = (o*a) % MOD;",
"(p&1)==1",
"(p&1)",
"p",
"1",
"1",
"o = (o*a) % MOD",
"o",
"(o*a) % MOD",
"(o*a)",
"o",
"a",
"MOD",
"a = (a*a) % MOD",
"a",
"(a*a) % MOD",
"(a*a)",
"a",
"a",
"MOD",
"return o;",
"o",
"long a",
"a",
"long b",
"b",
"long inv(long x) {\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }",
"inv",
"{\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }",
"long o = 1;",
"o",
"1",
"for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n }",
"long p = MOD-2;",
"long p = MOD-2;",
"p",
"MOD-2",
"MOD",
"2",
"p > 0",
"p",
"0",
"p>>=1",
"p>>=1",
"p",
"1",
"{\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n }",
"{\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n }",
"if((p&1)==1)o = (o*x)%MOD;",
"(p&1)==1",
"(p&1)",
"p",
"1",
"1",
"o = (o*x)%MOD",
"o",
"(o*x)%MOD",
"(o*x)",
"o",
"x",
"MOD",
"x = (x*x)%MOD",
"x",
"(x*x)%MOD",
"(x*x)",
"x",
"x",
"MOD",
"return o;",
"o",
"long x",
"x",
"long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }",
"gcd",
"{ return (b==0) ? a : gcd(b,a%b); }",
"return (b==0) ? a : gcd(b,a%b);",
"(b==0) ? a : gcd(b,a%b)",
"(b==0)",
"b",
"0",
"a",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }",
"gcd",
"{ return (b==0) ? a : gcd(b,a%b); }",
"return (b==0) ? a : gcd(b,a%b);",
"(b==0) ? a : gcd(b,a%b)",
"(b==0)",
"b",
"0",
"a",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }",
"run",
"{\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }",
"is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes())",
"is",
"INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes())",
"INPUT.isEmpty()",
"INPUT.isEmpty",
"INPUT",
"System.in",
"System",
"System.in",
"new ByteArrayInputStream(INPUT.getBytes())",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"long s = System.currentTimeMillis();",
"s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"int T = TestCases ? ni() : 1;",
"T",
"TestCases ? ni() : 1",
"TestCases",
"ni()",
"ni",
"1",
"for(int t=1;t<=T;t++) solve(t);",
"int t=1;",
"int t=1;",
"t",
"1",
"t<=T",
"t",
"T",
"t++",
"t++",
"t",
"solve(t);",
"solve(t)",
"solve",
"t",
"out.flush()",
"out.flush",
"out",
"if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");",
"!INPUT.isEmpty()",
"INPUT.isEmpty()",
"INPUT.isEmpty",
"INPUT",
"tr(System.currentTimeMillis()-s+\"ms\")",
"tr",
"System.currentTimeMillis()-s+\"ms\"",
"System.currentTimeMillis()-s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"s",
"\"ms\"",
"void p(Object o) { out.print(o); }",
"p",
"{ out.print(o); }",
"out.print(o)",
"out.print",
"out",
"o",
"Object o",
"o",
"void pn(Object o) { out.println(o); }",
"pn",
"{ out.println(o); }",
"out.println(o)",
"out.println",
"out",
"o",
"Object o",
"o",
"void pni(Object o) { out.println(o);out.flush(); }",
"pni",
"{ out.println(o);out.flush(); }",
"out.println(o)",
"out.println",
"out",
"o",
"out.flush()",
"out.flush",
"out",
"Object o",
"o",
"int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }",
"ni",
"{\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }",
"int num = 0",
"num",
"0",
"b;",
"b",
"boolean minus = false;",
"minus",
"false",
"while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));",
"(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')",
"(b = readByte()) != -1",
"(b = readByte())",
"b",
"readByte()",
"readByte",
"-1",
"1",
"!((b >= '0' && b <= '9') || b == '-')",
"((b >= '0' && b <= '9') || b == '-')",
"(b >= '0' && b <= '9')",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"b == '-'",
"b",
"'-'",
"if(b == '-') {\n minus = true;\n b = readByte();\n }",
"b == '-'",
"b",
"'-'",
"{\n minus = true;\n b = readByte();\n }",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }",
"true",
"{\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }",
"if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }",
"b >= '0' && b <= '9'",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"{\n num = num * 10 + (b - '0');\n }",
"num = num * 10 + (b - '0')",
"num",
"num * 10 + (b - '0')",
"num * 10",
"num",
"10",
"(b - '0')",
"b",
"'0'",
"{\n return minus ? -num : num;\n }",
"return minus ? -num : num;",
"minus ? -num : num",
"minus",
"-num",
"num",
"num",
"b = readByte()",
"b",
"readByte()",
"readByte",
"long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }",
"nl",
"{\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }",
"long num = 0;",
"num",
"0",
"int b;",
"b",
"boolean minus = false;",
"minus",
"false",
"while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));",
"(b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-')",
"(b = readByte()) != -1",
"(b = readByte())",
"b",
"readByte()",
"readByte",
"-1",
"1",
"!((b >= '0' && b <= '9') || b == '-')",
"((b >= '0' && b <= '9') || b == '-')",
"(b >= '0' && b <= '9')",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"b == '-'",
"b",
"'-'",
"if(b == '-') {\n minus = true;\n b = readByte();\n }",
"b == '-'",
"b",
"'-'",
"{\n minus = true;\n b = readByte();\n }",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }",
"true",
"{\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }",
"if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }",
"b >= '0' && b <= '9'",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"{\n num = num * 10 + (b - '0');\n }",
"num = num * 10 + (b - '0')",
"num",
"num * 10 + (b - '0')",
"num * 10",
"num",
"10",
"(b - '0')",
"b",
"'0'",
"{\n return minus ? -num : num;\n }",
"return minus ? -num : num;",
"minus ? -num : num",
"minus",
"-num",
"num",
"num",
"b = readByte()",
"b",
"readByte()",
"readByte",
"double nd() { return Double.parseDouble(ns()); }",
"nd",
"{ return Double.parseDouble(ns()); }",
"return Double.parseDouble(ns());",
"Double.parseDouble(ns())",
"Double.parseDouble",
"Double",
"ns()",
"ns",
"char nc() { return (char)skip(); }",
"nc",
"{ return (char)skip(); }",
"return (char)skip();",
"(char)skip()",
"skip",
"int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }",
"readByte",
"{\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }",
"if(lenbuf == -1)throw new InputMismatchException();",
"lenbuf == -1",
"lenbuf",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n }",
"ptrbuf >= lenbuf",
"ptrbuf",
"lenbuf",
"{\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n }",
"ptrbuf = 0",
"ptrbuf",
"0",
"try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }",
"catch (IOException e) { throw new InputMismatchException(); }",
"IOException e",
"{ throw new InputMismatchException(); }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{ lenbuf = is.read(inbuf); }",
"lenbuf = is.read(inbuf)",
"lenbuf",
"is.read(inbuf)",
"is.read",
"is",
"inbuf",
"if(lenbuf <= 0)return -1;",
"lenbuf <= 0",
"lenbuf",
"0",
"return -1;",
"-1",
"1",
"return inbuf[ptrbuf++];",
"inbuf[ptrbuf++]",
"inbuf",
"ptrbuf++",
"ptrbuf",
"boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }",
"isSpaceChar",
"{ return !(c >= 33 && c <= 126); }",
"return !(c >= 33 && c <= 126);",
"!(c >= 33 && c <= 126)",
"(c >= 33 && c <= 126)",
"c >= 33",
"c",
"33",
"c <= 126",
"c",
"126",
"int c",
"c",
"int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }",
"skip",
"{ int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }",
"int b;",
"b",
"while((b = readByte()) != -1 && isSpaceChar(b));",
"(b = readByte()) != -1 && isSpaceChar(b)",
"(b = readByte()) != -1",
"(b = readByte())",
"b",
"readByte()",
"readByte",
"-1",
"1",
"isSpaceChar(b)",
"isSpaceChar",
"b",
"return b;",
"b",
"String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) {\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }",
"ns",
"{\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) {\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }",
"int b = skip();",
"b",
"skip()",
"skip",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"while(!(isSpaceChar(b))) {\n sb.appendCodePoint(b); b = readByte();\n }",
"!(isSpaceChar(b))",
"(isSpaceChar(b))",
"isSpaceChar",
"b",
"{\n sb.appendCodePoint(b); b = readByte();\n }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }",
"ns",
"{\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }",
"char[] buf = new char[n];",
"buf",
"new char[n]",
"n",
"int b = skip()",
"b",
"skip()",
"skip",
"p = 0;",
"p",
"0",
"while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n }",
"p < n && !(isSpaceChar(b))",
"p < n",
"p",
"n",
"!(isSpaceChar(b))",
"(isSpaceChar(b))",
"isSpaceChar",
"b",
"{\n buf[p++] = (char)b;\n b = readByte();\n }",
"buf[p++] = (char)b",
"buf[p++]",
"buf",
"p++",
"p",
"(char)b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return n == p ? buf : Arrays.copyOf(buf, p);",
"n == p ? buf : Arrays.copyOf(buf, p)",
"n == p",
"n",
"p",
"buf",
"Arrays.copyOf(buf, p)",
"Arrays.copyOf",
"Arrays",
"buf",
"p",
"int n",
"n",
"void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }",
"tr",
"{ if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }",
"if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o));",
"INPUT.length() > 0",
"INPUT.length()",
"INPUT.length",
"INPUT",
"0",
"System.out.println(Arrays.deepToString(o))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.deepToString(o)",
"Arrays.deepToString",
"Arrays",
"o",
"Object... o",
"o",
"public class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n \n long MAX = 100000L, MOD = 1000000007L, INF = (long) 1e18;\n \n void solve(int TC) throws Exception {\n int n = ni();\n int[][] a = new int[n][2];\n for(int i=0;i<n;i++) {\n \ta[i][0] = ni();\n \ta[i][1] = ni();\n }\n boolean ok = false;\n for(int i=1;i<n-1;++i) {\n \tif(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;\n }\n pn( ok ? \"Yes\" : \"No\");\n }\n \n boolean TestCases = false;\n public static void main(String[] args) throws Exception { new Main().run(); }\n \n void hold(boolean b)throws Exception{if(!b)throw new Exception(\"Hold right there, Sparky!\");}\n static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}\n \n long pow(long a, long b) {\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }\n \n long inv(long x) {\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }\n long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }\n int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }\n \n void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n \n void p(Object o) { out.print(o); }\n void pn(Object o) { out.println(o); }\n void pni(Object o) { out.println(o);out.flush(); }\n double PI = 3.141592653589793238462643383279502884197169399;\n \n int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n double nd() { return Double.parseDouble(ns()); }\n char nc() { return (char)skip(); }\n \n int BUF_SIZE = 1024 * 8;\n byte[] inbuf = new byte[BUF_SIZE];\n int lenbuf = 0, ptrbuf = 0;\n \n int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }\n \n boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n \n String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) {\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }\n \n char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }\n \n void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n}",
"public class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n \n long MAX = 100000L, MOD = 1000000007L, INF = (long) 1e18;\n \n void solve(int TC) throws Exception {\n int n = ni();\n int[][] a = new int[n][2];\n for(int i=0;i<n;i++) {\n \ta[i][0] = ni();\n \ta[i][1] = ni();\n }\n boolean ok = false;\n for(int i=1;i<n-1;++i) {\n \tif(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;\n }\n pn( ok ? \"Yes\" : \"No\");\n }\n \n boolean TestCases = false;\n public static void main(String[] args) throws Exception { new Main().run(); }\n \n void hold(boolean b)throws Exception{if(!b)throw new Exception(\"Hold right there, Sparky!\");}\n static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}\n \n long pow(long a, long b) {\n if(b==0 || a==1) return 1;\n long o = 1;\n for(long p = b; p > 0; p>>=1) {\n if((p&1)==1) o = (o*a) % MOD;\n a = (a*a) % MOD;\n } return o;\n }\n \n long inv(long x) {\n long o = 1;\n for(long p = MOD-2; p > 0; p>>=1) {\n if((p&1)==1)o = (o*x)%MOD;\n x = (x*x)%MOD;\n } return o;\n }\n long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }\n int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }\n \n void run() throws Exception {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n long s = System.currentTimeMillis();\n int T = TestCases ? ni() : 1;\n for(int t=1;t<=T;t++) solve(t);\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n \n void p(Object o) { out.print(o); }\n void pn(Object o) { out.println(o); }\n void pni(Object o) { out.println(o);out.flush(); }\n double PI = 3.141592653589793238462643383279502884197169399;\n \n int ni() {\n int num = 0, b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9'){\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n long nl() {\n long num = 0;\n int b;\n boolean minus = false;\n while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));\n if(b == '-') {\n minus = true;\n b = readByte();\n }\n while(true) {\n if(b >= '0' && b <= '9') {\n num = num * 10 + (b - '0');\n } else {\n return minus ? -num : num;\n }\n b = readByte();\n }\n }\n \n double nd() { return Double.parseDouble(ns()); }\n char nc() { return (char)skip(); }\n \n int BUF_SIZE = 1024 * 8;\n byte[] inbuf = new byte[BUF_SIZE];\n int lenbuf = 0, ptrbuf = 0;\n \n int readByte() {\n if(lenbuf == -1)throw new InputMismatchException();\n if(ptrbuf >= lenbuf){\n ptrbuf = 0;\n try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }\n if(lenbuf <= 0)return -1;\n } return inbuf[ptrbuf++];\n }\n \n boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n \n String ns() {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))) {\n sb.appendCodePoint(b); b = readByte();\n } return sb.toString();\n }\n \n char[] ns(int n) {\n char[] buf = new char[n];\n int b = skip(), p = 0;\n while(p < n && !(isSpaceChar(b))){\n buf[p++] = (char)b;\n b = readByte();\n } return n == p ? buf : Arrays.copyOf(buf, p);\n }\n \n void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
InputStream is;
PrintWriter out;
String INPUT = "";
long MAX = 100000L, MOD = 1000000007L, INF = (long) 1e18;
void solve(int TC) throws Exception {
int n = ni();
int[][] a = new int[n][2];
for(int i=0;i<n;i++) {
a[i][0] = ni();
a[i][1] = ni();
}
boolean ok = false;
for(int i=1;i<n-1;++i) {
if(a[i-1][0] == a[i-1][1] && a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1]) ok = true;
}
pn( ok ? "Yes" : "No");
}
boolean TestCases = false;
public static void main(String[] args) throws Exception { new Main().run(); }
void hold(boolean b)throws Exception{if(!b)throw new Exception("Hold right there, Sparky!");}
static void dbg(Object... o){System.err.println(Arrays.deepToString(o));}
long pow(long a, long b) {
if(b==0 || a==1) return 1;
long o = 1;
for(long p = b; p > 0; p>>=1) {
if((p&1)==1) o = (o*a) % MOD;
a = (a*a) % MOD;
} return o;
}
long inv(long x) {
long o = 1;
for(long p = MOD-2; p > 0; p>>=1) {
if((p&1)==1)o = (o*x)%MOD;
x = (x*x)%MOD;
} return o;
}
long gcd(long a, long b) { return (b==0) ? a : gcd(b,a%b); }
int gcd(int a, int b) { return (b==0) ? a : gcd(b,a%b); }
void run() throws Exception {
is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
out = new PrintWriter(System.out);
long s = System.currentTimeMillis();
int T = TestCases ? ni() : 1;
for(int t=1;t<=T;t++) solve(t);
out.flush();
if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+"ms");
}
void p(Object o) { out.print(o); }
void pn(Object o) { out.println(o); }
void pni(Object o) { out.println(o);out.flush(); }
double PI = 3.141592653589793238462643383279502884197169399;
int ni() {
int num = 0, b;
boolean minus = false;
while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
if(b == '-') {
minus = true;
b = readByte();
}
while(true) {
if(b >= '0' && b <= '9'){
num = num * 10 + (b - '0');
} else {
return minus ? -num : num;
}
b = readByte();
}
}
long nl() {
long num = 0;
int b;
boolean minus = false;
while((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'));
if(b == '-') {
minus = true;
b = readByte();
}
while(true) {
if(b >= '0' && b <= '9') {
num = num * 10 + (b - '0');
} else {
return minus ? -num : num;
}
b = readByte();
}
}
double nd() { return Double.parseDouble(ns()); }
char nc() { return (char)skip(); }
int BUF_SIZE = 1024 * 8;
byte[] inbuf = new byte[BUF_SIZE];
int lenbuf = 0, ptrbuf = 0;
int readByte() {
if(lenbuf == -1)throw new InputMismatchException();
if(ptrbuf >= lenbuf){
ptrbuf = 0;
try { lenbuf = is.read(inbuf); } catch (IOException e) { throw new InputMismatchException(); }
if(lenbuf <= 0)return -1;
} return inbuf[ptrbuf++];
}
boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
String ns() {
int b = skip();
StringBuilder sb = new StringBuilder();
while(!(isSpaceChar(b))) {
sb.appendCodePoint(b); b = readByte();
} return sb.toString();
}
char[] ns(int n) {
char[] buf = new char[n];
int b = skip(), p = 0;
while(p < n && !(isSpaceChar(b))){
buf[p++] = (char)b;
b = readByte();
} return n == p ? buf : Arrays.copyOf(buf, p);
}
void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
41,
13,
17,
14,
13,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
40,
4,
13,
0,
13,
20,
12,
13,
30,
29,
2,
2,
13,
17,
4,
18,
13,
12,
13,
30,
4,
13,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
158,
11
],
[
158,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
14,
26
],
[
26,
27
],
[
26,
28
],
[
14,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
52,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
41,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
14,
70
],
[
70,
71
],
[
70,
72
],
[
14,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
14,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
12,
84
],
[
84,
85
],
[
158,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
86,
90
],
[
90,
91
],
[
86,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
92,
98
],
[
98,
99
],
[
86,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
103,
107
],
[
107,
108
],
[
107,
109
],
[
86,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
119,
120
],
[
86,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
86,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
137,
138
],
[
86,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
143,
146
],
[
146,
147
],
[
86,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
152,
155
],
[
155,
156
],
[
0,
157
],
[
157,
158
],
[
157,
159
]
]
| [
"import java.util.*;\nimport java.io.*;\nimport static java.lang.Math.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// 入力\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor(int i = 0; i < n; i++){\n\t\t int a = sc.nextInt();\n\t\t int b = sc.nextInt();\n\t\t if(a == b){\n\t\t cnt++;\n\t\t }else{\n\t\t cnt = 0;\n\t\t }\n\t\t if(cnt >= 3) flg = true;\n\t\t}\n\t\t\n\t\t// 計算\n\t\tString result = \"No\";\n\t\tif(flg) result = \"Yes\";\n\t\t\n\t\t// 出力\n\t\tSystem.out.println(result);\n\t\t\n\t}\n\t\n\tpublic static class Scanner {\n\t\tprivate BufferedReader br; private StringTokenizer tok;\n\t\tpublic Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}\n\t\tprivate void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}\n\t\tprivate boolean hasNext() { return tok != null && tok.hasMoreTokens();}\n\t\tpublic String next() throws IOException { getLine(); return tok.nextToken();}\n\t\tpublic int nextInt() throws IOException { return Integer.parseInt(next());}\n\t\tpublic long nextLong() throws IOException { return Long.parseLong(next());}\n\t\tpublic double nextDouble() throws IOException { return Double.parseDouble(next());}\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"public class Main {\n public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// 入力\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor(int i = 0; i < n; i++){\n\t\t int a = sc.nextInt();\n\t\t int b = sc.nextInt();\n\t\t if(a == b){\n\t\t cnt++;\n\t\t }else{\n\t\t cnt = 0;\n\t\t }\n\t\t if(cnt >= 3) flg = true;\n\t\t}\n\t\t\n\t\t// 計算\n\t\tString result = \"No\";\n\t\tif(flg) result = \"Yes\";\n\t\t\n\t\t// 出力\n\t\tSystem.out.println(result);\n\t\t\n\t}\n\t\n\tpublic static class Scanner {\n\t\tprivate BufferedReader br; private StringTokenizer tok;\n\t\tpublic Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}\n\t\tprivate void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}\n\t\tprivate boolean hasNext() { return tok != null && tok.hasMoreTokens();}\n\t\tpublic String next() throws IOException { getLine(); return tok.nextToken();}\n\t\tpublic int nextInt() throws IOException { return Integer.parseInt(next());}\n\t\tpublic long nextLong() throws IOException { return Long.parseLong(next());}\n\t\tpublic double nextDouble() throws IOException { return Double.parseDouble(next());}\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// 入力\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor(int i = 0; i < n; i++){\n\t\t int a = sc.nextInt();\n\t\t int b = sc.nextInt();\n\t\t if(a == b){\n\t\t cnt++;\n\t\t }else{\n\t\t cnt = 0;\n\t\t }\n\t\t if(cnt >= 3) flg = true;\n\t\t}\n\t\t\n\t\t// 計算\n\t\tString result = \"No\";\n\t\tif(flg) result = \"Yes\";\n\t\t\n\t\t// 出力\n\t\tSystem.out.println(result);\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// 入力\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor(int i = 0; i < n; i++){\n\t\t int a = sc.nextInt();\n\t\t int b = sc.nextInt();\n\t\t if(a == b){\n\t\t cnt++;\n\t\t }else{\n\t\t cnt = 0;\n\t\t }\n\t\t if(cnt >= 3) flg = true;\n\t\t}\n\t\t\n\t\t// 計算\n\t\tString result = \"No\";\n\t\tif(flg) result = \"Yes\";\n\t\t\n\t\t// 出力\n\t\tSystem.out.println(result);\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cnt = 0;",
"cnt",
"0",
"boolean flg = false;",
"flg",
"false",
"for(int i = 0; i < n; i++){\n\t\t int a = sc.nextInt();\n\t\t int b = sc.nextInt();\n\t\t if(a == b){\n\t\t cnt++;\n\t\t }else{\n\t\t cnt = 0;\n\t\t }\n\t\t if(cnt >= 3) flg = true;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t int a = sc.nextInt();\n\t\t int b = sc.nextInt();\n\t\t if(a == b){\n\t\t cnt++;\n\t\t }else{\n\t\t cnt = 0;\n\t\t }\n\t\t if(cnt >= 3) flg = true;\n\t\t}",
"{\n\t\t int a = sc.nextInt();\n\t\t int b = sc.nextInt();\n\t\t if(a == b){\n\t\t cnt++;\n\t\t }else{\n\t\t cnt = 0;\n\t\t }\n\t\t if(cnt >= 3) flg = true;\n\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a == b){\n\t\t cnt++;\n\t\t }else{\n\t\t cnt = 0;\n\t\t }",
"a == b",
"a",
"b",
"{\n\t\t cnt++;\n\t\t }",
"cnt++",
"cnt",
"{\n\t\t cnt = 0;\n\t\t }",
"cnt = 0",
"cnt",
"0",
"if(cnt >= 3) flg = true;",
"cnt >= 3",
"cnt",
"3",
"flg = true",
"flg",
"true",
"String result = \"No\";",
"result",
"\"No\"",
"if(flg) result = \"Yes\";",
"flg",
"result = \"Yes\"",
"result",
"\"Yes\"",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public static class Scanner {\n\t\tprivate BufferedReader br; private StringTokenizer tok;\n\t\tpublic Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}\n\t\tprivate void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}\n\t\tprivate boolean hasNext() { return tok != null && tok.hasMoreTokens();}\n\t\tpublic String next() throws IOException { getLine(); return tok.nextToken();}\n\t\tpublic int nextInt() throws IOException { return Integer.parseInt(next());}\n\t\tpublic long nextLong() throws IOException { return Long.parseLong(next());}\n\t\tpublic double nextDouble() throws IOException { return Double.parseDouble(next());}\n\t}",
"Scanner",
"private BufferedReader br;",
"br",
"private StringTokenizer tok;",
"tok",
"public Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}",
"Scanner",
"{ br = new BufferedReader(new InputStreamReader(is));}",
"br = new BufferedReader(new InputStreamReader(is))",
"br",
"new BufferedReader(new InputStreamReader(is))",
"InputStream is",
"is",
"private void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}",
"getLine",
"{ while(!hasNext()) tok = new StringTokenizer(br.readLine());}",
"while(!hasNext()) tok = new StringTokenizer(br.readLine());",
"!hasNext()",
"hasNext()",
"hasNext",
"tok = new StringTokenizer(br.readLine())",
"tok",
"new StringTokenizer(br.readLine())",
"private boolean hasNext() { return tok != null && tok.hasMoreTokens();}",
"hasNext",
"{ return tok != null && tok.hasMoreTokens();}",
"return tok != null && tok.hasMoreTokens();",
"tok != null && tok.hasMoreTokens()",
"tok != null",
"tok",
"null",
"tok.hasMoreTokens()",
"tok.hasMoreTokens",
"tok",
"public String next() throws IOException { getLine(); return tok.nextToken();}",
"next",
"{ getLine(); return tok.nextToken();}",
"getLine()",
"getLine",
"return tok.nextToken();",
"tok.nextToken()",
"tok.nextToken",
"tok",
"public int nextInt() throws IOException { return Integer.parseInt(next());}",
"nextInt",
"{ return Integer.parseInt(next());}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nextLong() throws IOException { return Long.parseLong(next());}",
"nextLong",
"{ return Long.parseLong(next());}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public double nextDouble() throws IOException { return Double.parseDouble(next());}",
"nextDouble",
"{ return Double.parseDouble(next());}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public class Main {\n public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// 入力\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor(int i = 0; i < n; i++){\n\t\t int a = sc.nextInt();\n\t\t int b = sc.nextInt();\n\t\t if(a == b){\n\t\t cnt++;\n\t\t }else{\n\t\t cnt = 0;\n\t\t }\n\t\t if(cnt >= 3) flg = true;\n\t\t}\n\t\t\n\t\t// 計算\n\t\tString result = \"No\";\n\t\tif(flg) result = \"Yes\";\n\t\t\n\t\t// 出力\n\t\tSystem.out.println(result);\n\t\t\n\t}\n\t\n\tpublic static class Scanner {\n\t\tprivate BufferedReader br; private StringTokenizer tok;\n\t\tpublic Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}\n\t\tprivate void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}\n\t\tprivate boolean hasNext() { return tok != null && tok.hasMoreTokens();}\n\t\tpublic String next() throws IOException { getLine(); return tok.nextToken();}\n\t\tpublic int nextInt() throws IOException { return Integer.parseInt(next());}\n\t\tpublic long nextLong() throws IOException { return Long.parseLong(next());}\n\t\tpublic double nextDouble() throws IOException { return Double.parseDouble(next());}\n\t}\n\n}",
"public class Main {\n public static void main(String[] args) throws Exception {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t// 入力\n\t\tint n = sc.nextInt();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor(int i = 0; i < n; i++){\n\t\t int a = sc.nextInt();\n\t\t int b = sc.nextInt();\n\t\t if(a == b){\n\t\t cnt++;\n\t\t }else{\n\t\t cnt = 0;\n\t\t }\n\t\t if(cnt >= 3) flg = true;\n\t\t}\n\t\t\n\t\t// 計算\n\t\tString result = \"No\";\n\t\tif(flg) result = \"Yes\";\n\t\t\n\t\t// 出力\n\t\tSystem.out.println(result);\n\t\t\n\t}\n\t\n\tpublic static class Scanner {\n\t\tprivate BufferedReader br; private StringTokenizer tok;\n\t\tpublic Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}\n\t\tprivate void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}\n\t\tprivate boolean hasNext() { return tok != null && tok.hasMoreTokens();}\n\t\tpublic String next() throws IOException { getLine(); return tok.nextToken();}\n\t\tpublic int nextInt() throws IOException { return Integer.parseInt(next());}\n\t\tpublic long nextLong() throws IOException { return Long.parseLong(next());}\n\t\tpublic double nextDouble() throws IOException { return Double.parseDouble(next());}\n\t}\n\n}",
"Main"
]
| import java.util.*;
import java.io.*;
import static java.lang.Math.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
// 入力
int n = sc.nextInt();
int cnt = 0;
boolean flg = false;
for(int i = 0; i < n; i++){
int a = sc.nextInt();
int b = sc.nextInt();
if(a == b){
cnt++;
}else{
cnt = 0;
}
if(cnt >= 3) flg = true;
}
// 計算
String result = "No";
if(flg) result = "Yes";
// 出力
System.out.println(result);
}
public static class Scanner {
private BufferedReader br; private StringTokenizer tok;
public Scanner(InputStream is) throws IOException { br = new BufferedReader(new InputStreamReader(is));}
private void getLine() throws IOException { while(!hasNext()) tok = new StringTokenizer(br.readLine());}
private boolean hasNext() { return tok != null && tok.hasMoreTokens();}
public String next() throws IOException { getLine(); return tok.nextToken();}
public int nextInt() throws IOException { return Integer.parseInt(next());}
public long nextLong() throws IOException { return Long.parseLong(next());}
public double nextDouble() throws IOException { return Double.parseDouble(next());}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
14,
4,
18,
18,
13,
17,
18,
13,
17,
30,
0,
13,
17,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
111,
17
],
[
111,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
20,
27
],
[
27,
28
],
[
27,
29
],
[
20,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
35,
36
],
[
36,
37
],
[
20,
38
],
[
38,
39
],
[
38,
40
],
[
20,
41
],
[
41,
42
],
[
41,
43
],
[
20,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
49,
50
],
[
49,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
44,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
59,
64
],
[
56,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
65,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
65,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
56,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
20,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
90,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
20,
102
],
[
102,
103
],
[
103,
104
],
[
20,
105
],
[
105,
106
],
[
106,
107
],
[
18,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.StringTokenizer;\n\npublic class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n\n int counter = 0;\n boolean ansFlag = false;\n\n for(int i = 0; i < N; i++) {\n String[] input_array = br.readLine().split(\" \");\n if(input_array[0].equals(input_array[1])) {\n counter += 1;\n } else {\n counter = 0;\n }\n\n if(counter == 3) {\n ansFlag = true;\n }\n }\n\n if(ansFlag){\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }\n\n br.close();\n pw.close();\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n\n int counter = 0;\n boolean ansFlag = false;\n\n for(int i = 0; i < N; i++) {\n String[] input_array = br.readLine().split(\" \");\n if(input_array[0].equals(input_array[1])) {\n counter += 1;\n } else {\n counter = 0;\n }\n\n if(counter == 3) {\n ansFlag = true;\n }\n }\n\n if(ansFlag){\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }\n\n br.close();\n pw.close();\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n\n int counter = 0;\n boolean ansFlag = false;\n\n for(int i = 0; i < N; i++) {\n String[] input_array = br.readLine().split(\" \");\n if(input_array[0].equals(input_array[1])) {\n counter += 1;\n } else {\n counter = 0;\n }\n\n if(counter == 3) {\n ansFlag = true;\n }\n }\n\n if(ansFlag){\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }\n\n br.close();\n pw.close();\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n\n int counter = 0;\n boolean ansFlag = false;\n\n for(int i = 0; i < N; i++) {\n String[] input_array = br.readLine().split(\" \");\n if(input_array[0].equals(input_array[1])) {\n counter += 1;\n } else {\n counter = 0;\n }\n\n if(counter == 3) {\n ansFlag = true;\n }\n }\n\n if(ansFlag){\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }\n\n br.close();\n pw.close();\n }",
"BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));",
"br",
"new BufferedReader(new java.io.InputStreamReader(System.in))",
"PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"StringTokenizer st = new StringTokenizer(br.readLine());",
"st",
"new StringTokenizer(br.readLine())",
"int N = Integer.parseInt(st.nextToken());",
"N",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"int counter = 0;",
"counter",
"0",
"boolean ansFlag = false;",
"ansFlag",
"false",
"for(int i = 0; i < N; i++) {\n String[] input_array = br.readLine().split(\" \");\n if(input_array[0].equals(input_array[1])) {\n counter += 1;\n } else {\n counter = 0;\n }\n\n if(counter == 3) {\n ansFlag = true;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n String[] input_array = br.readLine().split(\" \");\n if(input_array[0].equals(input_array[1])) {\n counter += 1;\n } else {\n counter = 0;\n }\n\n if(counter == 3) {\n ansFlag = true;\n }\n }",
"{\n String[] input_array = br.readLine().split(\" \");\n if(input_array[0].equals(input_array[1])) {\n counter += 1;\n } else {\n counter = 0;\n }\n\n if(counter == 3) {\n ansFlag = true;\n }\n }",
"String[] input_array = br.readLine().split(\" \");",
"input_array",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"if(input_array[0].equals(input_array[1])) {\n counter += 1;\n } else {\n counter = 0;\n }",
"input_array[0].equals(input_array[1])",
"input_array[0].equals",
"input_array[0]",
"input_array",
"0",
"input_array[1]",
"input_array",
"1",
"{\n counter += 1;\n }",
"counter += 1",
"counter",
"1",
"{\n counter = 0;\n }",
"counter = 0",
"counter",
"0",
"if(counter == 3) {\n ansFlag = true;\n }",
"counter == 3",
"counter",
"3",
"{\n ansFlag = true;\n }",
"ansFlag = true",
"ansFlag",
"true",
"if(ansFlag){\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }",
"ansFlag",
"{\n pw.println(\"Yes\");\n }",
"pw.println(\"Yes\")",
"pw.println",
"pw",
"\"Yes\"",
"{\n pw.println(\"No\");\n }",
"pw.println(\"No\")",
"pw.println",
"pw",
"\"No\"",
"br.close()",
"br.close",
"br",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n\n int counter = 0;\n boolean ansFlag = false;\n\n for(int i = 0; i < N; i++) {\n String[] input_array = br.readLine().split(\" \");\n if(input_array[0].equals(input_array[1])) {\n counter += 1;\n } else {\n counter = 0;\n }\n\n if(counter == 3) {\n ansFlag = true;\n }\n }\n\n if(ansFlag){\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }\n\n br.close();\n pw.close();\n }\n}",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));\n PrintWriter pw = new PrintWriter(System.out);\n StringTokenizer st = new StringTokenizer(br.readLine());\n\n int N = Integer.parseInt(st.nextToken());\n\n int counter = 0;\n boolean ansFlag = false;\n\n for(int i = 0; i < N; i++) {\n String[] input_array = br.readLine().split(\" \");\n if(input_array[0].equals(input_array[1])) {\n counter += 1;\n } else {\n counter = 0;\n }\n\n if(counter == 3) {\n ansFlag = true;\n }\n }\n\n if(ansFlag){\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }\n\n br.close();\n pw.close();\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
PrintWriter pw = new PrintWriter(System.out);
StringTokenizer st = new StringTokenizer(br.readLine());
int N = Integer.parseInt(st.nextToken());
int counter = 0;
boolean ansFlag = false;
for(int i = 0; i < N; i++) {
String[] input_array = br.readLine().split(" ");
if(input_array[0].equals(input_array[1])) {
counter += 1;
} else {
counter = 0;
}
if(counter == 3) {
ansFlag = true;
}
}
if(ansFlag){
pw.println("Yes");
} else {
pw.println("No");
}
br.close();
pw.close();
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
4,
18,
13,
0,
18,
36,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
18,
18,
36,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
30,
0,
13,
17,
3,
29,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
177,
5
],
[
177,
6
],
[
6,
7
],
[
177,
8
],
[
8,
9
],
[
177,
10
],
[
10,
11
],
[
177,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
22,
23
],
[
21,
24
],
[
24,
25
],
[
25,
26
],
[
14,
27
],
[
27,
28
],
[
28,
29
],
[
12,
30
],
[
30,
31
],
[
177,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
34,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
34,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
34,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
67,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
32,
91
],
[
91,
92
],
[
177,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
99,
109
],
[
109,
110
],
[
110,
111
],
[
99,
112
],
[
113,
113
],
[
113,
114
],
[
114,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
117,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
116,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
132,
134
],
[
129,
135
],
[
128,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
139,
141
],
[
136,
142
],
[
116,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
147,
149
],
[
144,
150
],
[
143,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
154,
156
],
[
151,
157
],
[
114,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
158,
162
],
[
95,
163
],
[
163,
164
],
[
177,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
168,
173
],
[
165,
174
],
[
174,
175
],
[
0,
176
],
[
176,
177
],
[
176,
178
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n Main m = new Main(sc);\n m.show(m.solve());\n sc.close();\n }\n \n\t//フィールド\n Scanner sc;\n int N;\n int[][] D;\n \n //入力\n Main(Scanner sc) {\n this.sc = sc;\n this.N = sc.nextInt();\n this.D= new int[N][2];\n for (int i = 0; i < N; i++) {\n \tfor (int j = 0; j < 2; j++) {\n \t\tthis.D[i][j] = sc.nextInt();\n \t}\n }\n }\n \n //解答処理\n private String solve() {\n String answer = \"No\";\n \n for (int i = 0; i < N-2; i++) {\n \tif (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}\n }\n \n return answer;\n }\n \n //出力\n public void show(String answer) {\n System.out.println(answer);\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n Main m = new Main(sc);\n m.show(m.solve());\n sc.close();\n }\n \n\t//フィールド\n Scanner sc;\n int N;\n int[][] D;\n \n //入力\n Main(Scanner sc) {\n this.sc = sc;\n this.N = sc.nextInt();\n this.D= new int[N][2];\n for (int i = 0; i < N; i++) {\n \tfor (int j = 0; j < 2; j++) {\n \t\tthis.D[i][j] = sc.nextInt();\n \t}\n }\n }\n \n //解答処理\n private String solve() {\n String answer = \"No\";\n \n for (int i = 0; i < N-2; i++) {\n \tif (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}\n }\n \n return answer;\n }\n \n //出力\n public void show(String answer) {\n System.out.println(answer);\n }\n\n}",
"Main",
"//フィールド\n Scanner sc;",
"sc",
"int N;",
"N",
"int[][] D;",
"D",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n Main m = new Main(sc);\n m.show(m.solve());\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n Main m = new Main(sc);\n m.show(m.solve());\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"Main m = new Main(sc);",
"m",
"new Main(sc)",
"m.show(m.solve())",
"m.show",
"m",
"m.solve()",
"m.solve",
"m",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"//入力\n Main(Scanner sc) {\n this.sc = sc;\n this.N = sc.nextInt();\n this.D= new int[N][2];\n for (int i = 0; i < N; i++) {\n \tfor (int j = 0; j < 2; j++) {\n \t\tthis.D[i][j] = sc.nextInt();\n \t}\n }\n }",
"Main",
"{\n this.sc = sc;\n this.N = sc.nextInt();\n this.D= new int[N][2];\n for (int i = 0; i < N; i++) {\n \tfor (int j = 0; j < 2; j++) {\n \t\tthis.D[i][j] = sc.nextInt();\n \t}\n }\n }",
"this.sc = sc",
"this.sc",
"this",
"this.sc",
"sc",
"this.N = sc.nextInt()",
"this.N",
"this",
"this.N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"this.D= new int[N][2]",
"this.D",
"this",
"this.D",
"new int[N][2]",
"N",
"2",
"for (int i = 0; i < N; i++) {\n \tfor (int j = 0; j < 2; j++) {\n \t\tthis.D[i][j] = sc.nextInt();\n \t}\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \tfor (int j = 0; j < 2; j++) {\n \t\tthis.D[i][j] = sc.nextInt();\n \t}\n }",
"{\n \tfor (int j = 0; j < 2; j++) {\n \t\tthis.D[i][j] = sc.nextInt();\n \t}\n }",
"for (int j = 0; j < 2; j++) {\n \t\tthis.D[i][j] = sc.nextInt();\n \t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < 2",
"j",
"2",
"j++",
"j++",
"j",
"{\n \t\tthis.D[i][j] = sc.nextInt();\n \t}",
"{\n \t\tthis.D[i][j] = sc.nextInt();\n \t}",
"this.D[i][j] = sc.nextInt()",
"this.D[i][j]",
"this.D[i]",
"this.D",
"this",
"this.D",
"i",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Scanner sc",
"sc",
"//解答処理\n private String solve() {\n String answer = \"No\";\n \n for (int i = 0; i < N-2; i++) {\n \tif (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}\n }\n \n return answer;\n }",
"solve",
"{\n String answer = \"No\";\n \n for (int i = 0; i < N-2; i++) {\n \tif (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}\n }\n \n return answer;\n }",
"String answer = \"No\";",
"answer",
"\"No\"",
"for (int i = 0; i < N-2; i++) {\n \tif (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N-2",
"i",
"N-2",
"N",
"2",
"i++",
"i++",
"i",
"{\n \tif (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}\n }",
"{\n \tif (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}\n }",
"if (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}",
"D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]",
"D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]",
"D[i][0] == D[i][1]",
"D[i][0]",
"D[i]",
"D",
"i",
"0",
"D[i][1]",
"D[i]",
"D",
"i",
"1",
"D[i+1][0] == D[i+1][1]",
"D[i+1][0]",
"D[i+1]",
"D",
"i+1",
"i",
"1",
"0",
"D[i+1][1]",
"D[i+1]",
"D",
"i+1",
"i",
"1",
"1",
"D[i+2][0] == D[i+2][1]",
"D[i+2][0]",
"D[i+2]",
"D",
"i+2",
"i",
"2",
"0",
"D[i+2][1]",
"D[i+2]",
"D",
"i+2",
"i",
"2",
"1",
"{\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}",
"answer = \"Yes\"",
"answer",
"\"Yes\"",
"break;",
"return answer;",
"answer",
"//出力\n public void show(String answer) {\n System.out.println(answer);\n }",
"show",
"{\n System.out.println(answer);\n }",
"System.out.println(answer)",
"System.out.println",
"System.out",
"System",
"System.out",
"answer",
"String answer",
"answer",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n Main m = new Main(sc);\n m.show(m.solve());\n sc.close();\n }\n \n\t//フィールド\n Scanner sc;\n int N;\n int[][] D;\n \n //入力\n Main(Scanner sc) {\n this.sc = sc;\n this.N = sc.nextInt();\n this.D= new int[N][2];\n for (int i = 0; i < N; i++) {\n \tfor (int j = 0; j < 2; j++) {\n \t\tthis.D[i][j] = sc.nextInt();\n \t}\n }\n }\n \n //解答処理\n private String solve() {\n String answer = \"No\";\n \n for (int i = 0; i < N-2; i++) {\n \tif (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}\n }\n \n return answer;\n }\n \n //出力\n public void show(String answer) {\n System.out.println(answer);\n }\n\n}",
"public class Main {\n\tpublic static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n Main m = new Main(sc);\n m.show(m.solve());\n sc.close();\n }\n \n\t//フィールド\n Scanner sc;\n int N;\n int[][] D;\n \n //入力\n Main(Scanner sc) {\n this.sc = sc;\n this.N = sc.nextInt();\n this.D= new int[N][2];\n for (int i = 0; i < N; i++) {\n \tfor (int j = 0; j < 2; j++) {\n \t\tthis.D[i][j] = sc.nextInt();\n \t}\n }\n }\n \n //解答処理\n private String solve() {\n String answer = \"No\";\n \n for (int i = 0; i < N-2; i++) {\n \tif (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {\n \t\tanswer = \"Yes\";\n \t\tbreak;\n \t}\n }\n \n return answer;\n }\n \n //出力\n public void show(String answer) {\n System.out.println(answer);\n }\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
Main m = new Main(sc);
m.show(m.solve());
sc.close();
}
//フィールド
Scanner sc;
int N;
int[][] D;
//入力
Main(Scanner sc) {
this.sc = sc;
this.N = sc.nextInt();
this.D= new int[N][2];
for (int i = 0; i < N; i++) {
for (int j = 0; j < 2; j++) {
this.D[i][j] = sc.nextInt();
}
}
}
//解答処理
private String solve() {
String answer = "No";
for (int i = 0; i < N-2; i++) {
if (D[i][0] == D[i][1] && D[i+1][0] == D[i+1][1] && D[i+2][0] == D[i+2][1]) {
answer = "Yes";
break;
}
}
return answer;
}
//出力
public void show(String answer) {
System.out.println(answer);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
74,
5
],
[
74,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
46,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
35,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
6,
71
],
[
71,
72
],
[
0,
73
],
[
73,
74
],
[
73,
75
]
]
| [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint rolls = sc.nextInt();\n\t\t\n\t\tString output = \"No\";\n\t\tint doubleRollCount = 0;\n\t\t\n\t\tfor(int i = 0; i < rolls; i++) {\n\t\t\tint rollOne = sc.nextInt();\n\t\t\tint rollTwo = sc.nextInt();\n\t\t\t\n\t\t\tif(rollOne == rollTwo) {\n\t\t\t\tdoubleRollCount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(doubleRollCount == 3) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(output);\n\t\t\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint rolls = sc.nextInt();\n\t\t\n\t\tString output = \"No\";\n\t\tint doubleRollCount = 0;\n\t\t\n\t\tfor(int i = 0; i < rolls; i++) {\n\t\t\tint rollOne = sc.nextInt();\n\t\t\tint rollTwo = sc.nextInt();\n\t\t\t\n\t\t\tif(rollOne == rollTwo) {\n\t\t\t\tdoubleRollCount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(doubleRollCount == 3) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(output);\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint rolls = sc.nextInt();\n\t\t\n\t\tString output = \"No\";\n\t\tint doubleRollCount = 0;\n\t\t\n\t\tfor(int i = 0; i < rolls; i++) {\n\t\t\tint rollOne = sc.nextInt();\n\t\t\tint rollTwo = sc.nextInt();\n\t\t\t\n\t\t\tif(rollOne == rollTwo) {\n\t\t\t\tdoubleRollCount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(doubleRollCount == 3) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(output);\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint rolls = sc.nextInt();\n\t\t\n\t\tString output = \"No\";\n\t\tint doubleRollCount = 0;\n\t\t\n\t\tfor(int i = 0; i < rolls; i++) {\n\t\t\tint rollOne = sc.nextInt();\n\t\t\tint rollTwo = sc.nextInt();\n\t\t\t\n\t\t\tif(rollOne == rollTwo) {\n\t\t\t\tdoubleRollCount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(doubleRollCount == 3) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(output);\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int rolls = sc.nextInt();",
"rolls",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String output = \"No\";",
"output",
"\"No\"",
"int doubleRollCount = 0;",
"doubleRollCount",
"0",
"for(int i = 0; i < rolls; i++) {\n\t\t\tint rollOne = sc.nextInt();\n\t\t\tint rollTwo = sc.nextInt();\n\t\t\t\n\t\t\tif(rollOne == rollTwo) {\n\t\t\t\tdoubleRollCount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(doubleRollCount == 3) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < rolls",
"i",
"rolls",
"i++",
"i++",
"i",
"{\n\t\t\tint rollOne = sc.nextInt();\n\t\t\tint rollTwo = sc.nextInt();\n\t\t\t\n\t\t\tif(rollOne == rollTwo) {\n\t\t\t\tdoubleRollCount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(doubleRollCount == 3) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t}",
"{\n\t\t\tint rollOne = sc.nextInt();\n\t\t\tint rollTwo = sc.nextInt();\n\t\t\t\n\t\t\tif(rollOne == rollTwo) {\n\t\t\t\tdoubleRollCount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(doubleRollCount == 3) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t}",
"int rollOne = sc.nextInt();",
"rollOne",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int rollTwo = sc.nextInt();",
"rollTwo",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(rollOne == rollTwo) {\n\t\t\t\tdoubleRollCount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}",
"rollOne == rollTwo",
"rollOne",
"rollTwo",
"{\n\t\t\t\tdoubleRollCount++;\n\t\t\t}",
"doubleRollCount++",
"doubleRollCount",
"{\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}",
"doubleRollCount = 0",
"doubleRollCount",
"0",
"if(doubleRollCount == 3) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}",
"doubleRollCount == 3",
"doubleRollCount",
"3",
"{\n\t\t\t\toutput = \"Yes\";\n\t\t\t}",
"output = \"Yes\"",
"output",
"\"Yes\"",
"System.out.println(output)",
"System.out.println",
"System.out",
"System",
"System.out",
"output",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint rolls = sc.nextInt();\n\t\t\n\t\tString output = \"No\";\n\t\tint doubleRollCount = 0;\n\t\t\n\t\tfor(int i = 0; i < rolls; i++) {\n\t\t\tint rollOne = sc.nextInt();\n\t\t\tint rollTwo = sc.nextInt();\n\t\t\t\n\t\t\tif(rollOne == rollTwo) {\n\t\t\t\tdoubleRollCount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(doubleRollCount == 3) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(output);\n\t\t\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint rolls = sc.nextInt();\n\t\t\n\t\tString output = \"No\";\n\t\tint doubleRollCount = 0;\n\t\t\n\t\tfor(int i = 0; i < rolls; i++) {\n\t\t\tint rollOne = sc.nextInt();\n\t\t\tint rollTwo = sc.nextInt();\n\t\t\t\n\t\t\tif(rollOne == rollTwo) {\n\t\t\t\tdoubleRollCount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tdoubleRollCount = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(doubleRollCount == 3) {\n\t\t\t\toutput = \"Yes\";\n\t\t\t}\n\t\t}\n\t\t\n\t\tSystem.out.println(output);\n\t\t\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int rolls = sc.nextInt();
String output = "No";
int doubleRollCount = 0;
for(int i = 0; i < rolls; i++) {
int rollOne = sc.nextInt();
int rollTwo = sc.nextInt();
if(rollOne == rollTwo) {
doubleRollCount++;
}
else {
doubleRollCount = 0;
}
if(doubleRollCount == 3) {
output = "Yes";
}
}
System.out.println(output);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
87,
5
],
[
87,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
46,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
35,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
65,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
8,
81
],
[
81,
82
],
[
82,
83
],
[
6,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n\n int cnt = 0;\n boolean judge = false;\n\n for (int i = 0; i < num ;i++) {\n int a1 = sc.nextInt();\n int a2 = sc.nextInt();\n if (a1 == a2) {\n cnt++; \n } else {\n cnt = 0;\n }\n if(cnt == 3){\n judge = true;\n }\n\n }\n if(judge){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n\n int cnt = 0;\n boolean judge = false;\n\n for (int i = 0; i < num ;i++) {\n int a1 = sc.nextInt();\n int a2 = sc.nextInt();\n if (a1 == a2) {\n cnt++; \n } else {\n cnt = 0;\n }\n if(cnt == 3){\n judge = true;\n }\n\n }\n if(judge){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n\n\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n\n int cnt = 0;\n boolean judge = false;\n\n for (int i = 0; i < num ;i++) {\n int a1 = sc.nextInt();\n int a2 = sc.nextInt();\n if (a1 == a2) {\n cnt++; \n } else {\n cnt = 0;\n }\n if(cnt == 3){\n judge = true;\n }\n\n }\n if(judge){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n\n int cnt = 0;\n boolean judge = false;\n\n for (int i = 0; i < num ;i++) {\n int a1 = sc.nextInt();\n int a2 = sc.nextInt();\n if (a1 == a2) {\n cnt++; \n } else {\n cnt = 0;\n }\n if(cnt == 3){\n judge = true;\n }\n\n }\n if(judge){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int num = sc.nextInt();",
"num",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cnt = 0;",
"cnt",
"0",
"boolean judge = false;",
"judge",
"false",
"for (int i = 0; i < num ;i++) {\n int a1 = sc.nextInt();\n int a2 = sc.nextInt();\n if (a1 == a2) {\n cnt++; \n } else {\n cnt = 0;\n }\n if(cnt == 3){\n judge = true;\n }\n\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < num",
"i",
"num",
"i++",
"i++",
"i",
"{\n int a1 = sc.nextInt();\n int a2 = sc.nextInt();\n if (a1 == a2) {\n cnt++; \n } else {\n cnt = 0;\n }\n if(cnt == 3){\n judge = true;\n }\n\n }",
"{\n int a1 = sc.nextInt();\n int a2 = sc.nextInt();\n if (a1 == a2) {\n cnt++; \n } else {\n cnt = 0;\n }\n if(cnt == 3){\n judge = true;\n }\n\n }",
"int a1 = sc.nextInt();",
"a1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a2 = sc.nextInt();",
"a2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (a1 == a2) {\n cnt++; \n } else {\n cnt = 0;\n }",
"a1 == a2",
"a1",
"a2",
"{\n cnt++; \n }",
"cnt++",
"cnt",
"{\n cnt = 0;\n }",
"cnt = 0",
"cnt",
"0",
"if(cnt == 3){\n judge = true;\n }",
"cnt == 3",
"cnt",
"3",
"{\n judge = true;\n }",
"judge = true",
"judge",
"true",
"if(judge){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"judge",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n\n int cnt = 0;\n boolean judge = false;\n\n for (int i = 0; i < num ;i++) {\n int a1 = sc.nextInt();\n int a2 = sc.nextInt();\n if (a1 == a2) {\n cnt++; \n } else {\n cnt = 0;\n }\n if(cnt == 3){\n judge = true;\n }\n\n }\n if(judge){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int num = sc.nextInt();\n\n int cnt = 0;\n boolean judge = false;\n\n for (int i = 0; i < num ;i++) {\n int a1 = sc.nextInt();\n int a2 = sc.nextInt();\n if (a1 == a2) {\n cnt++; \n } else {\n cnt = 0;\n }\n if(cnt == 3){\n judge = true;\n }\n\n }\n if(judge){\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n sc.close();\n\n\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int cnt = 0;
boolean judge = false;
for (int i = 0; i < num ;i++) {
int a1 = sc.nextInt();
int a2 = sc.nextInt();
if (a1 == a2) {
cnt++;
} else {
cnt = 0;
}
if(cnt == 3){
judge = true;
}
}
if(judge){
System.out.println("Yes");
} else {
System.out.println("No");
}
sc.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
109,
5
],
[
109,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
34,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
53,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
69,
81
],
[
81,
82
],
[
82,
83
],
[
69,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
68,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
92,
99
],
[
8,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
6,
106
],
[
106,
107
],
[
0,
108
],
[
108,
109
],
[
108,
110
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int[][] info = new int[N][2];\n\n for (int i = 0; i < N; i++) {\n info[i][0] = sc.nextInt();\n info[i][1] = sc.nextInt();\n }\n\n int z = 0;\n for (int i = 0; i < N; i++) {\n\n if (info[i][0] == info[i][1]) {\n z++;\n } else {\n z = 0;\n }\n\n if (z == 3) {\n System.out.println(\"Yes\");\n return;\n\n }\n }\n System.out.println(\"No\");\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int[][] info = new int[N][2];\n\n for (int i = 0; i < N; i++) {\n info[i][0] = sc.nextInt();\n info[i][1] = sc.nextInt();\n }\n\n int z = 0;\n for (int i = 0; i < N; i++) {\n\n if (info[i][0] == info[i][1]) {\n z++;\n } else {\n z = 0;\n }\n\n if (z == 3) {\n System.out.println(\"Yes\");\n return;\n\n }\n }\n System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int[][] info = new int[N][2];\n\n for (int i = 0; i < N; i++) {\n info[i][0] = sc.nextInt();\n info[i][1] = sc.nextInt();\n }\n\n int z = 0;\n for (int i = 0; i < N; i++) {\n\n if (info[i][0] == info[i][1]) {\n z++;\n } else {\n z = 0;\n }\n\n if (z == 3) {\n System.out.println(\"Yes\");\n return;\n\n }\n }\n System.out.println(\"No\");\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int[][] info = new int[N][2];\n\n for (int i = 0; i < N; i++) {\n info[i][0] = sc.nextInt();\n info[i][1] = sc.nextInt();\n }\n\n int z = 0;\n for (int i = 0; i < N; i++) {\n\n if (info[i][0] == info[i][1]) {\n z++;\n } else {\n z = 0;\n }\n\n if (z == 3) {\n System.out.println(\"Yes\");\n return;\n\n }\n }\n System.out.println(\"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] info = new int[N][2];",
"info",
"new int[N][2]",
"N",
"2",
"for (int i = 0; i < N; i++) {\n info[i][0] = sc.nextInt();\n info[i][1] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n info[i][0] = sc.nextInt();\n info[i][1] = sc.nextInt();\n }",
"{\n info[i][0] = sc.nextInt();\n info[i][1] = sc.nextInt();\n }",
"info[i][0] = sc.nextInt()",
"info[i][0]",
"info[i]",
"info",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"info[i][1] = sc.nextInt()",
"info[i][1]",
"info[i]",
"info",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int z = 0;",
"z",
"0",
"for (int i = 0; i < N; i++) {\n\n if (info[i][0] == info[i][1]) {\n z++;\n } else {\n z = 0;\n }\n\n if (z == 3) {\n System.out.println(\"Yes\");\n return;\n\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\n if (info[i][0] == info[i][1]) {\n z++;\n } else {\n z = 0;\n }\n\n if (z == 3) {\n System.out.println(\"Yes\");\n return;\n\n }\n }",
"{\n\n if (info[i][0] == info[i][1]) {\n z++;\n } else {\n z = 0;\n }\n\n if (z == 3) {\n System.out.println(\"Yes\");\n return;\n\n }\n }",
"if (info[i][0] == info[i][1]) {\n z++;\n } else {\n z = 0;\n }",
"info[i][0] == info[i][1]",
"info[i][0]",
"info[i]",
"info",
"i",
"0",
"info[i][1]",
"info[i]",
"info",
"i",
"1",
"{\n z++;\n }",
"z++",
"z",
"{\n z = 0;\n }",
"z = 0",
"z",
"0",
"if (z == 3) {\n System.out.println(\"Yes\");\n return;\n\n }",
"z == 3",
"z",
"3",
"{\n System.out.println(\"Yes\");\n return;\n\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int[][] info = new int[N][2];\n\n for (int i = 0; i < N; i++) {\n info[i][0] = sc.nextInt();\n info[i][1] = sc.nextInt();\n }\n\n int z = 0;\n for (int i = 0; i < N; i++) {\n\n if (info[i][0] == info[i][1]) {\n z++;\n } else {\n z = 0;\n }\n\n if (z == 3) {\n System.out.println(\"Yes\");\n return;\n\n }\n }\n System.out.println(\"No\");\n }\n}",
"public class Main {\n\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int[][] info = new int[N][2];\n\n for (int i = 0; i < N; i++) {\n info[i][0] = sc.nextInt();\n info[i][1] = sc.nextInt();\n }\n\n int z = 0;\n for (int i = 0; i < N; i++) {\n\n if (info[i][0] == info[i][1]) {\n z++;\n } else {\n z = 0;\n }\n\n if (z == 3) {\n System.out.println(\"Yes\");\n return;\n\n }\n }\n System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[][] info = new int[N][2];
for (int i = 0; i < N; i++) {
info[i][0] = sc.nextInt();
info[i][1] = sc.nextInt();
}
int z = 0;
for (int i = 0; i < N; i++) {
if (info[i][0] == info[i][1]) {
z++;
} else {
z = 0;
}
if (z == 3) {
System.out.println("Yes");
return;
}
}
System.out.println("No");
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
14,
2,
13,
13,
30,
0,
13,
2,
40,
13,
17,
30,
0,
13,
17,
4,
18,
13,
8,
13,
17,
17,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
100,
8
],
[
100,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
30,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
37,
39
],
[
29,
40
],
[
40,
41
],
[
41,
42
],
[
29,
43
],
[
44,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
47,
52
],
[
44,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
58,
60
],
[
44,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
66,
68
],
[
44,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
69,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
11,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
87,
90
],
[
11,
91
],
[
91,
92
],
[
92,
93
],
[
11,
94
],
[
94,
95
],
[
95,
96
],
[
9,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
]
| [
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n boolean res = false;\n\n for (int i = 0, chain = 0; i < n; ++i) {\n String[] line = br.readLine().split(\" \");\n int a = Integer.parseInt(line[0]), b = Integer.parseInt(line[1]);\n if (a == b) {\n res |= ++chain >= 3;\n } else {\n chain = 0;\n }\n }\n\n bw.write(res ? \"Yes\" : \"No\");\n\n bw.close();\n br.close();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) throws IOException {\n final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n boolean res = false;\n\n for (int i = 0, chain = 0; i < n; ++i) {\n String[] line = br.readLine().split(\" \");\n int a = Integer.parseInt(line[0]), b = Integer.parseInt(line[1]);\n if (a == b) {\n res |= ++chain >= 3;\n } else {\n chain = 0;\n }\n }\n\n bw.write(res ? \"Yes\" : \"No\");\n\n bw.close();\n br.close();\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n boolean res = false;\n\n for (int i = 0, chain = 0; i < n; ++i) {\n String[] line = br.readLine().split(\" \");\n int a = Integer.parseInt(line[0]), b = Integer.parseInt(line[1]);\n if (a == b) {\n res |= ++chain >= 3;\n } else {\n chain = 0;\n }\n }\n\n bw.write(res ? \"Yes\" : \"No\");\n\n bw.close();\n br.close();\n }",
"main",
"{\n final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n boolean res = false;\n\n for (int i = 0, chain = 0; i < n; ++i) {\n String[] line = br.readLine().split(\" \");\n int a = Integer.parseInt(line[0]), b = Integer.parseInt(line[1]);\n if (a == b) {\n res |= ++chain >= 3;\n } else {\n chain = 0;\n }\n }\n\n bw.write(res ? \"Yes\" : \"No\");\n\n bw.close();\n br.close();\n }",
"final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));",
"bw",
"new BufferedWriter(new OutputStreamWriter(System.out))",
"final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"int n = Integer.parseInt(br.readLine());",
"n",
"Integer.parseInt(br.readLine())",
"Integer.parseInt",
"Integer",
"br.readLine()",
"br.readLine",
"br",
"boolean res = false;",
"res",
"false",
"for (int i = 0, chain = 0; i < n; ++i) {\n String[] line = br.readLine().split(\" \");\n int a = Integer.parseInt(line[0]), b = Integer.parseInt(line[1]);\n if (a == b) {\n res |= ++chain >= 3;\n } else {\n chain = 0;\n }\n }",
"int i = 0, chain = 0;",
"int i = 0",
"i",
"0",
"chain = 0;",
"chain",
"0",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"{\n String[] line = br.readLine().split(\" \");\n int a = Integer.parseInt(line[0]), b = Integer.parseInt(line[1]);\n if (a == b) {\n res |= ++chain >= 3;\n } else {\n chain = 0;\n }\n }",
"{\n String[] line = br.readLine().split(\" \");\n int a = Integer.parseInt(line[0]), b = Integer.parseInt(line[1]);\n if (a == b) {\n res |= ++chain >= 3;\n } else {\n chain = 0;\n }\n }",
"String[] line = br.readLine().split(\" \");",
"line",
"br.readLine().split(\" \")",
"br.readLine().split",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"int a = Integer.parseInt(line[0])",
"a",
"Integer.parseInt(line[0])",
"Integer.parseInt",
"Integer",
"line[0]",
"line",
"0",
"b = Integer.parseInt(line[1]);",
"b",
"Integer.parseInt(line[1])",
"Integer.parseInt",
"Integer",
"line[1]",
"line",
"1",
"if (a == b) {\n res |= ++chain >= 3;\n } else {\n chain = 0;\n }",
"a == b",
"a",
"b",
"{\n res |= ++chain >= 3;\n }",
"res |= ++chain >= 3",
"res",
"++chain >= 3",
"++chain",
"chain",
"3",
"{\n chain = 0;\n }",
"chain = 0",
"chain",
"0",
"bw.write(res ? \"Yes\" : \"No\")",
"bw.write",
"bw",
"res ? \"Yes\" : \"No\"",
"res",
"\"Yes\"",
"\"No\"",
"bw.close()",
"bw.close",
"bw",
"br.close()",
"br.close",
"br",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws IOException {\n final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n boolean res = false;\n\n for (int i = 0, chain = 0; i < n; ++i) {\n String[] line = br.readLine().split(\" \");\n int a = Integer.parseInt(line[0]), b = Integer.parseInt(line[1]);\n if (a == b) {\n res |= ++chain >= 3;\n } else {\n chain = 0;\n }\n }\n\n bw.write(res ? \"Yes\" : \"No\");\n\n bw.close();\n br.close();\n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException {\n final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));\n final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n int n = Integer.parseInt(br.readLine());\n boolean res = false;\n\n for (int i = 0, chain = 0; i < n; ++i) {\n String[] line = br.readLine().split(\" \");\n int a = Integer.parseInt(line[0]), b = Integer.parseInt(line[1]);\n if (a == b) {\n res |= ++chain >= 3;\n } else {\n chain = 0;\n }\n }\n\n bw.write(res ? \"Yes\" : \"No\");\n\n bw.close();\n br.close();\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws IOException {
final BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int n = Integer.parseInt(br.readLine());
boolean res = false;
for (int i = 0, chain = 0; i < n; ++i) {
String[] line = br.readLine().split(" ");
int a = Integer.parseInt(line[0]), b = Integer.parseInt(line[1]);
if (a == b) {
res |= ++chain >= 3;
} else {
chain = 0;
}
}
bw.write(res ? "Yes" : "No");
bw.close();
br.close();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
3,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
86,
5
],
[
86,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
11,
12
],
[
11,
13
],
[
10,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
16,
19
],
[
19,
20
],
[
20,
21
],
[
10,
22
],
[
22,
23
],
[
22,
24
],
[
10,
25
],
[
25,
26
],
[
25,
27
],
[
10,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
47,
48
],
[
40,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
55,
56
],
[
40,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
57,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
40,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
10,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
6,
83
],
[
83,
84
],
[
0,
85
],
[
85,
86
],
[
85,
87
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int count = 0; String result = \"No\";\n for (int i = 0; i < N; i++) {\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }\n System.out.println(result);\n }\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int count = 0; String result = \"No\";\n for (int i = 0; i < N; i++) {\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }\n System.out.println(result);\n }\n }\n\n}",
"Main",
"public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int count = 0; String result = \"No\";\n for (int i = 0; i < N; i++) {\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }\n System.out.println(result);\n }\n }",
"main",
"{\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int count = 0; String result = \"No\";\n for (int i = 0; i < N; i++) {\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }\n System.out.println(result);\n }\n }",
"try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int count = 0; String result = \"No\";\n for (int i = 0; i < N; i++) {\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }\n System.out.println(result);\n }",
"{\n int N = Integer.parseInt(sc.next());\n int count = 0; String result = \"No\";\n for (int i = 0; i < N; i++) {\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }\n System.out.println(result);\n }",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int N = Integer.parseInt(sc.next());",
"N",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int count = 0;",
"count",
"0",
"String result = \"No\";",
"result",
"\"No\"",
"for (int i = 0; i < N; i++) {\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }",
"{\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }",
"int d1 = Integer.parseInt(sc.next());",
"d1",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"int d2 = Integer.parseInt(sc.next());",
"d2",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }",
"d1 == d2",
"d1",
"d2",
"{\n count++;\n }",
"count++",
"count",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"if (count == 3) {\n result = \"Yes\";\n break;\n }",
"count == 3",
"count",
"3",
"{\n result = \"Yes\";\n break;\n }",
"result = \"Yes\"",
"result",
"\"Yes\"",
"break;",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int count = 0; String result = \"No\";\n for (int i = 0; i < N; i++) {\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }\n System.out.println(result);\n }\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n try (Scanner sc = new Scanner(System.in)) {\n int N = Integer.parseInt(sc.next());\n int count = 0; String result = \"No\";\n for (int i = 0; i < N; i++) {\n int d1 = Integer.parseInt(sc.next());\n int d2 = Integer.parseInt(sc.next());\n if (d1 == d2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n result = \"Yes\";\n break;\n }\n }\n System.out.println(result);\n }\n }\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int N = Integer.parseInt(sc.next());
int count = 0; String result = "No";
for (int i = 0; i < N; i++) {
int d1 = Integer.parseInt(sc.next());
int d2 = Integer.parseInt(sc.next());
if (d1 == d2) {
count++;
} else {
count = 0;
}
if (count == 3) {
result = "Yes";
break;
}
}
System.out.println(result);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
20,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
4,
18,
13,
13,
4,
18,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
3,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
111,
8
],
[
111,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
29,
34
],
[
34,
35
],
[
34,
36
],
[
29,
37
],
[
37,
38
],
[
38,
39
],
[
29,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
46,
47
],
[
41,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
52,
53
],
[
11,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
68,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
67,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
66,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
11,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
90,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
9,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
]
| [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint z = 0;\n\t\tArrayList<Integer> d1 = new ArrayList<>();\n\t\tArrayList<Integer> d2 = new ArrayList<>();\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\td1.add(sc.nextInt());\n\t\t\td2.add(sc.nextInt());\n\n\t\t}\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tif(d1.get(i)==d2.get(i)) {\n\t\t\t\tz++;\n\t\t\t}else {\n\t\t\t\tz=0;\n\t\t\t}\n\n\t\t\tif(z==3) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tif(z==3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\n\t}\n\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint z = 0;\n\t\tArrayList<Integer> d1 = new ArrayList<>();\n\t\tArrayList<Integer> d2 = new ArrayList<>();\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\td1.add(sc.nextInt());\n\t\t\td2.add(sc.nextInt());\n\n\t\t}\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tif(d1.get(i)==d2.get(i)) {\n\t\t\t\tz++;\n\t\t\t}else {\n\t\t\t\tz=0;\n\t\t\t}\n\n\t\t\tif(z==3) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tif(z==3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint z = 0;\n\t\tArrayList<Integer> d1 = new ArrayList<>();\n\t\tArrayList<Integer> d2 = new ArrayList<>();\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\td1.add(sc.nextInt());\n\t\t\td2.add(sc.nextInt());\n\n\t\t}\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tif(d1.get(i)==d2.get(i)) {\n\t\t\t\tz++;\n\t\t\t}else {\n\t\t\t\tz=0;\n\t\t\t}\n\n\t\t\tif(z==3) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tif(z==3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint z = 0;\n\t\tArrayList<Integer> d1 = new ArrayList<>();\n\t\tArrayList<Integer> d2 = new ArrayList<>();\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\td1.add(sc.nextInt());\n\t\t\td2.add(sc.nextInt());\n\n\t\t}\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tif(d1.get(i)==d2.get(i)) {\n\t\t\t\tz++;\n\t\t\t}else {\n\t\t\t\tz=0;\n\t\t\t}\n\n\t\t\tif(z==3) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tif(z==3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int z = 0;",
"z",
"0",
"ArrayList<Integer> d1 = new ArrayList<>();",
"d1",
"new ArrayList<>()",
"ArrayList<Integer> d2 = new ArrayList<>();",
"d2",
"new ArrayList<>()",
"for(int i=0;i<n;i++) {\n\n\t\t\td1.add(sc.nextInt());\n\t\t\td2.add(sc.nextInt());\n\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\n\t\t\td1.add(sc.nextInt());\n\t\t\td2.add(sc.nextInt());\n\n\t\t}",
"{\n\n\t\t\td1.add(sc.nextInt());\n\t\t\td2.add(sc.nextInt());\n\n\t\t}",
"d1.add(sc.nextInt())",
"d1.add",
"d1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d2.add(sc.nextInt())",
"d2.add",
"d2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<n;i++) {\n\n\t\t\tif(d1.get(i)==d2.get(i)) {\n\t\t\t\tz++;\n\t\t\t}else {\n\t\t\t\tz=0;\n\t\t\t}\n\n\t\t\tif(z==3) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\n\t\t\tif(d1.get(i)==d2.get(i)) {\n\t\t\t\tz++;\n\t\t\t}else {\n\t\t\t\tz=0;\n\t\t\t}\n\n\t\t\tif(z==3) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"{\n\n\t\t\tif(d1.get(i)==d2.get(i)) {\n\t\t\t\tz++;\n\t\t\t}else {\n\t\t\t\tz=0;\n\t\t\t}\n\n\t\t\tif(z==3) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}",
"if(d1.get(i)==d2.get(i)) {\n\t\t\t\tz++;\n\t\t\t}else {\n\t\t\t\tz=0;\n\t\t\t}",
"d1.get(i)==d2.get(i)",
"d1.get(i)",
"d1.get",
"d1",
"i",
"d2.get(i)",
"d2.get",
"d2",
"i",
"{\n\t\t\t\tz++;\n\t\t\t}",
"z++",
"z",
"{\n\t\t\t\tz=0;\n\t\t\t}",
"z=0",
"z",
"0",
"if(z==3) {\n\t\t\t\tbreak;\n\t\t\t}",
"z==3",
"z",
"3",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"if(z==3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"z==3",
"z",
"3",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint z = 0;\n\t\tArrayList<Integer> d1 = new ArrayList<>();\n\t\tArrayList<Integer> d2 = new ArrayList<>();\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\td1.add(sc.nextInt());\n\t\t\td2.add(sc.nextInt());\n\n\t\t}\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tif(d1.get(i)==d2.get(i)) {\n\t\t\t\tz++;\n\t\t\t}else {\n\t\t\t\tz=0;\n\t\t\t}\n\n\t\t\tif(z==3) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tif(z==3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint z = 0;\n\t\tArrayList<Integer> d1 = new ArrayList<>();\n\t\tArrayList<Integer> d2 = new ArrayList<>();\n\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\td1.add(sc.nextInt());\n\t\t\td2.add(sc.nextInt());\n\n\t\t}\n\t\tfor(int i=0;i<n;i++) {\n\n\t\t\tif(d1.get(i)==d2.get(i)) {\n\t\t\t\tz++;\n\t\t\t}else {\n\t\t\t\tz=0;\n\t\t\t}\n\n\t\t\tif(z==3) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\tif(z==3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\n\t}\n\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int z = 0;
ArrayList<Integer> d1 = new ArrayList<>();
ArrayList<Integer> d2 = new ArrayList<>();
for(int i=0;i<n;i++) {
d1.add(sc.nextInt());
d2.add(sc.nextInt());
}
for(int i=0;i<n;i++) {
if(d1.get(i)==d2.get(i)) {
z++;
}else {
z=0;
}
if(z==3) {
break;
}
}
if(z==3) {
System.out.println("Yes");
}else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
41,
13,
2,
4,
18,
13,
17,
17,
17,
41,
13,
20,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
41,
13,
4,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
3,
30,
0,
13,
17,
14,
13,
30,
4,
13,
13,
30,
4,
13,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
2,
13,
13,
2,
13,
13,
1,
0,
13,
13,
30,
30,
14,
2,
18,
13,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
12,
13,
30,
14,
2,
4,
18,
13,
17,
30,
4,
18,
18,
13,
13,
2,
13,
13,
30,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
13,
2,
4,
18,
13,
17,
13,
4,
18,
13,
2,
13,
17,
2,
13,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
18,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
28,
13,
13,
30,
30,
28,
13,
13,
30,
30,
14,
2,
17,
13,
30,
40,
13,
29,
13,
23,
13,
12,
13,
30,
4,
13,
17,
12,
13,
30,
4,
13,
17,
4,
13,
13,
4,
13,
17,
23,
13,
12,
13,
30,
41,
13,
2,
17,
13,
29,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
4,
18,
13,
4,
18,
13,
13,
2,
13,
4,
18,
13,
30,
40,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
4,
18,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
29,
17,
30,
29,
2,
13,
4,
13,
2,
13,
17,
23,
13,
12,
13,
30,
4,
13,
13,
14,
2,
2,
13,
17,
2,
13,
17,
30,
29,
17,
30,
29,
2,
13,
4,
13,
2,
13,
17,
23,
13,
12,
13,
30,
29,
8,
2,
2,
13,
17,
2,
13,
17,
13,
2,
4,
13,
2,
13,
17,
4,
13,
2,
13,
17,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
673,
5
],
[
673,
6
],
[
6,
7
],
[
6,
8
],
[
673,
9
],
[
9,
10
],
[
9,
11
],
[
673,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
15,
18
],
[
15,
19
],
[
14,
20
],
[
673,
21
],
[
21,
22
],
[
21,
23
],
[
673,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
26,
34
],
[
34,
35
],
[
34,
36
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
49,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
49,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
58,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
26,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
24,
88
],
[
88,
89
],
[
673,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
102,
104
],
[
97,
105
],
[
105,
106
],
[
106,
107
],
[
97,
108
],
[
109,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
92,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
115,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
115,
125
],
[
125,
126
],
[
126,
127
],
[
115,
128
],
[
129,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
134,
136
],
[
130,
137
],
[
137,
138
],
[
137,
139
],
[
130,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
130,
144
],
[
145,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
147,
151
],
[
146,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
92,
157
],
[
157,
158
],
[
90,
159
],
[
159,
160
],
[
673,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
165,
169
],
[
164,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
171,
176
],
[
176,
177
],
[
176,
178
],
[
164,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
180,
185
],
[
185,
186
],
[
185,
187
],
[
187,
188
],
[
188,
189
],
[
180,
190
],
[
190,
191
],
[
191,
192
],
[
180,
193
],
[
194,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
198,
201
],
[
198,
202
],
[
197,
203
],
[
203,
204
],
[
204,
205
],
[
203,
206
],
[
206,
207
],
[
206,
208
],
[
195,
209
],
[
209,
210
],
[
209,
211
],
[
211,
212
],
[
212,
213
],
[
211,
214
],
[
161,
215
],
[
215,
216
],
[
161,
217
],
[
217,
218
],
[
673,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
221,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
227,
232
],
[
232,
233
],
[
232,
234
],
[
227,
235
],
[
235,
236
],
[
236,
237
],
[
227,
238
],
[
239,
239
],
[
239,
240
],
[
240,
241
],
[
241,
242
],
[
242,
243
],
[
242,
244
],
[
240,
245
],
[
245,
246
],
[
245,
247
],
[
240,
248
],
[
248,
249
],
[
249,
250
],
[
240,
251
],
[
252,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
255,
257
],
[
254,
258
],
[
253,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
259,
263
],
[
221,
264
],
[
264,
265
],
[
219,
266
],
[
266,
267
],
[
219,
268
],
[
268,
269
],
[
219,
270
],
[
270,
271
],
[
673,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
274,
278
],
[
278,
279
],
[
278,
280
],
[
278,
281
],
[
282,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
283,
286
],
[
287,
287
],
[
287,
288
],
[
288,
289
],
[
289,
290
],
[
289,
291
],
[
288,
292
],
[
292,
293
],
[
293,
294
],
[
274,
295
],
[
295,
296
],
[
272,
297
],
[
297,
298
],
[
673,
299
],
[
299,
300
],
[
299,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
673,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
307,
311
],
[
311,
312
],
[
311,
313
],
[
307,
314
],
[
314,
315
],
[
314,
316
],
[
305,
317
],
[
317,
318
],
[
673,
319
],
[
319,
320
],
[
319,
321
],
[
321,
322
],
[
322,
323
],
[
322,
324
],
[
324,
325
],
[
324,
326
],
[
321,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
319,
331
],
[
331,
332
],
[
673,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
335,
339
],
[
339,
340
],
[
339,
341
],
[
335,
342
],
[
342,
343
],
[
342,
344
],
[
344,
345
],
[
345,
346
],
[
335,
347
],
[
347,
348
],
[
348,
349
],
[
349,
350
],
[
349,
351
],
[
347,
352
],
[
352,
353
],
[
352,
354
],
[
347,
355
],
[
355,
356
],
[
356,
357
],
[
347,
358
],
[
359,
359
],
[
359,
360
],
[
360,
361
],
[
361,
362
],
[
362,
363
],
[
361,
364
],
[
364,
365
],
[
365,
366
],
[
364,
367
],
[
364,
368
],
[
368,
369
],
[
368,
370
],
[
370,
371
],
[
371,
372
],
[
360,
373
],
[
373,
374
],
[
374,
375
],
[
335,
376
],
[
376,
377
],
[
333,
378
],
[
378,
379
],
[
673,
380
],
[
380,
381
],
[
380,
382
],
[
382,
383
],
[
383,
384
],
[
384,
385
],
[
385,
386
],
[
673,
387
],
[
387,
388
],
[
387,
389
],
[
389,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
673,
394
],
[
394,
395
],
[
394,
396
],
[
396,
397
],
[
397,
398
],
[
398,
399
],
[
399,
400
],
[
673,
401
],
[
401,
402
],
[
401,
403
],
[
403,
404
],
[
404,
405
],
[
405,
406
],
[
406,
407
],
[
673,
408
],
[
408,
409
],
[
408,
410
],
[
410,
411
],
[
411,
412
],
[
412,
413
],
[
413,
414
],
[
414,
415
],
[
415,
416
],
[
673,
417
],
[
417,
418
],
[
417,
419
],
[
419,
420
],
[
420,
421
],
[
421,
422
],
[
422,
423
],
[
422,
424
],
[
421,
425
],
[
425,
426
],
[
425,
427
],
[
420,
428
],
[
428,
429
],
[
429,
430
],
[
420,
431
],
[
431,
432
],
[
432,
433
],
[
433,
434
],
[
433,
435
],
[
435,
436
],
[
435,
437
],
[
437,
438
],
[
437,
439
],
[
417,
440
],
[
440,
441
],
[
673,
442
],
[
442,
443
],
[
442,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
444,
448
],
[
448,
449
],
[
449,
450
],
[
450,
451
],
[
450,
452
],
[
449,
453
],
[
453,
454
],
[
453,
455
],
[
448,
456
],
[
456,
457
],
[
457,
458
],
[
448,
459
],
[
459,
460
],
[
460,
461
],
[
461,
462
],
[
461,
463
],
[
463,
464
],
[
463,
465
],
[
465,
466
],
[
465,
467
],
[
442,
468
],
[
468,
469
],
[
673,
470
],
[
470,
471
],
[
470,
472
],
[
472,
473
],
[
473,
474
],
[
474,
475
],
[
475,
476
],
[
476,
477
],
[
476,
478
],
[
475,
479
],
[
479,
480
],
[
479,
481
],
[
474,
482
],
[
474,
483
],
[
483,
484
],
[
484,
485
],
[
484,
486
],
[
486,
487
],
[
486,
488
],
[
483,
489
],
[
489,
490
],
[
489,
491
],
[
491,
492
],
[
491,
493
],
[
470,
494
],
[
494,
495
],
[
673,
496
],
[
496,
497
],
[
496,
498
],
[
498,
499
],
[
499,
500
],
[
500,
501
],
[
501,
502
],
[
501,
503
],
[
500,
504
],
[
504,
505
],
[
504,
506
],
[
504,
507
],
[
496,
508
],
[
508,
509
],
[
496,
510
],
[
510,
511
],
[
673,
512
],
[
512,
513
],
[
512,
514
],
[
514,
515
],
[
515,
516
],
[
516,
517
],
[
517,
518
],
[
517,
519
],
[
516,
520
],
[
520,
521
],
[
520,
522
],
[
520,
523
],
[
512,
524
],
[
524,
525
],
[
512,
526
],
[
526,
527
],
[
673,
528
],
[
528,
529
],
[
528,
530
],
[
530,
531
],
[
531,
532
],
[
532,
533
],
[
533,
534
],
[
533,
535
],
[
532,
536
],
[
532,
537
],
[
537,
538
],
[
537,
539
],
[
537,
540
],
[
540,
541
],
[
540,
542
],
[
528,
543
],
[
543,
544
],
[
528,
545
],
[
545,
546
],
[
673,
547
],
[
547,
548
],
[
547,
549
],
[
549,
550
],
[
550,
551
],
[
551,
552
],
[
552,
553
],
[
552,
554
],
[
551,
555
],
[
551,
556
],
[
556,
557
],
[
556,
558
],
[
556,
559
],
[
559,
560
],
[
559,
561
],
[
547,
562
],
[
562,
563
],
[
547,
564
],
[
564,
565
],
[
673,
566
],
[
566,
567
],
[
566,
568
],
[
568,
569
],
[
569,
570
],
[
570,
571
],
[
571,
572
],
[
571,
573
],
[
569,
574
],
[
566,
575
],
[
575,
576
],
[
673,
577
],
[
577,
578
],
[
577,
579
],
[
579,
580
],
[
580,
581
],
[
581,
582
],
[
582,
583
],
[
582,
584
],
[
580,
585
],
[
577,
586
],
[
586,
587
],
[
673,
588
],
[
588,
589
],
[
588,
590
],
[
590,
591
],
[
591,
592
],
[
592,
593
],
[
593,
594
],
[
592,
595
],
[
592,
596
],
[
588,
597
],
[
597,
598
],
[
588,
599
],
[
599,
600
],
[
673,
601
],
[
601,
602
],
[
601,
603
],
[
603,
604
],
[
604,
605
],
[
605,
606
],
[
606,
607
],
[
605,
608
],
[
605,
609
],
[
601,
610
],
[
610,
611
],
[
601,
612
],
[
612,
613
],
[
673,
614
],
[
614,
615
],
[
614,
616
],
[
616,
617
],
[
617,
618
],
[
618,
619
],
[
619,
620
],
[
618,
621
],
[
618,
622
],
[
614,
623
],
[
623,
624
],
[
614,
625
],
[
625,
626
],
[
673,
627
],
[
627,
628
],
[
627,
629
],
[
629,
630
],
[
630,
631
],
[
631,
632
],
[
632,
633
],
[
631,
634
],
[
631,
635
],
[
627,
636
],
[
636,
637
],
[
627,
638
],
[
638,
639
],
[
0,
640
],
[
640,
641
],
[
640,
642
],
[
642,
643
],
[
640,
644
],
[
644,
645
],
[
640,
646
],
[
646,
647
],
[
640,
648
],
[
648,
649
],
[
648,
650
],
[
650,
651
],
[
651,
652
],
[
652,
653
],
[
652,
654
],
[
651,
655
],
[
650,
656
],
[
656,
657
],
[
657,
658
],
[
657,
659
],
[
656,
660
],
[
650,
661
],
[
661,
662
],
[
662,
663
],
[
662,
664
],
[
661,
665
],
[
648,
666
],
[
666,
667
],
[
648,
668
],
[
668,
669
],
[
648,
670
],
[
670,
671
],
[
0,
672
],
[
672,
673
],
[
672,
674
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static String Y = \"Yes\";\n\tpublic static String N = \"No\";\n\tpublic static long MOD = (long) (Math.pow(10, 9) + 7);\n\tpublic static Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tint kai = 0;\n\t\tint n = ni();\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint na = ni();\n\t\t\tint nb = ni();\n\t\t\tif (na == nb) {\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkai = 0;\n\t\t\t}\n\t\t}\n\t\tif (flg) {\n\t\t\tout(Y);\n\t\t} else {\n\t\t\tout(N);\n\t\t}\n\n\t}\n\n\t/*\n\t * 以下メソッド集\n\t */\n\n\tpublic static int[] kousokusoinnsuubunkaihairetsu(int a) {\n\t\tint[] d = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\td[i] = i;\n\t\t}\n\t\tfor (int i = 2; i * i < a; i++) {\n\t\t\tfor (int j = i * i; j < a; j += i) {\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}\n\n\t\t}\n\n\t\treturn d;\n\t}\n\n\tpublic static void permutation(String q, String ans) {\n\t\t// Base Case\n\t\tif (q.length() <= 1) {\n\t\t\tSystem.out.println(ans + q);\n\t\t}\n\t\t// General Case\n\t\telse {\n\t\t\tfor (int i = 0; i < q.length(); i++) {\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic char[][] same(char[][] c, int h, int w) {\n\n\t\tchar[][] a = new char[h][w];\n\t\tfor (int i = 0; i < h; i++) {\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\n\t}\n\n\tstatic int countkuro(char[][] c) {\n\n\t\tint count = 0;\n\t\tfor (char[] cc : c) {\n\t\t\tfor (char ccc : cc) {\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\tstatic void debug() {\n\n\t\tout(\"---\");\n\t}\n\n\tstatic void debug(Object a) {\n\n\t\tout(\"-------\");\n\t\tout(a);\n\t\tout(\"-------\");\n\t}\n\n\tstatic int ketasuu(int n) {\n\n\t\tString str = \"\" + n;\n\t\treturn str.length();\n\t}\n\n\tstatic int account(String str) {\n\n\t\tString target = \"2\";\n\t\tint count = 0;\n\t\tint len = str.length();\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tif (target.equals(str.substring(i, i + target.length()))) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\tstatic int ni() {\n\n\t\treturn sc.nextInt();\n\t}\n\n\tstatic long nl() {\n\n\t\treturn sc.nextLong();\n\t}\n\n\tstatic double nd() {\n\n\t\treturn sc.nextDouble();\n\t}\n\n\tstatic String n() {\n\n\t\treturn sc.next();\n\t}\n\n\tstatic char[] nc() {\n\n\t\treturn sc.next().toCharArray();\n\t}\n\n\tstatic int kaijo(int n) {\n\n\t\tif (n == 0 || n == 1) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1);\n\t\t}\n\t}\n\n\tstatic long kaijo(long n) {\n\n\t\tdebug(n);\n\n\t\tif (n == 0l || n == 1l) {\n\t\t\treturn 1l;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1l);\n\t\t}\n\t}\n\n\tstatic int fib(int n) {\n\n\t\treturn (n == 1 || n == 0) ? n : fib(n - 2) + fib(n - 1);\n\t}\n\n\tstatic long lcm(long m, long n) {\n\n\t\treturn m * n / gcd(m, n);\n\t}\n\n\tstatic int lcm(int m, int n) {\n\n\t\treturn m * n / gcd(m, n);\n\t}\n\n\tstatic long gcd(long a, long b) {\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}\n\n\tstatic int gcd(int a, int b) {\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}\n\n\tstatic void out(Object obj) {\n\t\tSystem.out.println(obj);\n\t}\n\n\tstatic void outn(Object obj) {\n\t\tSystem.out.print(obj);\n\t}\n\n\tstatic double max(double d, double e) {\n\n\t\treturn Math.max(d, e);\n\t}\n\n\tstatic long max(long a, long b) {\n\n\t\treturn Math.max(a, b);\n\t}\n\n\tstatic long min(long d, long e) {\n\n\t\treturn Math.min(d, e);\n\t}\n\n\tstatic int min(int a, int b) {\n\n\t\treturn Math.min(a, b);\n\t}\n}\n\nclass XY {\n\n\tint h;\n\tint w;\n\tint d;\n\n\tXY(int h, int w, int d) {\n\t\tthis.h = h;\n\t\tthis.w = w;\n\t\tthis.d = d;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static String Y = \"Yes\";\n\tpublic static String N = \"No\";\n\tpublic static long MOD = (long) (Math.pow(10, 9) + 7);\n\tpublic static Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tint kai = 0;\n\t\tint n = ni();\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint na = ni();\n\t\t\tint nb = ni();\n\t\t\tif (na == nb) {\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkai = 0;\n\t\t\t}\n\t\t}\n\t\tif (flg) {\n\t\t\tout(Y);\n\t\t} else {\n\t\t\tout(N);\n\t\t}\n\n\t}\n\n\t/*\n\t * 以下メソッド集\n\t */\n\n\tpublic static int[] kousokusoinnsuubunkaihairetsu(int a) {\n\t\tint[] d = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\td[i] = i;\n\t\t}\n\t\tfor (int i = 2; i * i < a; i++) {\n\t\t\tfor (int j = i * i; j < a; j += i) {\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}\n\n\t\t}\n\n\t\treturn d;\n\t}\n\n\tpublic static void permutation(String q, String ans) {\n\t\t// Base Case\n\t\tif (q.length() <= 1) {\n\t\t\tSystem.out.println(ans + q);\n\t\t}\n\t\t// General Case\n\t\telse {\n\t\t\tfor (int i = 0; i < q.length(); i++) {\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic char[][] same(char[][] c, int h, int w) {\n\n\t\tchar[][] a = new char[h][w];\n\t\tfor (int i = 0; i < h; i++) {\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\n\t}\n\n\tstatic int countkuro(char[][] c) {\n\n\t\tint count = 0;\n\t\tfor (char[] cc : c) {\n\t\t\tfor (char ccc : cc) {\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\tstatic void debug() {\n\n\t\tout(\"---\");\n\t}\n\n\tstatic void debug(Object a) {\n\n\t\tout(\"-------\");\n\t\tout(a);\n\t\tout(\"-------\");\n\t}\n\n\tstatic int ketasuu(int n) {\n\n\t\tString str = \"\" + n;\n\t\treturn str.length();\n\t}\n\n\tstatic int account(String str) {\n\n\t\tString target = \"2\";\n\t\tint count = 0;\n\t\tint len = str.length();\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tif (target.equals(str.substring(i, i + target.length()))) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\tstatic int ni() {\n\n\t\treturn sc.nextInt();\n\t}\n\n\tstatic long nl() {\n\n\t\treturn sc.nextLong();\n\t}\n\n\tstatic double nd() {\n\n\t\treturn sc.nextDouble();\n\t}\n\n\tstatic String n() {\n\n\t\treturn sc.next();\n\t}\n\n\tstatic char[] nc() {\n\n\t\treturn sc.next().toCharArray();\n\t}\n\n\tstatic int kaijo(int n) {\n\n\t\tif (n == 0 || n == 1) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1);\n\t\t}\n\t}\n\n\tstatic long kaijo(long n) {\n\n\t\tdebug(n);\n\n\t\tif (n == 0l || n == 1l) {\n\t\t\treturn 1l;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1l);\n\t\t}\n\t}\n\n\tstatic int fib(int n) {\n\n\t\treturn (n == 1 || n == 0) ? n : fib(n - 2) + fib(n - 1);\n\t}\n\n\tstatic long lcm(long m, long n) {\n\n\t\treturn m * n / gcd(m, n);\n\t}\n\n\tstatic int lcm(int m, int n) {\n\n\t\treturn m * n / gcd(m, n);\n\t}\n\n\tstatic long gcd(long a, long b) {\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}\n\n\tstatic int gcd(int a, int b) {\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}\n\n\tstatic void out(Object obj) {\n\t\tSystem.out.println(obj);\n\t}\n\n\tstatic void outn(Object obj) {\n\t\tSystem.out.print(obj);\n\t}\n\n\tstatic double max(double d, double e) {\n\n\t\treturn Math.max(d, e);\n\t}\n\n\tstatic long max(long a, long b) {\n\n\t\treturn Math.max(a, b);\n\t}\n\n\tstatic long min(long d, long e) {\n\n\t\treturn Math.min(d, e);\n\t}\n\n\tstatic int min(int a, int b) {\n\n\t\treturn Math.min(a, b);\n\t}\n}",
"Main",
"public static String Y = \"Yes\";",
"Y",
"\"Yes\"",
"public static String N = \"No\";",
"N",
"\"No\"",
"public static long MOD = (long) (Math.pow(10, 9) + 7);",
"MOD",
"(long) (Math.pow(10, 9) + 7)",
"Math.pow(10, 9)",
"Math.pow",
"Math",
"10",
"9",
"7",
"public static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\n\t\tint kai = 0;\n\t\tint n = ni();\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint na = ni();\n\t\t\tint nb = ni();\n\t\t\tif (na == nb) {\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkai = 0;\n\t\t\t}\n\t\t}\n\t\tif (flg) {\n\t\t\tout(Y);\n\t\t} else {\n\t\t\tout(N);\n\t\t}\n\n\t}",
"main",
"{\n\n\t\tint kai = 0;\n\t\tint n = ni();\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint na = ni();\n\t\t\tint nb = ni();\n\t\t\tif (na == nb) {\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkai = 0;\n\t\t\t}\n\t\t}\n\t\tif (flg) {\n\t\t\tout(Y);\n\t\t} else {\n\t\t\tout(N);\n\t\t}\n\n\t}",
"int kai = 0;",
"kai",
"0",
"int n = ni();",
"n",
"ni()",
"ni",
"boolean flg = false;",
"flg",
"false",
"for (int i = 0; i < n; i++) {\n\t\t\tint na = ni();\n\t\t\tint nb = ni();\n\t\t\tif (na == nb) {\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkai = 0;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint na = ni();\n\t\t\tint nb = ni();\n\t\t\tif (na == nb) {\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkai = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint na = ni();\n\t\t\tint nb = ni();\n\t\t\tif (na == nb) {\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkai = 0;\n\t\t\t}\n\t\t}",
"int na = ni();",
"na",
"ni()",
"ni",
"int nb = ni();",
"nb",
"ni()",
"ni",
"if (na == nb) {\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkai = 0;\n\t\t\t}",
"na == nb",
"na",
"nb",
"{\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"kai++",
"kai",
"if (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"kai == 3",
"kai",
"3",
"{\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"flg = true",
"flg",
"true",
"break;",
"{\n\t\t\t\tkai = 0;\n\t\t\t}",
"kai = 0",
"kai",
"0",
"if (flg) {\n\t\t\tout(Y);\n\t\t} else {\n\t\t\tout(N);\n\t\t}",
"flg",
"{\n\t\t\tout(Y);\n\t\t}",
"out(Y)",
"out",
"Y",
"{\n\t\t\tout(N);\n\t\t}",
"out(N)",
"out",
"N",
"String[] args",
"args",
"public static int[] kousokusoinnsuubunkaihairetsu(int a) {\n\t\tint[] d = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\td[i] = i;\n\t\t}\n\t\tfor (int i = 2; i * i < a; i++) {\n\t\t\tfor (int j = i * i; j < a; j += i) {\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}\n\n\t\t}\n\n\t\treturn d;\n\t}",
"kousokusoinnsuubunkaihairetsu",
"{\n\t\tint[] d = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\td[i] = i;\n\t\t}\n\t\tfor (int i = 2; i * i < a; i++) {\n\t\t\tfor (int j = i * i; j < a; j += i) {\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}\n\n\t\t}\n\n\t\treturn d;\n\t}",
"int[] d = new int[a];",
"d",
"new int[a]",
"a",
"for (int i = 0; i < a; i++) {\n\t\t\td[i] = i;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a",
"i",
"a",
"i++",
"i++",
"i",
"{\n\t\t\td[i] = i;\n\t\t}",
"{\n\t\t\td[i] = i;\n\t\t}",
"d[i] = i",
"d[i]",
"d",
"i",
"i",
"for (int i = 2; i * i < a; i++) {\n\t\t\tfor (int j = i * i; j < a; j += i) {\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}\n\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i * i < a",
"i * i",
"i",
"i",
"a",
"i++",
"i++",
"i",
"{\n\t\t\tfor (int j = i * i; j < a; j += i) {\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}\n\n\t\t}",
"{\n\t\t\tfor (int j = i * i; j < a; j += i) {\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}\n\n\t\t}",
"for (int j = i * i; j < a; j += i) {\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}",
"int j = i * i;",
"int j = i * i;",
"j",
"i * i",
"i",
"i",
"j < a",
"j",
"a",
"j += i",
"j += i",
"j",
"i",
"{\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}",
"{\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}",
"if (d[j] == j)\n\t\t\t\t\td[j] = i;",
"d[j] == j",
"d[j]",
"d",
"j",
"j",
"d[j] = i",
"d[j]",
"d",
"j",
"i",
"return d;",
"d",
"int a",
"a",
"public static void permutation(String q, String ans) {\n\t\t// Base Case\n\t\tif (q.length() <= 1) {\n\t\t\tSystem.out.println(ans + q);\n\t\t}\n\t\t// General Case\n\t\telse {\n\t\t\tfor (int i = 0; i < q.length(); i++) {\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}\n\t\t}\n\t}",
"permutation",
"{\n\t\t// Base Case\n\t\tif (q.length() <= 1) {\n\t\t\tSystem.out.println(ans + q);\n\t\t}\n\t\t// General Case\n\t\telse {\n\t\t\tfor (int i = 0; i < q.length(); i++) {\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}\n\t\t}\n\t}",
"if (q.length() <= 1) {\n\t\t\tSystem.out.println(ans + q);\n\t\t}\n\t\t// General Case\n\t\telse {\n\t\t\tfor (int i = 0; i < q.length(); i++) {\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}\n\t\t}",
"q.length() <= 1",
"q.length()",
"q.length",
"q",
"1",
"{\n\t\t\tSystem.out.println(ans + q);\n\t\t}",
"System.out.println(ans + q)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans + q",
"ans",
"q",
"{\n\t\t\tfor (int i = 0; i < q.length(); i++) {\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}\n\t\t}",
"for (int i = 0; i < q.length(); i++) {\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < q.length()",
"i",
"q.length()",
"q.length",
"q",
"i++",
"i++",
"i",
"{\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}",
"{\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}",
"permutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i))",
"permutation",
"q.substring(0, i) + q.substring(i + 1)",
"q.substring(0, i)",
"q.substring",
"q",
"0",
"i",
"q.substring(i + 1)",
"q.substring",
"q",
"i + 1",
"i",
"1",
"ans + q.charAt(i)",
"ans",
"q.charAt(i)",
"q.charAt",
"q",
"i",
"String q",
"q",
"String ans",
"ans",
"static char[][] same(char[][] c, int h, int w) {\n\n\t\tchar[][] a = new char[h][w];\n\t\tfor (int i = 0; i < h; i++) {\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\n\t}",
"same",
"{\n\n\t\tchar[][] a = new char[h][w];\n\t\tfor (int i = 0; i < h; i++) {\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\n\t}",
"char[][] a = new char[h][w];",
"a",
"new char[h][w]",
"h",
"w",
"for (int i = 0; i < h; i++) {\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < h",
"i",
"h",
"i++",
"i++",
"i",
"{\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}\n\t\t}",
"for (int j = 0; j < w; j++) {\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < w",
"j",
"w",
"j++",
"j++",
"j",
"{\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}",
"{\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}",
"a[i][j] = c[i][j]",
"a[i][j]",
"a[i]",
"a",
"i",
"j",
"c[i][j]",
"c[i]",
"c",
"i",
"j",
"return a;",
"a",
"char[][] c",
"c",
"int h",
"h",
"int w",
"w",
"static int countkuro(char[][] c) {\n\n\t\tint count = 0;\n\t\tfor (char[] cc : c) {\n\t\t\tfor (char ccc : cc) {\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"countkuro",
"{\n\n\t\tint count = 0;\n\t\tfor (char[] cc : c) {\n\t\t\tfor (char ccc : cc) {\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"int count = 0;",
"count",
"0",
"for (char[] cc : c) {\n\t\t\tfor (char ccc : cc) {\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"char[] cc",
"c",
"{\n\t\t\tfor (char ccc : cc) {\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor (char ccc : cc) {\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"for (char ccc : cc) {\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"char ccc",
"cc",
"{\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}",
"if ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"'#' == ccc",
"'#'",
"ccc",
"{\n\t\t\t\t\tcount++;\n\t\t\t\t}",
"count++",
"count",
"return count;",
"count",
"char[][] c",
"c",
"static void debug() {\n\n\t\tout(\"---\");\n\t}",
"debug",
"{\n\n\t\tout(\"---\");\n\t}",
"out(\"---\")",
"out",
"\"---\"",
"static void debug(Object a) {\n\n\t\tout(\"-------\");\n\t\tout(a);\n\t\tout(\"-------\");\n\t}",
"debug",
"{\n\n\t\tout(\"-------\");\n\t\tout(a);\n\t\tout(\"-------\");\n\t}",
"out(\"-------\")",
"out",
"\"-------\"",
"out(a)",
"out",
"a",
"out(\"-------\")",
"out",
"\"-------\"",
"Object a",
"a",
"static int ketasuu(int n) {\n\n\t\tString str = \"\" + n;\n\t\treturn str.length();\n\t}",
"ketasuu",
"{\n\n\t\tString str = \"\" + n;\n\t\treturn str.length();\n\t}",
"String str = \"\" + n;",
"str",
"\"\" + n",
"\"\"",
"n",
"return str.length();",
"str.length()",
"str.length",
"str",
"int n",
"n",
"static int account(String str) {\n\n\t\tString target = \"2\";\n\t\tint count = 0;\n\t\tint len = str.length();\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tif (target.equals(str.substring(i, i + target.length()))) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"account",
"{\n\n\t\tString target = \"2\";\n\t\tint count = 0;\n\t\tint len = str.length();\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tif (target.equals(str.substring(i, i + target.length()))) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}",
"String target = \"2\";",
"target",
"\"2\"",
"int count = 0;",
"count",
"0",
"int len = str.length();",
"len",
"str.length()",
"str.length",
"str",
"for (int i = 0; i < len; i++) {\n\t\t\tif (target.equals(str.substring(i, i + target.length()))) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < len",
"i",
"len",
"i++",
"i++",
"i",
"{\n\t\t\tif (target.equals(str.substring(i, i + target.length()))) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (target.equals(str.substring(i, i + target.length()))) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"if (target.equals(str.substring(i, i + target.length()))) {\n\t\t\t\tcount++;\n\t\t\t}",
"target.equals(str.substring(i, i + target.length()))",
"target.equals",
"target",
"str.substring(i, i + target.length())",
"str.substring",
"str",
"i",
"i + target.length()",
"i",
"target.length()",
"target.length",
"target",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"return count;",
"count",
"String str",
"str",
"static int ni() {\n\n\t\treturn sc.nextInt();\n\t}",
"ni",
"{\n\n\t\treturn sc.nextInt();\n\t}",
"return sc.nextInt();",
"sc.nextInt()",
"sc.nextInt",
"sc",
"static long nl() {\n\n\t\treturn sc.nextLong();\n\t}",
"nl",
"{\n\n\t\treturn sc.nextLong();\n\t}",
"return sc.nextLong();",
"sc.nextLong()",
"sc.nextLong",
"sc",
"static double nd() {\n\n\t\treturn sc.nextDouble();\n\t}",
"nd",
"{\n\n\t\treturn sc.nextDouble();\n\t}",
"return sc.nextDouble();",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"static String n() {\n\n\t\treturn sc.next();\n\t}",
"n",
"{\n\n\t\treturn sc.next();\n\t}",
"return sc.next();",
"sc.next()",
"sc.next",
"sc",
"static char[] nc() {\n\n\t\treturn sc.next().toCharArray();\n\t}",
"nc",
"{\n\n\t\treturn sc.next().toCharArray();\n\t}",
"return sc.next().toCharArray();",
"sc.next().toCharArray()",
"sc.next().toCharArray",
"sc.next()",
"sc.next",
"sc",
"static int kaijo(int n) {\n\n\t\tif (n == 0 || n == 1) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1);\n\t\t}\n\t}",
"kaijo",
"{\n\n\t\tif (n == 0 || n == 1) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1);\n\t\t}\n\t}",
"if (n == 0 || n == 1) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1);\n\t\t}",
"n == 0 || n == 1",
"n == 0",
"n",
"0",
"n == 1",
"n",
"1",
"{\n\t\t\treturn 1;\n\t\t}",
"return 1;",
"1",
"{\n\t\t\treturn n * kaijo(n - 1);\n\t\t}",
"return n * kaijo(n - 1);",
"n * kaijo(n - 1)",
"n",
"kaijo(n - 1)",
"kaijo",
"n - 1",
"n",
"1",
"int n",
"n",
"static long kaijo(long n) {\n\n\t\tdebug(n);\n\n\t\tif (n == 0l || n == 1l) {\n\t\t\treturn 1l;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1l);\n\t\t}\n\t}",
"kaijo",
"{\n\n\t\tdebug(n);\n\n\t\tif (n == 0l || n == 1l) {\n\t\t\treturn 1l;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1l);\n\t\t}\n\t}",
"debug(n)",
"debug",
"n",
"if (n == 0l || n == 1l) {\n\t\t\treturn 1l;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1l);\n\t\t}",
"n == 0l || n == 1l",
"n == 0l",
"n",
"0l",
"n == 1l",
"n",
"1l",
"{\n\t\t\treturn 1l;\n\t\t}",
"return 1l;",
"1l",
"{\n\t\t\treturn n * kaijo(n - 1l);\n\t\t}",
"return n * kaijo(n - 1l);",
"n * kaijo(n - 1l)",
"n",
"kaijo(n - 1l)",
"kaijo",
"n - 1l",
"n",
"1l",
"long n",
"n",
"static int fib(int n) {\n\n\t\treturn (n == 1 || n == 0) ? n : fib(n - 2) + fib(n - 1);\n\t}",
"fib",
"{\n\n\t\treturn (n == 1 || n == 0) ? n : fib(n - 2) + fib(n - 1);\n\t}",
"return (n == 1 || n == 0) ? n : fib(n - 2) + fib(n - 1);",
"(n == 1 || n == 0) ? n : fib(n - 2) + fib(n - 1)",
"(n == 1 || n == 0)",
"n == 1",
"n",
"1",
"n == 0",
"n",
"0",
"n",
"fib(n - 2) + fib(n - 1)",
"fib(n - 2)",
"fib",
"n - 2",
"n",
"2",
"fib(n - 1)",
"fib",
"n - 1",
"n",
"1",
"int n",
"n",
"static long lcm(long m, long n) {\n\n\t\treturn m * n / gcd(m, n);\n\t}",
"lcm",
"{\n\n\t\treturn m * n / gcd(m, n);\n\t}",
"return m * n / gcd(m, n);",
"m * n / gcd(m, n)",
"m * n",
"m",
"n",
"gcd(m, n)",
"gcd",
"m",
"n",
"long m",
"m",
"long n",
"n",
"static int lcm(int m, int n) {\n\n\t\treturn m * n / gcd(m, n);\n\t}",
"lcm",
"{\n\n\t\treturn m * n / gcd(m, n);\n\t}",
"return m * n / gcd(m, n);",
"m * n / gcd(m, n)",
"m * n",
"m",
"n",
"gcd(m, n)",
"gcd",
"m",
"n",
"int m",
"m",
"int n",
"n",
"static long gcd(long a, long b) {\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}",
"gcd",
"{\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}",
"return (b == 0) ? a : gcd(b, a % b);",
"(b == 0) ? a : gcd(b, a % b)",
"(b == 0)",
"b",
"0",
"a",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static int gcd(int a, int b) {\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}",
"gcd",
"{\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}",
"return (b == 0) ? a : gcd(b, a % b);",
"(b == 0) ? a : gcd(b, a % b)",
"(b == 0)",
"b",
"0",
"a",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"static void out(Object obj) {\n\t\tSystem.out.println(obj);\n\t}",
"out",
"{\n\t\tSystem.out.println(obj);\n\t}",
"System.out.println(obj)",
"System.out.println",
"System.out",
"System",
"System.out",
"obj",
"Object obj",
"obj",
"static void outn(Object obj) {\n\t\tSystem.out.print(obj);\n\t}",
"outn",
"{\n\t\tSystem.out.print(obj);\n\t}",
"System.out.print(obj)",
"System.out.print",
"System.out",
"System",
"System.out",
"obj",
"Object obj",
"obj",
"static double max(double d, double e) {\n\n\t\treturn Math.max(d, e);\n\t}",
"max",
"{\n\n\t\treturn Math.max(d, e);\n\t}",
"return Math.max(d, e);",
"Math.max(d, e)",
"Math.max",
"Math",
"d",
"e",
"double d",
"d",
"double e",
"e",
"static long max(long a, long b) {\n\n\t\treturn Math.max(a, b);\n\t}",
"max",
"{\n\n\t\treturn Math.max(a, b);\n\t}",
"return Math.max(a, b);",
"Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static long min(long d, long e) {\n\n\t\treturn Math.min(d, e);\n\t}",
"min",
"{\n\n\t\treturn Math.min(d, e);\n\t}",
"return Math.min(d, e);",
"Math.min(d, e)",
"Math.min",
"Math",
"d",
"e",
"long d",
"d",
"long e",
"e",
"static int min(int a, int b) {\n\n\t\treturn Math.min(a, b);\n\t}",
"min",
"{\n\n\t\treturn Math.min(a, b);\n\t}",
"return Math.min(a, b);",
"Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"int a",
"a",
"int b",
"b",
"class XY {\n\n\tint h;\n\tint w;\n\tint d;\n\n\tXY(int h, int w, int d) {\n\t\tthis.h = h;\n\t\tthis.w = w;\n\t\tthis.d = d;\n\t}\n}",
"XY",
"int h;",
"h",
"int w;",
"w",
"int d;",
"d",
"XY(int h, int w, int d) {\n\t\tthis.h = h;\n\t\tthis.w = w;\n\t\tthis.d = d;\n\t}",
"XY",
"{\n\t\tthis.h = h;\n\t\tthis.w = w;\n\t\tthis.d = d;\n\t}",
"this.h = h",
"this.h",
"this",
"this.h",
"h",
"this.w = w",
"this.w",
"this",
"this.w",
"w",
"this.d = d",
"this.d",
"this",
"this.d",
"d",
"int h",
"h",
"int w",
"w",
"int d",
"d",
"public class Main {\n\n\tpublic static String Y = \"Yes\";\n\tpublic static String N = \"No\";\n\tpublic static long MOD = (long) (Math.pow(10, 9) + 7);\n\tpublic static Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tint kai = 0;\n\t\tint n = ni();\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint na = ni();\n\t\t\tint nb = ni();\n\t\t\tif (na == nb) {\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkai = 0;\n\t\t\t}\n\t\t}\n\t\tif (flg) {\n\t\t\tout(Y);\n\t\t} else {\n\t\t\tout(N);\n\t\t}\n\n\t}\n\n\t/*\n\t * 以下メソッド集\n\t */\n\n\tpublic static int[] kousokusoinnsuubunkaihairetsu(int a) {\n\t\tint[] d = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\td[i] = i;\n\t\t}\n\t\tfor (int i = 2; i * i < a; i++) {\n\t\t\tfor (int j = i * i; j < a; j += i) {\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}\n\n\t\t}\n\n\t\treturn d;\n\t}\n\n\tpublic static void permutation(String q, String ans) {\n\t\t// Base Case\n\t\tif (q.length() <= 1) {\n\t\t\tSystem.out.println(ans + q);\n\t\t}\n\t\t// General Case\n\t\telse {\n\t\t\tfor (int i = 0; i < q.length(); i++) {\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic char[][] same(char[][] c, int h, int w) {\n\n\t\tchar[][] a = new char[h][w];\n\t\tfor (int i = 0; i < h; i++) {\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\n\t}\n\n\tstatic int countkuro(char[][] c) {\n\n\t\tint count = 0;\n\t\tfor (char[] cc : c) {\n\t\t\tfor (char ccc : cc) {\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\tstatic void debug() {\n\n\t\tout(\"---\");\n\t}\n\n\tstatic void debug(Object a) {\n\n\t\tout(\"-------\");\n\t\tout(a);\n\t\tout(\"-------\");\n\t}\n\n\tstatic int ketasuu(int n) {\n\n\t\tString str = \"\" + n;\n\t\treturn str.length();\n\t}\n\n\tstatic int account(String str) {\n\n\t\tString target = \"2\";\n\t\tint count = 0;\n\t\tint len = str.length();\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tif (target.equals(str.substring(i, i + target.length()))) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\tstatic int ni() {\n\n\t\treturn sc.nextInt();\n\t}\n\n\tstatic long nl() {\n\n\t\treturn sc.nextLong();\n\t}\n\n\tstatic double nd() {\n\n\t\treturn sc.nextDouble();\n\t}\n\n\tstatic String n() {\n\n\t\treturn sc.next();\n\t}\n\n\tstatic char[] nc() {\n\n\t\treturn sc.next().toCharArray();\n\t}\n\n\tstatic int kaijo(int n) {\n\n\t\tif (n == 0 || n == 1) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1);\n\t\t}\n\t}\n\n\tstatic long kaijo(long n) {\n\n\t\tdebug(n);\n\n\t\tif (n == 0l || n == 1l) {\n\t\t\treturn 1l;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1l);\n\t\t}\n\t}\n\n\tstatic int fib(int n) {\n\n\t\treturn (n == 1 || n == 0) ? n : fib(n - 2) + fib(n - 1);\n\t}\n\n\tstatic long lcm(long m, long n) {\n\n\t\treturn m * n / gcd(m, n);\n\t}\n\n\tstatic int lcm(int m, int n) {\n\n\t\treturn m * n / gcd(m, n);\n\t}\n\n\tstatic long gcd(long a, long b) {\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}\n\n\tstatic int gcd(int a, int b) {\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}\n\n\tstatic void out(Object obj) {\n\t\tSystem.out.println(obj);\n\t}\n\n\tstatic void outn(Object obj) {\n\t\tSystem.out.print(obj);\n\t}\n\n\tstatic double max(double d, double e) {\n\n\t\treturn Math.max(d, e);\n\t}\n\n\tstatic long max(long a, long b) {\n\n\t\treturn Math.max(a, b);\n\t}\n\n\tstatic long min(long d, long e) {\n\n\t\treturn Math.min(d, e);\n\t}\n\n\tstatic int min(int a, int b) {\n\n\t\treturn Math.min(a, b);\n\t}\n}",
"public class Main {\n\n\tpublic static String Y = \"Yes\";\n\tpublic static String N = \"No\";\n\tpublic static long MOD = (long) (Math.pow(10, 9) + 7);\n\tpublic static Scanner sc = new Scanner(System.in);\n\n\tpublic static void main(String[] args) {\n\n\t\tint kai = 0;\n\t\tint n = ni();\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint na = ni();\n\t\t\tint nb = ni();\n\t\t\tif (na == nb) {\n\t\t\t\tkai++;\n\t\t\t\tif (kai == 3) {\n\t\t\t\t\tflg = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tkai = 0;\n\t\t\t}\n\t\t}\n\t\tif (flg) {\n\t\t\tout(Y);\n\t\t} else {\n\t\t\tout(N);\n\t\t}\n\n\t}\n\n\t/*\n\t * 以下メソッド集\n\t */\n\n\tpublic static int[] kousokusoinnsuubunkaihairetsu(int a) {\n\t\tint[] d = new int[a];\n\t\tfor (int i = 0; i < a; i++) {\n\t\t\td[i] = i;\n\t\t}\n\t\tfor (int i = 2; i * i < a; i++) {\n\t\t\tfor (int j = i * i; j < a; j += i) {\n\t\t\t\tif (d[j] == j)\n\t\t\t\t\td[j] = i;\n\t\t\t}\n\n\t\t}\n\n\t\treturn d;\n\t}\n\n\tpublic static void permutation(String q, String ans) {\n\t\t// Base Case\n\t\tif (q.length() <= 1) {\n\t\t\tSystem.out.println(ans + q);\n\t\t}\n\t\t// General Case\n\t\telse {\n\t\t\tfor (int i = 0; i < q.length(); i++) {\n\t\t\t\tpermutation(q.substring(0, i) + q.substring(i + 1),\n\t\t\t\t\t\tans + q.charAt(i));\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic char[][] same(char[][] c, int h, int w) {\n\n\t\tchar[][] a = new char[h][w];\n\t\tfor (int i = 0; i < h; i++) {\n\t\t\tfor (int j = 0; j < w; j++) {\n\t\t\t\ta[i][j] = c[i][j];\n\t\t\t}\n\t\t}\n\t\treturn a;\n\n\t}\n\n\tstatic int countkuro(char[][] c) {\n\n\t\tint count = 0;\n\t\tfor (char[] cc : c) {\n\t\t\tfor (char ccc : cc) {\n\t\t\t\tif ('#' == ccc) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\tstatic void debug() {\n\n\t\tout(\"---\");\n\t}\n\n\tstatic void debug(Object a) {\n\n\t\tout(\"-------\");\n\t\tout(a);\n\t\tout(\"-------\");\n\t}\n\n\tstatic int ketasuu(int n) {\n\n\t\tString str = \"\" + n;\n\t\treturn str.length();\n\t}\n\n\tstatic int account(String str) {\n\n\t\tString target = \"2\";\n\t\tint count = 0;\n\t\tint len = str.length();\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tif (target.equals(str.substring(i, i + target.length()))) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\treturn count;\n\t}\n\n\tstatic int ni() {\n\n\t\treturn sc.nextInt();\n\t}\n\n\tstatic long nl() {\n\n\t\treturn sc.nextLong();\n\t}\n\n\tstatic double nd() {\n\n\t\treturn sc.nextDouble();\n\t}\n\n\tstatic String n() {\n\n\t\treturn sc.next();\n\t}\n\n\tstatic char[] nc() {\n\n\t\treturn sc.next().toCharArray();\n\t}\n\n\tstatic int kaijo(int n) {\n\n\t\tif (n == 0 || n == 1) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1);\n\t\t}\n\t}\n\n\tstatic long kaijo(long n) {\n\n\t\tdebug(n);\n\n\t\tif (n == 0l || n == 1l) {\n\t\t\treturn 1l;\n\t\t} else {\n\t\t\treturn n * kaijo(n - 1l);\n\t\t}\n\t}\n\n\tstatic int fib(int n) {\n\n\t\treturn (n == 1 || n == 0) ? n : fib(n - 2) + fib(n - 1);\n\t}\n\n\tstatic long lcm(long m, long n) {\n\n\t\treturn m * n / gcd(m, n);\n\t}\n\n\tstatic int lcm(int m, int n) {\n\n\t\treturn m * n / gcd(m, n);\n\t}\n\n\tstatic long gcd(long a, long b) {\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}\n\n\tstatic int gcd(int a, int b) {\n\n\t\treturn (b == 0) ? a : gcd(b, a % b);\n\t}\n\n\tstatic void out(Object obj) {\n\t\tSystem.out.println(obj);\n\t}\n\n\tstatic void outn(Object obj) {\n\t\tSystem.out.print(obj);\n\t}\n\n\tstatic double max(double d, double e) {\n\n\t\treturn Math.max(d, e);\n\t}\n\n\tstatic long max(long a, long b) {\n\n\t\treturn Math.max(a, b);\n\t}\n\n\tstatic long min(long d, long e) {\n\n\t\treturn Math.min(d, e);\n\t}\n\n\tstatic int min(int a, int b) {\n\n\t\treturn Math.min(a, b);\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static String Y = "Yes";
public static String N = "No";
public static long MOD = (long) (Math.pow(10, 9) + 7);
public static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int kai = 0;
int n = ni();
boolean flg = false;
for (int i = 0; i < n; i++) {
int na = ni();
int nb = ni();
if (na == nb) {
kai++;
if (kai == 3) {
flg = true;
break;
}
} else {
kai = 0;
}
}
if (flg) {
out(Y);
} else {
out(N);
}
}
/*
* 以下メソッド集
*/
public static int[] kousokusoinnsuubunkaihairetsu(int a) {
int[] d = new int[a];
for (int i = 0; i < a; i++) {
d[i] = i;
}
for (int i = 2; i * i < a; i++) {
for (int j = i * i; j < a; j += i) {
if (d[j] == j)
d[j] = i;
}
}
return d;
}
public static void permutation(String q, String ans) {
// Base Case
if (q.length() <= 1) {
System.out.println(ans + q);
}
// General Case
else {
for (int i = 0; i < q.length(); i++) {
permutation(q.substring(0, i) + q.substring(i + 1),
ans + q.charAt(i));
}
}
}
static char[][] same(char[][] c, int h, int w) {
char[][] a = new char[h][w];
for (int i = 0; i < h; i++) {
for (int j = 0; j < w; j++) {
a[i][j] = c[i][j];
}
}
return a;
}
static int countkuro(char[][] c) {
int count = 0;
for (char[] cc : c) {
for (char ccc : cc) {
if ('#' == ccc) {
count++;
}
}
}
return count;
}
static void debug() {
out("---");
}
static void debug(Object a) {
out("-------");
out(a);
out("-------");
}
static int ketasuu(int n) {
String str = "" + n;
return str.length();
}
static int account(String str) {
String target = "2";
int count = 0;
int len = str.length();
for (int i = 0; i < len; i++) {
if (target.equals(str.substring(i, i + target.length()))) {
count++;
}
}
return count;
}
static int ni() {
return sc.nextInt();
}
static long nl() {
return sc.nextLong();
}
static double nd() {
return sc.nextDouble();
}
static String n() {
return sc.next();
}
static char[] nc() {
return sc.next().toCharArray();
}
static int kaijo(int n) {
if (n == 0 || n == 1) {
return 1;
} else {
return n * kaijo(n - 1);
}
}
static long kaijo(long n) {
debug(n);
if (n == 0l || n == 1l) {
return 1l;
} else {
return n * kaijo(n - 1l);
}
}
static int fib(int n) {
return (n == 1 || n == 0) ? n : fib(n - 2) + fib(n - 1);
}
static long lcm(long m, long n) {
return m * n / gcd(m, n);
}
static int lcm(int m, int n) {
return m * n / gcd(m, n);
}
static long gcd(long a, long b) {
return (b == 0) ? a : gcd(b, a % b);
}
static int gcd(int a, int b) {
return (b == 0) ? a : gcd(b, a % b);
}
static void out(Object obj) {
System.out.println(obj);
}
static void outn(Object obj) {
System.out.print(obj);
}
static double max(double d, double e) {
return Math.max(d, e);
}
static long max(long a, long b) {
return Math.max(a, b);
}
static long min(long d, long e) {
return Math.min(d, e);
}
static int min(int a, int b) {
return Math.min(a, b);
}
}
class XY {
int h;
int w;
int d;
XY(int h, int w, int d) {
this.h = h;
this.w = w;
this.d = d;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
4,
18,
13,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
0,
18,
13,
13,
4,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
13,
13,
18,
13,
13,
2,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
2,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
30,
0,
13,
17,
4,
18,
13,
13,
12,
13,
30,
41,
13,
2,
2,
2,
13,
17,
13,
13,
29,
8,
2,
13,
17,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
0,
13,
13,
14,
2,
13,
17,
0,
13,
13,
14,
2,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
0,
13,
4,
13,
13,
2,
13,
13,
14,
2,
13,
17,
0,
13,
13,
14,
2,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
42,
40,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
0,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
371,
20
],
[
371,
21
],
[
21,
22
],
[
21,
23
],
[
371,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
371,
30
],
[
30,
31
],
[
371,
32
],
[
32,
33
],
[
371,
34
],
[
34,
35
],
[
371,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
47
],
[
47,
48
],
[
47,
49
],
[
38,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
63,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
38,
76
],
[
76,
77
],
[
76,
78
],
[
38,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
79,
90
],
[
91,
91
],
[
91,
92
],
[
92,
93
],
[
94,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
102,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
94,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
113,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
92,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
38,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
371,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
137,
143
],
[
134,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
145,
150
],
[
150,
151
],
[
150,
152
],
[
132,
153
],
[
153,
154
],
[
132,
155
],
[
155,
156
],
[
371,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
163,
167
],
[
167,
168
],
[
167,
169
],
[
159,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
170,
174
],
[
174,
175
],
[
174,
176
],
[
159,
177
],
[
177,
178
],
[
157,
179
],
[
179,
180
],
[
157,
181
],
[
181,
182
],
[
371,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
188,
190
],
[
188,
191
],
[
191,
192
],
[
191,
193
],
[
185,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
194,
198
],
[
198,
199
],
[
198,
200
],
[
185,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
201,
205
],
[
205,
206
],
[
205,
207
],
[
185,
208
],
[
208,
209
],
[
183,
210
],
[
210,
211
],
[
183,
212
],
[
212,
213
],
[
371,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
217,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
216,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
371,
230
],
[
230,
231
],
[
230,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
235,
236
],
[
234,
237
],
[
237,
238
],
[
371,
239
],
[
239,
240
],
[
239,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
243,
246
],
[
246,
247
],
[
371,
248
],
[
248,
249
],
[
248,
250
],
[
250,
251
],
[
251,
252
],
[
252,
253
],
[
253,
254
],
[
252,
255
],
[
255,
256
],
[
371,
257
],
[
257,
258
],
[
257,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
259,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
264,
269
],
[
269,
270
],
[
269,
271
],
[
264,
272
],
[
272,
273
],
[
273,
274
],
[
264,
275
],
[
276,
276
],
[
276,
277
],
[
277,
278
],
[
278,
279
],
[
278,
280
],
[
277,
281
],
[
281,
282
],
[
259,
283
],
[
283,
284
],
[
257,
285
],
[
285,
286
],
[
371,
287
],
[
287,
288
],
[
287,
289
],
[
289,
290
],
[
290,
291
],
[
290,
292
],
[
289,
294
],
[
294,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
294,
299
],
[
299,
300
],
[
299,
301
],
[
294,
302
],
[
302,
303
],
[
303,
304
],
[
294,
305
],
[
306,
306
],
[
306,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
307,
311
],
[
311,
312
],
[
289,
313
],
[
313,
314
],
[
287,
315
],
[
315,
316
],
[
371,
317
],
[
317,
318
],
[
317,
319
],
[
319,
320
],
[
320,
321
],
[
320,
322
],
[
319,
324
],
[
324,
325
],
[
325,
326
],
[
326,
327
],
[
326,
328
],
[
324,
329
],
[
329,
330
],
[
329,
331
],
[
324,
332
],
[
332,
333
],
[
333,
334
],
[
324,
335
],
[
336,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
337,
341
],
[
341,
342
],
[
319,
343
],
[
343,
344
],
[
317,
345
],
[
345,
346
],
[
371,
347
],
[
347,
348
],
[
347,
349
],
[
349,
350
],
[
350,
351
],
[
350,
352
],
[
349,
353
],
[
353,
354
],
[
353,
355
],
[
349,
356
],
[
356,
357
],
[
356,
358
],
[
349,
359
],
[
359,
360
],
[
359,
361
],
[
349,
362
],
[
362,
363
],
[
363,
364
],
[
349,
365
],
[
365,
366
],
[
366,
367
],
[
347,
368
],
[
368,
369
],
[
0,
370
],
[
370,
371
],
[
370,
372
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.PrintWriter;\nimport java.math.BigInteger;\nimport java.util.*;\n \npublic class Main {\n \n void solve() throws IOException {\n int N = ni();\n int[] d1 = new int[N];\n int[] d2 = new int[N];\n \n for (int i = 0; i < N; i++) {\n d1[i] = ni();\n d2[i] = ni();\n }\n String ans = \"No\";\n for (int i = 2; i < N; i++) {\n if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){\n ans = \"Yes\";\n }\n }\n \n out.println(ans);\n }\n\n final int mod = 1000000007;\n final BigInteger MOD = BigInteger.valueOf(mod);\n\n int mul(int x, int y){\n int val = (int)((x * 1L * y) % mod);\n return val>=0 ? val : val+mod;\n }\n int add(int x, int y) {\n x += y;\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }\n int sub(int x, int y){\n x = add(x,mod-y);\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }\n String ns() throws IOException {\n while (!tok.hasMoreTokens()) {\n tok = new StringTokenizer(in.readLine(), \" \");\n }\n return tok.nextToken();\n }\n \n int ni() throws IOException {\n return Integer.parseInt(ns());\n }\n \n long nl() throws IOException {\n return Long.parseLong(ns());\n }\n \n double nd() throws IOException {\n return Double.parseDouble(ns());\n }\n \n String[] nsa(int n) throws IOException {\n String[] res = new String[n];\n for (int i = 0; i < n; i++) {\n res[i] = ns();\n }\n return res;\n }\n \n int[] nia(int n) throws IOException {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = ni();\n }\n return res;\n }\n \n long[] nla(int n) throws IOException {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nl();\n }\n return res;\n }\n \n static BufferedReader in;\n static PrintWriter out;\n static StringTokenizer tok;\n \n public static void main(String[] args) throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n tok = new StringTokenizer(\"\");\n Main main = new Main();\n main.solve();\n out.close();\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n \n void solve() throws IOException {\n int N = ni();\n int[] d1 = new int[N];\n int[] d2 = new int[N];\n \n for (int i = 0; i < N; i++) {\n d1[i] = ni();\n d2[i] = ni();\n }\n String ans = \"No\";\n for (int i = 2; i < N; i++) {\n if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){\n ans = \"Yes\";\n }\n }\n \n out.println(ans);\n }\n\n final int mod = 1000000007;\n final BigInteger MOD = BigInteger.valueOf(mod);\n\n int mul(int x, int y){\n int val = (int)((x * 1L * y) % mod);\n return val>=0 ? val : val+mod;\n }\n int add(int x, int y) {\n x += y;\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }\n int sub(int x, int y){\n x = add(x,mod-y);\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }\n String ns() throws IOException {\n while (!tok.hasMoreTokens()) {\n tok = new StringTokenizer(in.readLine(), \" \");\n }\n return tok.nextToken();\n }\n \n int ni() throws IOException {\n return Integer.parseInt(ns());\n }\n \n long nl() throws IOException {\n return Long.parseLong(ns());\n }\n \n double nd() throws IOException {\n return Double.parseDouble(ns());\n }\n \n String[] nsa(int n) throws IOException {\n String[] res = new String[n];\n for (int i = 0; i < n; i++) {\n res[i] = ns();\n }\n return res;\n }\n \n int[] nia(int n) throws IOException {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = ni();\n }\n return res;\n }\n \n long[] nla(int n) throws IOException {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nl();\n }\n return res;\n }\n \n static BufferedReader in;\n static PrintWriter out;\n static StringTokenizer tok;\n \n public static void main(String[] args) throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n tok = new StringTokenizer(\"\");\n Main main = new Main();\n main.solve();\n out.close();\n }\n}",
"Main",
"final int mod = 1000000007;",
"mod",
"1000000007",
"final BigInteger MOD = BigInteger.valueOf(mod);",
"MOD",
"BigInteger.valueOf(mod)",
"BigInteger.valueOf",
"BigInteger",
"mod",
"static BufferedReader in;",
"in",
"static PrintWriter out;",
"out",
"static StringTokenizer tok;",
"tok",
"void solve() throws IOException {\n int N = ni();\n int[] d1 = new int[N];\n int[] d2 = new int[N];\n \n for (int i = 0; i < N; i++) {\n d1[i] = ni();\n d2[i] = ni();\n }\n String ans = \"No\";\n for (int i = 2; i < N; i++) {\n if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){\n ans = \"Yes\";\n }\n }\n \n out.println(ans);\n }",
"solve",
"{\n int N = ni();\n int[] d1 = new int[N];\n int[] d2 = new int[N];\n \n for (int i = 0; i < N; i++) {\n d1[i] = ni();\n d2[i] = ni();\n }\n String ans = \"No\";\n for (int i = 2; i < N; i++) {\n if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){\n ans = \"Yes\";\n }\n }\n \n out.println(ans);\n }",
"int N = ni();",
"N",
"ni()",
"ni",
"int[] d1 = new int[N];",
"d1",
"new int[N]",
"N",
"int[] d2 = new int[N];",
"d2",
"new int[N]",
"N",
"for (int i = 0; i < N; i++) {\n d1[i] = ni();\n d2[i] = ni();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n d1[i] = ni();\n d2[i] = ni();\n }",
"{\n d1[i] = ni();\n d2[i] = ni();\n }",
"d1[i] = ni()",
"d1[i]",
"d1",
"i",
"ni()",
"ni",
"d2[i] = ni()",
"d2[i]",
"d2",
"i",
"ni()",
"ni",
"String ans = \"No\";",
"ans",
"\"No\"",
"for (int i = 2; i < N; i++) {\n if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){\n ans = \"Yes\";\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){\n ans = \"Yes\";\n }\n }",
"{\n if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){\n ans = \"Yes\";\n }\n }",
"if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){\n ans = \"Yes\";\n }",
"(d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])",
"(d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])",
"(d1[i]==d2[i])",
"d1[i]",
"d1",
"i",
"d2[i]",
"d2",
"i",
"(d1[i-1]==d2[i-1])",
"d1[i-1]",
"d1",
"i-1",
"i",
"1",
"d2[i-1]",
"d2",
"i-1",
"i",
"1",
"(d1[i-2]==d2[i-2])",
"d1[i-2]",
"d1",
"i-2",
"i",
"2",
"d2[i-2]",
"d2",
"i-2",
"i",
"2",
"{\n ans = \"Yes\";\n }",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"out.println(ans)",
"out.println",
"out",
"ans",
"int mul(int x, int y){\n int val = (int)((x * 1L * y) % mod);\n return val>=0 ? val : val+mod;\n }",
"mul",
"{\n int val = (int)((x * 1L * y) % mod);\n return val>=0 ? val : val+mod;\n }",
"int val = (int)((x * 1L * y) % mod);",
"val",
"(int)((x * 1L * y) % mod)",
"(x * 1L * y)",
"x * 1L * y",
"x",
"1L",
"y",
"mod",
"return val>=0 ? val : val+mod;",
"val>=0 ? val : val+mod",
"val>=0",
"val",
"0",
"val",
"val+mod",
"val",
"mod",
"int x",
"x",
"int y",
"y",
"int add(int x, int y) {\n x += y;\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }",
"add",
"{\n x += y;\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }",
"x += y",
"x",
"y",
"if(x < 0) x += mod;",
"x < 0",
"x",
"0",
"x += mod",
"x",
"mod",
"if(x>=mod) x -= mod;",
"x>=mod",
"x",
"mod",
"x -= mod",
"x",
"mod",
"return x;",
"x",
"int x",
"x",
"int y",
"y",
"int sub(int x, int y){\n x = add(x,mod-y);\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }",
"sub",
"{\n x = add(x,mod-y);\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }",
"x = add(x,mod-y)",
"x",
"add(x,mod-y)",
"add",
"x",
"mod-y",
"mod",
"y",
"if(x < 0) x += mod;",
"x < 0",
"x",
"0",
"x += mod",
"x",
"mod",
"if(x>=mod) x -= mod;",
"x>=mod",
"x",
"mod",
"x -= mod",
"x",
"mod",
"return x;",
"x",
"int x",
"x",
"int y",
"y",
"String ns() throws IOException {\n while (!tok.hasMoreTokens()) {\n tok = new StringTokenizer(in.readLine(), \" \");\n }\n return tok.nextToken();\n }",
"ns",
"{\n while (!tok.hasMoreTokens()) {\n tok = new StringTokenizer(in.readLine(), \" \");\n }\n return tok.nextToken();\n }",
"while (!tok.hasMoreTokens()) {\n tok = new StringTokenizer(in.readLine(), \" \");\n }",
"!tok.hasMoreTokens()",
"tok.hasMoreTokens()",
"tok.hasMoreTokens",
"tok",
"{\n tok = new StringTokenizer(in.readLine(), \" \");\n }",
"tok = new StringTokenizer(in.readLine(), \" \")",
"tok",
"new StringTokenizer(in.readLine(), \" \")",
"return tok.nextToken();",
"tok.nextToken()",
"tok.nextToken",
"tok",
"int ni() throws IOException {\n return Integer.parseInt(ns());\n }",
"ni",
"{\n return Integer.parseInt(ns());\n }",
"return Integer.parseInt(ns());",
"Integer.parseInt(ns())",
"Integer.parseInt",
"Integer",
"ns()",
"ns",
"long nl() throws IOException {\n return Long.parseLong(ns());\n }",
"nl",
"{\n return Long.parseLong(ns());\n }",
"return Long.parseLong(ns());",
"Long.parseLong(ns())",
"Long.parseLong",
"Long",
"ns()",
"ns",
"double nd() throws IOException {\n return Double.parseDouble(ns());\n }",
"nd",
"{\n return Double.parseDouble(ns());\n }",
"return Double.parseDouble(ns());",
"Double.parseDouble(ns())",
"Double.parseDouble",
"Double",
"ns()",
"ns",
"String[] nsa(int n) throws IOException {\n String[] res = new String[n];\n for (int i = 0; i < n; i++) {\n res[i] = ns();\n }\n return res;\n }",
"nsa",
"{\n String[] res = new String[n];\n for (int i = 0; i < n; i++) {\n res[i] = ns();\n }\n return res;\n }",
"String[] res = new String[n];",
"res",
"new String[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = ns();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = ns();\n }",
"{\n res[i] = ns();\n }",
"res[i] = ns()",
"res[i]",
"res",
"i",
"ns()",
"ns",
"return res;",
"res",
"int n",
"n",
"int[] nia(int n) throws IOException {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = ni();\n }\n return res;\n }",
"nia",
"{\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = ni();\n }\n return res;\n }",
"int[] res = new int[n];",
"res",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = ni();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = ni();\n }",
"{\n res[i] = ni();\n }",
"res[i] = ni()",
"res[i]",
"res",
"i",
"ni()",
"ni",
"return res;",
"res",
"int n",
"n",
"long[] nla(int n) throws IOException {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nl();\n }\n return res;\n }",
"nla",
"{\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nl();\n }\n return res;\n }",
"long[] res = new long[n];",
"res",
"new long[n]",
"n",
"for (int i = 0; i < n; i++) {\n res[i] = nl();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n res[i] = nl();\n }",
"{\n res[i] = nl();\n }",
"res[i] = nl()",
"res[i]",
"res",
"i",
"nl()",
"nl",
"return res;",
"res",
"int n",
"n",
"public static void main(String[] args) throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n tok = new StringTokenizer(\"\");\n Main main = new Main();\n main.solve();\n out.close();\n }",
"main",
"{\n in = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n tok = new StringTokenizer(\"\");\n Main main = new Main();\n main.solve();\n out.close();\n }",
"in = new BufferedReader(new InputStreamReader(System.in))",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"tok = new StringTokenizer(\"\")",
"tok",
"new StringTokenizer(\"\")",
"Main main = new Main();",
"main",
"new Main()",
"main.solve()",
"main.solve",
"main",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"public class Main {\n \n void solve() throws IOException {\n int N = ni();\n int[] d1 = new int[N];\n int[] d2 = new int[N];\n \n for (int i = 0; i < N; i++) {\n d1[i] = ni();\n d2[i] = ni();\n }\n String ans = \"No\";\n for (int i = 2; i < N; i++) {\n if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){\n ans = \"Yes\";\n }\n }\n \n out.println(ans);\n }\n\n final int mod = 1000000007;\n final BigInteger MOD = BigInteger.valueOf(mod);\n\n int mul(int x, int y){\n int val = (int)((x * 1L * y) % mod);\n return val>=0 ? val : val+mod;\n }\n int add(int x, int y) {\n x += y;\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }\n int sub(int x, int y){\n x = add(x,mod-y);\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }\n String ns() throws IOException {\n while (!tok.hasMoreTokens()) {\n tok = new StringTokenizer(in.readLine(), \" \");\n }\n return tok.nextToken();\n }\n \n int ni() throws IOException {\n return Integer.parseInt(ns());\n }\n \n long nl() throws IOException {\n return Long.parseLong(ns());\n }\n \n double nd() throws IOException {\n return Double.parseDouble(ns());\n }\n \n String[] nsa(int n) throws IOException {\n String[] res = new String[n];\n for (int i = 0; i < n; i++) {\n res[i] = ns();\n }\n return res;\n }\n \n int[] nia(int n) throws IOException {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = ni();\n }\n return res;\n }\n \n long[] nla(int n) throws IOException {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nl();\n }\n return res;\n }\n \n static BufferedReader in;\n static PrintWriter out;\n static StringTokenizer tok;\n \n public static void main(String[] args) throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n tok = new StringTokenizer(\"\");\n Main main = new Main();\n main.solve();\n out.close();\n }\n}",
"public class Main {\n \n void solve() throws IOException {\n int N = ni();\n int[] d1 = new int[N];\n int[] d2 = new int[N];\n \n for (int i = 0; i < N; i++) {\n d1[i] = ni();\n d2[i] = ni();\n }\n String ans = \"No\";\n for (int i = 2; i < N; i++) {\n if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){\n ans = \"Yes\";\n }\n }\n \n out.println(ans);\n }\n\n final int mod = 1000000007;\n final BigInteger MOD = BigInteger.valueOf(mod);\n\n int mul(int x, int y){\n int val = (int)((x * 1L * y) % mod);\n return val>=0 ? val : val+mod;\n }\n int add(int x, int y) {\n x += y;\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }\n int sub(int x, int y){\n x = add(x,mod-y);\n if(x < 0) x += mod;\n if(x>=mod) x -= mod;\n return x;\n }\n String ns() throws IOException {\n while (!tok.hasMoreTokens()) {\n tok = new StringTokenizer(in.readLine(), \" \");\n }\n return tok.nextToken();\n }\n \n int ni() throws IOException {\n return Integer.parseInt(ns());\n }\n \n long nl() throws IOException {\n return Long.parseLong(ns());\n }\n \n double nd() throws IOException {\n return Double.parseDouble(ns());\n }\n \n String[] nsa(int n) throws IOException {\n String[] res = new String[n];\n for (int i = 0; i < n; i++) {\n res[i] = ns();\n }\n return res;\n }\n \n int[] nia(int n) throws IOException {\n int[] res = new int[n];\n for (int i = 0; i < n; i++) {\n res[i] = ni();\n }\n return res;\n }\n \n long[] nla(int n) throws IOException {\n long[] res = new long[n];\n for (int i = 0; i < n; i++) {\n res[i] = nl();\n }\n return res;\n }\n \n static BufferedReader in;\n static PrintWriter out;\n static StringTokenizer tok;\n \n public static void main(String[] args) throws IOException {\n in = new BufferedReader(new InputStreamReader(System.in));\n out = new PrintWriter(System.out);\n tok = new StringTokenizer(\"\");\n Main main = new Main();\n main.solve();\n out.close();\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.*;
public class Main {
void solve() throws IOException {
int N = ni();
int[] d1 = new int[N];
int[] d2 = new int[N];
for (int i = 0; i < N; i++) {
d1[i] = ni();
d2[i] = ni();
}
String ans = "No";
for (int i = 2; i < N; i++) {
if((d1[i]==d2[i])&&(d1[i-1]==d2[i-1])&&(d1[i-2]==d2[i-2])){
ans = "Yes";
}
}
out.println(ans);
}
final int mod = 1000000007;
final BigInteger MOD = BigInteger.valueOf(mod);
int mul(int x, int y){
int val = (int)((x * 1L * y) % mod);
return val>=0 ? val : val+mod;
}
int add(int x, int y) {
x += y;
if(x < 0) x += mod;
if(x>=mod) x -= mod;
return x;
}
int sub(int x, int y){
x = add(x,mod-y);
if(x < 0) x += mod;
if(x>=mod) x -= mod;
return x;
}
String ns() throws IOException {
while (!tok.hasMoreTokens()) {
tok = new StringTokenizer(in.readLine(), " ");
}
return tok.nextToken();
}
int ni() throws IOException {
return Integer.parseInt(ns());
}
long nl() throws IOException {
return Long.parseLong(ns());
}
double nd() throws IOException {
return Double.parseDouble(ns());
}
String[] nsa(int n) throws IOException {
String[] res = new String[n];
for (int i = 0; i < n; i++) {
res[i] = ns();
}
return res;
}
int[] nia(int n) throws IOException {
int[] res = new int[n];
for (int i = 0; i < n; i++) {
res[i] = ni();
}
return res;
}
long[] nla(int n) throws IOException {
long[] res = new long[n];
for (int i = 0; i < n; i++) {
res[i] = nl();
}
return res;
}
static BufferedReader in;
static PrintWriter out;
static StringTokenizer tok;
public static void main(String[] args) throws IOException {
in = new BufferedReader(new InputStreamReader(System.in));
out = new PrintWriter(System.out);
tok = new StringTokenizer("");
Main main = new Main();
main.solve();
out.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
112,
5
],
[
112,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
40,
41
],
[
40,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
35,
46
],
[
47,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
48,
54
],
[
54,
55
],
[
55,
56
],
[
8,
57
],
[
57,
58
],
[
57,
59
],
[
8,
60
],
[
60,
61
],
[
60,
62
],
[
8,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
63,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
77,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
76,
88
],
[
88,
89
],
[
89,
90
],
[
76,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
75,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
8,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
6,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tString s = \"No\";\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif(count>=3) {\n\t\t\t\ts = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tString s = \"No\";\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif(count>=3) {\n\t\t\t\ts = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tString s = \"No\";\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif(count>=3) {\n\t\t\t\ts = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tString s = \"No\";\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif(count>=3) {\n\t\t\t\ts = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] d = new int[n][2];",
"d",
"new int[n][2]",
"n",
"2",
"for(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}",
"for(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}",
"int j = 0;",
"int j = 0;",
"j",
"0",
"j < 2",
"j",
"2",
"j++",
"j++",
"j",
"{\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}",
"{\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}",
"d[i][j] = sc.nextInt()",
"d[i][j]",
"d[i]",
"d",
"i",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"String s = \"No\";",
"s",
"\"No\"",
"for(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif(count>=3) {\n\t\t\t\ts = \"Yes\";\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif(count>=3) {\n\t\t\t\ts = \"Yes\";\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif(count>=3) {\n\t\t\t\ts = \"Yes\";\n\t\t\t}\n\t\t}",
"if(d[i][0]==d[i][1]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount = 0;\n\t\t\t}",
"d[i][0]==d[i][1]",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"{\n\t\t\t\tcount++;\n\t\t\t}",
"count++",
"count",
"{\n\t\t\t\tcount = 0;\n\t\t\t}",
"count = 0",
"count",
"0",
"if(count>=3) {\n\t\t\t\ts = \"Yes\";\n\t\t\t}",
"count>=3",
"count",
"3",
"{\n\t\t\t\ts = \"Yes\";\n\t\t\t}",
"s = \"Yes\"",
"s",
"\"Yes\"",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tString s = \"No\";\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif(count>=3) {\n\t\t\t\ts = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[n][2];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tfor(int j = 0; j < 2; j++) {\n\t\t\t\td[i][j] = sc.nextInt();\n\t\t\t}\n\t\t}\n\t\tint count = 0;\n\t\tString s = \"No\";\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t\tif(count>=3) {\n\t\t\t\ts = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(s);\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[][] d = new int[n][2];
for(int i = 0; i < n; i++) {
for(int j = 0; j < 2; j++) {
d[i][j] = sc.nextInt();
}
}
int count = 0;
String s = "No";
for(int i = 0; i < n; i++) {
if(d[i][0]==d[i][1]) {
count++;
}
else {
count = 0;
}
if(count>=3) {
s = "Yes";
}
}
System.out.println(s);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
40,
13,
30,
14,
2,
13,
17,
0,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
14,
2,
4,
18,
13,
17,
17,
30,
0,
13,
17,
40,
13,
11,
1,
41,
13,
13,
2,
13,
4,
18,
13,
1,
40,
13,
30,
14,
2,
4,
18,
13,
13,
17,
30,
0,
13,
4,
18,
13,
4,
18,
13,
0,
13,
20,
0,
13,
17,
30,
4,
18,
13,
4,
18,
13,
13,
14,
13,
0,
13,
17,
0,
13,
2,
4,
18,
13,
4,
18,
13,
13,
29,
2,
13,
8,
13,
40,
17,
17,
12,
13,
30,
29,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
251,
8
],
[
251,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
11,
20
],
[
20,
21
],
[
20,
22
],
[
11,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
26,
28
],
[
11,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
29,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
45,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
56,
58
],
[
51,
59
],
[
59,
60
],
[
59,
61
],
[
11,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
11,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
74,
77
],
[
9,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
80,
84
],
[
84,
85
],
[
80,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
92,
93
],
[
80,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
97,
106
],
[
106,
107
],
[
106,
108
],
[
96,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
80,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
117,
120
],
[
120,
121
],
[
80,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
129,
130
],
[
80,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
80,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
140,
145
],
[
145,
146
],
[
145,
147
],
[
140,
148
],
[
148,
149
],
[
148,
150
],
[
140,
151
],
[
151,
152
],
[
151,
153
],
[
140,
154
],
[
154,
155
],
[
154,
156
],
[
140,
157
],
[
157,
158
],
[
157,
159
],
[
140,
160
],
[
160,
161
],
[
160,
162
],
[
140,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
165,
168
],
[
164,
169
],
[
163,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
170,
174
],
[
174,
175
],
[
140,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
176,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
176,
186
],
[
186,
187
],
[
187,
188
],
[
176,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
192,
195
],
[
191,
196
],
[
190,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
201,
202
],
[
200,
203
],
[
203,
204
],
[
204,
205
],
[
197,
206
],
[
206,
207
],
[
206,
208
],
[
197,
209
],
[
209,
210
],
[
209,
211
],
[
190,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
213,
216
],
[
216,
217
],
[
217,
218
],
[
216,
219
],
[
212,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
222,
224
],
[
140,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
228,
231
],
[
231,
232
],
[
232,
233
],
[
227,
234
],
[
140,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
238,
242
],
[
80,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
0,
250
],
[
250,
251
],
[
250,
252
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n\n public static void main(String[] args) throws IOException {\n\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int res = 0,cnt = 0;\n boolean flag = false;\n while(n--!=0){\n int a = s.nextInt(),b=s.nextInt();\n if(a==b)cnt++;\n else{\n if(cnt>=3)flag = true;\n cnt = 0;\n }\n }\n if(cnt>=3)flag = true;\n System.out.println(flag?\"Yes\":\"No\");\n\n\n }\n\n\n}\n\n\n\n\nclass Scanner\n{\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s){\tbr = new BufferedReader(new InputStreamReader(s));}\n\n public String next() throws IOException\n {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {return Integer.parseInt(next());}\n\n public long nextLong() throws IOException {return Long.parseLong(next());}\n\n public String nextLine() throws IOException {return br.readLine();}\n\n public double nextDouble() throws IOException\n {\n String x = next();\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if(x.charAt(0) == '-')\n {\n neg = true;\n start++;\n }\n for(int i = start; i < x.length(); i++)\n if(x.charAt(i) == '.')\n {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n }\n else\n {\n sb.append(x.charAt(i));\n if(dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg?-1:1);\n }\n\n public boolean ready() throws IOException {return br.ready();}\n\n\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\n public static void main(String[] args) throws IOException {\n\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int res = 0,cnt = 0;\n boolean flag = false;\n while(n--!=0){\n int a = s.nextInt(),b=s.nextInt();\n if(a==b)cnt++;\n else{\n if(cnt>=3)flag = true;\n cnt = 0;\n }\n }\n if(cnt>=3)flag = true;\n System.out.println(flag?\"Yes\":\"No\");\n\n\n }\n\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int res = 0,cnt = 0;\n boolean flag = false;\n while(n--!=0){\n int a = s.nextInt(),b=s.nextInt();\n if(a==b)cnt++;\n else{\n if(cnt>=3)flag = true;\n cnt = 0;\n }\n }\n if(cnt>=3)flag = true;\n System.out.println(flag?\"Yes\":\"No\");\n\n\n }",
"main",
"{\n\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int res = 0,cnt = 0;\n boolean flag = false;\n while(n--!=0){\n int a = s.nextInt(),b=s.nextInt();\n if(a==b)cnt++;\n else{\n if(cnt>=3)flag = true;\n cnt = 0;\n }\n }\n if(cnt>=3)flag = true;\n System.out.println(flag?\"Yes\":\"No\");\n\n\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int n = s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int res = 0",
"res",
"0",
"cnt = 0;",
"cnt",
"0",
"boolean flag = false;",
"flag",
"false",
"while(n--!=0){\n int a = s.nextInt(),b=s.nextInt();\n if(a==b)cnt++;\n else{\n if(cnt>=3)flag = true;\n cnt = 0;\n }\n }",
"n--!=0",
"n--",
"n",
"0",
"{\n int a = s.nextInt(),b=s.nextInt();\n if(a==b)cnt++;\n else{\n if(cnt>=3)flag = true;\n cnt = 0;\n }\n }",
"int a = s.nextInt()",
"a",
"s.nextInt()",
"s.nextInt",
"s",
"b=s.nextInt();",
"b",
"s.nextInt()",
"s.nextInt",
"s",
"if(a==b)cnt++;\n else{\n if(cnt>=3)flag = true;\n cnt = 0;\n }",
"a==b",
"a",
"b",
"cnt++",
"cnt",
"{\n if(cnt>=3)flag = true;\n cnt = 0;\n }",
"if(cnt>=3)flag = true;",
"cnt>=3",
"cnt",
"3",
"flag = true",
"flag",
"true",
"cnt = 0",
"cnt",
"0",
"if(cnt>=3)flag = true;",
"cnt>=3",
"cnt",
"3",
"flag = true",
"flag",
"true",
"System.out.println(flag?\"Yes\":\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"flag?\"Yes\":\"No\"",
"flag",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"class Scanner\n{\n StringTokenizer st;\n BufferedReader br;\n\n public Scanner(InputStream s){\tbr = new BufferedReader(new InputStreamReader(s));}\n\n public String next() throws IOException\n {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }\n\n public int nextInt() throws IOException {return Integer.parseInt(next());}\n\n public long nextLong() throws IOException {return Long.parseLong(next());}\n\n public String nextLine() throws IOException {return br.readLine();}\n\n public double nextDouble() throws IOException\n {\n String x = next();\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if(x.charAt(0) == '-')\n {\n neg = true;\n start++;\n }\n for(int i = start; i < x.length(); i++)\n if(x.charAt(i) == '.')\n {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n }\n else\n {\n sb.append(x.charAt(i));\n if(dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg?-1:1);\n }\n\n public boolean ready() throws IOException {return br.ready();}\n\n\n}",
"Scanner",
"StringTokenizer st;",
"st",
"BufferedReader br;",
"br",
"public Scanner(InputStream s){\tbr = new BufferedReader(new InputStreamReader(s));}",
"Scanner",
"{\tbr = new BufferedReader(new InputStreamReader(s));}",
"br = new BufferedReader(new InputStreamReader(s))",
"br",
"new BufferedReader(new InputStreamReader(s))",
"InputStream s",
"s",
"public String next() throws IOException\n {\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens())\n st = new StringTokenizer(br.readLine());",
"st == null || !st.hasMoreTokens()",
"st == null",
"st",
"null",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int nextInt() throws IOException {return Integer.parseInt(next());}",
"nextInt",
"{return Integer.parseInt(next());}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public long nextLong() throws IOException {return Long.parseLong(next());}",
"nextLong",
"{return Long.parseLong(next());}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public String nextLine() throws IOException {return br.readLine();}",
"nextLine",
"{return br.readLine();}",
"return br.readLine();",
"br.readLine()",
"br.readLine",
"br",
"public double nextDouble() throws IOException\n {\n String x = next();\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if(x.charAt(0) == '-')\n {\n neg = true;\n start++;\n }\n for(int i = start; i < x.length(); i++)\n if(x.charAt(i) == '.')\n {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n }\n else\n {\n sb.append(x.charAt(i));\n if(dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg?-1:1);\n }",
"nextDouble",
"{\n String x = next();\n StringBuilder sb = new StringBuilder(\"0\");\n double res = 0, f = 1;\n boolean dec = false, neg = false;\n int start = 0;\n if(x.charAt(0) == '-')\n {\n neg = true;\n start++;\n }\n for(int i = start; i < x.length(); i++)\n if(x.charAt(i) == '.')\n {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n }\n else\n {\n sb.append(x.charAt(i));\n if(dec)\n f *= 10;\n }\n res += Long.parseLong(sb.toString()) / f;\n return res * (neg?-1:1);\n }",
"String x = next();",
"x",
"next()",
"next",
"StringBuilder sb = new StringBuilder(\"0\");",
"sb",
"new StringBuilder(\"0\")",
"double res = 0",
"res",
"0",
"f = 1;",
"f",
"1",
"boolean dec = false",
"dec",
"false",
"neg = false;",
"neg",
"false",
"int start = 0;",
"start",
"0",
"if(x.charAt(0) == '-')\n {\n neg = true;\n start++;\n }",
"x.charAt(0) == '-'",
"x.charAt(0)",
"x.charAt",
"x",
"0",
"'-'",
"{\n neg = true;\n start++;\n }",
"neg = true",
"neg",
"true",
"start++",
"start",
"for(int i = start; i < x.length(); i++)\n if(x.charAt(i) == '.')\n {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n }\n else\n {\n sb.append(x.charAt(i));\n if(dec)\n f *= 10;\n }",
"int i = start;",
"int i = start;",
"i",
"start",
"i < x.length()",
"i",
"x.length()",
"x.length",
"x",
"i++",
"i++",
"i",
"if(x.charAt(i) == '.')\n {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n }\n else\n {\n sb.append(x.charAt(i));\n if(dec)\n f *= 10;\n }",
"if(x.charAt(i) == '.')\n {\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n }\n else\n {\n sb.append(x.charAt(i));\n if(dec)\n f *= 10;\n }",
"x.charAt(i) == '.'",
"x.charAt(i)",
"x.charAt",
"x",
"i",
"'.'",
"{\n res = Long.parseLong(sb.toString());\n sb = new StringBuilder(\"0\");\n dec = true;\n }",
"res = Long.parseLong(sb.toString())",
"res",
"Long.parseLong(sb.toString())",
"Long.parseLong",
"Long",
"sb.toString()",
"sb.toString",
"sb",
"sb = new StringBuilder(\"0\")",
"sb",
"new StringBuilder(\"0\")",
"dec = true",
"dec",
"true",
"{\n sb.append(x.charAt(i));\n if(dec)\n f *= 10;\n }",
"sb.append(x.charAt(i))",
"sb.append",
"sb",
"x.charAt(i)",
"x.charAt",
"x",
"i",
"if(dec)\n f *= 10;",
"dec",
"f *= 10",
"f",
"10",
"res += Long.parseLong(sb.toString()) / f",
"res",
"Long.parseLong(sb.toString()) / f",
"Long.parseLong(sb.toString())",
"Long.parseLong",
"Long",
"sb.toString()",
"sb.toString",
"sb",
"f",
"return res * (neg?-1:1);",
"res * (neg?-1:1)",
"res",
"(neg?-1:1)",
"neg",
"-1",
"1",
"1",
"public boolean ready() throws IOException {return br.ready();}",
"ready",
"{return br.ready();}",
"return br.ready();",
"br.ready()",
"br.ready",
"br",
"public class Main {\n\n\n public static void main(String[] args) throws IOException {\n\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int res = 0,cnt = 0;\n boolean flag = false;\n while(n--!=0){\n int a = s.nextInt(),b=s.nextInt();\n if(a==b)cnt++;\n else{\n if(cnt>=3)flag = true;\n cnt = 0;\n }\n }\n if(cnt>=3)flag = true;\n System.out.println(flag?\"Yes\":\"No\");\n\n\n }\n\n\n}",
"public class Main {\n\n\n public static void main(String[] args) throws IOException {\n\n Scanner s = new Scanner(System.in);\n int n = s.nextInt();\n int res = 0,cnt = 0;\n boolean flag = false;\n while(n--!=0){\n int a = s.nextInt(),b=s.nextInt();\n if(a==b)cnt++;\n else{\n if(cnt>=3)flag = true;\n cnt = 0;\n }\n }\n if(cnt>=3)flag = true;\n System.out.println(flag?\"Yes\":\"No\");\n\n\n }\n\n\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) throws IOException {
Scanner s = new Scanner(System.in);
int n = s.nextInt();
int res = 0,cnt = 0;
boolean flag = false;
while(n--!=0){
int a = s.nextInt(),b=s.nextInt();
if(a==b)cnt++;
else{
if(cnt>=3)flag = true;
cnt = 0;
}
}
if(cnt>=3)flag = true;
System.out.println(flag?"Yes":"No");
}
}
class Scanner
{
StringTokenizer st;
BufferedReader br;
public Scanner(InputStream s){ br = new BufferedReader(new InputStreamReader(s));}
public String next() throws IOException
{
while (st == null || !st.hasMoreTokens())
st = new StringTokenizer(br.readLine());
return st.nextToken();
}
public int nextInt() throws IOException {return Integer.parseInt(next());}
public long nextLong() throws IOException {return Long.parseLong(next());}
public String nextLine() throws IOException {return br.readLine();}
public double nextDouble() throws IOException
{
String x = next();
StringBuilder sb = new StringBuilder("0");
double res = 0, f = 1;
boolean dec = false, neg = false;
int start = 0;
if(x.charAt(0) == '-')
{
neg = true;
start++;
}
for(int i = start; i < x.length(); i++)
if(x.charAt(i) == '.')
{
res = Long.parseLong(sb.toString());
sb = new StringBuilder("0");
dec = true;
}
else
{
sb.append(x.charAt(i));
if(dec)
f *= 10;
}
res += Long.parseLong(sb.toString()) / f;
return res * (neg?-1:1);
}
public boolean ready() throws IOException {return br.ready();}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
17,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
17,
13,
4,
18,
13,
0,
18,
18,
13,
17,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
18,
13,
17,
13,
18,
18,
13,
17,
13,
2,
18,
18,
13,
17,
2,
13,
17,
18,
18,
13,
17,
2,
13,
17,
2,
18,
18,
13,
17,
2,
13,
17,
18,
18,
13,
17,
2,
13,
17,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
137,
14
],
[
137,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
17,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
36,
37
],
[
36,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
53,
59
],
[
59,
60
],
[
60,
61
],
[
17,
62
],
[
62,
63
],
[
62,
64
],
[
17,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
65,
75
],
[
75,
76
],
[
76,
77
],
[
65,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
82,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
106,
108
],
[
82,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
114,
115
],
[
114,
116
],
[
109,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
121,
123
],
[
80,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
17,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
15,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
]
| [
"import java.util.Scanner;\nimport java.util.Queue;\nimport java.util.ArrayDeque;\nimport java.util.Arrays;\n \npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[2][n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\td[0][i] = sc.nextInt();\n\t\t\td[1][i] = sc.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\t\tfor(int i = 0; i < n - 2; i++) {\n\t\t\tif(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Queue;",
"Queue",
"java.util",
"import java.util.ArrayDeque;",
"ArrayDeque",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[2][n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\td[0][i] = sc.nextInt();\n\t\t\td[1][i] = sc.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\t\tfor(int i = 0; i < n - 2; i++) {\n\t\t\tif(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[2][n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\td[0][i] = sc.nextInt();\n\t\t\td[1][i] = sc.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\t\tfor(int i = 0; i < n - 2; i++) {\n\t\t\tif(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[2][n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\td[0][i] = sc.nextInt();\n\t\t\td[1][i] = sc.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\t\tfor(int i = 0; i < n - 2; i++) {\n\t\t\tif(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] d = new int[2][n];",
"d",
"new int[2][n]",
"2",
"n",
"for(int i = 0; i < n; i++) {\n\t\t\td[0][i] = sc.nextInt();\n\t\t\td[1][i] = sc.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\td[0][i] = sc.nextInt();\n\t\t\td[1][i] = sc.nextInt();\n\t\t}",
"{\n\t\t\td[0][i] = sc.nextInt();\n\t\t\td[1][i] = sc.nextInt();\n\t\t}",
"d[0][i] = sc.nextInt()",
"d[0][i]",
"d[0]",
"d",
"0",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d[1][i] = sc.nextInt()",
"d[1][i]",
"d[1]",
"d",
"1",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String ans = \"No\";",
"ans",
"\"No\"",
"for(int i = 0; i < n - 2; i++) {\n\t\t\tif(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n - 2",
"i",
"n - 2",
"n",
"2",
"i++",
"i++",
"i",
"{\n\t\t\tif(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}",
"if(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}",
"d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2]",
"d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2]",
"d[0][i]==d[1][i]",
"d[0][i]",
"d[0]",
"d",
"0",
"i",
"d[1][i]",
"d[1]",
"d",
"1",
"i",
"d[0][i+1]==d[1][i+1]",
"d[0][i+1]",
"d[0]",
"d",
"0",
"i+1",
"i",
"1",
"d[1][i+1]",
"d[1]",
"d",
"1",
"i+1",
"i",
"1",
"d[0][i+2]==d[1][i+2]",
"d[0][i+2]",
"d[0]",
"d",
"0",
"i+2",
"i",
"2",
"d[1][i+2]",
"d[1]",
"d",
"1",
"i+2",
"i",
"2",
"{\n\t\t\t\tans = \"Yes\";\n\t\t\t}",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[2][n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\td[0][i] = sc.nextInt();\n\t\t\td[1][i] = sc.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\t\tfor(int i = 0; i < n - 2; i++) {\n\t\t\tif(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\tint n = sc.nextInt();\n\t\tint[][] d = new int[2][n];\n\t\tfor(int i = 0; i < n; i++) {\n\t\t\td[0][i] = sc.nextInt();\n\t\t\td[1][i] = sc.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\t\tfor(int i = 0; i < n - 2; i++) {\n\t\t\tif(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(ans);\n\t}\n\n}",
"Main"
]
| import java.util.Scanner;
import java.util.Queue;
import java.util.ArrayDeque;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int[][] d = new int[2][n];
for(int i = 0; i < n; i++) {
d[0][i] = sc.nextInt();
d[1][i] = sc.nextInt();
}
String ans = "No";
for(int i = 0; i < n - 2; i++) {
if(d[0][i]==d[1][i] && d[0][i+1]==d[1][i+1] && d[0][i+2]==d[1][i+2] ) {
ans = "Yes";
}
}
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
18,
13,
13,
2,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
2,
2,
18,
13,
13,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
14,
13,
30,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
110,
14
],
[
110,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
17,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
35,
36
],
[
35,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
42,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
42,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
57,
59
],
[
17,
60
],
[
60,
61
],
[
60,
62
],
[
17,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
63,
73
],
[
73,
74
],
[
74,
75
],
[
63,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
81,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
77,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
17,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
15,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
]
| [
"import java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.List;\nimport java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n boolean[] isZorome = new boolean[n];\n for (int i = 0;i<n;i++){\n int d_1 = sc.nextInt();\n int d_2 = sc.nextInt();\n isZorome[i] = (d_1 == d_2);\n }\n String ans = \"No\";\n for (int i = 0;i<n-2;i++){\n boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];\n if (sanren){\n ans = \"Yes\";\n }\n }\n System.out.println(ans);\n }\n\n\n\n}\n",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n boolean[] isZorome = new boolean[n];\n for (int i = 0;i<n;i++){\n int d_1 = sc.nextInt();\n int d_2 = sc.nextInt();\n isZorome[i] = (d_1 == d_2);\n }\n String ans = \"No\";\n for (int i = 0;i<n-2;i++){\n boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];\n if (sanren){\n ans = \"Yes\";\n }\n }\n System.out.println(ans);\n }\n\n\n\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n boolean[] isZorome = new boolean[n];\n for (int i = 0;i<n;i++){\n int d_1 = sc.nextInt();\n int d_2 = sc.nextInt();\n isZorome[i] = (d_1 == d_2);\n }\n String ans = \"No\";\n for (int i = 0;i<n-2;i++){\n boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];\n if (sanren){\n ans = \"Yes\";\n }\n }\n System.out.println(ans);\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n boolean[] isZorome = new boolean[n];\n for (int i = 0;i<n;i++){\n int d_1 = sc.nextInt();\n int d_2 = sc.nextInt();\n isZorome[i] = (d_1 == d_2);\n }\n String ans = \"No\";\n for (int i = 0;i<n-2;i++){\n boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];\n if (sanren){\n ans = \"Yes\";\n }\n }\n System.out.println(ans);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean[] isZorome = new boolean[n];",
"isZorome",
"new boolean[n]",
"n",
"for (int i = 0;i<n;i++){\n int d_1 = sc.nextInt();\n int d_2 = sc.nextInt();\n isZorome[i] = (d_1 == d_2);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int d_1 = sc.nextInt();\n int d_2 = sc.nextInt();\n isZorome[i] = (d_1 == d_2);\n }",
"{\n int d_1 = sc.nextInt();\n int d_2 = sc.nextInt();\n isZorome[i] = (d_1 == d_2);\n }",
"int d_1 = sc.nextInt();",
"d_1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d_2 = sc.nextInt();",
"d_2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"isZorome[i] = (d_1 == d_2)",
"isZorome[i]",
"isZorome",
"i",
"(d_1 == d_2)",
"d_1",
"d_2",
"String ans = \"No\";",
"ans",
"\"No\"",
"for (int i = 0;i<n-2;i++){\n boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];\n if (sanren){\n ans = \"Yes\";\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<n-2",
"i",
"n-2",
"n",
"2",
"i++",
"i++",
"i",
"{\n boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];\n if (sanren){\n ans = \"Yes\";\n }\n }",
"{\n boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];\n if (sanren){\n ans = \"Yes\";\n }\n }",
"boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];",
"sanren",
"isZorome[i] && isZorome[i+1] && isZorome[i+2]",
"isZorome[i] && isZorome[i+1] && isZorome[i+2]",
"isZorome[i]",
"isZorome",
"i",
"isZorome[i+1]",
"isZorome",
"i+1",
"i",
"1",
"isZorome[i+2]",
"isZorome",
"i+2",
"i",
"2",
"if (sanren){\n ans = \"Yes\";\n }",
"sanren",
"{\n ans = \"Yes\";\n }",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n boolean[] isZorome = new boolean[n];\n for (int i = 0;i<n;i++){\n int d_1 = sc.nextInt();\n int d_2 = sc.nextInt();\n isZorome[i] = (d_1 == d_2);\n }\n String ans = \"No\";\n for (int i = 0;i<n-2;i++){\n boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];\n if (sanren){\n ans = \"Yes\";\n }\n }\n System.out.println(ans);\n }\n\n\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n boolean[] isZorome = new boolean[n];\n for (int i = 0;i<n;i++){\n int d_1 = sc.nextInt();\n int d_2 = sc.nextInt();\n isZorome[i] = (d_1 == d_2);\n }\n String ans = \"No\";\n for (int i = 0;i<n-2;i++){\n boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];\n if (sanren){\n ans = \"Yes\";\n }\n }\n System.out.println(ans);\n }\n\n\n\n}",
"Main"
]
| import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
boolean[] isZorome = new boolean[n];
for (int i = 0;i<n;i++){
int d_1 = sc.nextInt();
int d_2 = sc.nextInt();
isZorome[i] = (d_1 == d_2);
}
String ans = "No";
for (int i = 0;i<n-2;i++){
boolean sanren = isZorome[i] && isZorome[i+1] && isZorome[i+2];
if (sanren){
ans = "Yes";
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
112,
5
],
[
112,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
8,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
25,
30
],
[
30,
31
],
[
30,
32
],
[
25,
33
],
[
33,
34
],
[
34,
35
],
[
25,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
37,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
8,
52
],
[
52,
53
],
[
52,
54
],
[
8,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
79,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
67,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
95,
102
],
[
8,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
6,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tint[] n = new int[number];\n\t\tint[] m = new int[number];\n\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tn[i] = sc.nextInt();\n\t\t\tm[i] = sc.nextInt();\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tif (n[i] == m[i]) {\n\t\t\t\tcnt++;\n\t\t\t}else if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t\tif (cnt == 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tint[] n = new int[number];\n\t\tint[] m = new int[number];\n\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tn[i] = sc.nextInt();\n\t\t\tm[i] = sc.nextInt();\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tif (n[i] == m[i]) {\n\t\t\t\tcnt++;\n\t\t\t}else if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t\tif (cnt == 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tint[] n = new int[number];\n\t\tint[] m = new int[number];\n\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tn[i] = sc.nextInt();\n\t\t\tm[i] = sc.nextInt();\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tif (n[i] == m[i]) {\n\t\t\t\tcnt++;\n\t\t\t}else if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t\tif (cnt == 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tint[] n = new int[number];\n\t\tint[] m = new int[number];\n\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tn[i] = sc.nextInt();\n\t\t\tm[i] = sc.nextInt();\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tif (n[i] == m[i]) {\n\t\t\t\tcnt++;\n\t\t\t}else if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t\tif (cnt == 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int number = sc.nextInt();",
"number",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] n = new int[number];",
"n",
"new int[number]",
"number",
"int[] m = new int[number];",
"m",
"new int[number]",
"number",
"for (int i = 0; i < number; i++) {\n\t\t\tn[i] = sc.nextInt();\n\t\t\tm[i] = sc.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < number",
"i",
"number",
"i++",
"i++",
"i",
"{\n\t\t\tn[i] = sc.nextInt();\n\t\t\tm[i] = sc.nextInt();\n\t\t}",
"{\n\t\t\tn[i] = sc.nextInt();\n\t\t\tm[i] = sc.nextInt();\n\t\t}",
"n[i] = sc.nextInt()",
"n[i]",
"n",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"m[i] = sc.nextInt()",
"m[i]",
"m",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < number; i++) {\n\t\t\tif (n[i] == m[i]) {\n\t\t\t\tcnt++;\n\t\t\t}else if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t\tif (cnt == 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < number",
"i",
"number",
"i++",
"i++",
"i",
"{\n\t\t\tif (n[i] == m[i]) {\n\t\t\t\tcnt++;\n\t\t\t}else if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t\tif (cnt == 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}",
"{\n\t\t\tif (n[i] == m[i]) {\n\t\t\t\tcnt++;\n\t\t\t}else if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t\tif (cnt == 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}",
"if (n[i] == m[i]) {\n\t\t\t\tcnt++;\n\t\t\t}else if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}",
"n[i] == m[i]",
"n[i]",
"n",
"i",
"m[i]",
"m",
"i",
"{\n\t\t\t\tcnt++;\n\t\t\t}",
"cnt++",
"cnt",
"if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}",
"n[i] != m[i]",
"n[i]",
"n",
"i",
"m[i]",
"m",
"i",
"{\n\t\t\t\tcnt = 0;\n\t\t\t}",
"cnt = 0",
"cnt",
"0",
"if (cnt == 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"cnt == 3",
"cnt",
"3",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tint[] n = new int[number];\n\t\tint[] m = new int[number];\n\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tn[i] = sc.nextInt();\n\t\t\tm[i] = sc.nextInt();\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tif (n[i] == m[i]) {\n\t\t\t\tcnt++;\n\t\t\t}else if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t\tif (cnt == 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint number = sc.nextInt();\n\t\tint[] n = new int[number];\n\t\tint[] m = new int[number];\n\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tn[i] = sc.nextInt();\n\t\t\tm[i] = sc.nextInt();\n\t\t}\n\t\tint cnt = 0;\n\t\tfor (int i = 0; i < number; i++) {\n\t\t\tif (n[i] == m[i]) {\n\t\t\t\tcnt++;\n\t\t\t}else if(n[i] != m[i]) {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t\tif (cnt == 3) {\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t}\n\t\t\n\t\t\tSystem.out.println(\"No\");\n\t\t\n\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int number = sc.nextInt();
int[] n = new int[number];
int[] m = new int[number];
for (int i = 0; i < number; i++) {
n[i] = sc.nextInt();
m[i] = sc.nextInt();
}
int cnt = 0;
for (int i = 0; i < number; i++) {
if (n[i] == m[i]) {
cnt++;
}else if(n[i] != m[i]) {
cnt = 0;
}
if (cnt == 3) {
System.out.println("Yes");
return;
}
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
29,
30,
0,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
32,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
54,
61
],
[
43,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
6,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n final int N = sc.nextInt();\n \n int count = 0;\n \n for (int i = 0; i < N; i++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n if (d1 == d2) {\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n } else {\n count = 0;\n }\n }\n System.out.println(\"No\");\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n final int N = sc.nextInt();\n \n int count = 0;\n \n for (int i = 0; i < N; i++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n if (d1 == d2) {\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n } else {\n count = 0;\n }\n }\n System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n final int N = sc.nextInt();\n \n int count = 0;\n \n for (int i = 0; i < N; i++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n if (d1 == d2) {\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n } else {\n count = 0;\n }\n }\n System.out.println(\"No\");\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n \n final int N = sc.nextInt();\n \n int count = 0;\n \n for (int i = 0; i < N; i++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n if (d1 == d2) {\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n } else {\n count = 0;\n }\n }\n System.out.println(\"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"final int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < N; i++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n if (d1 == d2) {\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n } else {\n count = 0;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n if (d1 == d2) {\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n } else {\n count = 0;\n }\n }",
"{\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n if (d1 == d2) {\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n } else {\n count = 0;\n }\n }",
"int d1 = sc.nextInt();",
"d1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int d2 = sc.nextInt();",
"d2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (d1 == d2) {\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n } else {\n count = 0;\n }",
"d1 == d2",
"d1",
"d2",
"{\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"count++",
"count",
"if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }",
"count == 3",
"count",
"3",
"{\n System.out.println(\"Yes\");\n return;\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"return;",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n final int N = sc.nextInt();\n \n int count = 0;\n \n for (int i = 0; i < N; i++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n if (d1 == d2) {\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n } else {\n count = 0;\n }\n }\n System.out.println(\"No\");\n }\n}",
"public class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n \n final int N = sc.nextInt();\n \n int count = 0;\n \n for (int i = 0; i < N; i++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n \n if (d1 == d2) {\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n } else {\n count = 0;\n }\n }\n System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
final int N = sc.nextInt();
int count = 0;
for (int i = 0; i < N; i++) {
int d1 = sc.nextInt();
int d2 = sc.nextInt();
if (d1 == d2) {
count++;
if (count == 3) {
System.out.println("Yes");
return;
}
} else {
count = 0;
}
}
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
17,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
2,
18,
18,
13,
2,
13,
17,
17,
18,
18,
13,
2,
13,
17,
17,
30,
0,
13,
17,
3,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
132,
5
],
[
132,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
22,
27
],
[
27,
28
],
[
27,
29
],
[
22,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
34,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
34,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
44,
50
],
[
50,
51
],
[
51,
52
],
[
8,
53
],
[
53,
54
],
[
53,
55
],
[
8,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
56,
66
],
[
66,
67
],
[
67,
68
],
[
56,
69
],
[
70,
70
],
[
70,
71
],
[
71,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
73,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
85,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
93,
99
],
[
73,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
101,
107
],
[
100,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
71,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
8,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
8,
126
],
[
126,
127
],
[
127,
128
],
[
6,
129
],
[
129,
130
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
]
| [
"import java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int a[][] = new int[N][2];\n for(int i = 0; i < N; i++){\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }\n\n String ans = \"No\";\n\n for(int i = 0; i < N - 2; i++){\n if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){\n ans = \"Yes\";\n break;\n }\n }\n\n System.out.println(ans);\n\n sc.close();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int a[][] = new int[N][2];\n for(int i = 0; i < N; i++){\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }\n\n String ans = \"No\";\n\n for(int i = 0; i < N - 2; i++){\n if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){\n ans = \"Yes\";\n break;\n }\n }\n\n System.out.println(ans);\n\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int a[][] = new int[N][2];\n for(int i = 0; i < N; i++){\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }\n\n String ans = \"No\";\n\n for(int i = 0; i < N - 2; i++){\n if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){\n ans = \"Yes\";\n break;\n }\n }\n\n System.out.println(ans);\n\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int a[][] = new int[N][2];\n for(int i = 0; i < N; i++){\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }\n\n String ans = \"No\";\n\n for(int i = 0; i < N - 2; i++){\n if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){\n ans = \"Yes\";\n break;\n }\n }\n\n System.out.println(ans);\n\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a[][] = new int[N][2];",
"a",
"new int[N][2]",
"N",
"2",
"for(int i = 0; i < N; i++){\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }",
"{\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }",
"a[i][0] = sc.nextInt()",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a[i][1] = sc.nextInt()",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String ans = \"No\";",
"ans",
"\"No\"",
"for(int i = 0; i < N - 2; i++){\n if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){\n ans = \"Yes\";\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N - 2",
"i",
"N - 2",
"N",
"2",
"i++",
"i++",
"i",
"{\n if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){\n ans = \"Yes\";\n break;\n }\n }",
"{\n if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){\n ans = \"Yes\";\n break;\n }\n }",
"if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){\n ans = \"Yes\";\n break;\n }",
"a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]",
"a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]",
"a[i][0] == a[i][1]",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"a[i+1][0] == a[i+1][1]",
"a[i+1][0]",
"a[i+1]",
"a",
"i+1",
"i",
"1",
"0",
"a[i+1][1]",
"a[i+1]",
"a",
"i+1",
"i",
"1",
"1",
"a[i+2][0] == a[i+2][1]",
"a[i+2][0]",
"a[i+2]",
"a",
"i+2",
"i",
"2",
"0",
"a[i+2][1]",
"a[i+2]",
"a",
"i+2",
"i",
"2",
"1",
"{\n ans = \"Yes\";\n break;\n }",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"break;",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int a[][] = new int[N][2];\n for(int i = 0; i < N; i++){\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }\n\n String ans = \"No\";\n\n for(int i = 0; i < N - 2; i++){\n if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){\n ans = \"Yes\";\n break;\n }\n }\n\n System.out.println(ans);\n\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n\n int a[][] = new int[N][2];\n for(int i = 0; i < N; i++){\n a[i][0] = sc.nextInt();\n a[i][1] = sc.nextInt();\n }\n\n String ans = \"No\";\n\n for(int i = 0; i < N - 2; i++){\n if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){\n ans = \"Yes\";\n break;\n }\n }\n\n System.out.println(ans);\n\n sc.close();\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int a[][] = new int[N][2];
for(int i = 0; i < N; i++){
a[i][0] = sc.nextInt();
a[i][1] = sc.nextInt();
}
String ans = "No";
for(int i = 0; i < N - 2; i++){
if(a[i][0] == a[i][1] && a[i+1][0] == a[i+1][1] && a[i+2][0] == a[i+2][1]){
ans = "Yes";
break;
}
}
System.out.println(ans);
sc.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
13,
17,
0,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
36,
5
],
[
36,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
6,
33
],
[
33,
34
],
[
0,
35
],
[
35,
36
],
[
35,
37
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tif(a<1) a = 1;\n\t\telse a = 0;\n\t\tSystem.out.println(a);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tif(a<1) a = 1;\n\t\telse a = 0;\n\t\tSystem.out.println(a);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tif(a<1) a = 1;\n\t\telse a = 0;\n\t\tSystem.out.println(a);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tif(a<1) a = 1;\n\t\telse a = 0;\n\t\tSystem.out.println(a);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a<1) a = 1;\n\t\telse a = 0;",
"a<1",
"a",
"1",
"a = 1",
"a",
"1",
"a = 0",
"a",
"0",
"System.out.println(a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tif(a<1) a = 1;\n\t\telse a = 0;\n\t\tSystem.out.println(a);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint a = sc.nextInt();\n\t\tif(a<1) a = 1;\n\t\telse a = 0;\n\t\tSystem.out.println(a);\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
if(a<1) a = 1;
else a = 0;
System.out.println(a);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
8,
2,
13,
17,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
34,
5
],
[
34,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
25,
29
],
[
25,
30
],
[
6,
31
],
[
31,
32
],
[
0,
33
],
[
33,
34
],
[
33,
35
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint x = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\t// 結果の出力\n\t\tSystem.out.println(x == 0? 1 : 0);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint x = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\t// 結果の出力\n\t\tSystem.out.println(x == 0? 1 : 0);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint x = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\t// 結果の出力\n\t\tSystem.out.println(x == 0? 1 : 0);\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint x = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\t// 結果の出力\n\t\tSystem.out.println(x == 0? 1 : 0);\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int x = sc.nextInt();",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.close()",
"sc.close",
"sc",
"System.out.println(x == 0? 1 : 0)",
"System.out.println",
"System.out",
"System",
"System.out",
"x == 0? 1 : 0",
"x == 0",
"x",
"0",
"1",
"0",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint x = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\t// 結果の出力\n\t\tSystem.out.println(x == 0? 1 : 0);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\n\t\t// 入力値の取得\n\t\tint x = sc.nextInt();\n\t\tsc.close();\n\t\t\n\t\t// 結果の出力\n\t\tSystem.out.println(x == 0? 1 : 0);\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// 入力値の取得
int x = sc.nextInt();
sc.close();
// 結果の出力
System.out.println(x == 0? 1 : 0);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
17,
0,
13,
17,
12,
13,
30,
14,
4,
18,
17,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
29,
2,
13,
13,
12,
13,
30,
40,
13,
23,
13,
12,
13,
30
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
22,
23
],
[
14,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
27,
28
],
[
28,
29
],
[
12,
30
],
[
30,
31
],
[
0,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
32,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
44,
46
],
[
32,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
50,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
50,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
47,
67
],
[
67,
68
],
[
32,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
32,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
76,
81
],
[
81,
82
],
[
32,
83
],
[
83,
84
],
[
83,
85
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tSolver solver = new Solver();\n\t\tsolver.init();\n\t\tsolver.readHead(in.readLine());\n\t\t// for (; solver.hasNext();) {\n\t\t// solver.readBody(in.readLine());\n\t\t// }\n\t\t// solver.solve();\n\t}\n}\n\nclass Solver {\n\tint N;\n\tint cnt;\n\n\tpublic void init() {\n\t\tN = 0;\n\t\tcnt = 0;\n\t}\n\n\tpublic void readHead(String str) {\n\t\t// String[] strArr = str.split(\"\\\\s+\");\n\t\t// N = Integer.parseInt(strArr[0]);\n\t\t// System.out.println(N);\n\t\tif (\"0\".equals(str))\n\t\t\tSystem.out.println(\"1\");\n\t\telse\n\t\t\tSystem.out.println(\"0\");\n\t}\n\n\tpublic boolean hasNext() {\n\t\treturn cnt < N;\n\t}\n\n\tpublic void readBody(String str) {\n\t\t// System.out.println(str);\n\t\tcnt++;\n\t}\n\n\tpublic void solve() {\n\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"class Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tSolver solver = new Solver();\n\t\tsolver.init();\n\t\tsolver.readHead(in.readLine());\n\t\t// for (; solver.hasNext();) {\n\t\t// solver.readBody(in.readLine());\n\t\t// }\n\t\t// solver.solve();\n\t}\n}",
"Main",
"public static void main(String args[]) throws IOException {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tSolver solver = new Solver();\n\t\tsolver.init();\n\t\tsolver.readHead(in.readLine());\n\t\t// for (; solver.hasNext();) {\n\t\t// solver.readBody(in.readLine());\n\t\t// }\n\t\t// solver.solve();\n\t}",
"main",
"{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tSolver solver = new Solver();\n\t\tsolver.init();\n\t\tsolver.readHead(in.readLine());\n\t\t// for (; solver.hasNext();) {\n\t\t// solver.readBody(in.readLine());\n\t\t// }\n\t\t// solver.solve();\n\t}",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"Solver solver = new Solver();",
"solver",
"new Solver()",
"solver.init()",
"solver.init",
"solver",
"solver.readHead(in.readLine())",
"solver.readHead",
"solver",
"in.readLine()",
"in.readLine",
"in",
"String args[]",
"args",
"class Solver {\n\tint N;\n\tint cnt;\n\n\tpublic void init() {\n\t\tN = 0;\n\t\tcnt = 0;\n\t}\n\n\tpublic void readHead(String str) {\n\t\t// String[] strArr = str.split(\"\\\\s+\");\n\t\t// N = Integer.parseInt(strArr[0]);\n\t\t// System.out.println(N);\n\t\tif (\"0\".equals(str))\n\t\t\tSystem.out.println(\"1\");\n\t\telse\n\t\t\tSystem.out.println(\"0\");\n\t}\n\n\tpublic boolean hasNext() {\n\t\treturn cnt < N;\n\t}\n\n\tpublic void readBody(String str) {\n\t\t// System.out.println(str);\n\t\tcnt++;\n\t}\n\n\tpublic void solve() {\n\n\t}\n}",
"Solver",
"int N;",
"N",
"int cnt;",
"cnt",
"public void init() {\n\t\tN = 0;\n\t\tcnt = 0;\n\t}",
"init",
"{\n\t\tN = 0;\n\t\tcnt = 0;\n\t}",
"N = 0",
"N",
"0",
"cnt = 0",
"cnt",
"0",
"public void readHead(String str) {\n\t\t// String[] strArr = str.split(\"\\\\s+\");\n\t\t// N = Integer.parseInt(strArr[0]);\n\t\t// System.out.println(N);\n\t\tif (\"0\".equals(str))\n\t\t\tSystem.out.println(\"1\");\n\t\telse\n\t\t\tSystem.out.println(\"0\");\n\t}",
"readHead",
"{\n\t\t// String[] strArr = str.split(\"\\\\s+\");\n\t\t// N = Integer.parseInt(strArr[0]);\n\t\t// System.out.println(N);\n\t\tif (\"0\".equals(str))\n\t\t\tSystem.out.println(\"1\");\n\t\telse\n\t\t\tSystem.out.println(\"0\");\n\t}",
"if (\"0\".equals(str))\n\t\t\tSystem.out.println(\"1\");\n\t\telse\n\t\t\tSystem.out.println(\"0\");",
"\"0\".equals(str)",
"\"0\".equals",
"\"0\"",
"str",
"System.out.println(\"1\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"1\"",
"System.out.println(\"0\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"0\"",
"String str",
"str",
"public boolean hasNext() {\n\t\treturn cnt < N;\n\t}",
"hasNext",
"{\n\t\treturn cnt < N;\n\t}",
"return cnt < N;",
"cnt < N",
"cnt",
"N",
"public void readBody(String str) {\n\t\t// System.out.println(str);\n\t\tcnt++;\n\t}",
"readBody",
"{\n\t\t// System.out.println(str);\n\t\tcnt++;\n\t}",
"cnt++",
"cnt",
"String str",
"str",
"public void solve() {\n\n\t}",
"solve",
"{\n\n\t}"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main {
public static void main(String args[]) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
Solver solver = new Solver();
solver.init();
solver.readHead(in.readLine());
// for (; solver.hasNext();) {
// solver.readBody(in.readLine());
// }
// solver.solve();
}
}
class Solver {
int N;
int cnt;
public void init() {
N = 0;
cnt = 0;
}
public void readHead(String str) {
// String[] strArr = str.split("\\s+");
// N = Integer.parseInt(strArr[0]);
// System.out.println(N);
if ("0".equals(str))
System.out.println("1");
else
System.out.println("0");
}
public boolean hasNext() {
return cnt < N;
}
public void readBody(String str) {
// System.out.println(str);
cnt++;
}
public void solve() {
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
46,
11
],
[
46,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
12,
43
],
[
43,
44
],
[
0,
45
],
[
45,
46
],
[
45,
47
]
]
| [
"/* package whatever; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\npublic class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tif(x == 1)\n\t\t\tSystem.out.println(0);\n\t\telse if(x == 0)\n\t\t\tSystem.out.println(1);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tif(x == 1)\n\t\t\tSystem.out.println(0);\n\t\telse if(x == 0)\n\t\t\tSystem.out.println(1);\n\t}\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tif(x == 1)\n\t\t\tSystem.out.println(0);\n\t\telse if(x == 0)\n\t\t\tSystem.out.println(1);\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tif(x == 1)\n\t\t\tSystem.out.println(0);\n\t\telse if(x == 0)\n\t\t\tSystem.out.println(1);\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int x = scanner.nextInt();",
"x",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if(x == 1)\n\t\t\tSystem.out.println(0);\n\t\telse if(x == 0)\n\t\t\tSystem.out.println(1);",
"x == 1",
"x",
"1",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"if(x == 0)\n\t\t\tSystem.out.println(1);",
"x == 0",
"x",
"0",
"System.out.println(1)",
"System.out.println",
"System.out",
"System",
"System.out",
"1",
"String[] args",
"args",
"public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tif(x == 1)\n\t\t\tSystem.out.println(0);\n\t\telse if(x == 0)\n\t\t\tSystem.out.println(1);\n\t}\n}",
"public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint x = scanner.nextInt();\n\t\tif(x == 1)\n\t\t\tSystem.out.println(0);\n\t\telse if(x == 0)\n\t\t\tSystem.out.println(1);\n\t}\n}",
"Main"
]
| /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
public class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner scanner = new Scanner(System.in);
int x = scanner.nextInt();
if(x == 1)
System.out.println(0);
else if(x == 0)
System.out.println(1);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
14,
2,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
13,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
39,
5
],
[
39,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
17,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
6,
36
],
[
36,
37
],
[
0,
38
],
[
38,
39
],
[
38,
40
]
]
| [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\t//ABC081A\n\t\tScanner sc = new Scanner(System.in);\n\t\t// スペース区切りの整数の入力\n\t\tint a = sc.nextInt();\n\t\tint out = 0;\n\n\t\tif( a == 0) out =1;\n\t\t// 出力\n\t\tSystem.out.println(out);\n\n\t\tsc.close();\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t//ABC081A\n\t\tScanner sc = new Scanner(System.in);\n\t\t// スペース区切りの整数の入力\n\t\tint a = sc.nextInt();\n\t\tint out = 0;\n\n\t\tif( a == 0) out =1;\n\t\t// 出力\n\t\tSystem.out.println(out);\n\n\t\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t//ABC081A\n\t\tScanner sc = new Scanner(System.in);\n\t\t// スペース区切りの整数の入力\n\t\tint a = sc.nextInt();\n\t\tint out = 0;\n\n\t\tif( a == 0) out =1;\n\t\t// 出力\n\t\tSystem.out.println(out);\n\n\t\tsc.close();\n\t}",
"main",
"{\n\t\t//ABC081A\n\t\tScanner sc = new Scanner(System.in);\n\t\t// スペース区切りの整数の入力\n\t\tint a = sc.nextInt();\n\t\tint out = 0;\n\n\t\tif( a == 0) out =1;\n\t\t// 出力\n\t\tSystem.out.println(out);\n\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int out = 0;",
"out",
"0",
"if( a == 0) out =1;",
"a == 0",
"a",
"0",
"out =1",
"out",
"1",
"System.out.println(out)",
"System.out.println",
"System.out",
"System",
"System.out",
"out",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t//ABC081A\n\t\tScanner sc = new Scanner(System.in);\n\t\t// スペース区切りの整数の入力\n\t\tint a = sc.nextInt();\n\t\tint out = 0;\n\n\t\tif( a == 0) out =1;\n\t\t// 出力\n\t\tSystem.out.println(out);\n\n\t\tsc.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\t//ABC081A\n\t\tScanner sc = new Scanner(System.in);\n\t\t// スペース区切りの整数の入力\n\t\tint a = sc.nextInt();\n\t\tint out = 0;\n\n\t\tif( a == 0) out =1;\n\t\t// 出力\n\t\tSystem.out.println(out);\n\n\t\tsc.close();\n\t}\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
//ABC081A
Scanner sc = new Scanner(System.in);
// スペース区切りの整数の入力
int a = sc.nextInt();
int out = 0;
if( a == 0) out =1;
// 出力
System.out.println(out);
sc.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
42,
40,
4,
18,
13,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
160,
17
],
[
160,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
20,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
29,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
18,
50
],
[
50,
51
],
[
160,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
63,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
68,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
62,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
52,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
52,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
99,
104
],
[
104,
105
],
[
104,
106
],
[
99,
107
],
[
107,
108
],
[
108,
109
],
[
99,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
94,
117
],
[
117,
118
],
[
92,
119
],
[
119,
120
],
[
52,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
128,
129
],
[
52,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
132,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
137,
142
],
[
142,
143
],
[
142,
144
],
[
137,
145
],
[
145,
146
],
[
146,
147
],
[
137,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
153,
154
],
[
132,
155
],
[
155,
156
],
[
130,
157
],
[
157,
158
],
[
0,
159
],
[
159,
160
],
[
159,
161
]
]
| [
"//package csesCodes;// template code for cp;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) throws InterruptedException {\n FastScanner fs=new FastScanner();\n int x=fs.nextInt();\n if(x==1)\n System.out.println( 0);\n else if(x==0){\n System.out.println(1);\n }\n\n\n\n }\n\n\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n\n public String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] readLongArray(int n) {\n long[] a=new long[n];\n for (int i=0; i<n; i++) a[i]=nextLong();\n return a;\n }\n }\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) throws InterruptedException {\n FastScanner fs=new FastScanner();\n int x=fs.nextInt();\n if(x==1)\n System.out.println( 0);\n else if(x==0){\n System.out.println(1);\n }\n\n\n\n }\n\n\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n\n public String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] readLongArray(int n) {\n long[] a=new long[n];\n for (int i=0; i<n; i++) a[i]=nextLong();\n return a;\n }\n }\n\n}",
"Main",
"public static void main(String[] args) throws InterruptedException {\n FastScanner fs=new FastScanner();\n int x=fs.nextInt();\n if(x==1)\n System.out.println( 0);\n else if(x==0){\n System.out.println(1);\n }\n\n\n\n }",
"main",
"{\n FastScanner fs=new FastScanner();\n int x=fs.nextInt();\n if(x==1)\n System.out.println( 0);\n else if(x==0){\n System.out.println(1);\n }\n\n\n\n }",
"FastScanner fs=new FastScanner();",
"fs",
"new FastScanner()",
"int x=fs.nextInt();",
"x",
"fs.nextInt()",
"fs.nextInt",
"fs",
"if(x==1)\n System.out.println( 0);\n else if(x==0){\n System.out.println(1);\n }",
"x==1",
"x",
"1",
"System.out.println( 0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"if(x==0){\n System.out.println(1);\n }",
"x==0",
"x",
"0",
"{\n System.out.println(1);\n }",
"System.out.println(1)",
"System.out.println",
"System.out",
"System",
"System.out",
"1",
"String[] args",
"args",
"static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n\n public String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] readLongArray(int n) {\n long[] a=new long[n];\n for (int i=0; i<n; i++) a[i]=nextLong();\n return a;\n }\n }",
"FastScanner",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"StringTokenizer st=new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"public String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n\n }",
"next",
"{\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n\n }",
"while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st=new StringTokenizer(br.readLine());\n }",
"st=new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"public int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"public int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }",
"readArray",
"{\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }",
"int[] a=new int[n];",
"a",
"new int[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextInt();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextInt();",
"a[i]=nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public long[] readLongArray(int n) {\n long[] a=new long[n];\n for (int i=0; i<n; i++) a[i]=nextLong();\n return a;\n }",
"readLongArray",
"{\n long[] a=new long[n];\n for (int i=0; i<n; i++) a[i]=nextLong();\n return a;\n }",
"long[] a=new long[n];",
"a",
"new long[n]",
"n",
"for (int i=0; i<n; i++) a[i]=nextLong();",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"a[i]=nextLong();",
"a[i]=nextLong()",
"a[i]",
"a",
"i",
"nextLong()",
"nextLong",
"return a;",
"a",
"int n",
"n",
"public class Main {\n\n public static void main(String[] args) throws InterruptedException {\n FastScanner fs=new FastScanner();\n int x=fs.nextInt();\n if(x==1)\n System.out.println( 0);\n else if(x==0){\n System.out.println(1);\n }\n\n\n\n }\n\n\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n\n public String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] readLongArray(int n) {\n long[] a=new long[n];\n for (int i=0; i<n; i++) a[i]=nextLong();\n return a;\n }\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) throws InterruptedException {\n FastScanner fs=new FastScanner();\n int x=fs.nextInt();\n if(x==1)\n System.out.println( 0);\n else if(x==0){\n System.out.println(1);\n }\n\n\n\n }\n\n\n\n\n static class FastScanner {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n StringTokenizer st=new StringTokenizer(\"\");\n\n public String next() {\n while (!st.hasMoreTokens())\n try {\n st=new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n return st.nextToken();\n\n }\n\n public int nextInt() {\n return Integer.parseInt(next());\n }\n\n public int[] readArray(int n) {\n int[] a=new int[n];\n for (int i=0; i<n; i++) a[i]=nextInt();\n return a;\n }\n\n public long nextLong() {\n return Long.parseLong(next());\n }\n\n public long[] readLongArray(int n) {\n long[] a=new long[n];\n for (int i=0; i<n; i++) a[i]=nextLong();\n return a;\n }\n }\n\n}",
"Main"
]
| //package csesCodes;// template code for cp;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] args) throws InterruptedException {
FastScanner fs=new FastScanner();
int x=fs.nextInt();
if(x==1)
System.out.println( 0);
else if(x==0){
System.out.println(1);
}
}
static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
public String next() {
while (!st.hasMoreTokens())
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
public int[] readArray(int n) {
int[] a=new int[n];
for (int i=0; i<n; i++) a[i]=nextInt();
return a;
}
public long nextLong() {
return Long.parseLong(next());
}
public long[] readLongArray(int n) {
long[] a=new long[n];
for (int i=0; i<n; i++) a[i]=nextLong();
return a;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
4,
18,
13,
8,
2,
13,
17,
17,
17,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
142,
11
],
[
142,
12
],
[
12,
13
],
[
142,
14
],
[
14,
15
],
[
142,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
22,
23
],
[
22,
24
],
[
18,
25
],
[
25,
26
],
[
25,
27
],
[
18,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
28,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
42,
47
],
[
18,
48
],
[
48,
49
],
[
49,
50
],
[
16,
51
],
[
51,
52
],
[
142,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
53,
57
],
[
57,
58
],
[
53,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
53,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
68,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
78,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
67,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
53,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
100,
101
],
[
53,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
109,
110
],
[
53,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
118,
119
],
[
53,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
126,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
122,
139
],
[
139,
140
],
[
0,
141
],
[
141,
142
],
[
141,
143
]
]
| [
"import java.io.*;\nimport java.util.*;\nimport java.lang.*;\n\npublic class Main {\n public static MyScanner scan;\n public static PrintWriter out;\n public static void main(String[] args) {\n scan=new MyScanner();\n out=new PrintWriter(new BufferedOutputStream(System.out));\n\n int t=1;\n// int t=scan.nextInt();\n while(t-->0) {\n\n int x=scan.nextInt();\n out.println((x==1)?0:1);\n\n }\n out.close();\n }\n\n\n\n //scanner\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"public class Main {\n public static MyScanner scan;\n public static PrintWriter out;\n public static void main(String[] args) {\n scan=new MyScanner();\n out=new PrintWriter(new BufferedOutputStream(System.out));\n\n int t=1;\n// int t=scan.nextInt();\n while(t-->0) {\n\n int x=scan.nextInt();\n out.println((x==1)?0:1);\n\n }\n out.close();\n }\n\n\n\n //scanner\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"Main",
"public static MyScanner scan;",
"scan",
"public static PrintWriter out;",
"out",
"public static void main(String[] args) {\n scan=new MyScanner();\n out=new PrintWriter(new BufferedOutputStream(System.out));\n\n int t=1;\n// int t=scan.nextInt();\n while(t-->0) {\n\n int x=scan.nextInt();\n out.println((x==1)?0:1);\n\n }\n out.close();\n }",
"main",
"{\n scan=new MyScanner();\n out=new PrintWriter(new BufferedOutputStream(System.out));\n\n int t=1;\n// int t=scan.nextInt();\n while(t-->0) {\n\n int x=scan.nextInt();\n out.println((x==1)?0:1);\n\n }\n out.close();\n }",
"scan=new MyScanner()",
"scan",
"new MyScanner()",
"out=new PrintWriter(new BufferedOutputStream(System.out))",
"out",
"new PrintWriter(new BufferedOutputStream(System.out))",
"int t=1;",
"t",
"1",
"while(t-->0) {\n\n int x=scan.nextInt();\n out.println((x==1)?0:1);\n\n }",
"t-->0",
"t--",
"t",
"0",
"{\n\n int x=scan.nextInt();\n out.println((x==1)?0:1);\n\n }",
"int x=scan.nextInt();",
"x",
"scan.nextInt()",
"scan.nextInt",
"scan",
"out.println((x==1)?0:1)",
"out.println",
"out",
"(x==1)?0:1",
"(x==1)",
"x",
"1",
"0",
"1",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }",
"MyScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"MyScanner",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());\n }",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() {\n return Integer.parseInt(next());\n }",
"nextInt",
"{\n return Integer.parseInt(next());\n }",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n return Long.parseLong(next());\n }",
"nextLong",
"{\n return Long.parseLong(next());\n }",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble() {\n return Double.parseDouble(next());\n }",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"nextLine",
"{\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }",
"String str = \"\";",
"str",
"\"\"",
"try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }",
"catch (IOException e) {\n e.printStackTrace();\n }",
"IOException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n str = br.readLine();\n }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n public static MyScanner scan;\n public static PrintWriter out;\n public static void main(String[] args) {\n scan=new MyScanner();\n out=new PrintWriter(new BufferedOutputStream(System.out));\n\n int t=1;\n// int t=scan.nextInt();\n while(t-->0) {\n\n int x=scan.nextInt();\n out.println((x==1)?0:1);\n\n }\n out.close();\n }\n\n\n\n //scanner\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"public class Main {\n public static MyScanner scan;\n public static PrintWriter out;\n public static void main(String[] args) {\n scan=new MyScanner();\n out=new PrintWriter(new BufferedOutputStream(System.out));\n\n int t=1;\n// int t=scan.nextInt();\n while(t-->0) {\n\n int x=scan.nextInt();\n out.println((x==1)?0:1);\n\n }\n out.close();\n }\n\n\n\n //scanner\n public static class MyScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public MyScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String next() {\n while (st == null || !st.hasMoreElements()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return st.nextToken();\n }\n\n int nextInt() {\n return Integer.parseInt(next());\n }\n\n long nextLong() {\n return Long.parseLong(next());\n }\n\n double nextDouble() {\n return Double.parseDouble(next());\n }\n\n String nextLine() {\n String str = \"\";\n try {\n str = br.readLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return str;\n }\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
import java.lang.*;
public class Main {
public static MyScanner scan;
public static PrintWriter out;
public static void main(String[] args) {
scan=new MyScanner();
out=new PrintWriter(new BufferedOutputStream(System.out));
int t=1;
// int t=scan.nextInt();
while(t-->0) {
int x=scan.nextInt();
out.println((x==1)?0:1);
}
out.close();
}
//scanner
public static class MyScanner {
BufferedReader br;
StringTokenizer st;
public MyScanner() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
double nextDouble() {
return Double.parseDouble(next());
}
String nextLine() {
String str = "";
try {
str = br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return str;
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
44,
5
],
[
44,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
23,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
6,
41
],
[
41,
42
],
[
0,
43
],
[
43,
44
],
[
43,
45
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n \n public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n int x = Integer.parseInt(scanner.next());\n scanner.close();\n\n if (x == 0){\n System.out.println(1);\n } else {\n System.out.println(0);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n \n public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n int x = Integer.parseInt(scanner.next());\n scanner.close();\n\n if (x == 0){\n System.out.println(1);\n } else {\n System.out.println(0);\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n int x = Integer.parseInt(scanner.next());\n scanner.close();\n\n if (x == 0){\n System.out.println(1);\n } else {\n System.out.println(0);\n }\n }",
"main",
"{\n\n Scanner scanner = new Scanner(System.in);\n int x = Integer.parseInt(scanner.next());\n scanner.close();\n\n if (x == 0){\n System.out.println(1);\n } else {\n System.out.println(0);\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"int x = Integer.parseInt(scanner.next());",
"x",
"Integer.parseInt(scanner.next())",
"Integer.parseInt",
"Integer",
"scanner.next()",
"scanner.next",
"scanner",
"scanner.close()",
"scanner.close",
"scanner",
"if (x == 0){\n System.out.println(1);\n } else {\n System.out.println(0);\n }",
"x == 0",
"x",
"0",
"{\n System.out.println(1);\n }",
"System.out.println(1)",
"System.out.println",
"System.out",
"System",
"System.out",
"1",
"{\n System.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"String[] args",
"args",
"public class Main {\n \n public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n int x = Integer.parseInt(scanner.next());\n scanner.close();\n\n if (x == 0){\n System.out.println(1);\n } else {\n System.out.println(0);\n }\n }\n}",
"public class Main {\n \n public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n int x = Integer.parseInt(scanner.next());\n scanner.close();\n\n if (x == 0){\n System.out.println(1);\n } else {\n System.out.println(0);\n }\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int x = Integer.parseInt(scanner.next());
scanner.close();
if (x == 0){
System.out.println(1);
} else {
System.out.println(0);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
14,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
34,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
12,
45
],
[
45,
46
]
]
| [
"import java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\nclass Main{\n\tpublic static void main(String[] args) {\n\t Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n if(n==0){\n System.out.println(\"1\");\n }\n if(n==1){\n System.out.println(\"0\");\n }\n \n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main{\n\tpublic static void main(String[] args) {\n\t Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n if(n==0){\n System.out.println(\"1\");\n }\n if(n==1){\n System.out.println(\"0\");\n }\n \n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n if(n==0){\n System.out.println(\"1\");\n }\n if(n==1){\n System.out.println(\"0\");\n }\n \n\t}",
"main",
"{\n\t Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n if(n==0){\n System.out.println(\"1\");\n }\n if(n==1){\n System.out.println(\"0\");\n }\n \n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(n==0){\n System.out.println(\"1\");\n }",
"n==0",
"n",
"0",
"{\n System.out.println(\"1\");\n }",
"System.out.println(\"1\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"1\"",
"if(n==1){\n System.out.println(\"0\");\n }",
"n==1",
"n",
"1",
"{\n System.out.println(\"0\");\n }",
"System.out.println(\"0\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"0\"",
"String[] args",
"args"
]
| import java.util.*;
import java.lang.*;
import java.io.*;
class Main{
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
if(n==0){
System.out.println("1");
}
if(n==1){
System.out.println("0");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
13,
17,
17,
30,
0,
13,
2,
2,
13,
13,
13,
40,
13,
30,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
13,
17,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
13,
13,
2,
13,
17,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
2,
13,
17,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
13,
13,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
20,
2,
17,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
18,
13,
13,
12,
13,
30,
14,
2,
13,
17,
37,
20,
14,
2,
13,
13,
30,
0,
13,
17,
0,
13,
4,
18,
13,
13,
14,
2,
13,
17,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
37,
20,
29,
2,
13,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
37,
20,
29,
2,
13,
13,
12,
13,
30,
41,
13,
17,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
42,
2,
40,
4,
13,
13,
2,
13,
17,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
37,
20,
14,
2,
13,
17,
30,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
0,
13,
17,
0,
13,
2,
2,
13,
17,
13,
0,
13,
4,
13,
37,
20,
29,
2,
13,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
13,
42,
4,
13,
13,
0,
13,
4,
13,
42,
40,
4,
13,
13,
30,
4,
18,
13,
13,
0,
13,
4,
13,
29,
4,
18,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
36,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
36,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
36,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
36,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
36,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
36,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
36,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
36,
29,
13,
23,
13,
12,
13,
30,
14,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
29,
17,
29,
17,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
4,
18,
13,
2,
13,
17,
23,
13,
12,
13,
30,
4,
13,
13,
4,
18,
13,
17,
23,
13,
12,
13,
30,
4,
18,
13,
12,
13,
30,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
817,
11
],
[
817,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
14,
16
],
[
817,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
28,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
34,
42
],
[
42,
43
],
[
28,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
44,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
19,
57
],
[
57,
58
],
[
17,
59
],
[
59,
60
],
[
17,
61
],
[
61,
62
],
[
817,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
67,
70
],
[
70,
71
],
[
70,
72
],
[
63,
73
],
[
73,
74
],
[
817,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
83,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
75,
92
],
[
92,
93
],
[
75,
94
],
[
94,
95
],
[
817,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
98,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
107,
110
],
[
110,
111
],
[
110,
112
],
[
96,
113
],
[
113,
114
],
[
96,
115
],
[
115,
116
],
[
817,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
119,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
128,
129
],
[
128,
130
],
[
117,
131
],
[
131,
132
],
[
117,
133
],
[
133,
134
],
[
817,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
137,
141
],
[
141,
142
],
[
141,
143
],
[
137,
144
],
[
144,
145
],
[
144,
146
],
[
137,
147
],
[
147,
148
],
[
148,
149
],
[
147,
150
],
[
147,
151
],
[
137,
152
],
[
152,
153
],
[
153,
154
],
[
137,
155
],
[
155,
156
],
[
156,
157
],
[
135,
158
],
[
158,
159
],
[
817,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
162,
164
],
[
165,
166
],
[
165,
167
],
[
160,
168
],
[
168,
169
],
[
160,
170
],
[
170,
171
],
[
160,
172
],
[
172,
173
],
[
160,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
179,
181
],
[
160,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
185,
189
],
[
189,
190
],
[
184,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
191,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
195,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
201,
204
],
[
195,
205
],
[
205,
206
],
[
206,
207
],
[
206,
208
],
[
205,
209
],
[
209,
210
],
[
210,
211
],
[
184,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
160,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
219,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
219,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
219,
235
],
[
235,
236
],
[
235,
237
],
[
219,
238
],
[
238,
239
],
[
239,
240
],
[
239,
241
],
[
238,
242
],
[
242,
243
],
[
243,
244
],
[
243,
245
],
[
245,
246
],
[
242,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
219,
251
],
[
251,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
251,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
259,
260
],
[
259,
261
],
[
258,
262
],
[
262,
263
],
[
262,
264
],
[
257,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
265,
269
],
[
269,
270
],
[
269,
271
],
[
271,
272
],
[
271,
273
],
[
265,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
257,
278
],
[
278,
279
],
[
219,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
160,
284
],
[
284,
285
],
[
284,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
286,
290
],
[
290,
291
],
[
290,
292
],
[
292,
293
],
[
286,
294
],
[
294,
295
],
[
295,
296
],
[
295,
297
],
[
294,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
286,
302
],
[
302,
303
],
[
302,
304
],
[
286,
305
],
[
305,
306
],
[
306,
307
],
[
306,
308
],
[
305,
309
],
[
309,
310
],
[
310,
311
],
[
310,
312
],
[
312,
313
],
[
309,
314
],
[
314,
315
],
[
314,
316
],
[
316,
317
],
[
286,
318
],
[
318,
319
],
[
319,
320
],
[
320,
321
],
[
320,
322
],
[
318,
323
],
[
323,
324
],
[
324,
325
],
[
325,
326
],
[
326,
327
],
[
326,
328
],
[
325,
329
],
[
329,
330
],
[
329,
331
],
[
324,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
332,
336
],
[
336,
337
],
[
336,
338
],
[
338,
339
],
[
338,
340
],
[
332,
341
],
[
341,
342
],
[
341,
343
],
[
343,
344
],
[
324,
345
],
[
345,
346
],
[
286,
347
],
[
347,
348
],
[
348,
349
],
[
348,
350
],
[
160,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
354,
355
],
[
354,
356
],
[
353,
357
],
[
357,
358
],
[
357,
359
],
[
359,
360
],
[
353,
361
],
[
361,
362
],
[
362,
363
],
[
362,
364
],
[
361,
365
],
[
365,
366
],
[
365,
367
],
[
367,
368
],
[
353,
369
],
[
369,
370
],
[
369,
371
],
[
353,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
372,
376
],
[
376,
377
],
[
377,
378
],
[
377,
379
],
[
379,
380
],
[
376,
381
],
[
381,
382
],
[
381,
383
],
[
383,
384
],
[
353,
385
],
[
385,
386
],
[
386,
387
],
[
387,
388
],
[
388,
389
],
[
388,
390
],
[
386,
391
],
[
391,
392
],
[
391,
393
],
[
385,
394
],
[
394,
395
],
[
395,
396
],
[
396,
397
],
[
397,
398
],
[
397,
399
],
[
396,
400
],
[
400,
401
],
[
400,
402
],
[
395,
403
],
[
403,
404
],
[
404,
405
],
[
404,
406
],
[
403,
407
],
[
407,
408
],
[
407,
409
],
[
409,
410
],
[
409,
411
],
[
403,
412
],
[
412,
413
],
[
412,
414
],
[
414,
415
],
[
395,
416
],
[
416,
417
],
[
353,
418
],
[
418,
419
],
[
419,
420
],
[
419,
421
],
[
418,
422
],
[
422,
423
],
[
423,
424
],
[
423,
425
],
[
425,
426
],
[
422,
427
],
[
427,
428
],
[
427,
429
],
[
422,
430
],
[
430,
431
],
[
431,
432
],
[
432,
433
],
[
432,
434
],
[
430,
435
],
[
435,
436
],
[
436,
437
],
[
437,
438
],
[
438,
439
],
[
438,
440
],
[
437,
441
],
[
441,
442
],
[
441,
443
],
[
436,
444
],
[
444,
445
],
[
445,
446
],
[
445,
447
],
[
444,
448
],
[
448,
449
],
[
448,
450
],
[
450,
451
],
[
451,
452
],
[
451,
453
],
[
450,
454
],
[
444,
455
],
[
455,
456
],
[
455,
457
],
[
457,
458
],
[
436,
459
],
[
459,
460
],
[
353,
461
],
[
461,
462
],
[
462,
463
],
[
462,
464
],
[
160,
465
],
[
465,
466
],
[
465,
467
],
[
467,
468
],
[
468,
469
],
[
468,
470
],
[
467,
471
],
[
471,
472
],
[
471,
473
],
[
473,
474
],
[
467,
475
],
[
475,
476
],
[
476,
477
],
[
476,
478
],
[
475,
479
],
[
479,
480
],
[
479,
481
],
[
481,
482
],
[
467,
483
],
[
483,
484
],
[
484,
485
],
[
485,
486
],
[
485,
487
],
[
483,
488
],
[
488,
489
],
[
489,
490
],
[
490,
491
],
[
489,
492
],
[
488,
493
],
[
493,
494
],
[
493,
495
],
[
495,
496
],
[
467,
497
],
[
497,
498
],
[
498,
499
],
[
499,
500
],
[
160,
501
],
[
501,
502
],
[
501,
503
],
[
503,
504
],
[
504,
505
],
[
504,
506
],
[
503,
507
],
[
507,
508
],
[
508,
509
],
[
509,
510
],
[
509,
511
],
[
507,
512
],
[
512,
513
],
[
512,
514
],
[
507,
515
],
[
515,
516
],
[
516,
517
],
[
507,
518
],
[
519,
519
],
[
519,
520
],
[
520,
521
],
[
521,
522
],
[
520,
523
],
[
523,
524
],
[
524,
525
],
[
503,
526
],
[
526,
527
],
[
501,
528
],
[
528,
529
],
[
160,
530
],
[
530,
531
],
[
530,
532
],
[
532,
533
],
[
533,
534
],
[
533,
535
],
[
532,
537
],
[
537,
538
],
[
538,
539
],
[
539,
540
],
[
539,
541
],
[
537,
542
],
[
542,
543
],
[
542,
544
],
[
537,
545
],
[
545,
546
],
[
546,
547
],
[
537,
548
],
[
549,
549
],
[
549,
550
],
[
550,
551
],
[
551,
552
],
[
551,
553
],
[
550,
554
],
[
554,
555
],
[
555,
556
],
[
532,
557
],
[
557,
558
],
[
530,
559
],
[
559,
560
],
[
160,
561
],
[
561,
562
],
[
561,
563
],
[
563,
564
],
[
564,
565
],
[
564,
566
],
[
563,
567
],
[
567,
568
],
[
568,
569
],
[
569,
570
],
[
569,
571
],
[
567,
572
],
[
572,
573
],
[
572,
574
],
[
567,
575
],
[
575,
576
],
[
576,
577
],
[
567,
578
],
[
579,
579
],
[
579,
580
],
[
580,
581
],
[
581,
582
],
[
580,
583
],
[
583,
584
],
[
584,
585
],
[
563,
586
],
[
586,
587
],
[
561,
588
],
[
588,
589
],
[
160,
590
],
[
590,
591
],
[
590,
592
],
[
592,
593
],
[
593,
594
],
[
593,
595
],
[
592,
597
],
[
597,
598
],
[
598,
599
],
[
599,
600
],
[
599,
601
],
[
597,
602
],
[
602,
603
],
[
602,
604
],
[
597,
605
],
[
605,
606
],
[
606,
607
],
[
597,
608
],
[
609,
609
],
[
609,
610
],
[
610,
611
],
[
611,
612
],
[
611,
613
],
[
610,
614
],
[
614,
615
],
[
615,
616
],
[
592,
617
],
[
617,
618
],
[
590,
619
],
[
619,
620
],
[
160,
621
],
[
621,
622
],
[
621,
623
],
[
623,
624
],
[
624,
625
],
[
624,
626
],
[
623,
627
],
[
627,
628
],
[
628,
629
],
[
629,
630
],
[
629,
631
],
[
627,
632
],
[
632,
633
],
[
632,
634
],
[
627,
635
],
[
635,
636
],
[
636,
637
],
[
627,
638
],
[
639,
639
],
[
639,
640
],
[
640,
641
],
[
641,
642
],
[
640,
643
],
[
643,
644
],
[
644,
645
],
[
623,
646
],
[
646,
647
],
[
621,
648
],
[
648,
649
],
[
160,
650
],
[
650,
651
],
[
650,
652
],
[
652,
653
],
[
653,
654
],
[
653,
655
],
[
652,
656
],
[
656,
657
],
[
657,
658
],
[
658,
659
],
[
658,
660
],
[
656,
661
],
[
661,
662
],
[
661,
663
],
[
656,
664
],
[
664,
665
],
[
665,
666
],
[
656,
667
],
[
668,
668
],
[
668,
669
],
[
669,
670
],
[
670,
671
],
[
669,
672
],
[
672,
673
],
[
673,
674
],
[
652,
675
],
[
675,
676
],
[
650,
677
],
[
677,
678
],
[
160,
679
],
[
679,
680
],
[
679,
681
],
[
681,
682
],
[
682,
683
],
[
682,
684
],
[
681,
686
],
[
686,
687
],
[
687,
688
],
[
688,
689
],
[
688,
690
],
[
686,
691
],
[
691,
692
],
[
691,
693
],
[
686,
694
],
[
694,
695
],
[
695,
696
],
[
686,
697
],
[
698,
698
],
[
698,
699
],
[
699,
700
],
[
700,
701
],
[
700,
702
],
[
699,
703
],
[
703,
704
],
[
704,
705
],
[
681,
706
],
[
706,
707
],
[
679,
708
],
[
708,
709
],
[
160,
710
],
[
710,
711
],
[
710,
712
],
[
712,
713
],
[
713,
714
],
[
713,
715
],
[
712,
717
],
[
717,
718
],
[
718,
719
],
[
719,
720
],
[
719,
721
],
[
717,
722
],
[
722,
723
],
[
722,
724
],
[
717,
725
],
[
725,
726
],
[
726,
727
],
[
717,
728
],
[
729,
729
],
[
729,
730
],
[
730,
731
],
[
731,
732
],
[
731,
733
],
[
730,
734
],
[
734,
735
],
[
735,
736
],
[
712,
737
],
[
737,
738
],
[
710,
739
],
[
739,
740
],
[
160,
741
],
[
741,
742
],
[
741,
743
],
[
743,
744
],
[
744,
745
],
[
748,
746
],
[
758,
747
],
[
755,
748
],
[
748,
749
],
[
749,
750
],
[
749,
751
],
[
748,
752
],
[
752,
753
],
[
752,
754
],
[
755,
755
],
[
755,
756
],
[
755,
757
],
[
758,
758
],
[
758,
759
],
[
758,
760
],
[
748,
761
],
[
761,
762
],
[
761,
763
],
[
763,
764
],
[
744,
765
],
[
765,
766
],
[
743,
767
],
[
767,
768
],
[
741,
769
],
[
769,
770
],
[
817,
771
],
[
771,
772
],
[
771,
773
],
[
773,
774
],
[
771,
775
],
[
775,
776
],
[
775,
777
],
[
777,
778
],
[
778,
779
],
[
778,
780
],
[
771,
781
],
[
781,
782
],
[
781,
783
],
[
783,
784
],
[
784,
785
],
[
785,
786
],
[
784,
787
],
[
787,
788
],
[
787,
789
],
[
781,
790
],
[
790,
791
],
[
771,
792
],
[
792,
793
],
[
792,
794
],
[
794,
795
],
[
795,
796
],
[
795,
797
],
[
794,
798
],
[
798,
799
],
[
799,
800
],
[
798,
801
],
[
792,
802
],
[
802,
803
],
[
771,
804
],
[
804,
805
],
[
804,
806
],
[
806,
807
],
[
807,
808
],
[
808,
809
],
[
771,
810
],
[
810,
811
],
[
810,
812
],
[
812,
813
],
[
813,
814
],
[
814,
815
],
[
0,
816
],
[
816,
817
],
[
816,
818
]
]
| [
"\n\n/*\n AUTH -> krishna-3249\n DATE -> 9/13/20\n TIME -> 5:31 PM\n*/\n\n/*\n Simple can be harder than complex.\n Body, mind and spirit.\n Strive for progress, not perfection.\n*/\n\nimport java.lang.*;\nimport java.io.*;\nimport java.util.*;\n\npublic class Main {\n\n private static final long MOD = 1_000_000_000 + 7;\n\n private long power(long base, long exponent) {\n long res = 1;\n while (exponent > 0) {\n if ((exponent & 1) == 1) {\n res = (res * base) % MOD;\n exponent--;\n } else {\n base = (base * base) % MOD;\n exponent = exponent >> 1;\n }\n }\n return res;\n }\n\n private long inverseMod(long number) {\n return power(number, MOD - 2);\n }\n\n private int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n public void solve(Read input, Write output) throws Exception {\n int N = input.readInt();\n output.printLine((N^1));\n }\n\n public static void main(String[] args) throws Exception {\n Read input = new Read();\n Write output = new Write();\n Main D = new Main();\n D.solve(input, output);\n output.flush();\n output.close();\n }\n\n // java fast io reader and writer\n // taken from various sources and customized\n\n static class Read {\n\n private byte[] buffer = new byte[10 * 1024];\n private int index;\n private InputStream input_stream;\n private int total;\n\n public Read() {\n input_stream = System.in;\n }\n\n public int read() throws IOException {\n if (total < 0)\n throw new InputMismatchException();\n if (index >= total) {\n index = 0;\n total = input_stream.read(buffer);\n if (total <= 0)\n return -1;\n }\n return buffer[index++];\n }\n\n public long readLong() throws IOException {\n long number = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n long neg = 1l;\n if (n == '-') {\n neg = -1l;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * number;\n }\n\n public int readInt() throws IOException {\n int integer = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n integer *= 10;\n integer += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * integer;\n }\n\n public double readDouble() throws IOException {\n double doub = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n) && n != '.') {\n if (n >= '0' && n <= '9') {\n doub *= 10;\n doub += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n\n if (n == '.') {\n n = read();\n double temp = 1;\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }\n }\n return doub * neg;\n }\n\n public String readString() throws IOException {\n StringBuilder sb = new StringBuilder();\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n while (!isWhiteSpace(n)) {\n sb.append((char) n);\n n = read();\n }\n return sb.toString();\n }\n\n public List<Double> readDoubleList(int size) throws IOException {\n List<Double> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readDouble());\n }\n return res;\n }\n\n public double[] readDoubleArray(int size) throws IOException {\n double[] res = new double[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readDouble();\n }\n return res;\n }\n\n public List<String> readStringList(int size) throws IOException {\n List<String> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readString());\n }\n return res;\n }\n\n public String[] readStringArray(int size) throws IOException {\n String[] res = new String[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readString();\n }\n return res;\n }\n\n public List<Integer> readIntList(int size) throws IOException {\n List<Integer> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readInt());\n }\n return res;\n }\n\n public List<Long> readLongList(int size) throws IOException {\n List<Long> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readLong());\n }\n return res;\n }\n\n public int[] readIntArray(int size) throws IOException {\n int[] res = new int[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readInt();\n }\n return res;\n }\n\n public long[] readLongArray(int size) throws IOException {\n long[] res = new long[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readLong();\n }\n return res;\n }\n\n private boolean isWhiteSpace(int n) {\n if (n == ' ' || n == '\\n' || n == '\\r' || n == '\\t' || n == -1)\n return true;\n return false;\n }\n }\n\n static class Write {\n\n private final BufferedWriter bw;\n\n public Write() {\n bw = new BufferedWriter(new OutputStreamWriter(System.out));\n }\n\n public void print(Object str) throws IOException {\n bw.append(str + \"\");\n }\n\n public void printLine(Object str) throws IOException {\n print(str);\n bw.append(\"\\n\");\n }\n\n public void close() throws IOException {\n bw.close();\n }\n\n public void flush() throws IOException {\n bw.flush();\n }\n }\n}",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n private static final long MOD = 1_000_000_000 + 7;\n\n private long power(long base, long exponent) {\n long res = 1;\n while (exponent > 0) {\n if ((exponent & 1) == 1) {\n res = (res * base) % MOD;\n exponent--;\n } else {\n base = (base * base) % MOD;\n exponent = exponent >> 1;\n }\n }\n return res;\n }\n\n private long inverseMod(long number) {\n return power(number, MOD - 2);\n }\n\n private int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n public void solve(Read input, Write output) throws Exception {\n int N = input.readInt();\n output.printLine((N^1));\n }\n\n public static void main(String[] args) throws Exception {\n Read input = new Read();\n Write output = new Write();\n Main D = new Main();\n D.solve(input, output);\n output.flush();\n output.close();\n }\n\n // java fast io reader and writer\n // taken from various sources and customized\n\n static class Read {\n\n private byte[] buffer = new byte[10 * 1024];\n private int index;\n private InputStream input_stream;\n private int total;\n\n public Read() {\n input_stream = System.in;\n }\n\n public int read() throws IOException {\n if (total < 0)\n throw new InputMismatchException();\n if (index >= total) {\n index = 0;\n total = input_stream.read(buffer);\n if (total <= 0)\n return -1;\n }\n return buffer[index++];\n }\n\n public long readLong() throws IOException {\n long number = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n long neg = 1l;\n if (n == '-') {\n neg = -1l;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * number;\n }\n\n public int readInt() throws IOException {\n int integer = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n integer *= 10;\n integer += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * integer;\n }\n\n public double readDouble() throws IOException {\n double doub = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n) && n != '.') {\n if (n >= '0' && n <= '9') {\n doub *= 10;\n doub += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n\n if (n == '.') {\n n = read();\n double temp = 1;\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }\n }\n return doub * neg;\n }\n\n public String readString() throws IOException {\n StringBuilder sb = new StringBuilder();\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n while (!isWhiteSpace(n)) {\n sb.append((char) n);\n n = read();\n }\n return sb.toString();\n }\n\n public List<Double> readDoubleList(int size) throws IOException {\n List<Double> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readDouble());\n }\n return res;\n }\n\n public double[] readDoubleArray(int size) throws IOException {\n double[] res = new double[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readDouble();\n }\n return res;\n }\n\n public List<String> readStringList(int size) throws IOException {\n List<String> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readString());\n }\n return res;\n }\n\n public String[] readStringArray(int size) throws IOException {\n String[] res = new String[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readString();\n }\n return res;\n }\n\n public List<Integer> readIntList(int size) throws IOException {\n List<Integer> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readInt());\n }\n return res;\n }\n\n public List<Long> readLongList(int size) throws IOException {\n List<Long> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readLong());\n }\n return res;\n }\n\n public int[] readIntArray(int size) throws IOException {\n int[] res = new int[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readInt();\n }\n return res;\n }\n\n public long[] readLongArray(int size) throws IOException {\n long[] res = new long[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readLong();\n }\n return res;\n }\n\n private boolean isWhiteSpace(int n) {\n if (n == ' ' || n == '\\n' || n == '\\r' || n == '\\t' || n == -1)\n return true;\n return false;\n }\n }\n\n static class Write {\n\n private final BufferedWriter bw;\n\n public Write() {\n bw = new BufferedWriter(new OutputStreamWriter(System.out));\n }\n\n public void print(Object str) throws IOException {\n bw.append(str + \"\");\n }\n\n public void printLine(Object str) throws IOException {\n print(str);\n bw.append(\"\\n\");\n }\n\n public void close() throws IOException {\n bw.close();\n }\n\n public void flush() throws IOException {\n bw.flush();\n }\n }\n}",
"Main",
"private static final long MOD = 1_000_000_000 + 7;",
"MOD",
"1_000_000_000 + 7",
"1_000_000_000",
"7",
"private long power(long base, long exponent) {\n long res = 1;\n while (exponent > 0) {\n if ((exponent & 1) == 1) {\n res = (res * base) % MOD;\n exponent--;\n } else {\n base = (base * base) % MOD;\n exponent = exponent >> 1;\n }\n }\n return res;\n }",
"power",
"{\n long res = 1;\n while (exponent > 0) {\n if ((exponent & 1) == 1) {\n res = (res * base) % MOD;\n exponent--;\n } else {\n base = (base * base) % MOD;\n exponent = exponent >> 1;\n }\n }\n return res;\n }",
"long res = 1;",
"res",
"1",
"while (exponent > 0) {\n if ((exponent & 1) == 1) {\n res = (res * base) % MOD;\n exponent--;\n } else {\n base = (base * base) % MOD;\n exponent = exponent >> 1;\n }\n }",
"exponent > 0",
"exponent",
"0",
"{\n if ((exponent & 1) == 1) {\n res = (res * base) % MOD;\n exponent--;\n } else {\n base = (base * base) % MOD;\n exponent = exponent >> 1;\n }\n }",
"if ((exponent & 1) == 1) {\n res = (res * base) % MOD;\n exponent--;\n } else {\n base = (base * base) % MOD;\n exponent = exponent >> 1;\n }",
"(exponent & 1) == 1",
"(exponent & 1)",
"exponent",
"1",
"1",
"{\n res = (res * base) % MOD;\n exponent--;\n }",
"res = (res * base) % MOD",
"res",
"(res * base) % MOD",
"(res * base)",
"res",
"base",
"MOD",
"exponent--",
"exponent",
"{\n base = (base * base) % MOD;\n exponent = exponent >> 1;\n }",
"base = (base * base) % MOD",
"base",
"(base * base) % MOD",
"(base * base)",
"base",
"base",
"MOD",
"exponent = exponent >> 1",
"exponent",
"exponent >> 1",
"exponent",
"1",
"return res;",
"res",
"long base",
"base",
"long exponent",
"exponent",
"private long inverseMod(long number) {\n return power(number, MOD - 2);\n }",
"inverseMod",
"{\n return power(number, MOD - 2);\n }",
"return power(number, MOD - 2);",
"power(number, MOD - 2)",
"power",
"number",
"MOD - 2",
"MOD",
"2",
"long number",
"number",
"private int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }",
"gcd",
"{\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }",
"if (b == 0) {\n return a;\n }",
"b == 0",
"b",
"0",
"{\n return a;\n }",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"private long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }",
"gcd",
"{\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }",
"if (b == 0) {\n return a;\n }",
"b == 0",
"b",
"0",
"{\n return a;\n }",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public void solve(Read input, Write output) throws Exception {\n int N = input.readInt();\n output.printLine((N^1));\n }",
"solve",
"{\n int N = input.readInt();\n output.printLine((N^1));\n }",
"int N = input.readInt();",
"N",
"input.readInt()",
"input.readInt",
"input",
"output.printLine((N^1))",
"output.printLine",
"output",
"(N^1)",
"N",
"1",
"Read input",
"input",
"Write output",
"output",
"public static void main(String[] args) throws Exception {\n Read input = new Read();\n Write output = new Write();\n Main D = new Main();\n D.solve(input, output);\n output.flush();\n output.close();\n }",
"main",
"{\n Read input = new Read();\n Write output = new Write();\n Main D = new Main();\n D.solve(input, output);\n output.flush();\n output.close();\n }",
"Read input = new Read();",
"input",
"new Read()",
"Write output = new Write();",
"output",
"new Write()",
"Main D = new Main();",
"D",
"new Main()",
"D.solve(input, output)",
"D.solve",
"D",
"input",
"output",
"output.flush()",
"output.flush",
"output",
"output.close()",
"output.close",
"output",
"String[] args",
"args",
"static class Read {\n\n private byte[] buffer = new byte[10 * 1024];\n private int index;\n private InputStream input_stream;\n private int total;\n\n public Read() {\n input_stream = System.in;\n }\n\n public int read() throws IOException {\n if (total < 0)\n throw new InputMismatchException();\n if (index >= total) {\n index = 0;\n total = input_stream.read(buffer);\n if (total <= 0)\n return -1;\n }\n return buffer[index++];\n }\n\n public long readLong() throws IOException {\n long number = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n long neg = 1l;\n if (n == '-') {\n neg = -1l;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * number;\n }\n\n public int readInt() throws IOException {\n int integer = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n integer *= 10;\n integer += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * integer;\n }\n\n public double readDouble() throws IOException {\n double doub = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n) && n != '.') {\n if (n >= '0' && n <= '9') {\n doub *= 10;\n doub += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n\n if (n == '.') {\n n = read();\n double temp = 1;\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }\n }\n return doub * neg;\n }\n\n public String readString() throws IOException {\n StringBuilder sb = new StringBuilder();\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n while (!isWhiteSpace(n)) {\n sb.append((char) n);\n n = read();\n }\n return sb.toString();\n }\n\n public List<Double> readDoubleList(int size) throws IOException {\n List<Double> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readDouble());\n }\n return res;\n }\n\n public double[] readDoubleArray(int size) throws IOException {\n double[] res = new double[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readDouble();\n }\n return res;\n }\n\n public List<String> readStringList(int size) throws IOException {\n List<String> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readString());\n }\n return res;\n }\n\n public String[] readStringArray(int size) throws IOException {\n String[] res = new String[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readString();\n }\n return res;\n }\n\n public List<Integer> readIntList(int size) throws IOException {\n List<Integer> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readInt());\n }\n return res;\n }\n\n public List<Long> readLongList(int size) throws IOException {\n List<Long> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readLong());\n }\n return res;\n }\n\n public int[] readIntArray(int size) throws IOException {\n int[] res = new int[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readInt();\n }\n return res;\n }\n\n public long[] readLongArray(int size) throws IOException {\n long[] res = new long[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readLong();\n }\n return res;\n }\n\n private boolean isWhiteSpace(int n) {\n if (n == ' ' || n == '\\n' || n == '\\r' || n == '\\t' || n == -1)\n return true;\n return false;\n }\n }",
"Read",
"private byte[] buffer = new byte[10 * 1024];",
"buffer",
"new byte[10 * 1024]",
"10 * 1024",
"10",
"1024",
"private int index;",
"index",
"private InputStream input_stream;",
"input_stream",
"private int total;",
"total",
"public Read() {\n input_stream = System.in;\n }",
"Read",
"{\n input_stream = System.in;\n }",
"input_stream = System.in",
"input_stream",
"System.in",
"System",
"System.in",
"public int read() throws IOException {\n if (total < 0)\n throw new InputMismatchException();\n if (index >= total) {\n index = 0;\n total = input_stream.read(buffer);\n if (total <= 0)\n return -1;\n }\n return buffer[index++];\n }",
"read",
"{\n if (total < 0)\n throw new InputMismatchException();\n if (index >= total) {\n index = 0;\n total = input_stream.read(buffer);\n if (total <= 0)\n return -1;\n }\n return buffer[index++];\n }",
"if (total < 0)\n throw new InputMismatchException();",
"total < 0",
"total",
"0",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (index >= total) {\n index = 0;\n total = input_stream.read(buffer);\n if (total <= 0)\n return -1;\n }",
"index >= total",
"index",
"total",
"{\n index = 0;\n total = input_stream.read(buffer);\n if (total <= 0)\n return -1;\n }",
"index = 0",
"index",
"0",
"total = input_stream.read(buffer)",
"total",
"input_stream.read(buffer)",
"input_stream.read",
"input_stream",
"buffer",
"if (total <= 0)\n return -1;",
"total <= 0",
"total",
"0",
"return -1;",
"-1",
"1",
"return buffer[index++];",
"buffer[index++]",
"buffer",
"index++",
"index",
"public long readLong() throws IOException {\n long number = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n long neg = 1l;\n if (n == '-') {\n neg = -1l;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * number;\n }",
"readLong",
"{\n long number = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n long neg = 1l;\n if (n == '-') {\n neg = -1l;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * number;\n }",
"long number = 0;",
"number",
"0",
"int n = read();",
"n",
"read()",
"read",
"while (isWhiteSpace(n))\n n = read();",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"n = read()",
"n",
"read()",
"read",
"long neg = 1l;",
"neg",
"1l",
"if (n == '-') {\n neg = -1l;\n n = read();\n }",
"n == '-'",
"n",
"'-'",
"{\n neg = -1l;\n n = read();\n }",
"neg = -1l",
"neg",
"-1l",
"1l",
"n = read()",
"n",
"read()",
"read",
"while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n } else throw new InputMismatchException();\n }",
"!isWhiteSpace(n)",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"{\n if (n >= '0' && n <= '9') {\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n } else throw new InputMismatchException();\n }",
"if (n >= '0' && n <= '9') {\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n } else throw new InputMismatchException();",
"n >= '0' && n <= '9'",
"n >= '0'",
"n",
"'0'",
"n <= '9'",
"n",
"'9'",
"{\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n }",
"number *= 10l",
"number",
"10l",
"number += (long) (n - '0')",
"number",
"(long) (n - '0')",
"n",
"'0'",
"n = read()",
"n",
"read()",
"read",
"throw new InputMismatchException();",
"new InputMismatchException()",
"return neg * number;",
"neg * number",
"neg",
"number",
"public int readInt() throws IOException {\n int integer = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n integer *= 10;\n integer += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * integer;\n }",
"readInt",
"{\n int integer = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n integer *= 10;\n integer += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * integer;\n }",
"int integer = 0;",
"integer",
"0",
"int n = read();",
"n",
"read()",
"read",
"while (isWhiteSpace(n))\n n = read();",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"n = read()",
"n",
"read()",
"read",
"int neg = 1;",
"neg",
"1",
"if (n == '-') {\n neg = -1;\n n = read();\n }",
"n == '-'",
"n",
"'-'",
"{\n neg = -1;\n n = read();\n }",
"neg = -1",
"neg",
"-1",
"1",
"n = read()",
"n",
"read()",
"read",
"while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n integer *= 10;\n integer += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }",
"!isWhiteSpace(n)",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"{\n if (n >= '0' && n <= '9') {\n integer *= 10;\n integer += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }",
"if (n >= '0' && n <= '9') {\n integer *= 10;\n integer += n - '0';\n n = read();\n } else throw new InputMismatchException();",
"n >= '0' && n <= '9'",
"n >= '0'",
"n",
"'0'",
"n <= '9'",
"n",
"'9'",
"{\n integer *= 10;\n integer += n - '0';\n n = read();\n }",
"integer *= 10",
"integer",
"10",
"integer += n - '0'",
"integer",
"n - '0'",
"n",
"'0'",
"n = read()",
"n",
"read()",
"read",
"throw new InputMismatchException();",
"new InputMismatchException()",
"return neg * integer;",
"neg * integer",
"neg",
"integer",
"public double readDouble() throws IOException {\n double doub = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n) && n != '.') {\n if (n >= '0' && n <= '9') {\n doub *= 10;\n doub += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n\n if (n == '.') {\n n = read();\n double temp = 1;\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }\n }\n return doub * neg;\n }",
"readDouble",
"{\n double doub = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n) && n != '.') {\n if (n >= '0' && n <= '9') {\n doub *= 10;\n doub += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n\n if (n == '.') {\n n = read();\n double temp = 1;\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }\n }\n return doub * neg;\n }",
"double doub = 0;",
"doub",
"0",
"int n = read();",
"n",
"read()",
"read",
"while (isWhiteSpace(n))\n n = read();",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"n = read()",
"n",
"read()",
"read",
"int neg = 1;",
"neg",
"1",
"if (n == '-') {\n neg = -1;\n n = read();\n }",
"n == '-'",
"n",
"'-'",
"{\n neg = -1;\n n = read();\n }",
"neg = -1",
"neg",
"-1",
"1",
"n = read()",
"n",
"read()",
"read",
"while (!isWhiteSpace(n) && n != '.') {\n if (n >= '0' && n <= '9') {\n doub *= 10;\n doub += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }",
"!isWhiteSpace(n) && n != '.'",
"!isWhiteSpace(n)",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"n != '.'",
"n",
"'.'",
"{\n if (n >= '0' && n <= '9') {\n doub *= 10;\n doub += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }",
"if (n >= '0' && n <= '9') {\n doub *= 10;\n doub += n - '0';\n n = read();\n } else throw new InputMismatchException();",
"n >= '0' && n <= '9'",
"n >= '0'",
"n",
"'0'",
"n <= '9'",
"n",
"'9'",
"{\n doub *= 10;\n doub += n - '0';\n n = read();\n }",
"doub *= 10",
"doub",
"10",
"doub += n - '0'",
"doub",
"n - '0'",
"n",
"'0'",
"n = read()",
"n",
"read()",
"read",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (n == '.') {\n n = read();\n double temp = 1;\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }\n }",
"n == '.'",
"n",
"'.'",
"{\n n = read();\n double temp = 1;\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }\n }",
"n = read()",
"n",
"read()",
"read",
"double temp = 1;",
"temp",
"1",
"while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }",
"!isWhiteSpace(n)",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"{\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }",
"if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();",
"n >= '0' && n <= '9'",
"n >= '0'",
"n",
"'0'",
"n <= '9'",
"n",
"'9'",
"{\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n }",
"temp /= 10",
"temp",
"10",
"doub += (n - '0') * temp",
"doub",
"(n - '0') * temp",
"(n - '0')",
"n",
"'0'",
"temp",
"n = read()",
"n",
"read()",
"read",
"throw new InputMismatchException();",
"new InputMismatchException()",
"return doub * neg;",
"doub * neg",
"doub",
"neg",
"public String readString() throws IOException {\n StringBuilder sb = new StringBuilder();\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n while (!isWhiteSpace(n)) {\n sb.append((char) n);\n n = read();\n }\n return sb.toString();\n }",
"readString",
"{\n StringBuilder sb = new StringBuilder();\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n while (!isWhiteSpace(n)) {\n sb.append((char) n);\n n = read();\n }\n return sb.toString();\n }",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"int n = read();",
"n",
"read()",
"read",
"while (isWhiteSpace(n))\n n = read();",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"n = read()",
"n",
"read()",
"read",
"while (!isWhiteSpace(n)) {\n sb.append((char) n);\n n = read();\n }",
"!isWhiteSpace(n)",
"isWhiteSpace(n)",
"isWhiteSpace",
"n",
"{\n sb.append((char) n);\n n = read();\n }",
"sb.append((char) n)",
"sb.append",
"sb",
"(char) n",
"n = read()",
"n",
"read()",
"read",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"public List<Double> readDoubleList(int size) throws IOException {\n List<Double> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readDouble());\n }\n return res;\n }",
"readDoubleList",
"{\n List<Double> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readDouble());\n }\n return res;\n }",
"List<Double> res = new ArrayList<>();",
"res",
"new ArrayList<>()",
"for (int i = 0; i < size; i++) {\n res.add(this.readDouble());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n res.add(this.readDouble());\n }",
"{\n res.add(this.readDouble());\n }",
"res.add(this.readDouble())",
"res.add",
"res",
"this.readDouble()",
"this.readDouble",
"this",
"return res;",
"res",
"int size",
"size",
"public double[] readDoubleArray(int size) throws IOException {\n double[] res = new double[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readDouble();\n }\n return res;\n }",
"readDoubleArray",
"{\n double[] res = new double[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readDouble();\n }\n return res;\n }",
"double[] res = new double[size];",
"res",
"new double[size]",
"size",
"for (int i = 0; i < size; i++) {\n res[i] = this.readDouble();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n res[i] = this.readDouble();\n }",
"{\n res[i] = this.readDouble();\n }",
"res[i] = this.readDouble()",
"res[i]",
"res",
"i",
"this.readDouble()",
"this.readDouble",
"this",
"return res;",
"res",
"int size",
"size",
"public List<String> readStringList(int size) throws IOException {\n List<String> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readString());\n }\n return res;\n }",
"readStringList",
"{\n List<String> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readString());\n }\n return res;\n }",
"List<String> res = new ArrayList<>();",
"res",
"new ArrayList<>()",
"for (int i = 0; i < size; i++) {\n res.add(this.readString());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n res.add(this.readString());\n }",
"{\n res.add(this.readString());\n }",
"res.add(this.readString())",
"res.add",
"res",
"this.readString()",
"this.readString",
"this",
"return res;",
"res",
"int size",
"size",
"public String[] readStringArray(int size) throws IOException {\n String[] res = new String[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readString();\n }\n return res;\n }",
"readStringArray",
"{\n String[] res = new String[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readString();\n }\n return res;\n }",
"String[] res = new String[size];",
"res",
"new String[size]",
"size",
"for (int i = 0; i < size; i++) {\n res[i] = this.readString();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n res[i] = this.readString();\n }",
"{\n res[i] = this.readString();\n }",
"res[i] = this.readString()",
"res[i]",
"res",
"i",
"this.readString()",
"this.readString",
"this",
"return res;",
"res",
"int size",
"size",
"public List<Integer> readIntList(int size) throws IOException {\n List<Integer> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readInt());\n }\n return res;\n }",
"readIntList",
"{\n List<Integer> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readInt());\n }\n return res;\n }",
"List<Integer> res = new ArrayList<>();",
"res",
"new ArrayList<>()",
"for (int i = 0; i < size; i++) {\n res.add(this.readInt());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n res.add(this.readInt());\n }",
"{\n res.add(this.readInt());\n }",
"res.add(this.readInt())",
"res.add",
"res",
"this.readInt()",
"this.readInt",
"this",
"return res;",
"res",
"int size",
"size",
"public List<Long> readLongList(int size) throws IOException {\n List<Long> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readLong());\n }\n return res;\n }",
"readLongList",
"{\n List<Long> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readLong());\n }\n return res;\n }",
"List<Long> res = new ArrayList<>();",
"res",
"new ArrayList<>()",
"for (int i = 0; i < size; i++) {\n res.add(this.readLong());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n res.add(this.readLong());\n }",
"{\n res.add(this.readLong());\n }",
"res.add(this.readLong())",
"res.add",
"res",
"this.readLong()",
"this.readLong",
"this",
"return res;",
"res",
"int size",
"size",
"public int[] readIntArray(int size) throws IOException {\n int[] res = new int[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readInt();\n }\n return res;\n }",
"readIntArray",
"{\n int[] res = new int[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readInt();\n }\n return res;\n }",
"int[] res = new int[size];",
"res",
"new int[size]",
"size",
"for (int i = 0; i < size; i++) {\n res[i] = this.readInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n res[i] = this.readInt();\n }",
"{\n res[i] = this.readInt();\n }",
"res[i] = this.readInt()",
"res[i]",
"res",
"i",
"this.readInt()",
"this.readInt",
"this",
"return res;",
"res",
"int size",
"size",
"public long[] readLongArray(int size) throws IOException {\n long[] res = new long[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readLong();\n }\n return res;\n }",
"readLongArray",
"{\n long[] res = new long[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readLong();\n }\n return res;\n }",
"long[] res = new long[size];",
"res",
"new long[size]",
"size",
"for (int i = 0; i < size; i++) {\n res[i] = this.readLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n res[i] = this.readLong();\n }",
"{\n res[i] = this.readLong();\n }",
"res[i] = this.readLong()",
"res[i]",
"res",
"i",
"this.readLong()",
"this.readLong",
"this",
"return res;",
"res",
"int size",
"size",
"private boolean isWhiteSpace(int n) {\n if (n == ' ' || n == '\\n' || n == '\\r' || n == '\\t' || n == -1)\n return true;\n return false;\n }",
"isWhiteSpace",
"{\n if (n == ' ' || n == '\\n' || n == '\\r' || n == '\\t' || n == -1)\n return true;\n return false;\n }",
"if (n == ' ' || n == '\\n' || n == '\\r' || n == '\\t' || n == -1)\n return true;",
"n == ' ' || n == '\\n' || n == '\\r' || n == '\\t' || n == -1",
"n == '\\t'",
"n == '\\r'",
"n == ' ' || n == '\\n' || n == '\\r' || n == '\\t' || n == -1",
"n == ' '",
"n",
"' '",
"n == '\\n'",
"n",
"'\\n'",
"n == '\\r'",
"n",
"'\\r'",
"n == '\\t'",
"n",
"'\\t'",
"n == -1",
"n",
"-1",
"1",
"return true;",
"true",
"return false;",
"false",
"int n",
"n",
"static class Write {\n\n private final BufferedWriter bw;\n\n public Write() {\n bw = new BufferedWriter(new OutputStreamWriter(System.out));\n }\n\n public void print(Object str) throws IOException {\n bw.append(str + \"\");\n }\n\n public void printLine(Object str) throws IOException {\n print(str);\n bw.append(\"\\n\");\n }\n\n public void close() throws IOException {\n bw.close();\n }\n\n public void flush() throws IOException {\n bw.flush();\n }\n }",
"Write",
"private final BufferedWriter bw;",
"bw",
"public Write() {\n bw = new BufferedWriter(new OutputStreamWriter(System.out));\n }",
"Write",
"{\n bw = new BufferedWriter(new OutputStreamWriter(System.out));\n }",
"bw = new BufferedWriter(new OutputStreamWriter(System.out))",
"bw",
"new BufferedWriter(new OutputStreamWriter(System.out))",
"public void print(Object str) throws IOException {\n bw.append(str + \"\");\n }",
"print",
"{\n bw.append(str + \"\");\n }",
"bw.append(str + \"\")",
"bw.append",
"bw",
"str + \"\"",
"str",
"\"\"",
"Object str",
"str",
"public void printLine(Object str) throws IOException {\n print(str);\n bw.append(\"\\n\");\n }",
"printLine",
"{\n print(str);\n bw.append(\"\\n\");\n }",
"print(str)",
"print",
"str",
"bw.append(\"\\n\")",
"bw.append",
"bw",
"\"\\n\"",
"Object str",
"str",
"public void close() throws IOException {\n bw.close();\n }",
"close",
"{\n bw.close();\n }",
"bw.close()",
"bw.close",
"bw",
"public void flush() throws IOException {\n bw.flush();\n }",
"flush",
"{\n bw.flush();\n }",
"bw.flush()",
"bw.flush",
"bw",
"public class Main {\n\n private static final long MOD = 1_000_000_000 + 7;\n\n private long power(long base, long exponent) {\n long res = 1;\n while (exponent > 0) {\n if ((exponent & 1) == 1) {\n res = (res * base) % MOD;\n exponent--;\n } else {\n base = (base * base) % MOD;\n exponent = exponent >> 1;\n }\n }\n return res;\n }\n\n private long inverseMod(long number) {\n return power(number, MOD - 2);\n }\n\n private int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n public void solve(Read input, Write output) throws Exception {\n int N = input.readInt();\n output.printLine((N^1));\n }\n\n public static void main(String[] args) throws Exception {\n Read input = new Read();\n Write output = new Write();\n Main D = new Main();\n D.solve(input, output);\n output.flush();\n output.close();\n }\n\n // java fast io reader and writer\n // taken from various sources and customized\n\n static class Read {\n\n private byte[] buffer = new byte[10 * 1024];\n private int index;\n private InputStream input_stream;\n private int total;\n\n public Read() {\n input_stream = System.in;\n }\n\n public int read() throws IOException {\n if (total < 0)\n throw new InputMismatchException();\n if (index >= total) {\n index = 0;\n total = input_stream.read(buffer);\n if (total <= 0)\n return -1;\n }\n return buffer[index++];\n }\n\n public long readLong() throws IOException {\n long number = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n long neg = 1l;\n if (n == '-') {\n neg = -1l;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * number;\n }\n\n public int readInt() throws IOException {\n int integer = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n integer *= 10;\n integer += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * integer;\n }\n\n public double readDouble() throws IOException {\n double doub = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n) && n != '.') {\n if (n >= '0' && n <= '9') {\n doub *= 10;\n doub += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n\n if (n == '.') {\n n = read();\n double temp = 1;\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }\n }\n return doub * neg;\n }\n\n public String readString() throws IOException {\n StringBuilder sb = new StringBuilder();\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n while (!isWhiteSpace(n)) {\n sb.append((char) n);\n n = read();\n }\n return sb.toString();\n }\n\n public List<Double> readDoubleList(int size) throws IOException {\n List<Double> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readDouble());\n }\n return res;\n }\n\n public double[] readDoubleArray(int size) throws IOException {\n double[] res = new double[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readDouble();\n }\n return res;\n }\n\n public List<String> readStringList(int size) throws IOException {\n List<String> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readString());\n }\n return res;\n }\n\n public String[] readStringArray(int size) throws IOException {\n String[] res = new String[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readString();\n }\n return res;\n }\n\n public List<Integer> readIntList(int size) throws IOException {\n List<Integer> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readInt());\n }\n return res;\n }\n\n public List<Long> readLongList(int size) throws IOException {\n List<Long> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readLong());\n }\n return res;\n }\n\n public int[] readIntArray(int size) throws IOException {\n int[] res = new int[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readInt();\n }\n return res;\n }\n\n public long[] readLongArray(int size) throws IOException {\n long[] res = new long[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readLong();\n }\n return res;\n }\n\n private boolean isWhiteSpace(int n) {\n if (n == ' ' || n == '\\n' || n == '\\r' || n == '\\t' || n == -1)\n return true;\n return false;\n }\n }\n\n static class Write {\n\n private final BufferedWriter bw;\n\n public Write() {\n bw = new BufferedWriter(new OutputStreamWriter(System.out));\n }\n\n public void print(Object str) throws IOException {\n bw.append(str + \"\");\n }\n\n public void printLine(Object str) throws IOException {\n print(str);\n bw.append(\"\\n\");\n }\n\n public void close() throws IOException {\n bw.close();\n }\n\n public void flush() throws IOException {\n bw.flush();\n }\n }\n}",
"public class Main {\n\n private static final long MOD = 1_000_000_000 + 7;\n\n private long power(long base, long exponent) {\n long res = 1;\n while (exponent > 0) {\n if ((exponent & 1) == 1) {\n res = (res * base) % MOD;\n exponent--;\n } else {\n base = (base * base) % MOD;\n exponent = exponent >> 1;\n }\n }\n return res;\n }\n\n private long inverseMod(long number) {\n return power(number, MOD - 2);\n }\n\n private int gcd(int a, int b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n private long gcd(long a, long b) {\n if (b == 0) {\n return a;\n }\n return gcd(b, a % b);\n }\n\n public void solve(Read input, Write output) throws Exception {\n int N = input.readInt();\n output.printLine((N^1));\n }\n\n public static void main(String[] args) throws Exception {\n Read input = new Read();\n Write output = new Write();\n Main D = new Main();\n D.solve(input, output);\n output.flush();\n output.close();\n }\n\n // java fast io reader and writer\n // taken from various sources and customized\n\n static class Read {\n\n private byte[] buffer = new byte[10 * 1024];\n private int index;\n private InputStream input_stream;\n private int total;\n\n public Read() {\n input_stream = System.in;\n }\n\n public int read() throws IOException {\n if (total < 0)\n throw new InputMismatchException();\n if (index >= total) {\n index = 0;\n total = input_stream.read(buffer);\n if (total <= 0)\n return -1;\n }\n return buffer[index++];\n }\n\n public long readLong() throws IOException {\n long number = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n long neg = 1l;\n if (n == '-') {\n neg = -1l;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n number *= 10l;\n number += (long) (n - '0');\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * number;\n }\n\n public int readInt() throws IOException {\n int integer = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n integer *= 10;\n integer += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n return neg * integer;\n }\n\n public double readDouble() throws IOException {\n double doub = 0;\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n int neg = 1;\n if (n == '-') {\n neg = -1;\n n = read();\n }\n while (!isWhiteSpace(n) && n != '.') {\n if (n >= '0' && n <= '9') {\n doub *= 10;\n doub += n - '0';\n n = read();\n } else throw new InputMismatchException();\n }\n\n if (n == '.') {\n n = read();\n double temp = 1;\n while (!isWhiteSpace(n)) {\n if (n >= '0' && n <= '9') {\n temp /= 10;\n doub += (n - '0') * temp;\n n = read();\n } else throw new InputMismatchException();\n }\n }\n return doub * neg;\n }\n\n public String readString() throws IOException {\n StringBuilder sb = new StringBuilder();\n int n = read();\n while (isWhiteSpace(n))\n n = read();\n while (!isWhiteSpace(n)) {\n sb.append((char) n);\n n = read();\n }\n return sb.toString();\n }\n\n public List<Double> readDoubleList(int size) throws IOException {\n List<Double> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readDouble());\n }\n return res;\n }\n\n public double[] readDoubleArray(int size) throws IOException {\n double[] res = new double[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readDouble();\n }\n return res;\n }\n\n public List<String> readStringList(int size) throws IOException {\n List<String> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readString());\n }\n return res;\n }\n\n public String[] readStringArray(int size) throws IOException {\n String[] res = new String[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readString();\n }\n return res;\n }\n\n public List<Integer> readIntList(int size) throws IOException {\n List<Integer> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readInt());\n }\n return res;\n }\n\n public List<Long> readLongList(int size) throws IOException {\n List<Long> res = new ArrayList<>();\n for (int i = 0; i < size; i++) {\n res.add(this.readLong());\n }\n return res;\n }\n\n public int[] readIntArray(int size) throws IOException {\n int[] res = new int[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readInt();\n }\n return res;\n }\n\n public long[] readLongArray(int size) throws IOException {\n long[] res = new long[size];\n for (int i = 0; i < size; i++) {\n res[i] = this.readLong();\n }\n return res;\n }\n\n private boolean isWhiteSpace(int n) {\n if (n == ' ' || n == '\\n' || n == '\\r' || n == '\\t' || n == -1)\n return true;\n return false;\n }\n }\n\n static class Write {\n\n private final BufferedWriter bw;\n\n public Write() {\n bw = new BufferedWriter(new OutputStreamWriter(System.out));\n }\n\n public void print(Object str) throws IOException {\n bw.append(str + \"\");\n }\n\n public void printLine(Object str) throws IOException {\n print(str);\n bw.append(\"\\n\");\n }\n\n public void close() throws IOException {\n bw.close();\n }\n\n public void flush() throws IOException {\n bw.flush();\n }\n }\n}",
"Main"
]
|
/*
AUTH -> krishna-3249
DATE -> 9/13/20
TIME -> 5:31 PM
*/
/*
Simple can be harder than complex.
Body, mind and spirit.
Strive for progress, not perfection.
*/
import java.lang.*;
import java.io.*;
import java.util.*;
public class Main {
private static final long MOD = 1_000_000_000 + 7;
private long power(long base, long exponent) {
long res = 1;
while (exponent > 0) {
if ((exponent & 1) == 1) {
res = (res * base) % MOD;
exponent--;
} else {
base = (base * base) % MOD;
exponent = exponent >> 1;
}
}
return res;
}
private long inverseMod(long number) {
return power(number, MOD - 2);
}
private int gcd(int a, int b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
private long gcd(long a, long b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
public void solve(Read input, Write output) throws Exception {
int N = input.readInt();
output.printLine((N^1));
}
public static void main(String[] args) throws Exception {
Read input = new Read();
Write output = new Write();
Main D = new Main();
D.solve(input, output);
output.flush();
output.close();
}
// java fast io reader and writer
// taken from various sources and customized
static class Read {
private byte[] buffer = new byte[10 * 1024];
private int index;
private InputStream input_stream;
private int total;
public Read() {
input_stream = System.in;
}
public int read() throws IOException {
if (total < 0)
throw new InputMismatchException();
if (index >= total) {
index = 0;
total = input_stream.read(buffer);
if (total <= 0)
return -1;
}
return buffer[index++];
}
public long readLong() throws IOException {
long number = 0;
int n = read();
while (isWhiteSpace(n))
n = read();
long neg = 1l;
if (n == '-') {
neg = -1l;
n = read();
}
while (!isWhiteSpace(n)) {
if (n >= '0' && n <= '9') {
number *= 10l;
number += (long) (n - '0');
n = read();
} else throw new InputMismatchException();
}
return neg * number;
}
public int readInt() throws IOException {
int integer = 0;
int n = read();
while (isWhiteSpace(n))
n = read();
int neg = 1;
if (n == '-') {
neg = -1;
n = read();
}
while (!isWhiteSpace(n)) {
if (n >= '0' && n <= '9') {
integer *= 10;
integer += n - '0';
n = read();
} else throw new InputMismatchException();
}
return neg * integer;
}
public double readDouble() throws IOException {
double doub = 0;
int n = read();
while (isWhiteSpace(n))
n = read();
int neg = 1;
if (n == '-') {
neg = -1;
n = read();
}
while (!isWhiteSpace(n) && n != '.') {
if (n >= '0' && n <= '9') {
doub *= 10;
doub += n - '0';
n = read();
} else throw new InputMismatchException();
}
if (n == '.') {
n = read();
double temp = 1;
while (!isWhiteSpace(n)) {
if (n >= '0' && n <= '9') {
temp /= 10;
doub += (n - '0') * temp;
n = read();
} else throw new InputMismatchException();
}
}
return doub * neg;
}
public String readString() throws IOException {
StringBuilder sb = new StringBuilder();
int n = read();
while (isWhiteSpace(n))
n = read();
while (!isWhiteSpace(n)) {
sb.append((char) n);
n = read();
}
return sb.toString();
}
public List<Double> readDoubleList(int size) throws IOException {
List<Double> res = new ArrayList<>();
for (int i = 0; i < size; i++) {
res.add(this.readDouble());
}
return res;
}
public double[] readDoubleArray(int size) throws IOException {
double[] res = new double[size];
for (int i = 0; i < size; i++) {
res[i] = this.readDouble();
}
return res;
}
public List<String> readStringList(int size) throws IOException {
List<String> res = new ArrayList<>();
for (int i = 0; i < size; i++) {
res.add(this.readString());
}
return res;
}
public String[] readStringArray(int size) throws IOException {
String[] res = new String[size];
for (int i = 0; i < size; i++) {
res[i] = this.readString();
}
return res;
}
public List<Integer> readIntList(int size) throws IOException {
List<Integer> res = new ArrayList<>();
for (int i = 0; i < size; i++) {
res.add(this.readInt());
}
return res;
}
public List<Long> readLongList(int size) throws IOException {
List<Long> res = new ArrayList<>();
for (int i = 0; i < size; i++) {
res.add(this.readLong());
}
return res;
}
public int[] readIntArray(int size) throws IOException {
int[] res = new int[size];
for (int i = 0; i < size; i++) {
res[i] = this.readInt();
}
return res;
}
public long[] readLongArray(int size) throws IOException {
long[] res = new long[size];
for (int i = 0; i < size; i++) {
res[i] = this.readLong();
}
return res;
}
private boolean isWhiteSpace(int n) {
if (n == ' ' || n == '\n' || n == '\r' || n == '\t' || n == -1)
return true;
return false;
}
}
static class Write {
private final BufferedWriter bw;
public Write() {
bw = new BufferedWriter(new OutputStreamWriter(System.out));
}
public void print(Object str) throws IOException {
bw.append(str + "");
}
public void printLine(Object str) throws IOException {
print(str);
bw.append("\n");
}
public void close() throws IOException {
bw.close();
}
public void flush() throws IOException {
bw.flush();
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
4,
18,
20,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
2,
17,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
45,
8
],
[
45,
9
],
[
9,
10
],
[
45,
11
],
[
11,
12
],
[
45,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
15,
19
],
[
19,
20
],
[
19,
21
],
[
15,
22
],
[
22,
23
],
[
23,
24
],
[
15,
25
],
[
25,
26
],
[
26,
27
],
[
13,
28
],
[
28,
29
],
[
45,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
41,
43
],
[
0,
44
],
[
44,
45
],
[
44,
46
]
]
| [
"import java.io.PrintWriter;\nimport java.util.*;\n\npublic class Main {\n\n\n static Scanner sc;\n static PrintWriter out;\n\n public static void main(String[] args) {\n sc = new Scanner(System.in);\n out = new PrintWriter(System.out);\n new Main().solve();\n out.flush();\n }\n\n public void solve() {\n int n = sc.nextInt();\n out.println(1-n);\n }\n\n}",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\n static Scanner sc;\n static PrintWriter out;\n\n public static void main(String[] args) {\n sc = new Scanner(System.in);\n out = new PrintWriter(System.out);\n new Main().solve();\n out.flush();\n }\n\n public void solve() {\n int n = sc.nextInt();\n out.println(1-n);\n }\n\n}",
"Main",
"static Scanner sc;",
"sc",
"static PrintWriter out;",
"out",
"public static void main(String[] args) {\n sc = new Scanner(System.in);\n out = new PrintWriter(System.out);\n new Main().solve();\n out.flush();\n }",
"main",
"{\n sc = new Scanner(System.in);\n out = new PrintWriter(System.out);\n new Main().solve();\n out.flush();\n }",
"sc = new Scanner(System.in)",
"sc",
"new Scanner(System.in)",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"new Main().solve()",
"new Main().solve",
"new Main()",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"public void solve() {\n int n = sc.nextInt();\n out.println(1-n);\n }",
"solve",
"{\n int n = sc.nextInt();\n out.println(1-n);\n }",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"out.println(1-n)",
"out.println",
"out",
"1-n",
"1",
"n",
"public class Main {\n\n\n static Scanner sc;\n static PrintWriter out;\n\n public static void main(String[] args) {\n sc = new Scanner(System.in);\n out = new PrintWriter(System.out);\n new Main().solve();\n out.flush();\n }\n\n public void solve() {\n int n = sc.nextInt();\n out.println(1-n);\n }\n\n}",
"public class Main {\n\n\n static Scanner sc;\n static PrintWriter out;\n\n public static void main(String[] args) {\n sc = new Scanner(System.in);\n out = new PrintWriter(System.out);\n new Main().solve();\n out.flush();\n }\n\n public void solve() {\n int n = sc.nextInt();\n out.println(1-n);\n }\n\n}",
"Main"
]
| import java.io.PrintWriter;
import java.util.*;
public class Main {
static Scanner sc;
static PrintWriter out;
public static void main(String[] args) {
sc = new Scanner(System.in);
out = new PrintWriter(System.out);
new Main().solve();
out.flush();
}
public void solve() {
int n = sc.nextInt();
out.println(1-n);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
17,
12,
13,
30,
41,
13,
4,
13,
14,
2,
13,
17,
4,
13,
17,
4,
13,
17,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
17,
4,
13,
41,
13,
4,
18,
13,
4,
18,
13,
14,
40,
13,
4,
18,
18,
13,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
18,
13,
13,
23,
13,
12,
13,
30,
4,
13,
13,
13,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
41,
13,
2,
13,
4,
18,
13,
2,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
4,
18,
18,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
17,
2,
17,
4,
13,
2,
13,
2,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
13,
29,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
42,
2,
2,
13,
17,
40,
4,
18,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
4,
18,
13,
29,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
427,
11
],
[
427,
12
],
[
12,
13
],
[
427,
14
],
[
14,
15
],
[
427,
16
],
[
16,
17
],
[
16,
18
],
[
427,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
21,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
26,
33
],
[
33,
34
],
[
33,
35
],
[
427,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
42,
43
],
[
42,
44
],
[
38,
45
],
[
45,
46
],
[
45,
47
],
[
38,
48
],
[
48,
49
],
[
38,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
38,
55
],
[
55,
56
],
[
56,
57
],
[
38,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
61,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
67,
71
],
[
66,
72
],
[
38,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
36,
78
],
[
78,
79
],
[
427,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
83,
86
],
[
82,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
80,
91
],
[
91,
92
],
[
80,
93
],
[
93,
94
],
[
427,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
101,
109
],
[
109,
110
],
[
110,
111
],
[
101,
112
],
[
113,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
113,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
126,
127
],
[
126,
128
],
[
113,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
133,
134
],
[
133,
135
],
[
113,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
95,
141
],
[
141,
142
],
[
95,
143
],
[
143,
144
],
[
427,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
148,
151
],
[
145,
152
],
[
152,
153
],
[
427,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
157,
160
],
[
154,
161
],
[
161,
162
],
[
427,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
166,
169
],
[
165,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
163,
175
],
[
175,
176
],
[
427,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
427,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
427,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
427,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
427,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
427,
212
],
[
212,
213
],
[
212,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
216,
220
],
[
216,
221
],
[
221,
222
],
[
221,
223
],
[
221,
224
],
[
224,
225
],
[
224,
226
],
[
212,
227
],
[
227,
228
],
[
212,
229
],
[
229,
230
],
[
427,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
234,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
235,
239
],
[
235,
240
],
[
240,
241
],
[
240,
242
],
[
240,
243
],
[
243,
244
],
[
243,
245
],
[
231,
246
],
[
246,
247
],
[
231,
248
],
[
248,
249
],
[
427,
250
],
[
250,
251
],
[
250,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
255,
257
],
[
254,
258
],
[
254,
259
],
[
259,
260
],
[
259,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
263,
265
],
[
265,
266
],
[
265,
267
],
[
250,
268
],
[
268,
269
],
[
427,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
273,
274
],
[
273,
275
],
[
272,
277
],
[
277,
278
],
[
278,
279
],
[
279,
280
],
[
279,
281
],
[
277,
282
],
[
282,
283
],
[
282,
284
],
[
277,
285
],
[
285,
286
],
[
286,
287
],
[
277,
288
],
[
289,
289
],
[
289,
290
],
[
290,
291
],
[
291,
292
],
[
291,
293
],
[
290,
294
],
[
294,
295
],
[
272,
296
],
[
296,
297
],
[
270,
298
],
[
298,
299
],
[
427,
300
],
[
300,
301
],
[
300,
302
],
[
302,
303
],
[
303,
304
],
[
303,
305
],
[
302,
307
],
[
307,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
307,
312
],
[
312,
313
],
[
312,
314
],
[
307,
315
],
[
315,
316
],
[
316,
317
],
[
307,
318
],
[
319,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
320,
324
],
[
324,
325
],
[
302,
326
],
[
326,
327
],
[
300,
328
],
[
328,
329
],
[
427,
330
],
[
330,
331
],
[
330,
332
],
[
332,
333
],
[
330,
334
],
[
334,
335
],
[
330,
336
],
[
336,
337
],
[
336,
338
],
[
338,
339
],
[
339,
340
],
[
339,
341
],
[
330,
342
],
[
342,
343
],
[
342,
344
],
[
344,
345
],
[
345,
346
],
[
345,
347
],
[
342,
348
],
[
348,
349
],
[
330,
350
],
[
350,
351
],
[
350,
352
],
[
352,
353
],
[
353,
354
],
[
354,
355
],
[
355,
356
],
[
355,
357
],
[
354,
358
],
[
358,
359
],
[
359,
360
],
[
360,
361
],
[
353,
362
],
[
362,
363
],
[
363,
364
],
[
364,
365
],
[
364,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
363,
370
],
[
370,
371
],
[
371,
372
],
[
371,
373
],
[
352,
374
],
[
374,
375
],
[
375,
376
],
[
376,
377
],
[
330,
378
],
[
378,
379
],
[
378,
380
],
[
380,
381
],
[
381,
382
],
[
382,
383
],
[
383,
384
],
[
382,
385
],
[
385,
386
],
[
330,
387
],
[
387,
388
],
[
387,
389
],
[
389,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
391,
394
],
[
394,
395
],
[
330,
396
],
[
396,
397
],
[
396,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
401,
402
],
[
400,
403
],
[
403,
404
],
[
330,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
408,
409
],
[
408,
410
],
[
407,
411
],
[
411,
412
],
[
412,
413
],
[
412,
414
],
[
414,
415
],
[
415,
416
],
[
416,
417
],
[
411,
418
],
[
418,
419
],
[
419,
420
],
[
419,
421
],
[
421,
422
],
[
422,
423
],
[
407,
424
],
[
424,
425
],
[
0,
426
],
[
426,
427
],
[
426,
428
]
]
| [
"import java.util.*;\nimport java.io.*;\nimport java.math.*;\n/*\njavac Main.java\njava Main <input.txt> output.txt\n*/\n\npublic class Main\n{ \n public static void process()throws IOException\n {\n \n int x=ni();\n if(x==0)\n pn(1);\n else\n pn(0);\n }\n \n static AnotherReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new AnotherReader();\n boolean oj = true;\n //PrintWriter out=new PrintWriter(\"output\");\n //oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n //if(!oj) sc=new AnotherReader(100);\n\n //int i=1;\n //int T=ni(); while(T-->0)\n //{\n //p(\"Case #\"+i+\": \");\n process();\n //i++;\n //}\n long s = System.currentTimeMillis();\n \n out.flush();\n if(!oj)\n System.out.println(System.currentTimeMillis()-s+\"ms\");\n System.out.close(); \n }\n static void sort(long arr[],int n)\n {\n shuffle(arr,n);\n Arrays.sort(arr);\n }\n static void shuffle(long arr[],int n)\n {\n Random r=new Random();\n for(int i=0;i<n;i++)\n {\n long temp=arr[i];\n int pos=i+r.nextInt(n-i);\n arr[i]=arr[pos];\n arr[pos]=temp;\n }\n }\n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static void pni(Object o){out.println(o);System.out.flush();}\n static int ni()throws IOException{return sc.nextInt();}\n static long nl()throws IOException{return sc.nextLong();}\n static double nd()throws IOException{return sc.nextDouble();}\n static String nln()throws IOException{return sc.nextLine();}\n static String nn()throws IOException{return sc.next();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n static int[] iarr(int N)throws IOException{int[]ARR=new int[N];for(int i=0;i<N;i++){ARR[i]=ni();}return ARR;}\n static long[] larr(int N)throws IOException{long[]ARR=new long[N];for(int i=0;i<N;i++){ARR[i]=nl();}return ARR;}\n static boolean multipleTC=false;\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////\n static class AnotherReader{BufferedReader br; StringTokenizer st;\n AnotherReader()throws FileNotFoundException{\n br=new BufferedReader(new InputStreamReader(System.in));}\n AnotherReader(int a)throws FileNotFoundException{\n br = new BufferedReader(new FileReader(\"input.txt\"));}\n String next()throws IOException{\n while (st == null || !st.hasMoreElements()) {try{\n st = new StringTokenizer(br.readLine());}\n catch (IOException e){ e.printStackTrace(); }}\n return st.nextToken(); } int nextInt() throws IOException{\n return Integer.parseInt(next());}\n long nextLong() throws IOException\n {return Long.parseLong(next());}\n double nextDouble()throws IOException { return Double.parseDouble(next()); }\n String nextLine() throws IOException{ String str = \"\"; try{\n str = br.readLine();} catch (IOException e){\n e.printStackTrace();} return str;}}\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}\n ",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main\n{ \n public static void process()throws IOException\n {\n \n int x=ni();\n if(x==0)\n pn(1);\n else\n pn(0);\n }\n \n static AnotherReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new AnotherReader();\n boolean oj = true;\n //PrintWriter out=new PrintWriter(\"output\");\n //oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n //if(!oj) sc=new AnotherReader(100);\n\n //int i=1;\n //int T=ni(); while(T-->0)\n //{\n //p(\"Case #\"+i+\": \");\n process();\n //i++;\n //}\n long s = System.currentTimeMillis();\n \n out.flush();\n if(!oj)\n System.out.println(System.currentTimeMillis()-s+\"ms\");\n System.out.close(); \n }\n static void sort(long arr[],int n)\n {\n shuffle(arr,n);\n Arrays.sort(arr);\n }\n static void shuffle(long arr[],int n)\n {\n Random r=new Random();\n for(int i=0;i<n;i++)\n {\n long temp=arr[i];\n int pos=i+r.nextInt(n-i);\n arr[i]=arr[pos];\n arr[pos]=temp;\n }\n }\n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static void pni(Object o){out.println(o);System.out.flush();}\n static int ni()throws IOException{return sc.nextInt();}\n static long nl()throws IOException{return sc.nextLong();}\n static double nd()throws IOException{return sc.nextDouble();}\n static String nln()throws IOException{return sc.nextLine();}\n static String nn()throws IOException{return sc.next();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n static int[] iarr(int N)throws IOException{int[]ARR=new int[N];for(int i=0;i<N;i++){ARR[i]=ni();}return ARR;}\n static long[] larr(int N)throws IOException{long[]ARR=new long[N];for(int i=0;i<N;i++){ARR[i]=nl();}return ARR;}\n static boolean multipleTC=false;\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////\n static class AnotherReader{BufferedReader br; StringTokenizer st;\n AnotherReader()throws FileNotFoundException{\n br=new BufferedReader(new InputStreamReader(System.in));}\n AnotherReader(int a)throws FileNotFoundException{\n br = new BufferedReader(new FileReader(\"input.txt\"));}\n String next()throws IOException{\n while (st == null || !st.hasMoreElements()) {try{\n st = new StringTokenizer(br.readLine());}\n catch (IOException e){ e.printStackTrace(); }}\n return st.nextToken(); } int nextInt() throws IOException{\n return Integer.parseInt(next());}\n long nextLong() throws IOException\n {return Long.parseLong(next());}\n double nextDouble()throws IOException { return Double.parseDouble(next()); }\n String nextLine() throws IOException{ String str = \"\"; try{\n str = br.readLine();} catch (IOException e){\n e.printStackTrace();} return str;}}\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"Main",
"static AnotherReader sc;",
"sc",
"static PrintWriter out;",
"out",
"static boolean multipleTC=false;",
"multipleTC",
"false",
"public static void process()throws IOException\n {\n \n int x=ni();\n if(x==0)\n pn(1);\n else\n pn(0);\n }",
"process",
"{\n \n int x=ni();\n if(x==0)\n pn(1);\n else\n pn(0);\n }",
"int x=ni();",
"x",
"ni()",
"ni",
"if(x==0)\n pn(1);\n else\n pn(0);",
"x==0",
"x",
"0",
"pn(1)",
"pn",
"1",
"pn(0)",
"pn",
"0",
"public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new AnotherReader();\n boolean oj = true;\n //PrintWriter out=new PrintWriter(\"output\");\n //oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n //if(!oj) sc=new AnotherReader(100);\n\n //int i=1;\n //int T=ni(); while(T-->0)\n //{\n //p(\"Case #\"+i+\": \");\n process();\n //i++;\n //}\n long s = System.currentTimeMillis();\n \n out.flush();\n if(!oj)\n System.out.println(System.currentTimeMillis()-s+\"ms\");\n System.out.close(); \n }",
"main",
"{\n out = new PrintWriter(System.out);\n sc=new AnotherReader();\n boolean oj = true;\n //PrintWriter out=new PrintWriter(\"output\");\n //oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n //if(!oj) sc=new AnotherReader(100);\n\n //int i=1;\n //int T=ni(); while(T-->0)\n //{\n //p(\"Case #\"+i+\": \");\n process();\n //i++;\n //}\n long s = System.currentTimeMillis();\n \n out.flush();\n if(!oj)\n System.out.println(System.currentTimeMillis()-s+\"ms\");\n System.out.close(); \n }",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"sc=new AnotherReader()",
"sc",
"new AnotherReader()",
"boolean oj = true;",
"oj",
"true",
"process()",
"process",
"long s = System.currentTimeMillis();",
"s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"out.flush()",
"out.flush",
"out",
"if(!oj)\n System.out.println(System.currentTimeMillis()-s+\"ms\");",
"!oj",
"oj",
"System.out.println(System.currentTimeMillis()-s+\"ms\")",
"System.out.println",
"System.out",
"System",
"System.out",
"System.currentTimeMillis()-s+\"ms\"",
"System.currentTimeMillis()-s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"s",
"\"ms\"",
"System.out.close()",
"System.out.close",
"System.out",
"System",
"System.out",
"String[]args",
"args",
"static void sort(long arr[],int n)\n {\n shuffle(arr,n);\n Arrays.sort(arr);\n }",
"sort",
"{\n shuffle(arr,n);\n Arrays.sort(arr);\n }",
"shuffle(arr,n)",
"shuffle",
"arr",
"n",
"Arrays.sort(arr)",
"Arrays.sort",
"Arrays",
"arr",
"long arr[]",
"arr",
"int n",
"n",
"static void shuffle(long arr[],int n)\n {\n Random r=new Random();\n for(int i=0;i<n;i++)\n {\n long temp=arr[i];\n int pos=i+r.nextInt(n-i);\n arr[i]=arr[pos];\n arr[pos]=temp;\n }\n }",
"shuffle",
"{\n Random r=new Random();\n for(int i=0;i<n;i++)\n {\n long temp=arr[i];\n int pos=i+r.nextInt(n-i);\n arr[i]=arr[pos];\n arr[pos]=temp;\n }\n }",
"Random r=new Random();",
"r",
"new Random()",
"for(int i=0;i<n;i++)\n {\n long temp=arr[i];\n int pos=i+r.nextInt(n-i);\n arr[i]=arr[pos];\n arr[pos]=temp;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n long temp=arr[i];\n int pos=i+r.nextInt(n-i);\n arr[i]=arr[pos];\n arr[pos]=temp;\n }",
"{\n long temp=arr[i];\n int pos=i+r.nextInt(n-i);\n arr[i]=arr[pos];\n arr[pos]=temp;\n }",
"long temp=arr[i];",
"temp",
"arr[i]",
"arr",
"i",
"int pos=i+r.nextInt(n-i);",
"pos",
"i+r.nextInt(n-i)",
"i",
"r.nextInt(n-i)",
"r.nextInt",
"r",
"n-i",
"n",
"i",
"arr[i]=arr[pos]",
"arr[i]",
"arr",
"i",
"arr[pos]",
"arr",
"pos",
"arr[pos]=temp",
"arr[pos]",
"arr",
"pos",
"temp",
"long arr[]",
"arr",
"int n",
"n",
"static void pn(Object o){out.println(o);}",
"pn",
"{out.println(o);}",
"out.println(o)",
"out.println",
"out",
"o",
"Object o",
"o",
"static void p(Object o){out.print(o);}",
"p",
"{out.print(o);}",
"out.print(o)",
"out.print",
"out",
"o",
"Object o",
"o",
"static void pni(Object o){out.println(o);System.out.flush();}",
"pni",
"{out.println(o);System.out.flush();}",
"out.println(o)",
"out.println",
"out",
"o",
"System.out.flush()",
"System.out.flush",
"System.out",
"System",
"System.out",
"Object o",
"o",
"static int ni()throws IOException{return sc.nextInt();}",
"ni",
"{return sc.nextInt();}",
"return sc.nextInt();",
"sc.nextInt()",
"sc.nextInt",
"sc",
"static long nl()throws IOException{return sc.nextLong();}",
"nl",
"{return sc.nextLong();}",
"return sc.nextLong();",
"sc.nextLong()",
"sc.nextLong",
"sc",
"static double nd()throws IOException{return sc.nextDouble();}",
"nd",
"{return sc.nextDouble();}",
"return sc.nextDouble();",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"static String nln()throws IOException{return sc.nextLine();}",
"nln",
"{return sc.nextLine();}",
"return sc.nextLine();",
"sc.nextLine()",
"sc.nextLine",
"sc",
"static String nn()throws IOException{return sc.next();}",
"nn",
"{return sc.next();}",
"return sc.next();",
"sc.next()",
"sc.next",
"sc",
"static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}",
"gcd",
"{return (b==0)?a:gcd(b,a%b);}",
"return (b==0)?a:gcd(b,a%b);",
"(b==0)?a:gcd(b,a%b)",
"(b==0)",
"b",
"0",
"a",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}",
"gcd",
"{return (b==0)?a:gcd(b,a%b);}",
"return (b==0)?a:gcd(b,a%b);",
"(b==0)?a:gcd(b,a%b)",
"(b==0)",
"b",
"0",
"a",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}",
"bit",
"{return (n==0)?0:(1+bit(n&(n-1)));}",
"return (n==0)?0:(1+bit(n&(n-1)));",
"(n==0)?0:(1+bit(n&(n-1)))",
"(n==0)",
"n",
"0",
"0",
"(1+bit(n&(n-1)))",
"1",
"bit(n&(n-1))",
"bit",
"n&(n-1)",
"n",
"(n-1)",
"n",
"1",
"long n",
"n",
"static int[] iarr(int N)throws IOException{int[]ARR=new int[N];for(int i=0;i<N;i++){ARR[i]=ni();}return ARR;}",
"iarr",
"{int[]ARR=new int[N];for(int i=0;i<N;i++){ARR[i]=ni();}return ARR;}",
"int[]ARR=new int[N];",
"ARR",
"new int[N]",
"N",
"for(int i=0;i<N;i++){ARR[i]=ni();}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{ARR[i]=ni();}",
"{ARR[i]=ni();}",
"ARR[i]=ni()",
"ARR[i]",
"ARR",
"i",
"ni()",
"ni",
"return ARR;",
"ARR",
"int N",
"N",
"static long[] larr(int N)throws IOException{long[]ARR=new long[N];for(int i=0;i<N;i++){ARR[i]=nl();}return ARR;}",
"larr",
"{long[]ARR=new long[N];for(int i=0;i<N;i++){ARR[i]=nl();}return ARR;}",
"long[]ARR=new long[N];",
"ARR",
"new long[N]",
"N",
"for(int i=0;i<N;i++){ARR[i]=nl();}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{ARR[i]=nl();}",
"{ARR[i]=nl();}",
"ARR[i]=nl()",
"ARR[i]",
"ARR",
"i",
"nl()",
"nl",
"return ARR;",
"ARR",
"int N",
"N",
" static class AnotherReader{BufferedReader br; StringTokenizer st;\n AnotherReader()throws FileNotFoundException{\n br=new BufferedReader(new InputStreamReader(System.in));}\n AnotherReader(int a)throws FileNotFoundException{\n br = new BufferedReader(new FileReader(\"input.txt\"));}\n String next()throws IOException{\n while (st == null || !st.hasMoreElements()) {try{\n st = new StringTokenizer(br.readLine());}\n catch (IOException e){ e.printStackTrace(); }}\n return st.nextToken(); } int nextInt() throws IOException{\n return Integer.parseInt(next());}\n long nextLong() throws IOException\n {return Long.parseLong(next());}\n double nextDouble()throws IOException { return Double.parseDouble(next()); }\n String nextLine() throws IOException{ String str = \"\"; try{\n str = br.readLine();} catch (IOException e){\n e.printStackTrace();} return str;}}",
"AnotherReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"AnotherReader()throws FileNotFoundException{\n br=new BufferedReader(new InputStreamReader(System.in));}",
"AnotherReader",
"{\n br=new BufferedReader(new InputStreamReader(System.in));}",
"br=new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"AnotherReader(int a)throws FileNotFoundException{\n br = new BufferedReader(new FileReader(\"input.txt\"));}",
"AnotherReader",
"{\n br = new BufferedReader(new FileReader(\"input.txt\"));}",
"br = new BufferedReader(new FileReader(\"input.txt\"))",
"br",
"new BufferedReader(new FileReader(\"input.txt\"))",
"int a",
"a",
"String next()throws IOException{\n while (st == null || !st.hasMoreElements()) {try{\n st = new StringTokenizer(br.readLine());}\n catch (IOException e){ e.printStackTrace(); }}\n return st.nextToken(); }",
"next",
"{\n while (st == null || !st.hasMoreElements()) {try{\n st = new StringTokenizer(br.readLine());}\n catch (IOException e){ e.printStackTrace(); }}\n return st.nextToken(); }",
"while (st == null || !st.hasMoreElements()) {try{\n st = new StringTokenizer(br.readLine());}\n catch (IOException e){ e.printStackTrace(); }}",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{try{\n st = new StringTokenizer(br.readLine());}\n catch (IOException e){ e.printStackTrace(); }}",
"try{\n st = new StringTokenizer(br.readLine());}\n catch (IOException e){ e.printStackTrace(); }",
"catch (IOException e){ e.printStackTrace(); }",
"IOException e",
"{ e.printStackTrace(); }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n st = new StringTokenizer(br.readLine());}",
"st = new StringTokenizer(br.readLine())",
"st",
"new StringTokenizer(br.readLine())",
"return st.nextToken();",
"st.nextToken()",
"st.nextToken",
"st",
"int nextInt() throws IOException{\n return Integer.parseInt(next());}",
"nextInt",
"{\n return Integer.parseInt(next());}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() throws IOException\n {return Long.parseLong(next());}",
"nextLong",
"{return Long.parseLong(next());}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"double nextDouble()throws IOException { return Double.parseDouble(next()); }",
"nextDouble",
"{ return Double.parseDouble(next()); }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() throws IOException{ String str = \"\"; try{\n str = br.readLine();} catch (IOException e){\n e.printStackTrace();} return str;}",
"nextLine",
"{ String str = \"\"; try{\n str = br.readLine();} catch (IOException e){\n e.printStackTrace();} return str;}",
"String str = \"\";",
"str",
"\"\"",
"try{\n str = br.readLine();} catch (IOException e){\n e.printStackTrace();}",
"catch (IOException e){\n e.printStackTrace();}",
"IOException e",
"{\n e.printStackTrace();}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n str = br.readLine();}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main\n{ \n public static void process()throws IOException\n {\n \n int x=ni();\n if(x==0)\n pn(1);\n else\n pn(0);\n }\n \n static AnotherReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new AnotherReader();\n boolean oj = true;\n //PrintWriter out=new PrintWriter(\"output\");\n //oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n //if(!oj) sc=new AnotherReader(100);\n\n //int i=1;\n //int T=ni(); while(T-->0)\n //{\n //p(\"Case #\"+i+\": \");\n process();\n //i++;\n //}\n long s = System.currentTimeMillis();\n \n out.flush();\n if(!oj)\n System.out.println(System.currentTimeMillis()-s+\"ms\");\n System.out.close(); \n }\n static void sort(long arr[],int n)\n {\n shuffle(arr,n);\n Arrays.sort(arr);\n }\n static void shuffle(long arr[],int n)\n {\n Random r=new Random();\n for(int i=0;i<n;i++)\n {\n long temp=arr[i];\n int pos=i+r.nextInt(n-i);\n arr[i]=arr[pos];\n arr[pos]=temp;\n }\n }\n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static void pni(Object o){out.println(o);System.out.flush();}\n static int ni()throws IOException{return sc.nextInt();}\n static long nl()throws IOException{return sc.nextLong();}\n static double nd()throws IOException{return sc.nextDouble();}\n static String nln()throws IOException{return sc.nextLine();}\n static String nn()throws IOException{return sc.next();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n static int[] iarr(int N)throws IOException{int[]ARR=new int[N];for(int i=0;i<N;i++){ARR[i]=ni();}return ARR;}\n static long[] larr(int N)throws IOException{long[]ARR=new long[N];for(int i=0;i<N;i++){ARR[i]=nl();}return ARR;}\n static boolean multipleTC=false;\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////\n static class AnotherReader{BufferedReader br; StringTokenizer st;\n AnotherReader()throws FileNotFoundException{\n br=new BufferedReader(new InputStreamReader(System.in));}\n AnotherReader(int a)throws FileNotFoundException{\n br = new BufferedReader(new FileReader(\"input.txt\"));}\n String next()throws IOException{\n while (st == null || !st.hasMoreElements()) {try{\n st = new StringTokenizer(br.readLine());}\n catch (IOException e){ e.printStackTrace(); }}\n return st.nextToken(); } int nextInt() throws IOException{\n return Integer.parseInt(next());}\n long nextLong() throws IOException\n {return Long.parseLong(next());}\n double nextDouble()throws IOException { return Double.parseDouble(next()); }\n String nextLine() throws IOException{ String str = \"\"; try{\n str = br.readLine();} catch (IOException e){\n e.printStackTrace();} return str;}}\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"public class Main\n{ \n public static void process()throws IOException\n {\n \n int x=ni();\n if(x==0)\n pn(1);\n else\n pn(0);\n }\n \n static AnotherReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc=new AnotherReader();\n boolean oj = true;\n //PrintWriter out=new PrintWriter(\"output\");\n //oj = System.getProperty(\"ONLINE_JUDGE\") != null;\n //if(!oj) sc=new AnotherReader(100);\n\n //int i=1;\n //int T=ni(); while(T-->0)\n //{\n //p(\"Case #\"+i+\": \");\n process();\n //i++;\n //}\n long s = System.currentTimeMillis();\n \n out.flush();\n if(!oj)\n System.out.println(System.currentTimeMillis()-s+\"ms\");\n System.out.close(); \n }\n static void sort(long arr[],int n)\n {\n shuffle(arr,n);\n Arrays.sort(arr);\n }\n static void shuffle(long arr[],int n)\n {\n Random r=new Random();\n for(int i=0;i<n;i++)\n {\n long temp=arr[i];\n int pos=i+r.nextInt(n-i);\n arr[i]=arr[pos];\n arr[pos]=temp;\n }\n }\n \n static void pn(Object o){out.println(o);}\n static void p(Object o){out.print(o);}\n static void pni(Object o){out.println(o);System.out.flush();}\n static int ni()throws IOException{return sc.nextInt();}\n static long nl()throws IOException{return sc.nextLong();}\n static double nd()throws IOException{return sc.nextDouble();}\n static String nln()throws IOException{return sc.nextLine();}\n static String nn()throws IOException{return sc.next();}\n static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}\n static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}\n static int[] iarr(int N)throws IOException{int[]ARR=new int[N];for(int i=0;i<N;i++){ARR[i]=ni();}return ARR;}\n static long[] larr(int N)throws IOException{long[]ARR=new long[N];for(int i=0;i<N;i++){ARR[i]=nl();}return ARR;}\n static boolean multipleTC=false;\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////\n static class AnotherReader{BufferedReader br; StringTokenizer st;\n AnotherReader()throws FileNotFoundException{\n br=new BufferedReader(new InputStreamReader(System.in));}\n AnotherReader(int a)throws FileNotFoundException{\n br = new BufferedReader(new FileReader(\"input.txt\"));}\n String next()throws IOException{\n while (st == null || !st.hasMoreElements()) {try{\n st = new StringTokenizer(br.readLine());}\n catch (IOException e){ e.printStackTrace(); }}\n return st.nextToken(); } int nextInt() throws IOException{\n return Integer.parseInt(next());}\n long nextLong() throws IOException\n {return Long.parseLong(next());}\n double nextDouble()throws IOException { return Double.parseDouble(next()); }\n String nextLine() throws IOException{ String str = \"\"; try{\n str = br.readLine();} catch (IOException e){\n e.printStackTrace();} return str;}}\n \n/////////////////////////////////////////////////////////////////////////////////////////////////////////////\n}",
"Main"
]
| import java.util.*;
import java.io.*;
import java.math.*;
/*
javac Main.java
java Main <input.txt> output.txt
*/
public class Main
{
public static void process()throws IOException
{
int x=ni();
if(x==0)
pn(1);
else
pn(0);
}
static AnotherReader sc;
static PrintWriter out;
public static void main(String[]args)throws IOException
{
out = new PrintWriter(System.out);
sc=new AnotherReader();
boolean oj = true;
//PrintWriter out=new PrintWriter("output");
//oj = System.getProperty("ONLINE_JUDGE") != null;
//if(!oj) sc=new AnotherReader(100);
//int i=1;
//int T=ni(); while(T-->0)
//{
//p("Case #"+i+": ");
process();
//i++;
//}
long s = System.currentTimeMillis();
out.flush();
if(!oj)
System.out.println(System.currentTimeMillis()-s+"ms");
System.out.close();
}
static void sort(long arr[],int n)
{
shuffle(arr,n);
Arrays.sort(arr);
}
static void shuffle(long arr[],int n)
{
Random r=new Random();
for(int i=0;i<n;i++)
{
long temp=arr[i];
int pos=i+r.nextInt(n-i);
arr[i]=arr[pos];
arr[pos]=temp;
}
}
static void pn(Object o){out.println(o);}
static void p(Object o){out.print(o);}
static void pni(Object o){out.println(o);System.out.flush();}
static int ni()throws IOException{return sc.nextInt();}
static long nl()throws IOException{return sc.nextLong();}
static double nd()throws IOException{return sc.nextDouble();}
static String nln()throws IOException{return sc.nextLine();}
static String nn()throws IOException{return sc.next();}
static long gcd(long a, long b)throws IOException{return (b==0)?a:gcd(b,a%b);}
static int gcd(int a, int b)throws IOException{return (b==0)?a:gcd(b,a%b);}
static int bit(long n)throws IOException{return (n==0)?0:(1+bit(n&(n-1)));}
static int[] iarr(int N)throws IOException{int[]ARR=new int[N];for(int i=0;i<N;i++){ARR[i]=ni();}return ARR;}
static long[] larr(int N)throws IOException{long[]ARR=new long[N];for(int i=0;i<N;i++){ARR[i]=nl();}return ARR;}
static boolean multipleTC=false;
/////////////////////////////////////////////////////////////////////////////////////////////////////////
static class AnotherReader{BufferedReader br; StringTokenizer st;
AnotherReader()throws FileNotFoundException{
br=new BufferedReader(new InputStreamReader(System.in));}
AnotherReader(int a)throws FileNotFoundException{
br = new BufferedReader(new FileReader("input.txt"));}
String next()throws IOException{
while (st == null || !st.hasMoreElements()) {try{
st = new StringTokenizer(br.readLine());}
catch (IOException e){ e.printStackTrace(); }}
return st.nextToken(); } int nextInt() throws IOException{
return Integer.parseInt(next());}
long nextLong() throws IOException
{return Long.parseLong(next());}
double nextDouble()throws IOException { return Double.parseDouble(next()); }
String nextLine() throws IOException{ String str = ""; try{
str = br.readLine();} catch (IOException e){
e.printStackTrace();} return str;}}
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
0,
13,
4,
18,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
58,
5
],
[
58,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
21,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
6,
43
],
[
43,
44
],
[
58,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
45,
55
],
[
55,
56
],
[
0,
57
],
[
57,
58
],
[
57,
59
]
]
| [
"import java.util.Scanner;\npublic class Main {\n void run(String[] args){\n Scanner scan=new Scanner(System.in);\n Integer x;\n Integer print;\n x=scan.nextInt();\n if(x==0){\n System.out.println(1);\n }\n else if(x==1){\n System.out.println(0);\n }\n }\n public static void main(String args[]){\n Main printer = new Main();\n printer.run(args);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n void run(String[] args){\n Scanner scan=new Scanner(System.in);\n Integer x;\n Integer print;\n x=scan.nextInt();\n if(x==0){\n System.out.println(1);\n }\n else if(x==1){\n System.out.println(0);\n }\n }\n public static void main(String args[]){\n Main printer = new Main();\n printer.run(args);\n }\n}",
"Main",
"void run(String[] args){\n Scanner scan=new Scanner(System.in);\n Integer x;\n Integer print;\n x=scan.nextInt();\n if(x==0){\n System.out.println(1);\n }\n else if(x==1){\n System.out.println(0);\n }\n }",
"run",
"{\n Scanner scan=new Scanner(System.in);\n Integer x;\n Integer print;\n x=scan.nextInt();\n if(x==0){\n System.out.println(1);\n }\n else if(x==1){\n System.out.println(0);\n }\n }",
"Scanner scan=new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"Integer x;",
"x",
"Integer print;",
"print",
"x=scan.nextInt()",
"x",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(x==0){\n System.out.println(1);\n }\n else if(x==1){\n System.out.println(0);\n }",
"x==0",
"x",
"0",
"{\n System.out.println(1);\n }",
"System.out.println(1)",
"System.out.println",
"System.out",
"System",
"System.out",
"1",
"if(x==1){\n System.out.println(0);\n }",
"x==1",
"x",
"1",
"{\n System.out.println(0);\n }",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"String[] args",
"args",
"public static void main(String args[]){\n Main printer = new Main();\n printer.run(args);\n }",
"main",
"{\n Main printer = new Main();\n printer.run(args);\n }",
"Main printer = new Main();",
"printer",
"new Main()",
"printer.run(args)",
"printer.run",
"printer",
"args",
"String args[]",
"args",
"public class Main {\n void run(String[] args){\n Scanner scan=new Scanner(System.in);\n Integer x;\n Integer print;\n x=scan.nextInt();\n if(x==0){\n System.out.println(1);\n }\n else if(x==1){\n System.out.println(0);\n }\n }\n public static void main(String args[]){\n Main printer = new Main();\n printer.run(args);\n }\n}",
"public class Main {\n void run(String[] args){\n Scanner scan=new Scanner(System.in);\n Integer x;\n Integer print;\n x=scan.nextInt();\n if(x==0){\n System.out.println(1);\n }\n else if(x==1){\n System.out.println(0);\n }\n }\n public static void main(String args[]){\n Main printer = new Main();\n printer.run(args);\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
void run(String[] args){
Scanner scan=new Scanner(System.in);
Integer x;
Integer print;
x=scan.nextInt();
if(x==0){
System.out.println(1);
}
else if(x==1){
System.out.println(0);
}
}
public static void main(String args[]){
Main printer = new Main();
printer.run(args);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
39,
5
],
[
39,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
8,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
17,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
8,
33
],
[
33,
34
],
[
34,
35
],
[
6,
36
],
[
36,
37
],
[
0,
38
],
[
38,
39
],
[
38,
40
]
]
| [
"import java.util.*;\n\npublic class Main{\n public static void main(String args[]){\n \tScanner scan = new Scanner(System.in);\n \tint num = scan.nextInt();\n \tif(num==0)\n \t\tSystem.out.println(1);\n \telse\n \t\tSystem.out.println(0);\n \tscan.close();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n public static void main(String args[]){\n \tScanner scan = new Scanner(System.in);\n \tint num = scan.nextInt();\n \tif(num==0)\n \t\tSystem.out.println(1);\n \telse\n \t\tSystem.out.println(0);\n \tscan.close();\n }\n}",
"Main",
"public static void main(String args[]){\n \tScanner scan = new Scanner(System.in);\n \tint num = scan.nextInt();\n \tif(num==0)\n \t\tSystem.out.println(1);\n \telse\n \t\tSystem.out.println(0);\n \tscan.close();\n }",
"main",
"{\n \tScanner scan = new Scanner(System.in);\n \tint num = scan.nextInt();\n \tif(num==0)\n \t\tSystem.out.println(1);\n \telse\n \t\tSystem.out.println(0);\n \tscan.close();\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int num = scan.nextInt();",
"num",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(num==0)\n \t\tSystem.out.println(1);\n \telse\n \t\tSystem.out.println(0);",
"num==0",
"num",
"0",
"System.out.println(1)",
"System.out.println",
"System.out",
"System",
"System.out",
"1",
"System.out.println(0)",
"System.out.println",
"System.out",
"System",
"System.out",
"0",
"scan.close()",
"scan.close",
"scan",
"String args[]",
"args",
"public class Main{\n public static void main(String args[]){\n \tScanner scan = new Scanner(System.in);\n \tint num = scan.nextInt();\n \tif(num==0)\n \t\tSystem.out.println(1);\n \telse\n \t\tSystem.out.println(0);\n \tscan.close();\n }\n}",
"public class Main{\n public static void main(String args[]){\n \tScanner scan = new Scanner(System.in);\n \tint num = scan.nextInt();\n \tif(num==0)\n \t\tSystem.out.println(1);\n \telse\n \t\tSystem.out.println(0);\n \tscan.close();\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int num = scan.nextInt();
if(num==0)
System.out.println(1);
else
System.out.println(0);
scan.close();
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.