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,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
41,
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,
0,
13,
17,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
14,
13,
30,
0,
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
],
[
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
],
[
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
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
37,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
37,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
37,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
68,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
8,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
6,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
]
| [
"\nimport java.util.*;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // 整数の入力\n int a = sc.nextInt();\n int count = 0;\n String d;\n Boolean e = false;\n for (int i = 0; i < a; i++) {\n // スペース区切りの整数の入力\n int b = sc.nextInt();\n int c = sc.nextInt();\n\n if (b == c) {\n count += 1;\n } else {\n count = 0;\n }\n if (count == 3) {\n e = true;\n }\n }\n\n if (e) {\n d = \"Yes\";\n } else {\n d = \"No\";\n }\n\n // 出力\n System.out.println(d);\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 // 整数の入力\n int a = sc.nextInt();\n int count = 0;\n String d;\n Boolean e = false;\n for (int i = 0; i < a; i++) {\n // スペース区切りの整数の入力\n int b = sc.nextInt();\n int c = sc.nextInt();\n\n if (b == c) {\n count += 1;\n } else {\n count = 0;\n }\n if (count == 3) {\n e = true;\n }\n }\n\n if (e) {\n d = \"Yes\";\n } else {\n d = \"No\";\n }\n\n // 出力\n System.out.println(d);\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // 整数の入力\n int a = sc.nextInt();\n int count = 0;\n String d;\n Boolean e = false;\n for (int i = 0; i < a; i++) {\n // スペース区切りの整数の入力\n int b = sc.nextInt();\n int c = sc.nextInt();\n\n if (b == c) {\n count += 1;\n } else {\n count = 0;\n }\n if (count == 3) {\n e = true;\n }\n }\n\n if (e) {\n d = \"Yes\";\n } else {\n d = \"No\";\n }\n\n // 出力\n System.out.println(d);\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n // 整数の入力\n int a = sc.nextInt();\n int count = 0;\n String d;\n Boolean e = false;\n for (int i = 0; i < a; i++) {\n // スペース区切りの整数の入力\n int b = sc.nextInt();\n int c = sc.nextInt();\n\n if (b == c) {\n count += 1;\n } else {\n count = 0;\n }\n if (count == 3) {\n e = true;\n }\n }\n\n if (e) {\n d = \"Yes\";\n } else {\n d = \"No\";\n }\n\n // 出力\n System.out.println(d);\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"String d;",
"d",
"Boolean e = false;",
"e",
"false",
"for (int i = 0; i < a; i++) {\n // スペース区切りの整数の入力\n int b = sc.nextInt();\n int c = sc.nextInt();\n\n if (b == c) {\n count += 1;\n } else {\n count = 0;\n }\n if (count == 3) {\n e = true;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a",
"i",
"a",
"i++",
"i++",
"i",
"{\n // スペース区切りの整数の入力\n int b = sc.nextInt();\n int c = sc.nextInt();\n\n if (b == c) {\n count += 1;\n } else {\n count = 0;\n }\n if (count == 3) {\n e = true;\n }\n }",
"{\n // スペース区切りの整数の入力\n int b = sc.nextInt();\n int c = sc.nextInt();\n\n if (b == c) {\n count += 1;\n } else {\n count = 0;\n }\n if (count == 3) {\n e = true;\n }\n }",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = sc.nextInt();",
"c",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (b == c) {\n count += 1;\n } else {\n count = 0;\n }",
"b == c",
"b",
"c",
"{\n count += 1;\n }",
"count += 1",
"count",
"1",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"if (count == 3) {\n e = true;\n }",
"count == 3",
"count",
"3",
"{\n e = true;\n }",
"e = true",
"e",
"true",
"if (e) {\n d = \"Yes\";\n } else {\n d = \"No\";\n }",
"e",
"{\n d = \"Yes\";\n }",
"d = \"Yes\"",
"d",
"\"Yes\"",
"{\n d = \"No\";\n }",
"d = \"No\"",
"d",
"\"No\"",
"System.out.println(d)",
"System.out.println",
"System.out",
"System",
"System.out",
"d",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // 整数の入力\n int a = sc.nextInt();\n int count = 0;\n String d;\n Boolean e = false;\n for (int i = 0; i < a; i++) {\n // スペース区切りの整数の入力\n int b = sc.nextInt();\n int c = sc.nextInt();\n\n if (b == c) {\n count += 1;\n } else {\n count = 0;\n }\n if (count == 3) {\n e = true;\n }\n }\n\n if (e) {\n d = \"Yes\";\n } else {\n d = \"No\";\n }\n\n // 出力\n System.out.println(d);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n // 整数の入力\n int a = sc.nextInt();\n int count = 0;\n String d;\n Boolean e = false;\n for (int i = 0; i < a; i++) {\n // スペース区切りの整数の入力\n int b = sc.nextInt();\n int c = sc.nextInt();\n\n if (b == c) {\n count += 1;\n } else {\n count = 0;\n }\n if (count == 3) {\n e = true;\n }\n }\n\n if (e) {\n d = \"Yes\";\n } else {\n d = \"No\";\n }\n\n // 出力\n System.out.println(d);\n }\n}",
"Main"
]
|
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
// 整数の入力
int a = sc.nextInt();
int count = 0;
String d;
Boolean e = false;
for (int i = 0; i < a; i++) {
// スペース区切りの整数の入力
int b = sc.nextInt();
int c = sc.nextInt();
if (b == c) {
count += 1;
} else {
count = 0;
}
if (count == 3) {
e = true;
}
}
if (e) {
d = "Yes";
} else {
d = "No";
}
// 出力
System.out.println(d);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
29,
17,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
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,
30,
40,
13,
30,
0,
13,
17,
14,
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,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
88,
5
],
[
88,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
6,
11
],
[
11,
12
],
[
6,
13
],
[
13,
14
],
[
88,
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,
29
],
[
29,
30
],
[
29,
31
],
[
17,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
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
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
48,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
37,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
17,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
67,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
15,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\t// 2-100\n\tpublic static String check(int x, int y) {\n\t\t\n\t\treturn \"\";\n\t}\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint count = 0;\n\t\tint vit = 0;\n\t\twhile (n-- != 0) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tif (x == y) {\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\tvit = 1;\n\t\t\t}\n\t\t}\n\t\tif (vit == 1) {\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\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t// 2-100\n\tpublic static String check(int x, int y) {\n\t\t\n\t\treturn \"\";\n\t}\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint count = 0;\n\t\tint vit = 0;\n\t\twhile (n-- != 0) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tif (x == y) {\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\tvit = 1;\n\t\t\t}\n\t\t}\n\t\tif (vit == 1) {\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\n}",
"Main",
"// 2-100\n\tpublic static String check(int x, int y) {\n\t\t\n\t\treturn \"\";\n\t}",
"check",
"{\n\t\t\n\t\treturn \"\";\n\t}",
"return \"\";",
"\"\"",
"int x",
"x",
"int y",
"y",
"public static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint count = 0;\n\t\tint vit = 0;\n\t\twhile (n-- != 0) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tif (x == y) {\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\tvit = 1;\n\t\t\t}\n\t\t}\n\t\tif (vit == 1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint count = 0;\n\t\tint vit = 0;\n\t\twhile (n-- != 0) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tif (x == y) {\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\tvit = 1;\n\t\t\t}\n\t\t}\n\t\tif (vit == 1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int count = 0;",
"count",
"0",
"int vit = 0;",
"vit",
"0",
"while (n-- != 0) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tif (x == y) {\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\tvit = 1;\n\t\t\t}\n\t\t}",
"n-- != 0",
"n--",
"n",
"0",
"{\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tif (x == y) {\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\tvit = 1;\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\tcount++;\n\t\t\t}else {\n\t\t\t\tcount=0;\n\t\t\t}",
"x == y",
"x",
"y",
"{\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\tvit = 1;\n\t\t\t}",
"count==3",
"count",
"3",
"{\n\t\t\t\tvit = 1;\n\t\t\t}",
"vit = 1",
"vit",
"1",
"if (vit == 1) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"vit == 1",
"vit",
"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\"",
"String args[]",
"args",
"public class Main {\n\t// 2-100\n\tpublic static String check(int x, int y) {\n\t\t\n\t\treturn \"\";\n\t}\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint count = 0;\n\t\tint vit = 0;\n\t\twhile (n-- != 0) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tif (x == y) {\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\tvit = 1;\n\t\t\t}\n\t\t}\n\t\tif (vit == 1) {\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\n}",
"public class Main {\n\t// 2-100\n\tpublic static String check(int x, int y) {\n\t\t\n\t\treturn \"\";\n\t}\n\tpublic static void main(String args[]) {\n\t\tScanner in = new Scanner(System.in);\n\t\tint n = in.nextInt();\n\t\tint count = 0;\n\t\tint vit = 0;\n\t\twhile (n-- != 0) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tif (x == y) {\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\tvit = 1;\n\t\t\t}\n\t\t}\n\t\tif (vit == 1) {\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\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
// 2-100
public static String check(int x, int y) {
return "";
}
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int count = 0;
int vit = 0;
while (n-- != 0) {
int x = in.nextInt();
int y = in.nextInt();
if (x == y) {
count++;
}else {
count=0;
}
if (count==3) {
vit = 1;
}
}
if (vit == 1) {
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,
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.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 String result = \"No\";\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 >= 3) {\n result = \"Yes\";\n }\n\n }\n System.out.println(result);\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 n = sc.nextInt();\n String result = \"No\";\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 >= 3) {\n result = \"Yes\";\n }\n\n }\n System.out.println(result);\n\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n String result = \"No\";\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 >= 3) {\n result = \"Yes\";\n }\n\n }\n System.out.println(result);\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n String result = \"No\";\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 >= 3) {\n result = \"Yes\";\n }\n\n }\n System.out.println(result);\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"String result = \"No\";",
"result",
"\"No\"",
"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 >= 3) {\n result = \"Yes\";\n }\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 >= 3) {\n result = \"Yes\";\n }\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 >= 3) {\n result = \"Yes\";\n }\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 >= 3) {\n result = \"Yes\";\n }",
"zoroCount >= 3",
"zoroCount",
"3",
"{\n result = \"Yes\";\n }",
"result = \"Yes\"",
"result",
"\"Yes\"",
"System.out.println(result)",
"System.out.println",
"System.out",
"System",
"System.out",
"result",
"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 String result = \"No\";\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 >= 3) {\n result = \"Yes\";\n }\n\n }\n System.out.println(result);\n\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 String result = \"No\";\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 >= 3) {\n result = \"Yes\";\n }\n\n }\n System.out.println(result);\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();
String result = "No";
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 >= 3) {
result = "Yes";
}
}
System.out.println(result);
}
} |
[
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,
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,
13,
17,
30,
0,
13,
17,
3,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
0,
13,
2,
13,
17,
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
],
[
127,
5
],
[
127,
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
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
8,
56
],
[
56,
57
],
[
56,
58
],
[
8,
59
],
[
59,
60
],
[
59,
61
],
[
8,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
62,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
75,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
85,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
84,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
84,
101
],
[
101,
102
],
[
101,
103
],
[
8,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
109,
111
],
[
104,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
104,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
6,
124
],
[
124,
125
],
[
0,
126
],
[
126,
127
],
[
126,
128
]
]
| [
"import java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n \tfor(int j=0;j<=1;j++)\n \t\tarr[i][j]=sc.nextInt();\n }\n int ct=0,bl=0;\n for(int i=0;i<n;i++)\n {\n \tif(ct==3)\n \t{\n \t\tbl=1;\n \t\tbreak;\n \t}\n \telse if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;\n }\n if(bl==1 || ct==3)\n \tSystem.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n \tfor(int j=0;j<=1;j++)\n \t\tarr[i][j]=sc.nextInt();\n }\n int ct=0,bl=0;\n for(int i=0;i<n;i++)\n {\n \tif(ct==3)\n \t{\n \t\tbl=1;\n \t\tbreak;\n \t}\n \telse if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;\n }\n if(bl==1 || ct==3)\n \tSystem.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n \tfor(int j=0;j<=1;j++)\n \t\tarr[i][j]=sc.nextInt();\n }\n int ct=0,bl=0;\n for(int i=0;i<n;i++)\n {\n \tif(ct==3)\n \t{\n \t\tbl=1;\n \t\tbreak;\n \t}\n \telse if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;\n }\n if(bl==1 || ct==3)\n \tSystem.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n \tfor(int j=0;j<=1;j++)\n \t\tarr[i][j]=sc.nextInt();\n }\n int ct=0,bl=0;\n for(int i=0;i<n;i++)\n {\n \tif(ct==3)\n \t{\n \t\tbl=1;\n \t\tbreak;\n \t}\n \telse if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;\n }\n if(bl==1 || ct==3)\n \tSystem.out.println(\"Yes\");\n else\n \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 arr[][]=new int[n][2];",
"arr",
"new int[n][2]",
"n",
"2",
"for(int i=0;i<n;i++)\n {\n \tfor(int j=0;j<=1;j++)\n \t\tarr[i][j]=sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tfor(int j=0;j<=1;j++)\n \t\tarr[i][j]=sc.nextInt();\n }",
"{\n \tfor(int j=0;j<=1;j++)\n \t\tarr[i][j]=sc.nextInt();\n }",
"for(int j=0;j<=1;j++)\n \t\tarr[i][j]=sc.nextInt();",
"int j=0;",
"int j=0;",
"j",
"0",
"j<=1",
"j",
"1",
"j++",
"j++",
"j",
"arr[i][j]=sc.nextInt();",
"arr[i][j]=sc.nextInt()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ct=0",
"ct",
"0",
"bl=0;",
"bl",
"0",
"for(int i=0;i<n;i++)\n {\n \tif(ct==3)\n \t{\n \t\tbl=1;\n \t\tbreak;\n \t}\n \telse if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \tif(ct==3)\n \t{\n \t\tbl=1;\n \t\tbreak;\n \t}\n \telse if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;\n }",
"{\n \tif(ct==3)\n \t{\n \t\tbl=1;\n \t\tbreak;\n \t}\n \telse if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;\n }",
"if(ct==3)\n \t{\n \t\tbl=1;\n \t\tbreak;\n \t}\n \telse if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;",
"ct==3",
"ct",
"3",
"{\n \t\tbl=1;\n \t\tbreak;\n \t}",
"bl=1",
"bl",
"1",
"break;",
"if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;",
"arr[i][0]==arr[i][1]",
"arr[i][0]",
"arr[i]",
"arr",
"i",
"0",
"arr[i][1]",
"arr[i]",
"arr",
"i",
"1",
"ct=ct+1",
"ct",
"ct+1",
"ct",
"1",
"ct=0",
"ct",
"0",
"if(bl==1 || ct==3)\n \tSystem.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");",
"bl==1 || ct==3",
"bl==1",
"bl",
"1",
"ct==3",
"ct",
"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\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n \tfor(int j=0;j<=1;j++)\n \t\tarr[i][j]=sc.nextInt();\n }\n int ct=0,bl=0;\n for(int i=0;i<n;i++)\n {\n \tif(ct==3)\n \t{\n \t\tbl=1;\n \t\tbreak;\n \t}\n \telse if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;\n }\n if(bl==1 || ct==3)\n \tSystem.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n \tfor(int j=0;j<=1;j++)\n \t\tarr[i][j]=sc.nextInt();\n }\n int ct=0,bl=0;\n for(int i=0;i<n;i++)\n {\n \tif(ct==3)\n \t{\n \t\tbl=1;\n \t\tbreak;\n \t}\n \telse if(arr[i][0]==arr[i][1])\n \t\tct=ct+1;\n \telse\n \t\tct=0;\n }\n if(bl==1 || ct==3)\n \tSystem.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\n\t}\n\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc=new Scanner(System.in);
int n=sc.nextInt();
int arr[][]=new int[n][2];
for(int i=0;i<n;i++)
{
for(int j=0;j<=1;j++)
arr[i][j]=sc.nextInt();
}
int ct=0,bl=0;
for(int i=0;i<n;i++)
{
if(ct==3)
{
bl=1;
break;
}
else if(arr[i][0]==arr[i][1])
ct=ct+1;
else
ct=0;
}
if(bl==1 || ct==3)
System.out.println("Yes");
else
System.out.println("No");
}
}
|
[
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,
29,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
23,
13,
23,
13,
12,
13,
30,
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,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
4,
13,
13,
13,
4,
13,
13,
2,
13,
17,
4,
13,
13,
2,
13,
17,
30,
4,
18,
13,
17,
29,
4,
18,
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
],
[
912,
11
],
[
912,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
14,
16
],
[
912,
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
],
[
912,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
67,
70
],
[
70,
71
],
[
70,
72
],
[
63,
73
],
[
73,
74
],
[
912,
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
],
[
912,
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
],
[
912,
117
],
[
117,
118
],
[
117,
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
],
[
117,
132
],
[
132,
133
],
[
117,
134
],
[
134,
135
],
[
912,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
142,
143
],
[
138,
144
],
[
144,
145
],
[
144,
146
],
[
138,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
149,
154
],
[
154,
155
],
[
154,
156
],
[
149,
157
],
[
157,
158
],
[
158,
159
],
[
149,
160
],
[
161,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
162,
167
],
[
167,
168
],
[
167,
169
],
[
162,
170
],
[
170,
171
],
[
171,
172
],
[
162,
173
],
[
174,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
176,
180
],
[
175,
181
],
[
181,
182
],
[
182,
183
],
[
138,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
184,
189
],
[
189,
190
],
[
189,
191
],
[
184,
192
],
[
192,
193
],
[
193,
194
],
[
184,
195
],
[
196,
196
],
[
196,
197
],
[
197,
198
],
[
199,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
200,
203
],
[
199,
204
],
[
204,
205
],
[
204,
206
],
[
204,
207
],
[
207,
208
],
[
207,
209
],
[
199,
210
],
[
210,
211
],
[
210,
212
],
[
210,
213
],
[
213,
214
],
[
213,
215
],
[
197,
216
],
[
216,
217
],
[
217,
218
],
[
218,
219
],
[
217,
220
],
[
216,
221
],
[
138,
222
],
[
222,
223
],
[
223,
224
],
[
222,
225
],
[
136,
226
],
[
226,
227
],
[
136,
228
],
[
228,
229
],
[
912,
230
],
[
230,
231
],
[
230,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
232,
236
],
[
236,
237
],
[
236,
238
],
[
232,
239
],
[
239,
240
],
[
239,
241
],
[
232,
242
],
[
242,
243
],
[
243,
244
],
[
242,
245
],
[
242,
246
],
[
232,
247
],
[
247,
248
],
[
248,
249
],
[
232,
250
],
[
250,
251
],
[
251,
252
],
[
230,
253
],
[
253,
254
],
[
912,
255
],
[
255,
256
],
[
255,
257
],
[
257,
258
],
[
257,
259
],
[
260,
261
],
[
260,
262
],
[
255,
263
],
[
263,
264
],
[
255,
265
],
[
265,
266
],
[
255,
267
],
[
267,
268
],
[
255,
269
],
[
269,
270
],
[
269,
271
],
[
271,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
274,
276
],
[
255,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
280,
284
],
[
284,
285
],
[
279,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
286,
290
],
[
290,
291
],
[
291,
292
],
[
291,
293
],
[
290,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
296,
299
],
[
290,
300
],
[
300,
301
],
[
301,
302
],
[
301,
303
],
[
300,
304
],
[
304,
305
],
[
305,
306
],
[
279,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
310,
311
],
[
255,
312
],
[
312,
313
],
[
312,
314
],
[
314,
315
],
[
315,
316
],
[
315,
317
],
[
314,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
314,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
322,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
314,
330
],
[
330,
331
],
[
330,
332
],
[
314,
333
],
[
333,
334
],
[
334,
335
],
[
334,
336
],
[
333,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
340,
341
],
[
337,
342
],
[
342,
343
],
[
342,
344
],
[
344,
345
],
[
314,
346
],
[
346,
347
],
[
347,
348
],
[
348,
349
],
[
348,
350
],
[
346,
351
],
[
351,
352
],
[
352,
353
],
[
353,
354
],
[
354,
355
],
[
354,
356
],
[
353,
357
],
[
357,
358
],
[
357,
359
],
[
352,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
360,
364
],
[
364,
365
],
[
364,
366
],
[
366,
367
],
[
366,
368
],
[
360,
369
],
[
369,
370
],
[
369,
371
],
[
371,
372
],
[
352,
373
],
[
373,
374
],
[
314,
375
],
[
375,
376
],
[
376,
377
],
[
376,
378
],
[
255,
379
],
[
379,
380
],
[
379,
381
],
[
381,
382
],
[
382,
383
],
[
382,
384
],
[
381,
385
],
[
385,
386
],
[
385,
387
],
[
387,
388
],
[
381,
389
],
[
389,
390
],
[
390,
391
],
[
390,
392
],
[
389,
393
],
[
393,
394
],
[
393,
395
],
[
395,
396
],
[
381,
397
],
[
397,
398
],
[
397,
399
],
[
381,
400
],
[
400,
401
],
[
401,
402
],
[
401,
403
],
[
400,
404
],
[
404,
405
],
[
405,
406
],
[
405,
407
],
[
407,
408
],
[
404,
409
],
[
409,
410
],
[
409,
411
],
[
411,
412
],
[
381,
413
],
[
413,
414
],
[
414,
415
],
[
415,
416
],
[
415,
417
],
[
413,
418
],
[
418,
419
],
[
419,
420
],
[
420,
421
],
[
421,
422
],
[
421,
423
],
[
420,
424
],
[
424,
425
],
[
424,
426
],
[
419,
427
],
[
427,
428
],
[
428,
429
],
[
428,
430
],
[
427,
431
],
[
431,
432
],
[
431,
433
],
[
433,
434
],
[
433,
435
],
[
427,
436
],
[
436,
437
],
[
436,
438
],
[
438,
439
],
[
419,
440
],
[
440,
441
],
[
381,
442
],
[
442,
443
],
[
443,
444
],
[
443,
445
],
[
255,
446
],
[
446,
447
],
[
446,
448
],
[
448,
449
],
[
449,
450
],
[
449,
451
],
[
448,
452
],
[
452,
453
],
[
452,
454
],
[
454,
455
],
[
448,
456
],
[
456,
457
],
[
457,
458
],
[
457,
459
],
[
456,
460
],
[
460,
461
],
[
460,
462
],
[
462,
463
],
[
448,
464
],
[
464,
465
],
[
464,
466
],
[
448,
467
],
[
467,
468
],
[
468,
469
],
[
468,
470
],
[
467,
471
],
[
471,
472
],
[
472,
473
],
[
472,
474
],
[
474,
475
],
[
471,
476
],
[
476,
477
],
[
476,
478
],
[
478,
479
],
[
448,
480
],
[
480,
481
],
[
481,
482
],
[
482,
483
],
[
483,
484
],
[
483,
485
],
[
481,
486
],
[
486,
487
],
[
486,
488
],
[
480,
489
],
[
489,
490
],
[
490,
491
],
[
491,
492
],
[
492,
493
],
[
492,
494
],
[
491,
495
],
[
495,
496
],
[
495,
497
],
[
490,
498
],
[
498,
499
],
[
499,
500
],
[
499,
501
],
[
498,
502
],
[
502,
503
],
[
502,
504
],
[
504,
505
],
[
504,
506
],
[
498,
507
],
[
507,
508
],
[
507,
509
],
[
509,
510
],
[
490,
511
],
[
511,
512
],
[
448,
513
],
[
513,
514
],
[
514,
515
],
[
514,
516
],
[
513,
517
],
[
517,
518
],
[
518,
519
],
[
518,
520
],
[
520,
521
],
[
517,
522
],
[
522,
523
],
[
522,
524
],
[
517,
525
],
[
525,
526
],
[
526,
527
],
[
527,
528
],
[
527,
529
],
[
525,
530
],
[
530,
531
],
[
531,
532
],
[
532,
533
],
[
533,
534
],
[
533,
535
],
[
532,
536
],
[
536,
537
],
[
536,
538
],
[
531,
539
],
[
539,
540
],
[
540,
541
],
[
540,
542
],
[
539,
543
],
[
543,
544
],
[
543,
545
],
[
545,
546
],
[
546,
547
],
[
546,
548
],
[
545,
549
],
[
539,
550
],
[
550,
551
],
[
550,
552
],
[
552,
553
],
[
531,
554
],
[
554,
555
],
[
448,
556
],
[
556,
557
],
[
557,
558
],
[
557,
559
],
[
255,
560
],
[
560,
561
],
[
560,
562
],
[
562,
563
],
[
563,
564
],
[
563,
565
],
[
562,
566
],
[
566,
567
],
[
566,
568
],
[
568,
569
],
[
562,
570
],
[
570,
571
],
[
571,
572
],
[
571,
573
],
[
570,
574
],
[
574,
575
],
[
574,
576
],
[
576,
577
],
[
562,
578
],
[
578,
579
],
[
579,
580
],
[
580,
581
],
[
580,
582
],
[
578,
583
],
[
583,
584
],
[
584,
585
],
[
585,
586
],
[
584,
587
],
[
583,
588
],
[
588,
589
],
[
588,
590
],
[
590,
591
],
[
562,
592
],
[
592,
593
],
[
593,
594
],
[
594,
595
],
[
255,
596
],
[
596,
597
],
[
596,
598
],
[
598,
599
],
[
599,
600
],
[
599,
601
],
[
598,
602
],
[
602,
603
],
[
603,
604
],
[
604,
605
],
[
604,
606
],
[
602,
607
],
[
607,
608
],
[
607,
609
],
[
602,
610
],
[
610,
611
],
[
611,
612
],
[
602,
613
],
[
614,
614
],
[
614,
615
],
[
615,
616
],
[
616,
617
],
[
615,
618
],
[
618,
619
],
[
619,
620
],
[
598,
621
],
[
621,
622
],
[
596,
623
],
[
623,
624
],
[
255,
625
],
[
625,
626
],
[
625,
627
],
[
627,
628
],
[
628,
629
],
[
628,
630
],
[
627,
632
],
[
632,
633
],
[
633,
634
],
[
634,
635
],
[
634,
636
],
[
632,
637
],
[
637,
638
],
[
637,
639
],
[
632,
640
],
[
640,
641
],
[
641,
642
],
[
632,
643
],
[
644,
644
],
[
644,
645
],
[
645,
646
],
[
646,
647
],
[
646,
648
],
[
645,
649
],
[
649,
650
],
[
650,
651
],
[
627,
652
],
[
652,
653
],
[
625,
654
],
[
654,
655
],
[
255,
656
],
[
656,
657
],
[
656,
658
],
[
658,
659
],
[
659,
660
],
[
659,
661
],
[
658,
662
],
[
662,
663
],
[
663,
664
],
[
664,
665
],
[
664,
666
],
[
662,
667
],
[
667,
668
],
[
667,
669
],
[
662,
670
],
[
670,
671
],
[
671,
672
],
[
662,
673
],
[
674,
674
],
[
674,
675
],
[
675,
676
],
[
676,
677
],
[
675,
678
],
[
678,
679
],
[
679,
680
],
[
658,
681
],
[
681,
682
],
[
656,
683
],
[
683,
684
],
[
255,
685
],
[
685,
686
],
[
685,
687
],
[
687,
688
],
[
688,
689
],
[
688,
690
],
[
687,
692
],
[
692,
693
],
[
693,
694
],
[
694,
695
],
[
694,
696
],
[
692,
697
],
[
697,
698
],
[
697,
699
],
[
692,
700
],
[
700,
701
],
[
701,
702
],
[
692,
703
],
[
704,
704
],
[
704,
705
],
[
705,
706
],
[
706,
707
],
[
706,
708
],
[
705,
709
],
[
709,
710
],
[
710,
711
],
[
687,
712
],
[
712,
713
],
[
685,
714
],
[
714,
715
],
[
255,
716
],
[
716,
717
],
[
716,
718
],
[
718,
719
],
[
719,
720
],
[
719,
721
],
[
718,
722
],
[
722,
723
],
[
723,
724
],
[
724,
725
],
[
724,
726
],
[
722,
727
],
[
727,
728
],
[
727,
729
],
[
722,
730
],
[
730,
731
],
[
731,
732
],
[
722,
733
],
[
734,
734
],
[
734,
735
],
[
735,
736
],
[
736,
737
],
[
735,
738
],
[
738,
739
],
[
739,
740
],
[
718,
741
],
[
741,
742
],
[
716,
743
],
[
743,
744
],
[
255,
745
],
[
745,
746
],
[
745,
747
],
[
747,
748
],
[
748,
749
],
[
748,
750
],
[
747,
751
],
[
751,
752
],
[
752,
753
],
[
753,
754
],
[
753,
755
],
[
751,
756
],
[
756,
757
],
[
756,
758
],
[
751,
759
],
[
759,
760
],
[
760,
761
],
[
751,
762
],
[
763,
763
],
[
763,
764
],
[
764,
765
],
[
765,
766
],
[
764,
767
],
[
767,
768
],
[
768,
769
],
[
747,
770
],
[
770,
771
],
[
745,
772
],
[
772,
773
],
[
255,
774
],
[
774,
775
],
[
774,
776
],
[
776,
777
],
[
777,
778
],
[
777,
779
],
[
776,
781
],
[
781,
782
],
[
782,
783
],
[
783,
784
],
[
783,
785
],
[
781,
786
],
[
786,
787
],
[
786,
788
],
[
781,
789
],
[
789,
790
],
[
790,
791
],
[
781,
792
],
[
793,
793
],
[
793,
794
],
[
794,
795
],
[
795,
796
],
[
795,
797
],
[
794,
798
],
[
798,
799
],
[
799,
800
],
[
776,
801
],
[
801,
802
],
[
774,
803
],
[
803,
804
],
[
255,
805
],
[
805,
806
],
[
805,
807
],
[
807,
808
],
[
808,
809
],
[
808,
810
],
[
807,
812
],
[
812,
813
],
[
813,
814
],
[
814,
815
],
[
814,
816
],
[
812,
817
],
[
817,
818
],
[
817,
819
],
[
812,
820
],
[
820,
821
],
[
821,
822
],
[
812,
823
],
[
824,
824
],
[
824,
825
],
[
825,
826
],
[
826,
827
],
[
826,
828
],
[
825,
829
],
[
829,
830
],
[
830,
831
],
[
807,
832
],
[
832,
833
],
[
805,
834
],
[
834,
835
],
[
255,
836
],
[
836,
837
],
[
836,
838
],
[
838,
839
],
[
839,
840
],
[
843,
841
],
[
853,
842
],
[
850,
843
],
[
843,
844
],
[
844,
845
],
[
844,
846
],
[
843,
847
],
[
847,
848
],
[
847,
849
],
[
850,
850
],
[
850,
851
],
[
850,
852
],
[
853,
853
],
[
853,
854
],
[
853,
855
],
[
843,
856
],
[
856,
857
],
[
856,
858
],
[
858,
859
],
[
839,
860
],
[
860,
861
],
[
838,
862
],
[
862,
863
],
[
836,
864
],
[
864,
865
],
[
912,
866
],
[
866,
867
],
[
866,
868
],
[
868,
869
],
[
866,
870
],
[
870,
871
],
[
870,
872
],
[
872,
873
],
[
873,
874
],
[
873,
875
],
[
866,
876
],
[
876,
877
],
[
876,
878
],
[
878,
879
],
[
879,
880
],
[
880,
881
],
[
879,
882
],
[
882,
883
],
[
882,
884
],
[
876,
885
],
[
885,
886
],
[
866,
887
],
[
887,
888
],
[
887,
889
],
[
889,
890
],
[
890,
891
],
[
890,
892
],
[
889,
893
],
[
893,
894
],
[
894,
895
],
[
893,
896
],
[
887,
897
],
[
897,
898
],
[
866,
899
],
[
899,
900
],
[
899,
901
],
[
901,
902
],
[
902,
903
],
[
903,
904
],
[
866,
905
],
[
905,
906
],
[
905,
907
],
[
907,
908
],
[
908,
909
],
[
909,
910
],
[
0,
911
],
[
911,
912
],
[
911,
913
]
]
| [
"\n\n/*\n AUTH -> krishna-3249\n DATE -> 9/19/20\n TIME -> 5:45 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 private boolean check(int[][] rolls, int roll_number) {\n return rolls[roll_number][0]==rolls[roll_number][1];\n }\n\n public void solve(Read input, Write output) throws Exception {\n int N = input.readInt();\n int[][] rolls = new int[N][2];\n for (int i=0;i<N;i++) {\n for (int j=0;j<2;j++) {\n rolls[i][j] = input.readInt();\n }\n }\n for (int i=2;i<N;i++) {\n if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {\n output.printLine(\"Yes\");\n return;\n }\n }\n output.printLine(\"No\");\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 private boolean check(int[][] rolls, int roll_number) {\n return rolls[roll_number][0]==rolls[roll_number][1];\n }\n\n public void solve(Read input, Write output) throws Exception {\n int N = input.readInt();\n int[][] rolls = new int[N][2];\n for (int i=0;i<N;i++) {\n for (int j=0;j<2;j++) {\n rolls[i][j] = input.readInt();\n }\n }\n for (int i=2;i<N;i++) {\n if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {\n output.printLine(\"Yes\");\n return;\n }\n }\n output.printLine(\"No\");\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",
"private boolean check(int[][] rolls, int roll_number) {\n return rolls[roll_number][0]==rolls[roll_number][1];\n }",
"check",
"{\n return rolls[roll_number][0]==rolls[roll_number][1];\n }",
"return rolls[roll_number][0]==rolls[roll_number][1];",
"rolls[roll_number][0]==rolls[roll_number][1]",
"rolls[roll_number][0]",
"rolls[roll_number]",
"rolls",
"roll_number",
"0",
"rolls[roll_number][1]",
"rolls[roll_number]",
"rolls",
"roll_number",
"1",
"int[][] rolls",
"rolls",
"int roll_number",
"roll_number",
"public void solve(Read input, Write output) throws Exception {\n int N = input.readInt();\n int[][] rolls = new int[N][2];\n for (int i=0;i<N;i++) {\n for (int j=0;j<2;j++) {\n rolls[i][j] = input.readInt();\n }\n }\n for (int i=2;i<N;i++) {\n if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {\n output.printLine(\"Yes\");\n return;\n }\n }\n output.printLine(\"No\");\n }",
"solve",
"{\n int N = input.readInt();\n int[][] rolls = new int[N][2];\n for (int i=0;i<N;i++) {\n for (int j=0;j<2;j++) {\n rolls[i][j] = input.readInt();\n }\n }\n for (int i=2;i<N;i++) {\n if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {\n output.printLine(\"Yes\");\n return;\n }\n }\n output.printLine(\"No\");\n }",
"int N = input.readInt();",
"N",
"input.readInt()",
"input.readInt",
"input",
"int[][] rolls = new int[N][2];",
"rolls",
"new int[N][2]",
"N",
"2",
"for (int i=0;i<N;i++) {\n for (int j=0;j<2;j++) {\n rolls[i][j] = input.readInt();\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 rolls[i][j] = input.readInt();\n }\n }",
"{\n for (int j=0;j<2;j++) {\n rolls[i][j] = input.readInt();\n }\n }",
"for (int j=0;j<2;j++) {\n rolls[i][j] = input.readInt();\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<2",
"j",
"2",
"j++",
"j++",
"j",
"{\n rolls[i][j] = input.readInt();\n }",
"{\n rolls[i][j] = input.readInt();\n }",
"rolls[i][j] = input.readInt()",
"rolls[i][j]",
"rolls[i]",
"rolls",
"i",
"j",
"input.readInt()",
"input.readInt",
"input",
"for (int i=2;i<N;i++) {\n if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {\n output.printLine(\"Yes\");\n return;\n }\n }",
"int i=2;",
"int i=2;",
"i",
"2",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {\n output.printLine(\"Yes\");\n return;\n }\n }",
"{\n if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {\n output.printLine(\"Yes\");\n return;\n }\n }",
"if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {\n output.printLine(\"Yes\");\n return;\n }",
"check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)",
"check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)",
"check(rolls, i)",
"check",
"rolls",
"i",
"check(rolls, i-1)",
"check",
"rolls",
"i-1",
"i",
"1",
"check(rolls, i-2)",
"check",
"rolls",
"i-2",
"i",
"2",
"{\n output.printLine(\"Yes\");\n return;\n }",
"output.printLine(\"Yes\")",
"output.printLine",
"output",
"\"Yes\"",
"return;",
"output.printLine(\"No\")",
"output.printLine",
"output",
"\"No\"",
"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 private boolean check(int[][] rolls, int roll_number) {\n return rolls[roll_number][0]==rolls[roll_number][1];\n }\n\n public void solve(Read input, Write output) throws Exception {\n int N = input.readInt();\n int[][] rolls = new int[N][2];\n for (int i=0;i<N;i++) {\n for (int j=0;j<2;j++) {\n rolls[i][j] = input.readInt();\n }\n }\n for (int i=2;i<N;i++) {\n if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {\n output.printLine(\"Yes\");\n return;\n }\n }\n output.printLine(\"No\");\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 private boolean check(int[][] rolls, int roll_number) {\n return rolls[roll_number][0]==rolls[roll_number][1];\n }\n\n public void solve(Read input, Write output) throws Exception {\n int N = input.readInt();\n int[][] rolls = new int[N][2];\n for (int i=0;i<N;i++) {\n for (int j=0;j<2;j++) {\n rolls[i][j] = input.readInt();\n }\n }\n for (int i=2;i<N;i++) {\n if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {\n output.printLine(\"Yes\");\n return;\n }\n }\n output.printLine(\"No\");\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/19/20
TIME -> 5:45 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);
}
private boolean check(int[][] rolls, int roll_number) {
return rolls[roll_number][0]==rolls[roll_number][1];
}
public void solve(Read input, Write output) throws Exception {
int N = input.readInt();
int[][] rolls = new int[N][2];
for (int i=0;i<N;i++) {
for (int j=0;j<2;j++) {
rolls[i][j] = input.readInt();
}
}
for (int i=2;i<N;i++) {
if (check(rolls, i) && check(rolls, i-1) && check(rolls, i-2)) {
output.printLine("Yes");
return;
}
}
output.printLine("No");
}
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,
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,
41,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
13,
14,
2,
2,
2,
13,
17,
2,
4,
18,
13,
2,
13,
17,
17,
2,
4,
18,
13,
2,
13,
17,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
0,
13,
20,
41,
13,
18,
13,
13,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
41,
13,
20,
41,
13,
17,
41,
13,
17,
42,
2,
13,
2,
13,
17,
30,
0,
13,
4,
18,
13,
4,
18,
13,
13,
40,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
2,
13,
17,
14,
2,
13,
4,
18,
13,
2,
2,
13,
17,
17,
30,
4,
18,
13,
13,
30,
4,
18,
13,
17,
4,
18,
18,
13,
13,
4,
13,
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
]
| [
[
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
],
[
33,
34
],
[
31,
35
],
[
35,
36
],
[
31,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
39,
45
],
[
45,
46
],
[
45,
47
],
[
39,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
48,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
62,
69
],
[
69,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
75,
82
],
[
71,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
83,
90
],
[
69,
91
],
[
91,
92
],
[
39,
93
],
[
93,
94
],
[
37,
95
],
[
95,
96
],
[
31,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
99,
105
],
[
105,
106
],
[
105,
107
],
[
99,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
99,
113
],
[
113,
114
],
[
113,
115
],
[
99,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
99,
121
],
[
121,
122
],
[
121,
123
],
[
99,
124
],
[
124,
125
],
[
124,
126
],
[
99,
127
],
[
127,
128
],
[
127,
129
],
[
99,
130
],
[
130,
131
],
[
130,
132
],
[
99,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
133,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
139,
145
],
[
145,
146
],
[
146,
147
],
[
145,
148
],
[
139,
149
],
[
149,
150
],
[
99,
151
],
[
151,
152
],
[
151,
153
],
[
99,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
154,
159
],
[
159,
160
],
[
159,
161
],
[
154,
162
],
[
162,
163
],
[
163,
164
],
[
154,
165
],
[
166,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
169,
172
],
[
172,
173
],
[
172,
174
],
[
166,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
178,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
181,
185
],
[
175,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
187,
190
],
[
175,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
192,
195
],
[
99,
196
],
[
196,
197
],
[
197,
198
],
[
198,
199
],
[
198,
200
],
[
196,
201
],
[
201,
202
],
[
201,
203
],
[
97,
204
],
[
204,
205
],
[
31,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
206,
210
],
[
210,
211
],
[
206,
212
],
[
212,
213
],
[
212,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
214,
218
],
[
218,
219
],
[
218,
220
],
[
212,
221
],
[
221,
222
],
[
206,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
228,
230
],
[
227,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
226,
235
],
[
235,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
240,
241
],
[
236,
242
],
[
242,
243
],
[
243,
244
],
[
243,
245
],
[
225,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
206,
250
],
[
250,
251
],
[
250,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
254,
257
],
[
257,
258
]
]
| [
"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.ArrayList;\nimport java.util.Collections;\nimport java.util.List;\nimport java.util.StringTokenizer;\n\nclass Main {\n private static InputReader in;\n private static PrintWriter out;\n\n // static String convert(String input){\n // int lgt = input.length();\n // char last = input.charAt(lgt-1);\n // if(last == 's'){\n // return input + \"es\";\n // }else{\n // return input + \"s\";\n // }\n \n // }\n\n static String isInRow(List<Integer> lst){\n int lgt = lst.size();\n int temp3 = 0;\n for(int i =0; i < lgt-2; i++){\n temp3 = lst.get(i);\n if((temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0) )\n return \"Yes\";\n }\n return \"No\";\n }\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n in = new InputReader(inputStream);\n OutputStream outputStream = System.out;\n out = new PrintWriter(outputStream);\n\n int length = in.nextInt();\n List<Integer> arr = new ArrayList<Integer>();\n List<Integer> arr2 = new ArrayList<Integer>();\n int counter = 0;\n int temp = 0;\n while(counter < length * 2){\n temp = in.nextInt();\n arr.add(temp);\n counter++;\n }\n // System.out.println(arr);\n\n int temp2 = 0;\n for(int i = 0; i < length; i++){\n temp2 = arr.get(i*2);\n if(temp2 == arr.get(i*2+1)){\n arr2.add(temp2);\n }\n else{\n arr2.add(0);\n }\n }\n System.out.println(isInRow(arr2));\n \n }\n\n // taken from https://codeforces.com/submissions/Petr\n // together with PrintWriter, these input-output (IO) is much faster than the usual Scanner(System.in) and System.out\n // please use these classes to avoid your fast algorithm gets Time Limit Exceeded caused by slow input-output (IO)\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}",
"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.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"class Main {\n private static InputReader in;\n private static PrintWriter out;\n\n // static String convert(String input){\n // int lgt = input.length();\n // char last = input.charAt(lgt-1);\n // if(last == 's'){\n // return input + \"es\";\n // }else{\n // return input + \"s\";\n // }\n \n // }\n\n static String isInRow(List<Integer> lst){\n int lgt = lst.size();\n int temp3 = 0;\n for(int i =0; i < lgt-2; i++){\n temp3 = lst.get(i);\n if((temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0) )\n return \"Yes\";\n }\n return \"No\";\n }\n\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n in = new InputReader(inputStream);\n OutputStream outputStream = System.out;\n out = new PrintWriter(outputStream);\n\n int length = in.nextInt();\n List<Integer> arr = new ArrayList<Integer>();\n List<Integer> arr2 = new ArrayList<Integer>();\n int counter = 0;\n int temp = 0;\n while(counter < length * 2){\n temp = in.nextInt();\n arr.add(temp);\n counter++;\n }\n // System.out.println(arr);\n\n int temp2 = 0;\n for(int i = 0; i < length; i++){\n temp2 = arr.get(i*2);\n if(temp2 == arr.get(i*2+1)){\n arr2.add(temp2);\n }\n else{\n arr2.add(0);\n }\n }\n System.out.println(isInRow(arr2));\n \n }\n\n // taken from https://codeforces.com/submissions/Petr\n // together with PrintWriter, these input-output (IO) is much faster than the usual Scanner(System.in) and System.out\n // please use these classes to avoid your fast algorithm gets Time Limit Exceeded caused by slow input-output (IO)\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}",
"Main",
"private static InputReader in;",
"in",
"private static PrintWriter out;",
"out",
"static String isInRow(List<Integer> lst){\n int lgt = lst.size();\n int temp3 = 0;\n for(int i =0; i < lgt-2; i++){\n temp3 = lst.get(i);\n if((temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0) )\n return \"Yes\";\n }\n return \"No\";\n }",
"isInRow",
"{\n int lgt = lst.size();\n int temp3 = 0;\n for(int i =0; i < lgt-2; i++){\n temp3 = lst.get(i);\n if((temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0) )\n return \"Yes\";\n }\n return \"No\";\n }",
"int lgt = lst.size();",
"lgt",
"lst.size()",
"lst.size",
"lst",
"int temp3 = 0;",
"temp3",
"0",
"for(int i =0; i < lgt-2; i++){\n temp3 = lst.get(i);\n if((temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0) )\n return \"Yes\";\n }",
"int i =0;",
"int i =0;",
"i",
"0",
"i < lgt-2",
"i",
"lgt-2",
"lgt",
"2",
"i++",
"i++",
"i",
"{\n temp3 = lst.get(i);\n if((temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0) )\n return \"Yes\";\n }",
"{\n temp3 = lst.get(i);\n if((temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0) )\n return \"Yes\";\n }",
"temp3 = lst.get(i)",
"temp3",
"lst.get(i)",
"lst.get",
"lst",
"i",
"if((temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0) )\n return \"Yes\";",
"(temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0)",
"(temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0)",
"(temp3 != 0)",
"temp3",
"0",
"(lst.get(i+1) != 0)",
"lst.get(i+1)",
"lst.get",
"lst",
"i+1",
"i",
"1",
"0",
"(lst.get(i+2) != 0)",
"lst.get(i+2)",
"lst.get",
"lst",
"i+2",
"i",
"2",
"0",
"return \"Yes\";",
"\"Yes\"",
"return \"No\";",
"\"No\"",
"List<Integer> lst",
"lst",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n in = new InputReader(inputStream);\n OutputStream outputStream = System.out;\n out = new PrintWriter(outputStream);\n\n int length = in.nextInt();\n List<Integer> arr = new ArrayList<Integer>();\n List<Integer> arr2 = new ArrayList<Integer>();\n int counter = 0;\n int temp = 0;\n while(counter < length * 2){\n temp = in.nextInt();\n arr.add(temp);\n counter++;\n }\n // System.out.println(arr);\n\n int temp2 = 0;\n for(int i = 0; i < length; i++){\n temp2 = arr.get(i*2);\n if(temp2 == arr.get(i*2+1)){\n arr2.add(temp2);\n }\n else{\n arr2.add(0);\n }\n }\n System.out.println(isInRow(arr2));\n \n }",
"main",
"{\n InputStream inputStream = System.in;\n in = new InputReader(inputStream);\n OutputStream outputStream = System.out;\n out = new PrintWriter(outputStream);\n\n int length = in.nextInt();\n List<Integer> arr = new ArrayList<Integer>();\n List<Integer> arr2 = new ArrayList<Integer>();\n int counter = 0;\n int temp = 0;\n while(counter < length * 2){\n temp = in.nextInt();\n arr.add(temp);\n counter++;\n }\n // System.out.println(arr);\n\n int temp2 = 0;\n for(int i = 0; i < length; i++){\n temp2 = arr.get(i*2);\n if(temp2 == arr.get(i*2+1)){\n arr2.add(temp2);\n }\n else{\n arr2.add(0);\n }\n }\n System.out.println(isInRow(arr2));\n \n }",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"in = new InputReader(inputStream)",
"in",
"new InputReader(inputStream)",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"out = new PrintWriter(outputStream)",
"out",
"new PrintWriter(outputStream)",
"int length = in.nextInt();",
"length",
"in.nextInt()",
"in.nextInt",
"in",
"List<Integer> arr = new ArrayList<Integer>();",
"arr",
"new ArrayList<Integer>()",
"List<Integer> arr2 = new ArrayList<Integer>();",
"arr2",
"new ArrayList<Integer>()",
"int counter = 0;",
"counter",
"0",
"int temp = 0;",
"temp",
"0",
"while(counter < length * 2){\n temp = in.nextInt();\n arr.add(temp);\n counter++;\n }",
"counter < length * 2",
"counter",
"length * 2",
"length",
"2",
"{\n temp = in.nextInt();\n arr.add(temp);\n counter++;\n }",
"temp = in.nextInt()",
"temp",
"in.nextInt()",
"in.nextInt",
"in",
"arr.add(temp)",
"arr.add",
"arr",
"temp",
"counter++",
"counter",
"int temp2 = 0;",
"temp2",
"0",
"for(int i = 0; i < length; i++){\n temp2 = arr.get(i*2);\n if(temp2 == arr.get(i*2+1)){\n arr2.add(temp2);\n }\n else{\n arr2.add(0);\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < length",
"i",
"length",
"i++",
"i++",
"i",
"{\n temp2 = arr.get(i*2);\n if(temp2 == arr.get(i*2+1)){\n arr2.add(temp2);\n }\n else{\n arr2.add(0);\n }\n }",
"{\n temp2 = arr.get(i*2);\n if(temp2 == arr.get(i*2+1)){\n arr2.add(temp2);\n }\n else{\n arr2.add(0);\n }\n }",
"temp2 = arr.get(i*2)",
"temp2",
"arr.get(i*2)",
"arr.get",
"arr",
"i*2",
"i",
"2",
"if(temp2 == arr.get(i*2+1)){\n arr2.add(temp2);\n }\n else{\n arr2.add(0);\n }",
"temp2 == arr.get(i*2+1)",
"temp2",
"arr.get(i*2+1)",
"arr.get",
"arr",
"i*2+1",
"i*2",
"i",
"2",
"1",
"{\n arr2.add(temp2);\n }",
"arr2.add(temp2)",
"arr2.add",
"arr2",
"temp2",
"{\n arr2.add(0);\n }",
"arr2.add(0)",
"arr2.add",
"arr2",
"0",
"System.out.println(isInRow(arr2))",
"System.out.println",
"System.out",
"System",
"System.out",
"isInRow(arr2)",
"isInRow",
"arr2",
"String[] args",
"args",
"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 }",
"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"
]
| 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.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.StringTokenizer;
class Main {
private static InputReader in;
private static PrintWriter out;
// static String convert(String input){
// int lgt = input.length();
// char last = input.charAt(lgt-1);
// if(last == 's'){
// return input + "es";
// }else{
// return input + "s";
// }
// }
static String isInRow(List<Integer> lst){
int lgt = lst.size();
int temp3 = 0;
for(int i =0; i < lgt-2; i++){
temp3 = lst.get(i);
if((temp3 != 0) && (lst.get(i+1) != 0) && (lst.get(i+2) != 0) )
return "Yes";
}
return "No";
}
public static void main(String[] args) {
InputStream inputStream = System.in;
in = new InputReader(inputStream);
OutputStream outputStream = System.out;
out = new PrintWriter(outputStream);
int length = in.nextInt();
List<Integer> arr = new ArrayList<Integer>();
List<Integer> arr2 = new ArrayList<Integer>();
int counter = 0;
int temp = 0;
while(counter < length * 2){
temp = in.nextInt();
arr.add(temp);
counter++;
}
// System.out.println(arr);
int temp2 = 0;
for(int i = 0; i < length; i++){
temp2 = arr.get(i*2);
if(temp2 == arr.get(i*2+1)){
arr2.add(temp2);
}
else{
arr2.add(0);
}
}
System.out.println(isInRow(arr2));
}
// taken from https://codeforces.com/submissions/Petr
// together with PrintWriter, these input-output (IO) is much faster than the usual Scanner(System.in) and System.out
// please use these classes to avoid your fast algorithm gets Time Limit Exceeded caused by slow input-output (IO)
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());
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
2,
4,
18,
13,
17,
17,
17,
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,
0,
13,
17,
14,
2,
13,
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
],
[
85,
5
],
[
85,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
12,
15
],
[
12,
16
],
[
11,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
8,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
29,
31
],
[
8,
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
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
44,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
8,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
8,
79
],
[
79,
80
],
[
80,
81
],
[
6,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"import java.util.*;\n\npublic class Main\n{\n public static void main(String[] args)\n {\n //long start = System.currentTimeMillis();\n final long MOD = (long)Math.pow(10,9)+7;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n String ans = \"No\";\n for (int i = 0;i<n;++i)\n {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) ++count;\n else count = 0;\n\n if (count >= 3)\n {\n ans = \"Yes\";\n break;\n }\n }\n System.out.println(ans);\n sc.close();\n// long end = System.currentTimeMillis();\n// System.err.println((end-start)+\"ms\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main\n{\n public static void main(String[] args)\n {\n //long start = System.currentTimeMillis();\n final long MOD = (long)Math.pow(10,9)+7;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n String ans = \"No\";\n for (int i = 0;i<n;++i)\n {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) ++count;\n else count = 0;\n\n if (count >= 3)\n {\n ans = \"Yes\";\n break;\n }\n }\n System.out.println(ans);\n sc.close();\n// long end = System.currentTimeMillis();\n// System.err.println((end-start)+\"ms\");\n }\n}",
"Main",
"public static void main(String[] args)\n {\n //long start = System.currentTimeMillis();\n final long MOD = (long)Math.pow(10,9)+7;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n String ans = \"No\";\n for (int i = 0;i<n;++i)\n {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) ++count;\n else count = 0;\n\n if (count >= 3)\n {\n ans = \"Yes\";\n break;\n }\n }\n System.out.println(ans);\n sc.close();\n// long end = System.currentTimeMillis();\n// System.err.println((end-start)+\"ms\");\n }",
"main",
"{\n //long start = System.currentTimeMillis();\n final long MOD = (long)Math.pow(10,9)+7;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n String ans = \"No\";\n for (int i = 0;i<n;++i)\n {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) ++count;\n else count = 0;\n\n if (count >= 3)\n {\n ans = \"Yes\";\n break;\n }\n }\n System.out.println(ans);\n sc.close();\n// long end = System.currentTimeMillis();\n// System.err.println((end-start)+\"ms\");\n }",
"final long MOD = (long)Math.pow(10,9)+7;",
"MOD",
"(long)Math.pow(10,9)+7",
"(long)Math.pow(10,9)",
"Math.pow",
"Math",
"10",
"9",
"7",
"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",
"String ans = \"No\";",
"ans",
"\"No\"",
"for (int i = 0;i<n;++i)\n {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) ++count;\n else count = 0;\n\n if (count >= 3)\n {\n ans = \"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) ++count;\n else count = 0;\n\n if (count >= 3)\n {\n ans = \"Yes\";\n break;\n }\n }",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) ++count;\n else count = 0;\n\n if (count >= 3)\n {\n ans = \"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) ++count;\n else count = 0;",
"a == b",
"a",
"b",
"++count",
"count",
"count = 0",
"count",
"0",
"if (count >= 3)\n {\n ans = \"Yes\";\n break;\n }",
"count >= 3",
"count",
"3",
"{\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{\n public static void main(String[] args)\n {\n //long start = System.currentTimeMillis();\n final long MOD = (long)Math.pow(10,9)+7;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n String ans = \"No\";\n for (int i = 0;i<n;++i)\n {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) ++count;\n else count = 0;\n\n if (count >= 3)\n {\n ans = \"Yes\";\n break;\n }\n }\n System.out.println(ans);\n sc.close();\n// long end = System.currentTimeMillis();\n// System.err.println((end-start)+\"ms\");\n }\n}",
"public class Main\n{\n public static void main(String[] args)\n {\n //long start = System.currentTimeMillis();\n final long MOD = (long)Math.pow(10,9)+7;\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n String ans = \"No\";\n for (int i = 0;i<n;++i)\n {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) ++count;\n else count = 0;\n\n if (count >= 3)\n {\n ans = \"Yes\";\n break;\n }\n }\n System.out.println(ans);\n sc.close();\n// long end = System.currentTimeMillis();\n// System.err.println((end-start)+\"ms\");\n }\n}",
"Main"
]
| import java.util.*;
public class Main
{
public static void main(String[] args)
{
//long start = System.currentTimeMillis();
final long MOD = (long)Math.pow(10,9)+7;
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
String ans = "No";
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)
{
ans = "Yes";
break;
}
}
System.out.println(ans);
sc.close();
// long end = System.currentTimeMillis();
// System.err.println((end-start)+"ms");
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
39,
39,
40,
17,
40,
17,
39,
40,
17,
17,
39,
40,
17,
17,
39,
17,
40,
17,
39,
17,
17,
39,
17,
40,
17,
39,
17,
17,
39,
17,
17,
41,
13,
39,
39,
40,
17,
17,
39,
17,
17,
39,
17,
40,
17,
39,
17,
17,
41,
13,
41,
13,
41,
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,
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,
3,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
17,
29,
17,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
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,
13,
13,
18,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
40,
17,
41,
13,
18,
13,
13,
41,
13,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
2,
13,
13,
17,
14,
2,
18,
13,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
40,
17,
41,
13,
4,
18,
13,
41,
13,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
2,
13,
13,
17,
14,
2,
4,
18,
13,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
29,
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,
0,
13,
20,
13,
0,
13,
20,
13,
23,
13,
12,
13,
30,
14,
2,
18,
13,
13,
13,
30,
29,
13,
30,
29,
4,
13,
18,
13,
13,
23,
13,
12,
13,
30,
0,
13,
18,
13,
13,
0,
13,
18,
13,
13,
14,
2,
13,
13,
30,
29,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
18,
13,
13,
13,
30,
0,
18,
13,
13,
13,
14,
2,
18,
13,
13,
18,
13,
13,
30,
40,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
4,
13,
13,
4,
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
],
[
520,
11
],
[
520,
12
],
[
12,
13
],
[
520,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
16,
26
],
[
26,
27
],
[
27,
28
],
[
26,
29
],
[
16,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
16,
34
],
[
34,
35
],
[
34,
36
],
[
16,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
16,
41
],
[
41,
42
],
[
41,
43
],
[
16,
44
],
[
44,
45
],
[
44,
46
],
[
520,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
49,
61
],
[
61,
62
],
[
61,
63
],
[
520,
64
],
[
64,
65
],
[
520,
66
],
[
66,
67
],
[
520,
68
],
[
68,
69
],
[
520,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
72,
81
],
[
81,
82
],
[
81,
83
],
[
72,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
91,
92
],
[
91,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
86,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
99,
105
],
[
105,
106
],
[
106,
107
],
[
98,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
108,
114
],
[
114,
115
],
[
115,
116
],
[
72,
117
],
[
117,
118
],
[
117,
119
],
[
72,
120
],
[
120,
121
],
[
120,
122
],
[
72,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
123,
128
],
[
128,
129
],
[
128,
130
],
[
123,
131
],
[
131,
132
],
[
132,
133
],
[
123,
134
],
[
135,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
138,
142
],
[
137,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
136,
148
],
[
148,
149
],
[
149,
150
],
[
136,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
135,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
72,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
167,
172
],
[
164,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
174,
179
],
[
70,
180
],
[
180,
181
],
[
520,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
185,
189
],
[
189,
190
],
[
185,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
191,
195
],
[
195,
196
],
[
191,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
197,
203
],
[
203,
204
],
[
184,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
207,
210
],
[
184,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
211,
216
],
[
216,
217
],
[
216,
218
],
[
211,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
211,
223
],
[
224,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
227,
228
],
[
227,
229
],
[
226,
230
],
[
225,
231
],
[
231,
232
],
[
232,
233
],
[
184,
234
],
[
234,
235
],
[
182,
236
],
[
236,
237
],
[
520,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
244,
245
],
[
244,
246
],
[
240,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
249,
251
],
[
247,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
254,
256
],
[
247,
257
],
[
257,
258
],
[
258,
259
],
[
247,
260
],
[
261,
261
],
[
261,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
262,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
266,
270
],
[
270,
271
],
[
270,
272
],
[
240,
273
],
[
273,
274
],
[
238,
275
],
[
275,
276
],
[
238,
277
],
[
277,
278
],
[
520,
279
],
[
279,
280
],
[
279,
281
],
[
281,
282
],
[
282,
283
],
[
282,
284
],
[
284,
285
],
[
281,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
288,
290
],
[
281,
291
],
[
291,
292
],
[
281,
293
],
[
293,
294
],
[
294,
295
],
[
295,
296
],
[
295,
297
],
[
294,
298
],
[
293,
299
],
[
299,
300
],
[
300,
301
],
[
300,
302
],
[
302,
303
],
[
303,
304
],
[
303,
305
],
[
302,
306
],
[
299,
307
],
[
307,
308
],
[
308,
309
],
[
309,
310
],
[
309,
311
],
[
308,
312
],
[
307,
313
],
[
313,
314
],
[
314,
315
],
[
314,
316
],
[
307,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
281,
321
],
[
321,
322
],
[
279,
323
],
[
323,
324
],
[
279,
325
],
[
325,
326
],
[
520,
327
],
[
327,
328
],
[
327,
329
],
[
329,
330
],
[
330,
331
],
[
330,
332
],
[
332,
333
],
[
329,
334
],
[
334,
335
],
[
334,
336
],
[
336,
337
],
[
337,
338
],
[
329,
339
],
[
339,
340
],
[
329,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
342,
346
],
[
341,
347
],
[
347,
348
],
[
348,
349
],
[
348,
350
],
[
350,
351
],
[
351,
352
],
[
351,
353
],
[
350,
354
],
[
347,
355
],
[
355,
356
],
[
356,
357
],
[
357,
358
],
[
358,
359
],
[
357,
360
],
[
356,
361
],
[
355,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
355,
366
],
[
366,
367
],
[
367,
368
],
[
367,
369
],
[
329,
370
],
[
370,
371
],
[
327,
372
],
[
372,
373
],
[
327,
374
],
[
374,
375
],
[
520,
376
],
[
376,
377
],
[
376,
378
],
[
378,
379
],
[
379,
380
],
[
380,
381
],
[
381,
382
],
[
381,
383
],
[
380,
384
],
[
380,
385
],
[
385,
386
],
[
385,
387
],
[
385,
388
],
[
388,
389
],
[
388,
390
],
[
376,
391
],
[
391,
392
],
[
376,
393
],
[
393,
394
],
[
520,
395
],
[
395,
396
],
[
395,
397
],
[
397,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
400,
402
],
[
399,
403
],
[
399,
404
],
[
404,
405
],
[
404,
406
],
[
404,
407
],
[
407,
408
],
[
407,
409
],
[
395,
410
],
[
410,
411
],
[
395,
412
],
[
412,
413
],
[
520,
414
],
[
414,
415
],
[
414,
416
],
[
416,
417
],
[
417,
418
],
[
417,
419
],
[
416,
421
],
[
421,
422
],
[
421,
423
],
[
414,
425
],
[
425,
426
],
[
520,
427
],
[
427,
428
],
[
427,
429
],
[
429,
430
],
[
430,
431
],
[
431,
432
],
[
432,
433
],
[
432,
434
],
[
431,
435
],
[
430,
436
],
[
436,
437
],
[
437,
438
],
[
430,
439
],
[
439,
440
],
[
440,
441
],
[
441,
442
],
[
441,
443
],
[
443,
444
],
[
443,
445
],
[
427,
446
],
[
446,
447
],
[
520,
448
],
[
448,
449
],
[
448,
450
],
[
450,
451
],
[
451,
452
],
[
451,
453
],
[
453,
454
],
[
453,
455
],
[
450,
456
],
[
456,
457
],
[
456,
458
],
[
458,
459
],
[
458,
460
],
[
450,
461
],
[
461,
462
],
[
462,
463
],
[
462,
464
],
[
461,
465
],
[
465,
466
],
[
450,
467
],
[
467,
468
],
[
468,
469
],
[
469,
470
],
[
469,
471
],
[
468,
472
],
[
472,
473
],
[
472,
474
],
[
467,
475
],
[
475,
476
],
[
476,
477
],
[
477,
478
],
[
477,
479
],
[
476,
480
],
[
467,
481
],
[
481,
482
],
[
482,
483
],
[
483,
484
],
[
483,
485
],
[
482,
486
],
[
481,
487
],
[
487,
488
],
[
488,
489
],
[
489,
490
],
[
489,
491
],
[
488,
492
],
[
492,
493
],
[
492,
494
],
[
487,
495
],
[
495,
496
],
[
496,
497
],
[
497,
498
],
[
497,
499
],
[
448,
500
],
[
500,
501
],
[
448,
502
],
[
502,
503
],
[
520,
504
],
[
504,
505
],
[
504,
506
],
[
506,
507
],
[
507,
508
],
[
508,
509
],
[
509,
510
],
[
509,
511
],
[
508,
512
],
[
512,
513
],
[
512,
514
],
[
504,
515
],
[
515,
516
],
[
504,
517
],
[
517,
518
],
[
0,
519
],
[
519,
520
],
[
519,
521
]
]
| [
"import java.io.IOException;\nimport java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\n\tstatic int[][] map;\n\tstatic int[][] directions8= {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};\n\tstatic int[][] directions4= {{-1,0},{1,0},{0,-1},{0,1}};\n\tstatic int ans;\n\tstatic int[] parent;//union-find用\n\tstatic int[] rank;//union-find用\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[][] D = new int[N][2];\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}\n\t\tboolean ans = false;\n\t\tint zoro = 0;\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\tzoro++;\n\t\t\t}else {\n\t\t\t\tzoro=0;\n\t\t\t}\n\t\t\tif(zoro==3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(ans) {\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\n\t//素数判定\n\tpublic static boolean isPrime(long num) {\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false; // 偶数はあらかじめ除く\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// 素数である\n\t\treturn true;\n\t}\n\n\t//BFS用に二つの配列を足し算する\n\tstatic int[] addArrayElms(int[] a, int[] b) {\n\t\tint[] c = new int[a.length];\n\t\tfor(int i = 0; i < a.length; i++) {\n\t\t\tc[i] = a[i] + b[i];\n\t\t}\n\t\treturn c;\n\t}\n\n\t//\t//二分探索\n\t//k <= num となる最小の配列要素kのインデックスを返す\n\tstatic private int binarySearch(long num, long[] orderedArray){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//二分探索\n\t//k <= num となる最小のList要素kのインデックスを返す\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aとbの最小公倍数を求める\n\tpublic static int gcd(int a, int b) {\n\t\treturn b == 0 ? a: gcd(b, a % b);\n\t}\n\tpublic static long gcd(long a, long b) {\n\t\treturn b == 0 ? a: gcd(b, a % b);\n\t}\n\n\t//Union-Find用の配列を要素数nで初期化\n\tstatic void ufInit(int n){\n\t\tparent = new int[n];\n\t\trank = new int[n];\n\t}\n\n\t//Union-Findの要素の最上位の親(グループ名)を返す\n\tstatic int ufFind(int a) {\n\t\tif(parent[a]==a) {\n\t\t\treturn a;\n\t\t}else {\n\t\t\treturn ufFind(parent[a]);\n\t\t}\n\t}\n\n\t//Union-Find木を連結する\n\tstatic void ufUnite(int a, int b) {\n\t\ta = parent[a];\n\t\tb = parent[b];\n\n\t\tif(a==b) {\n\t\t\treturn;\n\t\t}\n\t\tif(rank[a] > rank[b]){\n\t\t\tparent[b]=a;\n\t\t}else {\n\t\t\tparent[a]=b;\n\t\t\tif(rank[a]==rank[b]) {\n\t\t\t\trank[b]++;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic boolean ufSame(int a, int b) {\n\t\treturn ufFind(a)==ufFind(b);\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tstatic int[][] map;\n\tstatic int[][] directions8= {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};\n\tstatic int[][] directions4= {{-1,0},{1,0},{0,-1},{0,1}};\n\tstatic int ans;\n\tstatic int[] parent;//union-find用\n\tstatic int[] rank;//union-find用\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[][] D = new int[N][2];\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}\n\t\tboolean ans = false;\n\t\tint zoro = 0;\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\tzoro++;\n\t\t\t}else {\n\t\t\t\tzoro=0;\n\t\t\t}\n\t\t\tif(zoro==3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(ans) {\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\n\t//素数判定\n\tpublic static boolean isPrime(long num) {\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false; // 偶数はあらかじめ除く\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// 素数である\n\t\treturn true;\n\t}\n\n\t//BFS用に二つの配列を足し算する\n\tstatic int[] addArrayElms(int[] a, int[] b) {\n\t\tint[] c = new int[a.length];\n\t\tfor(int i = 0; i < a.length; i++) {\n\t\t\tc[i] = a[i] + b[i];\n\t\t}\n\t\treturn c;\n\t}\n\n\t//\t//二分探索\n\t//k <= num となる最小の配列要素kのインデックスを返す\n\tstatic private int binarySearch(long num, long[] orderedArray){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//二分探索\n\t//k <= num となる最小のList要素kのインデックスを返す\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aとbの最小公倍数を求める\n\tpublic static int gcd(int a, int b) {\n\t\treturn b == 0 ? a: gcd(b, a % b);\n\t}\n\tpublic static long gcd(long a, long b) {\n\t\treturn b == 0 ? a: gcd(b, a % b);\n\t}\n\n\t//Union-Find用の配列を要素数nで初期化\n\tstatic void ufInit(int n){\n\t\tparent = new int[n];\n\t\trank = new int[n];\n\t}\n\n\t//Union-Findの要素の最上位の親(グループ名)を返す\n\tstatic int ufFind(int a) {\n\t\tif(parent[a]==a) {\n\t\t\treturn a;\n\t\t}else {\n\t\t\treturn ufFind(parent[a]);\n\t\t}\n\t}\n\n\t//Union-Find木を連結する\n\tstatic void ufUnite(int a, int b) {\n\t\ta = parent[a];\n\t\tb = parent[b];\n\n\t\tif(a==b) {\n\t\t\treturn;\n\t\t}\n\t\tif(rank[a] > rank[b]){\n\t\t\tparent[b]=a;\n\t\t}else {\n\t\t\tparent[a]=b;\n\t\t\tif(rank[a]==rank[b]) {\n\t\t\t\trank[b]++;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic boolean ufSame(int a, int b) {\n\t\treturn ufFind(a)==ufFind(b);\n\t}\n}",
"Main",
"static int[][] map;",
"map",
"static int[][] directions8= {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};",
"directions8",
"{{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}}",
"{-1,-1}",
"-1",
"1",
"-1",
"1",
"{-1,0}",
"-1",
"1",
"0",
"{-1,1}",
"-1",
"1",
"1",
"{0,-1}",
"0",
"-1",
"1",
"{0,1}",
"0",
"1",
"{1,-1}",
"1",
"-1",
"1",
"{1,0}",
"1",
"0",
"{1,1}",
"1",
"1",
"static int[][] directions4= {{-1,0},{1,0},{0,-1},{0,1}};",
"directions4",
"{{-1,0},{1,0},{0,-1},{0,1}}",
"{-1,0}",
"-1",
"1",
"0",
"{1,0}",
"1",
"0",
"{0,-1}",
"0",
"-1",
"1",
"{0,1}",
"0",
"1",
"static int ans;",
"ans",
"static int[] parent;//union-find用",
"parent",
"static int[] rank;//union-find用",
"rank",
"public static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[][] D = new int[N][2];\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}\n\t\tboolean ans = false;\n\t\tint zoro = 0;\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\tzoro++;\n\t\t\t}else {\n\t\t\t\tzoro=0;\n\t\t\t}\n\t\t\tif(zoro==3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(ans) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[][] D = new int[N][2];\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}\n\t\tboolean ans = false;\n\t\tint zoro = 0;\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\tzoro++;\n\t\t\t}else {\n\t\t\t\tzoro=0;\n\t\t\t}\n\t\t\tif(zoro==3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(ans) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\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 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\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}",
"{\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}",
"D[i][0]=sc.nextInt()",
"D[i][0]",
"D[i]",
"D",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"D[i][1]=sc.nextInt()",
"D[i][1]",
"D[i]",
"D",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean ans = false;",
"ans",
"false",
"int zoro = 0;",
"zoro",
"0",
"for(int i = 0;i<N ; i++) {\n\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\tzoro++;\n\t\t\t}else {\n\t\t\t\tzoro=0;\n\t\t\t}\n\t\t\tif(zoro==3) {\n\t\t\t\tans = true;\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\tif(D[i][0]==D[i][1]) {\n\t\t\t\tzoro++;\n\t\t\t}else {\n\t\t\t\tzoro=0;\n\t\t\t}\n\t\t\tif(zoro==3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\tzoro++;\n\t\t\t}else {\n\t\t\t\tzoro=0;\n\t\t\t}\n\t\t\tif(zoro==3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if(D[i][0]==D[i][1]) {\n\t\t\t\tzoro++;\n\t\t\t}else {\n\t\t\t\tzoro=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\tzoro++;\n\t\t\t}",
"zoro++",
"zoro",
"{\n\t\t\t\tzoro=0;\n\t\t\t}",
"zoro=0",
"zoro",
"0",
"if(zoro==3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}",
"zoro==3",
"zoro",
"3",
"{\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}",
"ans = true",
"ans",
"true",
"break;",
"if(ans) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"ans",
"{\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",
"//素数判定\n\tpublic static boolean isPrime(long num) {\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false; // 偶数はあらかじめ除く\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// 素数である\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false; // 偶数はあらかじめ除く\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// 素数である\n\t\treturn true;\n\t}",
"if (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false; // 偶数はあらかじめ除く",
"num < 2",
"num",
"2",
"return false;",
"false",
"if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false; // 偶数はあらかじめ除く",
"num == 2",
"num",
"2",
"return true;",
"true",
"if (num % 2 == 0) return false; // 偶数はあらかじめ除く",
"num % 2 == 0",
"num % 2",
"num",
"2",
"0",
"return false; // 偶数はあらかじめ除く",
"false",
"double sqrtNum = Math.sqrt(num);",
"sqrtNum",
"Math.sqrt(num)",
"Math.sqrt",
"Math",
"num",
"for (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= sqrtNum",
"i",
"sqrtNum",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"if (num % i == 0)\n\t\t\t{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}",
"num % i == 0",
"num % i",
"num",
"i",
"0",
"{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"long num",
"num",
"//BFS用に二つの配列を足し算する\n\tstatic int[] addArrayElms(int[] a, int[] b) {\n\t\tint[] c = new int[a.length];\n\t\tfor(int i = 0; i < a.length; i++) {\n\t\t\tc[i] = a[i] + b[i];\n\t\t}\n\t\treturn c;\n\t}",
"addArrayElms",
"{\n\t\tint[] c = new int[a.length];\n\t\tfor(int i = 0; i < a.length; i++) {\n\t\t\tc[i] = a[i] + b[i];\n\t\t}\n\t\treturn c;\n\t}",
"int[] c = new int[a.length];",
"c",
"new int[a.length]",
"a.length",
"a",
"a.length",
"for(int i = 0; i < a.length; i++) {\n\t\t\tc[i] = a[i] + b[i];\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"{\n\t\t\tc[i] = a[i] + b[i];\n\t\t}",
"{\n\t\t\tc[i] = a[i] + b[i];\n\t\t}",
"c[i] = a[i] + b[i]",
"c[i]",
"c",
"i",
"a[i] + b[i]",
"a[i]",
"a",
"i",
"b[i]",
"b",
"i",
"return c;",
"c",
"int[] a",
"a",
"int[] b",
"b",
"//\t//二分探索\n\t//k <= num となる最小の配列要素kのインデックスを返す\n\tstatic private int binarySearch(long num, long[] orderedArray){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"binarySearch",
"{\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"int lowerBorder = -1;",
"lowerBorder",
"-1",
"1",
"int upperBorder = orderedArray.length;",
"upperBorder",
"orderedArray.length",
"orderedArray",
"orderedArray.length",
"int mid;",
"mid",
"while(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"upperBorder - lowerBorder >1",
"upperBorder - lowerBorder",
"upperBorder",
"lowerBorder",
"1",
"{\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"mid = (upperBorder + lowerBorder)/2",
"mid",
"(upperBorder + lowerBorder)/2",
"(upperBorder + lowerBorder)",
"upperBorder",
"lowerBorder",
"2",
"if(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"orderedArray[mid]<=num",
"orderedArray[mid]",
"orderedArray",
"mid",
"num",
"{\n\t\t\t\tlowerBorder = mid;\n\t\t\t}",
"lowerBorder = mid",
"lowerBorder",
"mid",
"{\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"upperBorder = mid",
"upperBorder",
"mid",
"return lowerBorder;",
"lowerBorder",
"long num",
"num",
"long[] orderedArray",
"orderedArray",
"//二分探索\n\t//k <= num となる最小のList要素kのインデックスを返す\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"binarySearch",
"{\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}",
"int lowerBorder = -1;",
"lowerBorder",
"-1",
"1",
"int upperBorder = orderedList.size();",
"upperBorder",
"orderedList.size()",
"orderedList.size",
"orderedList",
"int mid;",
"mid",
"while(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"upperBorder - lowerBorder >1",
"upperBorder - lowerBorder",
"upperBorder",
"lowerBorder",
"1",
"{\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}",
"mid = (upperBorder + lowerBorder)/2",
"mid",
"(upperBorder + lowerBorder)/2",
"(upperBorder + lowerBorder)",
"upperBorder",
"lowerBorder",
"2",
"if(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"orderedList.get(mid)<=num",
"orderedList.get(mid)",
"orderedList.get",
"orderedList",
"mid",
"num",
"{\n\t\t\t\tlowerBorder = mid;\n\t\t\t}",
"lowerBorder = mid",
"lowerBorder",
"mid",
"{\n\t\t\t\tupperBorder = mid;\n\t\t\t}",
"upperBorder = mid",
"upperBorder",
"mid",
"return lowerBorder;",
"lowerBorder",
"long num",
"num",
"ArrayList<Long> orderedList",
"orderedList",
"//aとbの最小公倍数を求める\n\tpublic static int gcd(int a, int b) {\n\t\treturn b == 0 ? a: gcd(b, a % b);\n\t}",
"gcd",
"{\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",
"public static long gcd(long a, long b) {\n\t\treturn b == 0 ? a: gcd(b, a % b);\n\t}",
"gcd",
"{\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",
"//Union-Find用の配列を要素数nで初期化\n\tstatic void ufInit(int n){\n\t\tparent = new int[n];\n\t\trank = new int[n];\n\t}",
"ufInit",
"{\n\t\tparent = new int[n];\n\t\trank = new int[n];\n\t}",
"parent = new int[n]",
"parent",
"new int[n]",
"n",
"rank = new int[n]",
"rank",
"new int[n]",
"n",
"int n",
"n",
"//Union-Findの要素の最上位の親(グループ名)を返す\n\tstatic int ufFind(int a) {\n\t\tif(parent[a]==a) {\n\t\t\treturn a;\n\t\t}else {\n\t\t\treturn ufFind(parent[a]);\n\t\t}\n\t}",
"ufFind",
"{\n\t\tif(parent[a]==a) {\n\t\t\treturn a;\n\t\t}else {\n\t\t\treturn ufFind(parent[a]);\n\t\t}\n\t}",
"if(parent[a]==a) {\n\t\t\treturn a;\n\t\t}else {\n\t\t\treturn ufFind(parent[a]);\n\t\t}",
"parent[a]==a",
"parent[a]",
"parent",
"a",
"a",
"{\n\t\t\treturn a;\n\t\t}",
"return a;",
"a",
"{\n\t\t\treturn ufFind(parent[a]);\n\t\t}",
"return ufFind(parent[a]);",
"ufFind(parent[a])",
"ufFind",
"parent[a]",
"parent",
"a",
"int a",
"a",
"//Union-Find木を連結する\n\tstatic void ufUnite(int a, int b) {\n\t\ta = parent[a];\n\t\tb = parent[b];\n\n\t\tif(a==b) {\n\t\t\treturn;\n\t\t}\n\t\tif(rank[a] > rank[b]){\n\t\t\tparent[b]=a;\n\t\t}else {\n\t\t\tparent[a]=b;\n\t\t\tif(rank[a]==rank[b]) {\n\t\t\t\trank[b]++;\n\t\t\t}\n\t\t}\n\t}",
"ufUnite",
"{\n\t\ta = parent[a];\n\t\tb = parent[b];\n\n\t\tif(a==b) {\n\t\t\treturn;\n\t\t}\n\t\tif(rank[a] > rank[b]){\n\t\t\tparent[b]=a;\n\t\t}else {\n\t\t\tparent[a]=b;\n\t\t\tif(rank[a]==rank[b]) {\n\t\t\t\trank[b]++;\n\t\t\t}\n\t\t}\n\t}",
"a = parent[a]",
"a",
"parent[a]",
"parent",
"a",
"b = parent[b]",
"b",
"parent[b]",
"parent",
"b",
"if(a==b) {\n\t\t\treturn;\n\t\t}",
"a==b",
"a",
"b",
"{\n\t\t\treturn;\n\t\t}",
"return;",
"if(rank[a] > rank[b]){\n\t\t\tparent[b]=a;\n\t\t}else {\n\t\t\tparent[a]=b;\n\t\t\tif(rank[a]==rank[b]) {\n\t\t\t\trank[b]++;\n\t\t\t}\n\t\t}",
"rank[a] > rank[b]",
"rank[a]",
"rank",
"a",
"rank[b]",
"rank",
"b",
"{\n\t\t\tparent[b]=a;\n\t\t}",
"parent[b]=a",
"parent[b]",
"parent",
"b",
"a",
"{\n\t\t\tparent[a]=b;\n\t\t\tif(rank[a]==rank[b]) {\n\t\t\t\trank[b]++;\n\t\t\t}\n\t\t}",
"parent[a]=b",
"parent[a]",
"parent",
"a",
"b",
"if(rank[a]==rank[b]) {\n\t\t\t\trank[b]++;\n\t\t\t}",
"rank[a]==rank[b]",
"rank[a]",
"rank",
"a",
"rank[b]",
"rank",
"b",
"{\n\t\t\t\trank[b]++;\n\t\t\t}",
"rank[b]++",
"rank[b]",
"rank",
"b",
"int a",
"a",
"int b",
"b",
"static boolean ufSame(int a, int b) {\n\t\treturn ufFind(a)==ufFind(b);\n\t}",
"ufSame",
"{\n\t\treturn ufFind(a)==ufFind(b);\n\t}",
"return ufFind(a)==ufFind(b);",
"ufFind(a)==ufFind(b)",
"ufFind(a)",
"ufFind",
"a",
"ufFind(b)",
"ufFind",
"b",
"int a",
"a",
"int b",
"b",
"public class Main {\n\n\tstatic int[][] map;\n\tstatic int[][] directions8= {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};\n\tstatic int[][] directions4= {{-1,0},{1,0},{0,-1},{0,1}};\n\tstatic int ans;\n\tstatic int[] parent;//union-find用\n\tstatic int[] rank;//union-find用\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[][] D = new int[N][2];\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}\n\t\tboolean ans = false;\n\t\tint zoro = 0;\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\tzoro++;\n\t\t\t}else {\n\t\t\t\tzoro=0;\n\t\t\t}\n\t\t\tif(zoro==3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(ans) {\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\n\t//素数判定\n\tpublic static boolean isPrime(long num) {\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false; // 偶数はあらかじめ除く\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// 素数である\n\t\treturn true;\n\t}\n\n\t//BFS用に二つの配列を足し算する\n\tstatic int[] addArrayElms(int[] a, int[] b) {\n\t\tint[] c = new int[a.length];\n\t\tfor(int i = 0; i < a.length; i++) {\n\t\t\tc[i] = a[i] + b[i];\n\t\t}\n\t\treturn c;\n\t}\n\n\t//\t//二分探索\n\t//k <= num となる最小の配列要素kのインデックスを返す\n\tstatic private int binarySearch(long num, long[] orderedArray){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//二分探索\n\t//k <= num となる最小のList要素kのインデックスを返す\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aとbの最小公倍数を求める\n\tpublic static int gcd(int a, int b) {\n\t\treturn b == 0 ? a: gcd(b, a % b);\n\t}\n\tpublic static long gcd(long a, long b) {\n\t\treturn b == 0 ? a: gcd(b, a % b);\n\t}\n\n\t//Union-Find用の配列を要素数nで初期化\n\tstatic void ufInit(int n){\n\t\tparent = new int[n];\n\t\trank = new int[n];\n\t}\n\n\t//Union-Findの要素の最上位の親(グループ名)を返す\n\tstatic int ufFind(int a) {\n\t\tif(parent[a]==a) {\n\t\t\treturn a;\n\t\t}else {\n\t\t\treturn ufFind(parent[a]);\n\t\t}\n\t}\n\n\t//Union-Find木を連結する\n\tstatic void ufUnite(int a, int b) {\n\t\ta = parent[a];\n\t\tb = parent[b];\n\n\t\tif(a==b) {\n\t\t\treturn;\n\t\t}\n\t\tif(rank[a] > rank[b]){\n\t\t\tparent[b]=a;\n\t\t}else {\n\t\t\tparent[a]=b;\n\t\t\tif(rank[a]==rank[b]) {\n\t\t\t\trank[b]++;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic boolean ufSame(int a, int b) {\n\t\treturn ufFind(a)==ufFind(b);\n\t}\n}",
"public class Main {\n\n\tstatic int[][] map;\n\tstatic int[][] directions8= {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};\n\tstatic int[][] directions4= {{-1,0},{1,0},{0,-1},{0,1}};\n\tstatic int ans;\n\tstatic int[] parent;//union-find用\n\tstatic int[] rank;//union-find用\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt();\n\n\t\tint[][] D = new int[N][2];\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}\n\t\tboolean ans = false;\n\t\tint zoro = 0;\n\n\t\tfor(int i = 0;i<N ; i++) {\n\t\t\tif(D[i][0]==D[i][1]) {\n\t\t\t\tzoro++;\n\t\t\t}else {\n\t\t\t\tzoro=0;\n\t\t\t}\n\t\t\tif(zoro==3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif(ans) {\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\n\t//素数判定\n\tpublic static boolean isPrime(long num) {\n\t\tif (num < 2) return false;\n\t\telse if (num == 2) return true;\n\t\telse if (num % 2 == 0) return false; // 偶数はあらかじめ除く\n\n\t\tdouble sqrtNum = Math.sqrt(num);\n\t\tfor (int i = 3; i <= sqrtNum; i += 2)\n\t\t{\n\t\t\tif (num % i == 0)\n\t\t\t{\n\t\t\t\t// 素数ではない\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// 素数である\n\t\treturn true;\n\t}\n\n\t//BFS用に二つの配列を足し算する\n\tstatic int[] addArrayElms(int[] a, int[] b) {\n\t\tint[] c = new int[a.length];\n\t\tfor(int i = 0; i < a.length; i++) {\n\t\t\tc[i] = a[i] + b[i];\n\t\t}\n\t\treturn c;\n\t}\n\n\t//\t//二分探索\n\t//k <= num となる最小の配列要素kのインデックスを返す\n\tstatic private int binarySearch(long num, long[] orderedArray){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedArray.length;\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedArray[mid]<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//二分探索\n\t//k <= num となる最小のList要素kのインデックスを返す\n\tstatic private int binarySearch(long num, ArrayList<Long> orderedList){\n\t\tint lowerBorder = -1;\n\t\tint upperBorder = orderedList.size();\n\t\tint mid;\n\n\t\twhile(upperBorder - lowerBorder >1) {\n\t\t\tmid = (upperBorder + lowerBorder)/2;\n\t\t\tif(orderedList.get(mid)<=num) {\n\t\t\t\tlowerBorder = mid;\n\t\t\t}else {\n\t\t\t\tupperBorder = mid;\n\t\t\t}\n\t\t}\n\t\treturn lowerBorder;\n\t}\n\n\t//aとbの最小公倍数を求める\n\tpublic static int gcd(int a, int b) {\n\t\treturn b == 0 ? a: gcd(b, a % b);\n\t}\n\tpublic static long gcd(long a, long b) {\n\t\treturn b == 0 ? a: gcd(b, a % b);\n\t}\n\n\t//Union-Find用の配列を要素数nで初期化\n\tstatic void ufInit(int n){\n\t\tparent = new int[n];\n\t\trank = new int[n];\n\t}\n\n\t//Union-Findの要素の最上位の親(グループ名)を返す\n\tstatic int ufFind(int a) {\n\t\tif(parent[a]==a) {\n\t\t\treturn a;\n\t\t}else {\n\t\t\treturn ufFind(parent[a]);\n\t\t}\n\t}\n\n\t//Union-Find木を連結する\n\tstatic void ufUnite(int a, int b) {\n\t\ta = parent[a];\n\t\tb = parent[b];\n\n\t\tif(a==b) {\n\t\t\treturn;\n\t\t}\n\t\tif(rank[a] > rank[b]){\n\t\t\tparent[b]=a;\n\t\t}else {\n\t\t\tparent[a]=b;\n\t\t\tif(rank[a]==rank[b]) {\n\t\t\t\trank[b]++;\n\t\t\t}\n\t\t}\n\t}\n\n\tstatic boolean ufSame(int a, int b) {\n\t\treturn ufFind(a)==ufFind(b);\n\t}\n}",
"Main"
]
| import java.io.IOException;
import java.util.ArrayList;
import java.util.Scanner;
public class Main {
static int[][] map;
static int[][] directions8= {{-1,-1},{-1,0},{-1,1},{0,-1},{0,1},{1,-1},{1,0},{1,1}};
static int[][] directions4= {{-1,0},{1,0},{0,-1},{0,1}};
static int ans;
static int[] parent;//union-find用
static int[] rank;//union-find用
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[][] D = new int[N][2];
for(int i = 0;i<N ; i++) {
D[i][0]=sc.nextInt();
D[i][1]=sc.nextInt();
}
boolean ans = false;
int zoro = 0;
for(int i = 0;i<N ; i++) {
if(D[i][0]==D[i][1]) {
zoro++;
}else {
zoro=0;
}
if(zoro==3) {
ans = true;
break;
}
}
if(ans) {
System.out.println("Yes");
}else {
System.out.println("No");
}
}
//素数判定
public static boolean isPrime(long num) {
if (num < 2) return false;
else if (num == 2) return true;
else if (num % 2 == 0) return false; // 偶数はあらかじめ除く
double sqrtNum = Math.sqrt(num);
for (int i = 3; i <= sqrtNum; i += 2)
{
if (num % i == 0)
{
// 素数ではない
return false;
}
}
// 素数である
return true;
}
//BFS用に二つの配列を足し算する
static int[] addArrayElms(int[] a, int[] b) {
int[] c = new int[a.length];
for(int i = 0; i < a.length; i++) {
c[i] = a[i] + b[i];
}
return c;
}
// //二分探索
//k <= num となる最小の配列要素kのインデックスを返す
static private int binarySearch(long num, long[] orderedArray){
int lowerBorder = -1;
int upperBorder = orderedArray.length;
int mid;
while(upperBorder - lowerBorder >1) {
mid = (upperBorder + lowerBorder)/2;
if(orderedArray[mid]<=num) {
lowerBorder = mid;
}else {
upperBorder = mid;
}
}
return lowerBorder;
}
//二分探索
//k <= num となる最小のList要素kのインデックスを返す
static private int binarySearch(long num, ArrayList<Long> orderedList){
int lowerBorder = -1;
int upperBorder = orderedList.size();
int mid;
while(upperBorder - lowerBorder >1) {
mid = (upperBorder + lowerBorder)/2;
if(orderedList.get(mid)<=num) {
lowerBorder = mid;
}else {
upperBorder = mid;
}
}
return lowerBorder;
}
//aとbの最小公倍数を求める
public static int gcd(int a, int b) {
return b == 0 ? a: gcd(b, a % b);
}
public static long gcd(long a, long b) {
return b == 0 ? a: gcd(b, a % b);
}
//Union-Find用の配列を要素数nで初期化
static void ufInit(int n){
parent = new int[n];
rank = new int[n];
}
//Union-Findの要素の最上位の親(グループ名)を返す
static int ufFind(int a) {
if(parent[a]==a) {
return a;
}else {
return ufFind(parent[a]);
}
}
//Union-Find木を連結する
static void ufUnite(int a, int b) {
a = parent[a];
b = parent[b];
if(a==b) {
return;
}
if(rank[a] > rank[b]){
parent[b]=a;
}else {
parent[a]=b;
if(rank[a]==rank[b]) {
rank[b]++;
}
}
}
static boolean ufSame(int a, int b) {
return ufFind(a)==ufFind(b);
}
}
|
[
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,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
0,
18,
13,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
2,
2,
18,
13,
2,
13,
17,
13,
13,
0,
18,
13,
13,
2,
13,
2,
2,
18,
13,
2,
13,
13,
2,
13,
13,
13,
0,
18,
13,
13,
2,
2,
18,
13,
2,
13,
17,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
17,
14,
2,
2,
13,
17,
2,
13,
17,
29,
17,
29,
2,
2,
18,
13,
13,
2,
2,
18,
13,
13,
18,
13,
2,
13,
13,
13,
13,
23,
13,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
13,
14,
2,
13,
17,
0,
13,
13,
29,
2,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
13,
13,
4,
13,
13,
13,
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,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
0,
13,
17,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
4,
13,
23,
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,
0,
13,
17,
0,
13,
17,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
0,
13,
13,
23,
13,
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,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
20,
2,
13,
17,
0,
18,
36,
13,
20,
2,
13,
17,
4,
18,
13,
13,
40,
17,
4,
18,
13,
13,
17,
23,
13,
12,
13,
30,
4,
13,
4,
13,
13,
4,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
17,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
30,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
14,
2,
18,
13,
13,
18,
13,
13,
40,
18,
13,
13,
29,
17,
23,
13,
23,
13,
12,
13,
30,
29,
2,
4,
13,
13,
4,
13,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
18,
13,
13,
17,
29,
13,
29,
0,
13,
4,
13,
18,
13,
13,
23,
13,
12,
13,
30,
29,
40,
18,
13,
4,
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
],
[
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
],
[
64,
65
],
[
64,
66
],
[
0,
67
],
[
67,
68
],
[
67,
69
],
[
0,
70
],
[
70,
71
],
[
70,
72
],
[
0,
73
],
[
847,
74
],
[
847,
75
],
[
75,
76
],
[
75,
77
],
[
847,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
80,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
80,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
80,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
109,
110
],
[
109,
111
],
[
104,
112
],
[
112,
113
],
[
113,
114
],
[
104,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
122,
128
],
[
121,
129
],
[
116,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
140,
142
],
[
137,
143
],
[
143,
144
],
[
143,
145
],
[
136,
146
],
[
116,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
147,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
155,
157
],
[
152,
158
],
[
158,
159
],
[
158,
160
],
[
151,
161
],
[
78,
162
],
[
162,
163
],
[
78,
164
],
[
164,
165
],
[
78,
166
],
[
166,
167
],
[
78,
168
],
[
168,
169
],
[
78,
170
],
[
170,
171
],
[
847,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
179,
180
],
[
174,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
186,
188
],
[
181,
189
],
[
189,
190
],
[
174,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
193,
197
],
[
197,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
198,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
204,
206
],
[
197,
207
],
[
192,
208
],
[
172,
209
],
[
209,
210
],
[
172,
211
],
[
211,
212
],
[
172,
213
],
[
213,
214
],
[
172,
215
],
[
215,
216
],
[
172,
217
],
[
217,
218
],
[
847,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
223,
225
],
[
222,
226
],
[
226,
227
],
[
222,
228
],
[
228,
229
],
[
219,
230
],
[
230,
231
],
[
219,
232
],
[
232,
233
],
[
847,
234
],
[
234,
235
],
[
234,
236
],
[
236,
237
],
[
237,
238
],
[
238,
239
],
[
238,
240
],
[
237,
241
],
[
241,
242
],
[
237,
243
],
[
243,
244
],
[
234,
245
],
[
245,
246
],
[
234,
247
],
[
247,
248
],
[
847,
249
],
[
249,
250
],
[
249,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
254,
256
],
[
251,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
257,
261
],
[
261,
262
],
[
261,
263
],
[
251,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
249,
268
],
[
268,
269
],
[
249,
270
],
[
270,
271
],
[
249,
272
],
[
272,
273
],
[
847,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
277,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
280,
282
],
[
279,
283
],
[
283,
284
],
[
283,
285
],
[
283,
286
],
[
278,
287
],
[
274,
288
],
[
288,
289
],
[
274,
290
],
[
290,
291
],
[
274,
292
],
[
292,
293
],
[
847,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
298,
301
],
[
301,
302
],
[
301,
303
],
[
298,
304
],
[
294,
305
],
[
305,
306
],
[
294,
307
],
[
307,
308
],
[
847,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
311,
315
],
[
315,
316
],
[
316,
317
],
[
316,
318
],
[
315,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
322,
323
],
[
322,
324
],
[
321,
325
],
[
320,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
328,
332
],
[
319,
333
],
[
333,
334
],
[
333,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
335,
339
],
[
319,
340
],
[
340,
341
],
[
340,
342
],
[
311,
343
],
[
343,
344
],
[
309,
345
],
[
345,
346
],
[
309,
347
],
[
347,
348
],
[
309,
349
],
[
349,
350
],
[
847,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
354,
355
],
[
351,
356
],
[
356,
357
],
[
847,
358
],
[
358,
359
],
[
358,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
360,
364
],
[
364,
365
],
[
364,
366
],
[
366,
367
],
[
367,
368
],
[
360,
369
],
[
369,
370
],
[
369,
371
],
[
360,
372
],
[
372,
373
],
[
372,
374
],
[
360,
375
],
[
375,
376
],
[
376,
377
],
[
377,
378
],
[
377,
379
],
[
375,
380
],
[
380,
381
],
[
380,
382
],
[
375,
383
],
[
383,
384
],
[
384,
385
],
[
375,
386
],
[
387,
387
],
[
387,
388
],
[
388,
389
],
[
388,
390
],
[
390,
391
],
[
391,
392
],
[
387,
393
],
[
393,
394
],
[
393,
395
],
[
395,
396
],
[
396,
397
],
[
387,
398
],
[
398,
399
],
[
399,
400
],
[
399,
401
],
[
398,
402
],
[
402,
403
],
[
403,
404
],
[
402,
405
],
[
405,
406
],
[
406,
407
],
[
406,
408
],
[
405,
409
],
[
409,
410
],
[
409,
411
],
[
398,
412
],
[
412,
413
],
[
412,
414
],
[
360,
415
],
[
415,
416
],
[
415,
417
],
[
417,
418
],
[
418,
419
],
[
419,
420
],
[
419,
421
],
[
417,
422
],
[
415,
423
],
[
423,
424
],
[
424,
425
],
[
425,
426
],
[
425,
427
],
[
423,
428
],
[
847,
429
],
[
429,
430
],
[
429,
431
],
[
431,
432
],
[
429,
433
],
[
433,
434
],
[
433,
435
],
[
429,
437
],
[
437,
438
],
[
437,
439
],
[
429,
440
],
[
440,
441
],
[
440,
442
],
[
429,
443
],
[
443,
444
],
[
443,
445
],
[
445,
446
],
[
446,
447
],
[
446,
448
],
[
443,
449
],
[
449,
450
],
[
429,
451
],
[
451,
452
],
[
451,
453
],
[
453,
454
],
[
454,
455
],
[
455,
456
],
[
455,
457
],
[
454,
458
],
[
458,
459
],
[
459,
460
],
[
454,
461
],
[
461,
462
],
[
462,
463
],
[
462,
464
],
[
461,
465
],
[
465,
466
],
[
466,
467
],
[
466,
468
],
[
468,
469
],
[
469,
470
],
[
470,
471
],
[
465,
472
],
[
472,
473
],
[
473,
474
],
[
473,
475
],
[
475,
476
],
[
476,
477
],
[
475,
478
],
[
461,
479
],
[
479,
480
],
[
480,
481
],
[
480,
482
],
[
479,
483
],
[
483,
484
],
[
484,
485
],
[
453,
486
],
[
486,
487
],
[
429,
488
],
[
488,
489
],
[
488,
490
],
[
490,
491
],
[
491,
492
],
[
492,
493
],
[
491,
494
],
[
494,
495
],
[
495,
496
],
[
495,
497
],
[
497,
498
],
[
491,
499
],
[
499,
500
],
[
500,
501
],
[
429,
502
],
[
502,
503
],
[
502,
504
],
[
504,
505
],
[
505,
506
],
[
506,
507
],
[
507,
508
],
[
507,
509
],
[
506,
510
],
[
510,
511
],
[
510,
512
],
[
502,
513
],
[
513,
514
],
[
429,
515
],
[
515,
516
],
[
515,
517
],
[
517,
518
],
[
518,
519
],
[
519,
520
],
[
520,
521
],
[
519,
522
],
[
522,
523
],
[
523,
524
],
[
523,
525
],
[
525,
526
],
[
525,
527
],
[
518,
528
],
[
528,
529
],
[
517,
530
],
[
530,
531
],
[
531,
532
],
[
429,
533
],
[
533,
534
],
[
533,
535
],
[
535,
536
],
[
536,
537
],
[
537,
538
],
[
538,
539
],
[
536,
540
],
[
540,
541
],
[
535,
542
],
[
542,
543
],
[
542,
544
],
[
535,
545
],
[
545,
546
],
[
545,
547
],
[
547,
548
],
[
535,
549
],
[
549,
550
],
[
550,
551
],
[
550,
552
],
[
549,
553
],
[
553,
554
],
[
554,
555
],
[
555,
556
],
[
554,
557
],
[
553,
558
],
[
558,
559
],
[
558,
560
],
[
560,
561
],
[
535,
562
],
[
562,
563
],
[
563,
564
],
[
564,
565
],
[
429,
566
],
[
566,
567
],
[
566,
568
],
[
568,
569
],
[
569,
570
],
[
570,
571
],
[
571,
572
],
[
569,
573
],
[
573,
574
],
[
568,
575
],
[
575,
576
],
[
575,
577
],
[
568,
578
],
[
578,
579
],
[
578,
580
],
[
568,
581
],
[
581,
582
],
[
581,
583
],
[
583,
584
],
[
568,
585
],
[
585,
586
],
[
586,
587
],
[
586,
588
],
[
585,
589
],
[
589,
590
],
[
590,
591
],
[
590,
592
],
[
589,
593
],
[
593,
594
],
[
593,
595
],
[
595,
596
],
[
568,
597
],
[
597,
598
],
[
598,
599
],
[
599,
600
],
[
599,
601
],
[
598,
602
],
[
602,
603
],
[
602,
604
],
[
597,
605
],
[
605,
606
],
[
606,
607
],
[
568,
608
],
[
608,
609
],
[
608,
610
],
[
610,
611
],
[
611,
612
],
[
612,
613
],
[
613,
614
],
[
613,
615
],
[
612,
616
],
[
616,
617
],
[
616,
618
],
[
611,
619
],
[
619,
620
],
[
620,
621
],
[
620,
622
],
[
619,
623
],
[
623,
624
],
[
623,
625
],
[
625,
626
],
[
625,
627
],
[
611,
628
],
[
628,
629
],
[
629,
630
],
[
630,
631
],
[
630,
632
],
[
632,
633
],
[
629,
634
],
[
634,
635
],
[
635,
636
],
[
635,
637
],
[
628,
638
],
[
638,
639
],
[
639,
640
],
[
640,
641
],
[
640,
642
],
[
642,
643
],
[
640,
644
],
[
628,
645
],
[
645,
646
],
[
646,
647
],
[
610,
648
],
[
648,
649
],
[
648,
650
],
[
650,
651
],
[
429,
652
],
[
652,
653
],
[
652,
654
],
[
654,
655
],
[
655,
656
],
[
655,
657
],
[
657,
658
],
[
654,
659
],
[
659,
660
],
[
660,
661
],
[
661,
662
],
[
661,
663
],
[
663,
664
],
[
663,
665
],
[
660,
666
],
[
666,
667
],
[
666,
668
],
[
668,
669
],
[
668,
670
],
[
659,
671
],
[
671,
672
],
[
654,
673
],
[
673,
674
],
[
429,
675
],
[
675,
676
],
[
675,
677
],
[
677,
678
],
[
678,
679
],
[
679,
680
],
[
680,
681
],
[
679,
682
],
[
682,
683
],
[
847,
684
],
[
684,
685
],
[
684,
686
],
[
686,
687
],
[
684,
688
],
[
688,
689
],
[
684,
690
],
[
690,
691
],
[
690,
692
],
[
692,
693
],
[
693,
694
],
[
694,
695
],
[
694,
696
],
[
693,
697
],
[
698,
699
],
[
698,
700
],
[
692,
701
],
[
701,
702
],
[
702,
703
],
[
702,
704
],
[
701,
705
],
[
706,
707
],
[
706,
708
],
[
692,
709
],
[
709,
710
],
[
710,
711
],
[
709,
712
],
[
709,
713
],
[
713,
714
],
[
692,
715
],
[
715,
716
],
[
716,
717
],
[
715,
718
],
[
715,
719
],
[
690,
720
],
[
720,
721
],
[
684,
722
],
[
722,
723
],
[
722,
724
],
[
724,
725
],
[
725,
726
],
[
725,
727
],
[
727,
728
],
[
727,
729
],
[
725,
730
],
[
730,
731
],
[
730,
732
],
[
722,
733
],
[
733,
734
],
[
722,
735
],
[
735,
736
],
[
684,
737
],
[
737,
738
],
[
737,
739
],
[
739,
740
],
[
740,
741
],
[
741,
742
],
[
741,
743
],
[
740,
744
],
[
744,
745
],
[
739,
746
],
[
746,
747
],
[
747,
748
],
[
748,
749
],
[
748,
750
],
[
747,
751
],
[
751,
752
],
[
751,
753
],
[
746,
754
],
[
754,
755
],
[
755,
756
],
[
756,
757
],
[
756,
758
],
[
755,
759
],
[
759,
760
],
[
759,
761
],
[
754,
762
],
[
762,
763
],
[
763,
764
],
[
763,
765
],
[
762,
766
],
[
746,
767
],
[
767,
768
],
[
768,
769
],
[
769,
770
],
[
769,
771
],
[
768,
772
],
[
772,
773
],
[
772,
774
],
[
767,
775
],
[
775,
776
],
[
776,
777
],
[
776,
778
],
[
775,
779
],
[
767,
780
],
[
780,
781
],
[
781,
782
],
[
782,
783
],
[
782,
784
],
[
781,
785
],
[
785,
786
],
[
785,
787
],
[
780,
788
],
[
788,
789
],
[
789,
790
],
[
789,
791
],
[
739,
792
],
[
792,
793
],
[
737,
794
],
[
794,
795
],
[
737,
796
],
[
796,
797
],
[
684,
798
],
[
798,
799
],
[
798,
800
],
[
800,
801
],
[
801,
802
],
[
802,
803
],
[
803,
804
],
[
803,
805
],
[
802,
806
],
[
806,
807
],
[
806,
808
],
[
798,
809
],
[
809,
810
],
[
798,
811
],
[
811,
812
],
[
684,
813
],
[
813,
814
],
[
813,
815
],
[
815,
816
],
[
816,
817
],
[
817,
818
],
[
818,
819
],
[
818,
820
],
[
817,
821
],
[
816,
822
],
[
822,
823
],
[
816,
824
],
[
824,
825
],
[
825,
826
],
[
825,
827
],
[
827,
828
],
[
827,
829
],
[
829,
830
],
[
829,
831
],
[
813,
832
],
[
832,
833
],
[
684,
834
],
[
834,
835
],
[
834,
836
],
[
836,
837
],
[
837,
838
],
[
838,
839
],
[
839,
840
],
[
839,
841
],
[
841,
842
],
[
841,
843
],
[
834,
844
],
[
844,
845
],
[
0,
846
],
[
846,
847
],
[
846,
848
]
]
| [
"import java.io.IOException;\nimport java.io.InputStream;\nimport java.math.BigDecimal;\nimport java.math.BigInteger;\nimport java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Arrays;\nimport java.util.BitSet;\nimport java.util.Collections;\nimport java.util.Comparator;\nimport java.util.Deque;\nimport java.util.HashMap;\nimport java.util.HashSet;\nimport java.util.List;\nimport java.util.Map;\nimport java.util.Map.Entry;\nimport java.util.NoSuchElementException;\nimport java.util.Objects;\nimport java.util.PriorityQueue;\nimport java.util.Queue;\nimport java.util.Scanner;\nimport java.util.Set;\nimport java.util.TreeMap;\nimport java.util.TreeSet;\n\npublic class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tstatic class FastScanner {\n\t\tprivate final InputStream in;\n\t\tprivate final byte[] buffer = new byte[1024];\n\t\tprivate int ptr = 0;\n\t\tprivate int buflen = 0;\n\n\t\tpublic FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}\n\n\t\tprivate boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tprivate static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}\n\n\t\tpublic boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}\n\n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}\n\n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n\n\t/**\n\t * Compute n! mod. p, (n!)^(-1) mod.p\n\t *\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @param MAX\n\t * :\n\t * @param MOD\n\t * :\n\t */\n\n\tstatic void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}\n\t/*\n\t * static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,\n\t * final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =\n\t * 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -\n\t * 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); inv[i] =\n\t * (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).\n\t * multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).\n\t * longValue(); finv[i] = (BigInteger.valueOf(finv[i -\n\t * 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); } }\n\t */\n\n\t/**\n\t * @Compute nCk(二項係数計算) mod. p\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @return :nCk(二項係数計算) mod. p\n\t */\n\tstatic long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}\n\t/*\n\t * static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){\n\t * if (n < k) return 0; if (n < 0 || k < 0) return 0; return\n\t * BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])\n\t * .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))\n\t * ) .mod(BigInteger.valueOf(MOD)).longValue(); }\n\t */\n\n\tstatic int hz_swap(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\tstatic long hz_swap(long a, long b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\t// mod上での差分\n\tstatic long hz_modSub(long a, long b, long mod) {\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}\n\n\t// mod上での割算\n\tstatic long hz_modDiv(long a, long b, long mod) {\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}\n\n\t// 逆元\n\tstatic long hz_modInv(long a, long mod) {\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}\n\n\t// mod上での累乗\n\tstatic long hz_modPow(long n, long k, long mod) {\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// Union Find Tree\n\tstatic class HZ_UF {\n\n\t\tpublic int[] par;\n\t\tpublic int[] rank;\n\n\t\tpublic HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}\n\n\t\tpublic void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}\n\n\t\tpublic boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}\n\n\t\tpublic int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}\n\n\t\tpublic int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tsolve_abc179_b();\n\t}\n \n \tpublic static void solve_abc179_b() {\n\n\t\tFastScanner sc = new FastScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\t\n\t\t//int[] d1 = new int[n];\n\t\t//int[] d2 = new int[n];\n\t\t\n\t\tint count = 0;\n\t\tboolean flg = false;\n\t\t\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\t\n\t\t\tif(d1 == d2){\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}\n\t\t\telse count = 0;\n\t\t\t\n\t\t}\n\t\t\n\t\tif(flg) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.ArrayDeque;",
"ArrayDeque",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.BitSet;",
"BitSet",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Comparator;",
"Comparator",
"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.Map.Entry;",
"Entry",
"java.util.Map",
"import java.util.NoSuchElementException;",
"NoSuchElementException",
"java.util",
"import java.util.Objects;",
"Objects",
"java.util",
"import java.util.PriorityQueue;",
"PriorityQueue",
"java.util",
"import java.util.Queue;",
"Queue",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"import java.util.TreeMap;",
"TreeMap",
"java.util",
"import java.util.TreeSet;",
"TreeSet",
"java.util",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tstatic class FastScanner {\n\t\tprivate final InputStream in;\n\t\tprivate final byte[] buffer = new byte[1024];\n\t\tprivate int ptr = 0;\n\t\tprivate int buflen = 0;\n\n\t\tpublic FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}\n\n\t\tprivate boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tprivate static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}\n\n\t\tpublic boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}\n\n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}\n\n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n\n\t/**\n\t * Compute n! mod. p, (n!)^(-1) mod.p\n\t *\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @param MAX\n\t * :\n\t * @param MOD\n\t * :\n\t */\n\n\tstatic void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}\n\t/*\n\t * static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,\n\t * final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =\n\t * 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -\n\t * 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); inv[i] =\n\t * (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).\n\t * multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).\n\t * longValue(); finv[i] = (BigInteger.valueOf(finv[i -\n\t * 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); } }\n\t */\n\n\t/**\n\t * @Compute nCk(二項係数計算) mod. p\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @return :nCk(二項係数計算) mod. p\n\t */\n\tstatic long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}\n\t/*\n\t * static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){\n\t * if (n < k) return 0; if (n < 0 || k < 0) return 0; return\n\t * BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])\n\t * .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))\n\t * ) .mod(BigInteger.valueOf(MOD)).longValue(); }\n\t */\n\n\tstatic int hz_swap(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\tstatic long hz_swap(long a, long b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\t// mod上での差分\n\tstatic long hz_modSub(long a, long b, long mod) {\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}\n\n\t// mod上での割算\n\tstatic long hz_modDiv(long a, long b, long mod) {\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}\n\n\t// 逆元\n\tstatic long hz_modInv(long a, long mod) {\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}\n\n\t// mod上での累乗\n\tstatic long hz_modPow(long n, long k, long mod) {\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// Union Find Tree\n\tstatic class HZ_UF {\n\n\t\tpublic int[] par;\n\t\tpublic int[] rank;\n\n\t\tpublic HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}\n\n\t\tpublic void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}\n\n\t\tpublic boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}\n\n\t\tpublic int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}\n\n\t\tpublic int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tsolve_abc179_b();\n\t}\n \n \tpublic static void solve_abc179_b() {\n\n\t\tFastScanner sc = new FastScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\t\n\t\t//int[] d1 = new int[n];\n\t\t//int[] d2 = new int[n];\n\t\t\n\t\tint count = 0;\n\t\tboolean flg = false;\n\t\t\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\t\n\t\t\tif(d1 == d2){\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}\n\t\t\telse count = 0;\n\t\t\t\n\t\t}\n\t\t\n\t\tif(flg) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"/**\n\t * Compute n! mod. p, (n!)^(-1) mod.p\n\t *\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @param MAX\n\t * :\n\t * @param MOD\n\t * :\n\t */\n\n\tstatic void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}",
"hz_COMinit",
"{\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}",
"fac[0] = fac[1] = 1L",
"fac[0]",
"fac",
"0",
"fac[1] = 1L",
"fac[1]",
"fac",
"1",
"1L",
"finv[0] = finv[1] = 1L",
"finv[0]",
"finv",
"0",
"finv[1] = 1L",
"finv[1]",
"finv",
"1",
"1L",
"inv[1] = 1L",
"inv[1]",
"inv",
"1",
"1L",
"for (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < MAX",
"i",
"MAX",
"i++",
"i++",
"i",
"{\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}",
"{\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}",
"fac[i] = fac[i - 1] * i % MOD",
"fac[i]",
"fac",
"i",
"fac[i - 1] * i % MOD",
"fac[i - 1] * i",
"fac[i - 1]",
"fac",
"i - 1",
"i",
"1",
"i",
"MOD",
"inv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD",
"inv[i]",
"inv",
"i",
"MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD",
"MOD",
"inv[(int) (MOD % i)] * (MOD / i) % MOD",
"inv[(int) (MOD % i)] * (MOD / i)",
"inv[(int) (MOD % i)]",
"inv",
"(int) (MOD % i)",
"MOD",
"i",
"(MOD / i)",
"MOD",
"i",
"MOD",
"finv[i] = finv[i - 1] * inv[i] % MOD",
"finv[i]",
"finv",
"i",
"finv[i - 1] * inv[i] % MOD",
"finv[i - 1] * inv[i]",
"finv[i - 1]",
"finv",
"i - 1",
"i",
"1",
"inv[i]",
"inv",
"i",
"MOD",
"long fac[]",
"fac",
"long finv[]",
"finv",
"long inv[]",
"inv",
"final int MAX",
"MAX",
"final long MOD",
"MOD",
"/**\n\t * @Compute nCk(二項係数計算) mod. p\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @return :nCk(二項係数計算) mod. p\n\t */\n\tstatic long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}",
"hz_COM",
"{\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}",
"if (n < k)\n\t\t\treturn 0;",
"n < k",
"n",
"k",
"return 0;",
"0",
"if (n < 0 || k < 0)\n\t\t\treturn 0;",
"n < 0 || k < 0",
"n < 0",
"n",
"0",
"k < 0",
"k",
"0",
"return 0;",
"0",
"return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;",
"fac[n] * (finv[k] * finv[n - k] % MOD) % MOD",
"fac[n] * (finv[k] * finv[n - k] % MOD)",
"fac[n]",
"fac",
"n",
"(finv[k] * finv[n - k] % MOD)",
"finv[k] * finv[n - k]",
"finv[k]",
"finv",
"k",
"finv[n - k]",
"finv",
"n - k",
"n",
"k",
"MOD",
"MOD",
"long fac[]",
"fac",
"long finv[]",
"finv",
"int n",
"n",
"int k",
"k",
"final long MOD",
"MOD",
"static int hz_swap(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}",
"hz_swap",
"{\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}",
"if (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;",
"a >= b",
"a",
"b",
"return a;",
"a",
"return b;",
"b",
"int a",
"a",
"int b",
"b",
"static long hz_swap(long a, long b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}",
"hz_swap",
"{\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}",
"if (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;",
"a >= b",
"a",
"b",
"return a;",
"a",
"return b;",
"b",
"long a",
"a",
"long b",
"b",
"// mod上での差分\n\tstatic long hz_modSub(long a, long b, long mod) {\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}",
"hz_modSub",
"{\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}",
"long v = a - b;",
"v",
"a - b",
"a",
"b",
"if (v < 0)\n\t\t\tv += mod;",
"v < 0",
"v",
"0",
"v += mod",
"v",
"mod",
"return v % mod;",
"v % mod",
"v",
"mod",
"long a",
"a",
"long b",
"b",
"long mod",
"mod",
"// mod上での割算\n\tstatic long hz_modDiv(long a, long b, long mod) {\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}",
"hz_modDiv",
"{\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}",
"return (a % mod) * hz_modInv(b, mod) % mod;",
"(a % mod) * hz_modInv(b, mod) % mod",
"(a % mod) * hz_modInv(b, mod)",
"(a % mod)",
"a",
"mod",
"hz_modInv(b, mod)",
"hz_modInv",
"b",
"mod",
"mod",
"long a",
"a",
"long b",
"b",
"long mod",
"mod",
"// 逆元\n\tstatic long hz_modInv(long a, long mod) {\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}",
"hz_modInv",
"{\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}",
"return hz_modPow(a, mod - 2L, mod);",
"hz_modPow(a, mod - 2L, mod)",
"hz_modPow",
"a",
"mod - 2L",
"mod",
"2L",
"mod",
"long a",
"a",
"long mod",
"mod",
"// mod上での累乗\n\tstatic long hz_modPow(long n, long k, long mod) {\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}",
"hz_modPow",
"{\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}",
"long result = 1L;",
"result",
"1L",
"while (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}",
"k > 0L",
"k",
"0L",
"{\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}",
"if ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;",
"(k & 1L) == 1L",
"(k & 1L)",
"k",
"1L",
"1L",
"result = (result * n) % mod",
"result",
"(result * n) % mod",
"(result * n)",
"result",
"n",
"mod",
"n = n * n % mod",
"n",
"n * n % mod",
"n * n",
"n",
"n",
"mod",
"k >>= 1L",
"k",
"1L",
"return result;",
"result",
"long n",
"n",
"long k",
"k",
"long mod",
"mod",
"public static void main(String[] args) {\n\n\t\tsolve_abc179_b();\n\t}",
"main",
"{\n\n\t\tsolve_abc179_b();\n\t}",
"solve_abc179_b()",
"solve_abc179_b",
"String[] args",
"args",
"public static void solve_abc179_b() {\n\n\t\tFastScanner sc = new FastScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\t\n\t\t//int[] d1 = new int[n];\n\t\t//int[] d2 = new int[n];\n\t\t\n\t\tint count = 0;\n\t\tboolean flg = false;\n\t\t\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\t\n\t\t\tif(d1 == d2){\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}\n\t\t\telse count = 0;\n\t\t\t\n\t\t}\n\t\t\n\t\tif(flg) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}",
"solve_abc179_b",
"{\n\n\t\tFastScanner sc = new FastScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\t\n\t\t//int[] d1 = new int[n];\n\t\t//int[] d2 = new int[n];\n\t\t\n\t\tint count = 0;\n\t\tboolean flg = false;\n\t\t\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\t\n\t\t\tif(d1 == d2){\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}\n\t\t\telse count = 0;\n\t\t\t\n\t\t}\n\t\t\n\t\tif(flg) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}",
"FastScanner sc = new FastScanner(System.in);",
"sc",
"new FastScanner(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\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\t\n\t\t\tif(d1 == d2){\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}\n\t\t\telse count = 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\t\n\t\t\tif(d1 == d2){\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}\n\t\t\telse count = 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\t\n\t\t\tif(d1 == d2){\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}\n\t\t\telse count = 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\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}\n\t\t\telse count = 0;",
"d1 == d2",
"d1",
"d2",
"{\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}",
"count++",
"count",
"if(count == 3) flg = true;",
"count == 3",
"count",
"3",
"flg = true",
"flg",
"true",
"count = 0",
"count",
"0",
"if(flg) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");",
"flg",
"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\"",
"static class FastScanner {\n\t\tprivate final InputStream in;\n\t\tprivate final byte[] buffer = new byte[1024];\n\t\tprivate int ptr = 0;\n\t\tprivate int buflen = 0;\n\n\t\tpublic FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}\n\n\t\tprivate boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tprivate static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}\n\n\t\tpublic boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}\n\n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}\n\n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}",
"FastScanner",
"private final InputStream in;",
"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",
"public FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}",
"FastScanner",
"{\n\t\t\tin = source;\n\t\t}",
"in = source",
"in",
"source",
"InputStream source",
"source",
"private boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"hasNextByte",
"{\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"if (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"ptr < buflen",
"ptr",
"buflen",
"{\n\t\t\t\treturn true;\n\t\t\t}",
"return true;",
"true",
"{\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}",
"ptr = 0",
"ptr",
"0",
"try {\n\t\t\t\t\tbuflen = in.read(buffer);\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\tbuflen = in.read(buffer);\n\t\t\t\t}",
"buflen = in.read(buffer)",
"buflen",
"in.read(buffer)",
"in.read",
"in",
"buffer",
"if (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"buflen <= 0",
"buflen",
"0",
"{\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"private int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}",
"readByte",
"{\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}",
"if (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;",
"hasNextByte()",
"hasNextByte",
"return buffer[ptr++];",
"buffer[ptr++]",
"buffer",
"ptr++",
"ptr",
"return -1;",
"-1",
"1",
"private static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}",
"isPrintableChar",
"{\n\t\t\treturn 33 <= c && c <= 126;\n\t\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\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}",
"hasNext",
"{\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}",
"while (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;",
"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\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}",
"next",
"{\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}",
"if (!hasNext())\n\t\t\t\tthrow 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\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\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\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}",
"nextLong",
"{\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}",
"if (!hasNext())\n\t\t\t\tthrow 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\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}",
"b == '-'",
"b",
"'-'",
"{\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}",
"minus = true",
"minus",
"true",
"b = readByte()",
"b",
"readByte()",
"readByte",
"if (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"b < '0' || '9' < b",
"b < '0'",
"b",
"'0'",
"'9' < b",
"'9'",
"b",
"{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}",
"true",
"{\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}",
"if ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}",
"'0' <= b && b <= '9'",
"'0' <= b",
"'0'",
"b",
"b <= '9'",
"b",
"'9'",
"{\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t}",
"n *= 10",
"n",
"10",
"n += b - '0'",
"n",
"b - '0'",
"b",
"'0'",
"if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}",
"b == -1 || !isPrintableChar(b)",
"b == -1",
"b",
"-1",
"1",
"!isPrintableChar(b)",
"isPrintableChar(b)",
"isPrintableChar",
"b",
"{\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t}",
"return minus ? -n : n;",
"minus ? -n : n",
"minus",
"-n",
"n",
"n",
"{\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}",
"throw new NumberFormatException();",
"new NumberFormatException()",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}",
"nextInt",
"{\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}",
"long nl = nextLong();",
"nl",
"nextLong()",
"nextLong",
"if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow 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\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"static class HZ_UF {\n\n\t\tpublic int[] par;\n\t\tpublic int[] rank;\n\n\t\tpublic HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}\n\n\t\tpublic void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}\n\n\t\tpublic boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}\n\n\t\tpublic int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}\n\n\t\tpublic int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}\n\t}",
"HZ_UF",
"public int[] par;",
"par",
"public int[] rank;",
"rank",
"public HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}",
"HZ_UF",
"{\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}",
"this.par = new int[n + 1]",
"this.par",
"this",
"this.par",
"new int[n + 1]",
"n + 1",
"n",
"1",
"this.rank = new int[n + 1]",
"this.rank",
"this",
"this.rank",
"new int[n + 1]",
"n + 1",
"n",
"1",
"Arrays.fill(par, -1)",
"Arrays.fill",
"Arrays",
"par",
"-1",
"1",
"Arrays.fill(rank, 0)",
"Arrays.fill",
"Arrays",
"rank",
"0",
"int n",
"n",
"public void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}",
"unite",
"{\n\t\t\tlink(root(x), root(y));\n\t\t}",
"link(root(x), root(y))",
"link",
"root(x)",
"root",
"x",
"root(y)",
"root",
"y",
"int x",
"x",
"int y",
"y",
"public boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"link",
"{\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"if (x == y)\n\t\t\t\treturn false;",
"x == y",
"x",
"y",
"return false;",
"false",
"if (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}",
"rank[x] > rank[y]",
"rank[x]",
"rank",
"x",
"rank[y]",
"rank",
"y",
"{\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t}",
"par[x] += par[y]",
"par[x]",
"par",
"x",
"par[y]",
"par",
"y",
"par[y] = x",
"par[y]",
"par",
"y",
"x",
"{\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}",
"par[y] += par[x]",
"par[y]",
"par",
"y",
"par[x]",
"par",
"x",
"par[x] = y",
"par[x]",
"par",
"x",
"y",
"if (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;",
"rank[x] == rank[y]",
"rank[x]",
"rank",
"x",
"rank[y]",
"rank",
"y",
"rank[y]++",
"rank[y]",
"rank",
"y",
"return true;",
"true",
"int x",
"x",
"int y",
"y",
"public boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}",
"isSame",
"{\n\t\t\treturn root(x) == root(y);\n\t\t}",
"return root(x) == root(y);",
"root(x) == root(y)",
"root(x)",
"root",
"x",
"root(y)",
"root",
"y",
"int x",
"x",
"int y",
"y",
"public int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}",
"root",
"{\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}",
"if (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);",
"par[x] < 0",
"par[x]",
"par",
"x",
"0",
"return x;",
"x",
"return x = root(par[x]);",
"x = root(par[x])",
"x",
"root(par[x])",
"root",
"par[x]",
"par",
"x",
"int x",
"x",
"public int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}",
"size",
"{\n\t\t\treturn -par[root(x)];\n\t\t}",
"return -par[root(x)];",
"-par[root(x)]",
"par[root(x)]",
"par",
"root(x)",
"root",
"x",
"int x",
"x",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tstatic class FastScanner {\n\t\tprivate final InputStream in;\n\t\tprivate final byte[] buffer = new byte[1024];\n\t\tprivate int ptr = 0;\n\t\tprivate int buflen = 0;\n\n\t\tpublic FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}\n\n\t\tprivate boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tprivate static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}\n\n\t\tpublic boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}\n\n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}\n\n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n\n\t/**\n\t * Compute n! mod. p, (n!)^(-1) mod.p\n\t *\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @param MAX\n\t * :\n\t * @param MOD\n\t * :\n\t */\n\n\tstatic void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}\n\t/*\n\t * static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,\n\t * final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =\n\t * 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -\n\t * 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); inv[i] =\n\t * (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).\n\t * multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).\n\t * longValue(); finv[i] = (BigInteger.valueOf(finv[i -\n\t * 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); } }\n\t */\n\n\t/**\n\t * @Compute nCk(二項係数計算) mod. p\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @return :nCk(二項係数計算) mod. p\n\t */\n\tstatic long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}\n\t/*\n\t * static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){\n\t * if (n < k) return 0; if (n < 0 || k < 0) return 0; return\n\t * BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])\n\t * .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))\n\t * ) .mod(BigInteger.valueOf(MOD)).longValue(); }\n\t */\n\n\tstatic int hz_swap(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\tstatic long hz_swap(long a, long b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\t// mod上での差分\n\tstatic long hz_modSub(long a, long b, long mod) {\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}\n\n\t// mod上での割算\n\tstatic long hz_modDiv(long a, long b, long mod) {\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}\n\n\t// 逆元\n\tstatic long hz_modInv(long a, long mod) {\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}\n\n\t// mod上での累乗\n\tstatic long hz_modPow(long n, long k, long mod) {\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// Union Find Tree\n\tstatic class HZ_UF {\n\n\t\tpublic int[] par;\n\t\tpublic int[] rank;\n\n\t\tpublic HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}\n\n\t\tpublic void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}\n\n\t\tpublic boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}\n\n\t\tpublic int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}\n\n\t\tpublic int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tsolve_abc179_b();\n\t}\n \n \tpublic static void solve_abc179_b() {\n\n\t\tFastScanner sc = new FastScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\t\n\t\t//int[] d1 = new int[n];\n\t\t//int[] d2 = new int[n];\n\t\t\n\t\tint count = 0;\n\t\tboolean flg = false;\n\t\t\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\t\n\t\t\tif(d1 == d2){\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}\n\t\t\telse count = 0;\n\t\t\t\n\t\t}\n\t\t\n\t\tif(flg) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"public class Main {\n\n\tstatic Scanner sc = new Scanner(System.in);\n\n\tstatic class FastScanner {\n\t\tprivate final InputStream in;\n\t\tprivate final byte[] buffer = new byte[1024];\n\t\tprivate int ptr = 0;\n\t\tprivate int buflen = 0;\n\n\t\tpublic FastScanner(InputStream source) {\n\t\t\tin = source;\n\t\t}\n\n\t\tprivate boolean hasNextByte() {\n\t\t\tif (ptr < buflen) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tptr = 0;\n\t\t\t\ttry {\n\t\t\t\t\tbuflen = in.read(buffer);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\tif (buflen <= 0) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tprivate int readByte() {\n\t\t\tif (hasNextByte())\n\t\t\t\treturn buffer[ptr++];\n\t\t\telse\n\t\t\t\treturn -1;\n\t\t}\n\n\t\tprivate static boolean isPrintableChar(int c) {\n\t\t\treturn 33 <= c && c <= 126;\n\t\t}\n\n\t\tpublic boolean hasNext() {\n\t\t\twhile (hasNextByte() && !isPrintableChar(buffer[ptr]))\n\t\t\t\tptr++;\n\t\t\treturn hasNextByte();\n\t\t}\n\n\t\tpublic String next() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tint b = readByte();\n\t\t\twhile (isPrintableChar(b)) {\n\t\t\t\tsb.appendCodePoint(b);\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\treturn sb.toString();\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tif (!hasNext())\n\t\t\t\tthrow new NoSuchElementException();\n\t\t\tlong n = 0;\n\t\t\tboolean minus = false;\n\t\t\tint b = readByte();\n\t\t\tif (b == '-') {\n\t\t\t\tminus = true;\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t\tif (b < '0' || '9' < b) {\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\twhile (true) {\n\t\t\t\tif ('0' <= b && b <= '9') {\n\t\t\t\t\tn *= 10;\n\t\t\t\t\tn += b - '0';\n\t\t\t\t} else if (b == -1 || !isPrintableChar(b)) {\n\t\t\t\t\treturn minus ? -n : n;\n\t\t\t\t} else {\n\t\t\t\t\tthrow new NumberFormatException();\n\t\t\t\t}\n\t\t\t\tb = readByte();\n\t\t\t}\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tlong nl = nextLong();\n\t\t\tif (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)\n\t\t\t\tthrow new NumberFormatException();\n\t\t\treturn (int) nl;\n\t\t}\n\n\t\tpublic double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n\n\t/**\n\t * Compute n! mod. p, (n!)^(-1) mod.p\n\t *\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @param MAX\n\t * :\n\t * @param MOD\n\t * :\n\t */\n\n\tstatic void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {\n\t\tfac[0] = fac[1] = 1L;\n\t\tfinv[0] = finv[1] = 1L;\n\t\tinv[1] = 1L;\n\t\tfor (int i = 2; i < MAX; i++) {\n\t\t\tfac[i] = fac[i - 1] * i % MOD;\n\t\t\tinv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;\n\t\t\tfinv[i] = finv[i - 1] * inv[i] % MOD;\n\t\t}\n\t}\n\t/*\n\t * static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,\n\t * final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =\n\t * 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -\n\t * 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); inv[i] =\n\t * (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).\n\t * multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).\n\t * longValue(); finv[i] = (BigInteger.valueOf(finv[i -\n\t * 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).\n\t * longValue(); } }\n\t */\n\n\t/**\n\t * @Compute nCk(二項係数計算) mod. p\n\t * @param fac[]\n\t * : n! mod. p\n\t * @param finv[]\n\t * : (n!)^(-1) mod. p\n\t * @return :nCk(二項係数計算) mod. p\n\t */\n\tstatic long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {\n\t\tif (n < k)\n\t\t\treturn 0;\n\t\tif (n < 0 || k < 0)\n\t\t\treturn 0;\n\t\treturn fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;\n\t}\n\t/*\n\t * static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){\n\t * if (n < k) return 0; if (n < 0 || k < 0) return 0; return\n\t * BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])\n\t * .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))\n\t * ) .mod(BigInteger.valueOf(MOD)).longValue(); }\n\t */\n\n\tstatic int hz_swap(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\tstatic long hz_swap(long a, long b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn b;\n\t}\n\n\t// mod上での差分\n\tstatic long hz_modSub(long a, long b, long mod) {\n\t\tlong v = a - b;\n\t\tif (v < 0)\n\t\t\tv += mod;\n\t\treturn v % mod;\n\t}\n\n\t// mod上での割算\n\tstatic long hz_modDiv(long a, long b, long mod) {\n\t\treturn (a % mod) * hz_modInv(b, mod) % mod;\n\t}\n\n\t// 逆元\n\tstatic long hz_modInv(long a, long mod) {\n\t\treturn hz_modPow(a, mod - 2L, mod);\n\t}\n\n\t// mod上での累乗\n\tstatic long hz_modPow(long n, long k, long mod) {\n\n\t\tlong result = 1L;\n\n\t\t// k を右シフトしつつ n を 2 乗していく\n\t\twhile (k > 0L) {\n\t\t\t// k の最下ビットが 1 なら、今の n を答えに掛ける\n\t\t\tif ((k & 1L) == 1L)\n\t\t\t\tresult = (result * n) % mod;\n\t\t\tn = n * n % mod;\n\t\t\tk >>= 1L;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t// Union Find Tree\n\tstatic class HZ_UF {\n\n\t\tpublic int[] par;\n\t\tpublic int[] rank;\n\n\t\tpublic HZ_UF(int n) {\n\t\t\tthis.par = new int[n + 1];\n\t\t\tthis.rank = new int[n + 1];\n\n\t\t\tArrays.fill(par, -1);\n\t\t\tArrays.fill(rank, 0);\n\t\t}\n\n\t\tpublic void unite(int x, int y) {\n\t\t\tlink(root(x), root(y));\n\t\t}\n\n\t\tpublic boolean link(int x, int y) {\n\t\t\tif (x == y)\n\t\t\t\treturn false;\n\t\t\tif (rank[x] > rank[y]) {\n\t\t\t\tpar[x] += par[y];\n\t\t\t\tpar[y] = x;\n\t\t\t} else {\n\t\t\t\tpar[y] += par[x];\n\t\t\t\tpar[x] = y;\n\t\t\t\tif (rank[x] == rank[y])\n\t\t\t\t\trank[y]++;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\tpublic boolean isSame(int x, int y) {\n\t\t\treturn root(x) == root(y);\n\t\t}\n\n\t\tpublic int root(int x) {\n\t\t\tif (par[x] < 0)\n\t\t\t\treturn x;\n\t\t\telse\n\t\t\t\treturn x = root(par[x]);\n\t\t}\n\n\t\tpublic int size(int x) {\n\t\t\treturn -par[root(x)];\n\t\t}\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tsolve_abc179_b();\n\t}\n \n \tpublic static void solve_abc179_b() {\n\n\t\tFastScanner sc = new FastScanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\t\n\t\t//int[] d1 = new int[n];\n\t\t//int[] d2 = new int[n];\n\t\t\n\t\tint count = 0;\n\t\tboolean flg = false;\n\t\t\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\t\n\t\t\tif(d1 == d2){\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) flg = true;\n\t\t\t}\n\t\t\telse count = 0;\n\t\t\t\n\t\t}\n\t\t\n\t\tif(flg) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t}\n}",
"Main"
]
| import java.io.IOException;
import java.io.InputStream;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.Collections;
import java.util.Comparator;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.PriorityQueue;
import java.util.Queue;
import java.util.Scanner;
import java.util.Set;
import java.util.TreeMap;
import java.util.TreeSet;
public class Main {
static Scanner sc = new Scanner(System.in);
static class FastScanner {
private final InputStream in;
private final byte[] buffer = new byte[1024];
private int ptr = 0;
private int buflen = 0;
public FastScanner(InputStream source) {
in = source;
}
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());
}
}
/**
* Compute n! mod. p, (n!)^(-1) mod.p
*
* @param fac[]
* : n! mod. p
* @param finv[]
* : (n!)^(-1) mod. p
* @param MAX
* :
* @param MOD
* :
*/
static void hz_COMinit(long fac[], long finv[], long inv[], final int MAX, final long MOD) {
fac[0] = fac[1] = 1L;
finv[0] = finv[1] = 1L;
inv[1] = 1L;
for (int i = 2; i < MAX; i++) {
fac[i] = fac[i - 1] * i % MOD;
inv[i] = MOD - inv[(int) (MOD % i)] * (MOD / i) % MOD;
finv[i] = finv[i - 1] * inv[i] % MOD;
}
}
/*
* static void hz_COMinit(long fac[], long finv[], long inv[],final int MAX,
* final long MOD) { fac[0] = fac[1] = 1L; finv[0] = finv[1] = 1L; inv[1] =
* 1L; for (int i = 2; i < MAX; i++){ fac[i] = (BigInteger.valueOf(fac[i -
* 1]).multiply(BigInteger.valueOf(i)).mod(BigInteger.valueOf(MOD))).
* longValue(); inv[i] =
* (BigInteger.valueOf(MOD).subtract(BigInteger.valueOf(inv[(int)(MOD%i)]).
* multiply(BigInteger.valueOf(MOD/i)).mod(BigInteger.valueOf(MOD)))).
* longValue(); finv[i] = (BigInteger.valueOf(finv[i -
* 1]).multiply(BigInteger.valueOf(inv[i])).mod(BigInteger.valueOf(MOD))).
* longValue(); } }
*/
/**
* @Compute nCk(二項係数計算) mod. p
* @param fac[]
* : n! mod. p
* @param finv[]
* : (n!)^(-1) mod. p
* @return :nCk(二項係数計算) mod. p
*/
static long hz_COM(long fac[], long finv[], int n, int k, final long MOD) {
if (n < k)
return 0;
if (n < 0 || k < 0)
return 0;
return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}
/*
* static long hz_COM(long fac[],long finv[], int n, int k, final long MOD){
* if (n < k) return 0; if (n < 0 || k < 0) return 0; return
* BigInteger.valueOf(fac[n]) .multiply(BigInteger.valueOf(finv[k])
* .multiply(BigInteger.valueOf(finv[n - k])) .mod(BigInteger.valueOf(MOD))
* ) .mod(BigInteger.valueOf(MOD)).longValue(); }
*/
static int hz_swap(int a, int b) {
if (a >= b)
return a;
else
return b;
}
static long hz_swap(long a, long b) {
if (a >= b)
return a;
else
return b;
}
// mod上での差分
static long hz_modSub(long a, long b, long mod) {
long v = a - b;
if (v < 0)
v += mod;
return v % mod;
}
// mod上での割算
static long hz_modDiv(long a, long b, long mod) {
return (a % mod) * hz_modInv(b, mod) % mod;
}
// 逆元
static long hz_modInv(long a, long mod) {
return hz_modPow(a, mod - 2L, mod);
}
// mod上での累乗
static long hz_modPow(long n, long k, long mod) {
long result = 1L;
// k を右シフトしつつ n を 2 乗していく
while (k > 0L) {
// k の最下ビットが 1 なら、今の n を答えに掛ける
if ((k & 1L) == 1L)
result = (result * n) % mod;
n = n * n % mod;
k >>= 1L;
}
return result;
}
// Union Find Tree
static class HZ_UF {
public int[] par;
public int[] rank;
public HZ_UF(int n) {
this.par = new int[n + 1];
this.rank = new int[n + 1];
Arrays.fill(par, -1);
Arrays.fill(rank, 0);
}
public void unite(int x, int y) {
link(root(x), root(y));
}
public boolean link(int x, int y) {
if (x == y)
return false;
if (rank[x] > rank[y]) {
par[x] += par[y];
par[y] = x;
} else {
par[y] += par[x];
par[x] = y;
if (rank[x] == rank[y])
rank[y]++;
}
return true;
}
public boolean isSame(int x, int y) {
return root(x) == root(y);
}
public int root(int x) {
if (par[x] < 0)
return x;
else
return x = root(par[x]);
}
public int size(int x) {
return -par[root(x)];
}
}
public static void main(String[] args) {
solve_abc179_b();
}
public static void solve_abc179_b() {
FastScanner sc = new FastScanner(System.in);
int n = sc.nextInt();
//int[] d1 = new int[n];
//int[] d2 = new int[n];
int count = 0;
boolean flg = false;
for(int i=0;i<n;i++){
int d1 = sc.nextInt();
int d2 = sc.nextInt();
if(d1 == d2){
count++;
if(count == 3) flg = true;
}
else count = 0;
}
if(flg) 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,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
13,
13,
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,
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
],
[
168,
8
],
[
168,
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
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
26,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
31,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
31,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
42,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
31,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
55,
59
],
[
11,
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
],
[
73,
75
],
[
71,
76
],
[
9,
77
],
[
77,
78
],
[
168,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
79,
83
],
[
83,
84
],
[
79,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
79,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
94,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
104,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
93,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
79,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
126,
127
],
[
79,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
135,
136
],
[
79,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
144,
145
],
[
79,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
152,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
148,
165
],
[
165,
166
],
[
0,
167
],
[
167,
168
],
[
167,
169
]
]
| [
"\nimport java.util.*;\nimport java.io.*;\n\npublic class Main {\n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n\n\t\n\n\tpublic static void main(String[] args) throws FileNotFoundException {\n\t\n\t\n /*File file =new File(\"input.txt\");\n Scanner scan=new Scanner(new FileInputStream(file));\n PrintWriter out=new PrintWriter(\"output.txt\");\n */\nFastReader scan=new FastReader();\n int n=scan.nextInt();\n int count=0;\n int max=0;\n while(n-->0){\n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t if(a==b){\n++count;\n\t }\n\t else{\n\t\t count=0;\n\t }\n\t max=Math.max(count,max);\n\t \n }\n\n if(max>=3){\n\t System.out.println(\"Yes\");\n }\n else\n System.out.println(\"No\");\n\n\t}\n}\n\n",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n\n\t\n\n\tpublic static void main(String[] args) throws FileNotFoundException {\n\t\n\t\n /*File file =new File(\"input.txt\");\n Scanner scan=new Scanner(new FileInputStream(file));\n PrintWriter out=new PrintWriter(\"output.txt\");\n */\nFastReader scan=new FastReader();\n int n=scan.nextInt();\n int count=0;\n int max=0;\n while(n-->0){\n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t if(a==b){\n++count;\n\t }\n\t else{\n\t\t count=0;\n\t }\n\t max=Math.max(count,max);\n\t \n }\n\n if(max>=3){\n\t System.out.println(\"Yes\");\n }\n else\n System.out.println(\"No\");\n\n\t}\n}",
"Main",
"public static void main(String[] args) throws FileNotFoundException {\n\t\n\t\n /*File file =new File(\"input.txt\");\n Scanner scan=new Scanner(new FileInputStream(file));\n PrintWriter out=new PrintWriter(\"output.txt\");\n */\nFastReader scan=new FastReader();\n int n=scan.nextInt();\n int count=0;\n int max=0;\n while(n-->0){\n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t if(a==b){\n++count;\n\t }\n\t else{\n\t\t count=0;\n\t }\n\t max=Math.max(count,max);\n\t \n }\n\n if(max>=3){\n\t System.out.println(\"Yes\");\n }\n else\n System.out.println(\"No\");\n\n\t}",
"main",
"{\n\t\n\t\n /*File file =new File(\"input.txt\");\n Scanner scan=new Scanner(new FileInputStream(file));\n PrintWriter out=new PrintWriter(\"output.txt\");\n */\nFastReader scan=new FastReader();\n int n=scan.nextInt();\n int count=0;\n int max=0;\n while(n-->0){\n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t if(a==b){\n++count;\n\t }\n\t else{\n\t\t count=0;\n\t }\n\t max=Math.max(count,max);\n\t \n }\n\n if(max>=3){\n\t System.out.println(\"Yes\");\n }\n else\n System.out.println(\"No\");\n\n\t}",
"FastReader scan=new FastReader();",
"scan",
"new FastReader()",
"int n=scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int count=0;",
"count",
"0",
"int max=0;",
"max",
"0",
"while(n-->0){\n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t if(a==b){\n++count;\n\t }\n\t else{\n\t\t count=0;\n\t }\n\t max=Math.max(count,max);\n\t \n }",
"n-->0",
"n--",
"n",
"0",
"{\n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t if(a==b){\n++count;\n\t }\n\t else{\n\t\t count=0;\n\t }\n\t max=Math.max(count,max);\n\t \n }",
"int a=scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b=scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(a==b){\n++count;\n\t }\n\t else{\n\t\t count=0;\n\t }",
"a==b",
"a",
"b",
"{\n++count;\n\t }",
"++count",
"count",
"{\n\t\t count=0;\n\t }",
"count=0",
"count",
"0",
"max=Math.max(count,max)",
"max",
"Math.max(count,max)",
"Math.max",
"Math",
"count",
"max",
"if(max>=3){\n\t System.out.println(\"Yes\");\n }\n else\n System.out.println(\"No\");",
"max>=3",
"max",
"3",
"{\n\t System.out.println(\"Yes\");\n }",
"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 FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"FastReader",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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.hasMoreElements()) {\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.hasMoreElements()) {\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.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"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",
"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",
"double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}",
"nextLine",
"{\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}",
"String str = \"\";",
"str",
"\"\"",
"try {\n\t\t\t\tstr = br.readLine();\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\tstr = br.readLine();\n\t\t\t}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main {\n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n\n\t\n\n\tpublic static void main(String[] args) throws FileNotFoundException {\n\t\n\t\n /*File file =new File(\"input.txt\");\n Scanner scan=new Scanner(new FileInputStream(file));\n PrintWriter out=new PrintWriter(\"output.txt\");\n */\nFastReader scan=new FastReader();\n int n=scan.nextInt();\n int count=0;\n int max=0;\n while(n-->0){\n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t if(a==b){\n++count;\n\t }\n\t else{\n\t\t count=0;\n\t }\n\t max=Math.max(count,max);\n\t \n }\n\n if(max>=3){\n\t System.out.println(\"Yes\");\n }\n else\n System.out.println(\"No\");\n\n\t}\n}",
"public class Main {\n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n\n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n\n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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\n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n\n\t\n\n\tpublic static void main(String[] args) throws FileNotFoundException {\n\t\n\t\n /*File file =new File(\"input.txt\");\n Scanner scan=new Scanner(new FileInputStream(file));\n PrintWriter out=new PrintWriter(\"output.txt\");\n */\nFastReader scan=new FastReader();\n int n=scan.nextInt();\n int count=0;\n int max=0;\n while(n-->0){\n\t int a=scan.nextInt();\n\t int b=scan.nextInt();\n\t if(a==b){\n++count;\n\t }\n\t else{\n\t\t count=0;\n\t }\n\t max=Math.max(count,max);\n\t \n }\n\n if(max>=3){\n\t System.out.println(\"Yes\");\n }\n else\n System.out.println(\"No\");\n\n\t}\n}",
"Main"
]
|
import java.util.*;
import java.io.*;
public class Main {
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
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;
}
}
public static void main(String[] args) throws FileNotFoundException {
/*File file =new File("input.txt");
Scanner scan=new Scanner(new FileInputStream(file));
PrintWriter out=new PrintWriter("output.txt");
*/
FastReader scan=new FastReader();
int n=scan.nextInt();
int count=0;
int max=0;
while(n-->0){
int a=scan.nextInt();
int b=scan.nextInt();
if(a==b){
++count;
}
else{
count=0;
}
max=Math.max(count,max);
}
if(max>=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,
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,
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,
14,
13,
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
],
[
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
],
[
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
],
[
8,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
59,
64
],
[
64,
65
],
[
64,
66
],
[
59,
67
],
[
67,
68
],
[
68,
69
],
[
59,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
72,
84
],
[
84,
85
],
[
85,
86
],
[
72,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
71,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
8,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
99,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
6,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
]
| [
"\timport java.util.Scanner;\n\n\tpublic class Main {\n\t\tpublic static void main(String[] args) {\n\t\t\tScanner sc = new Scanner(System.in);\n\n\t\t\tint n = sc.nextInt();\n\t\t\tint[][] d = new int[n][2];\n\t\t\tint count = 0;\n\t\t\tboolean ans=false;\n\t\t\tfor(int i=0;i<n;i++) {\n\t\t\t\td[i][0] = sc.nextInt();\n\t\t\t\td[i][1] = sc.nextInt();\n\t\t\t}\n\n\t\t\tfor(int i=0;i<n;i++) {\n\n\t\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount=0;\n\t\t\t\t}if(count >= 3) {\n\t\t\t\t\tans=true;}\n\t\t\t}\n\t\t\tif(ans) {\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\t\t}\n\t}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\tpublic static void main(String[] args) {\n\t\t\tScanner sc = new Scanner(System.in);\n\n\t\t\tint n = sc.nextInt();\n\t\t\tint[][] d = new int[n][2];\n\t\t\tint count = 0;\n\t\t\tboolean ans=false;\n\t\t\tfor(int i=0;i<n;i++) {\n\t\t\t\td[i][0] = sc.nextInt();\n\t\t\t\td[i][1] = sc.nextInt();\n\t\t\t}\n\n\t\t\tfor(int i=0;i<n;i++) {\n\n\t\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount=0;\n\t\t\t\t}if(count >= 3) {\n\t\t\t\t\tans=true;}\n\t\t\t}\n\t\t\tif(ans) {\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\t\t}\n\t}",
"Main",
"public static void main(String[] args) {\n\t\t\tScanner sc = new Scanner(System.in);\n\n\t\t\tint n = sc.nextInt();\n\t\t\tint[][] d = new int[n][2];\n\t\t\tint count = 0;\n\t\t\tboolean ans=false;\n\t\t\tfor(int i=0;i<n;i++) {\n\t\t\t\td[i][0] = sc.nextInt();\n\t\t\t\td[i][1] = sc.nextInt();\n\t\t\t}\n\n\t\t\tfor(int i=0;i<n;i++) {\n\n\t\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount=0;\n\t\t\t\t}if(count >= 3) {\n\t\t\t\t\tans=true;}\n\t\t\t}\n\t\t\tif(ans) {\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\t\t}",
"main",
"{\n\t\t\tScanner sc = new Scanner(System.in);\n\n\t\t\tint n = sc.nextInt();\n\t\t\tint[][] d = new int[n][2];\n\t\t\tint count = 0;\n\t\t\tboolean ans=false;\n\t\t\tfor(int i=0;i<n;i++) {\n\t\t\t\td[i][0] = sc.nextInt();\n\t\t\t\td[i][1] = sc.nextInt();\n\t\t\t}\n\n\t\t\tfor(int i=0;i<n;i++) {\n\n\t\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount=0;\n\t\t\t\t}if(count >= 3) {\n\t\t\t\t\tans=true;}\n\t\t\t}\n\t\t\tif(ans) {\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\t\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",
"int count = 0;",
"count",
"0",
"boolean ans=false;",
"ans",
"false",
"for(int i=0;i<n;i++) {\n\t\t\t\td[i][0] = sc.nextInt();\n\t\t\t\td[i][1] = sc.nextInt();\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] = sc.nextInt();\n\t\t\t\td[i][1] = sc.nextInt();\n\t\t\t}",
"{\n\t\t\t\td[i][0] = sc.nextInt();\n\t\t\t\td[i][1] = sc.nextInt();\n\t\t\t}",
"d[i][0] = sc.nextInt()",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d[i][1] = sc.nextInt()",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<n;i++) {\n\n\t\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount=0;\n\t\t\t\t}if(count >= 3) {\n\t\t\t\t\tans=true;}\n\t\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\n\t\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount=0;\n\t\t\t\t}if(count >= 3) {\n\t\t\t\t\tans=true;}\n\t\t\t}",
"{\n\n\t\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount=0;\n\t\t\t\t}if(count >= 3) {\n\t\t\t\t\tans=true;}\n\t\t\t}",
"if(d[i][0]==d[i][1]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount=0;\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\tcount++;\n\t\t\t\t}",
"count++",
"count",
"{\n\t\t\t\t\tcount=0;\n\t\t\t\t}",
"count=0",
"count",
"0",
"if(count >= 3) {\n\t\t\t\t\tans=true;}",
"count >= 3",
"count",
"3",
"{\n\t\t\t\t\tans=true;}",
"ans=true",
"ans",
"true",
"if(ans) {\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}",
"ans",
"{\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\t\tpublic static void main(String[] args) {\n\t\t\tScanner sc = new Scanner(System.in);\n\n\t\t\tint n = sc.nextInt();\n\t\t\tint[][] d = new int[n][2];\n\t\t\tint count = 0;\n\t\t\tboolean ans=false;\n\t\t\tfor(int i=0;i<n;i++) {\n\t\t\t\td[i][0] = sc.nextInt();\n\t\t\t\td[i][1] = sc.nextInt();\n\t\t\t}\n\n\t\t\tfor(int i=0;i<n;i++) {\n\n\t\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount=0;\n\t\t\t\t}if(count >= 3) {\n\t\t\t\t\tans=true;}\n\t\t\t}\n\t\t\tif(ans) {\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\t\t}\n\t}",
"public class Main {\n\t\tpublic static void main(String[] args) {\n\t\t\tScanner sc = new Scanner(System.in);\n\n\t\t\tint n = sc.nextInt();\n\t\t\tint[][] d = new int[n][2];\n\t\t\tint count = 0;\n\t\t\tboolean ans=false;\n\t\t\tfor(int i=0;i<n;i++) {\n\t\t\t\td[i][0] = sc.nextInt();\n\t\t\t\td[i][1] = sc.nextInt();\n\t\t\t}\n\n\t\t\tfor(int i=0;i<n;i++) {\n\n\t\t\t\tif(d[i][0]==d[i][1]) {\n\t\t\t\t\tcount++;\n\t\t\t\t}else {\n\t\t\t\t\tcount=0;\n\t\t\t\t}if(count >= 3) {\n\t\t\t\t\tans=true;}\n\t\t\t}\n\t\t\tif(ans) {\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\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[][] d = new int[n][2];
int count = 0;
boolean ans=false;
for(int i=0;i<n;i++) {
d[i][0] = sc.nextInt();
d[i][1] = sc.nextInt();
}
for(int i=0;i<n;i++) {
if(d[i][0]==d[i][1]) {
count++;
}else {
count=0;
}if(count >= 3) {
ans=true;}
}
if(ans) {
System.out.println("Yes");
}else {
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
2,
17,
17,
41,
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,
18,
13,
13,
18,
13,
13,
9,
14,
2,
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,
4,
18,
18,
13,
13,
8,
13,
17,
17,
12,
13,
30,
41,
13,
4,
18,
13,
13,
20,
4,
18,
13,
13,
4,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
4,
18,
20,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
156,
5
],
[
156,
6
],
[
6,
7
],
[
6,
8
],
[
156,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
156,
14
],
[
14,
15
],
[
156,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
18,
24
],
[
24,
25
],
[
24,
26
],
[
18,
28
],
[
28,
29
],
[
28,
30
],
[
18,
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
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
49,
50
],
[
50,
51
],
[
44,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
18,
59
],
[
59,
60
],
[
59,
61
],
[
18,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
62,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
74,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
85,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
97,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
84,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
18,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
118,
120
],
[
118,
121
],
[
156,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
127,
131
],
[
124,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
124,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
136,
140
],
[
122,
141
],
[
141,
142
],
[
122,
143
],
[
143,
144
],
[
122,
145
],
[
145,
146
],
[
156,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
147,
153
],
[
153,
154
],
[
0,
155
],
[
155,
156
],
[
155,
157
]
]
| [
"//package src.com.jetman.atcoder;\n\nimport java.util.*;\n\n/**\n * @description:\n * @author: Jetman\n * @create: 2020-08-29 14:39\n **/\npublic class Main {\n\n Scanner sc = new Scanner(System.in);\n\n long MOD = 1000000000 + 7;\n\n long dp[][];\n\n private void slove() {\n\n int n = sc.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n b[i] = sc.nextInt();\n }\n\n boolean ans = false;\n for (int i = 2; i < n; i++) {\n if (a[i] != b[i]) continue;\n if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {\n ans = true;\n break;\n }\n }\n\n System.out.println(ans?\"Yes\":\"No\");\n\n\n\n }\n\n private void build(Map<Integer, List<Integer>> edge, int l, int r) {\n List<Integer> list = edge.getOrDefault(l, new ArrayList<>());\n list.add(r);\n edge.put(l,list);\n }\n\n\n public static void main(String[] args) {\n new Main().slove();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n long MOD = 1000000000 + 7;\n\n long dp[][];\n\n private void slove() {\n\n int n = sc.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n b[i] = sc.nextInt();\n }\n\n boolean ans = false;\n for (int i = 2; i < n; i++) {\n if (a[i] != b[i]) continue;\n if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {\n ans = true;\n break;\n }\n }\n\n System.out.println(ans?\"Yes\":\"No\");\n\n\n\n }\n\n private void build(Map<Integer, List<Integer>> edge, int l, int r) {\n List<Integer> list = edge.getOrDefault(l, new ArrayList<>());\n list.add(r);\n edge.put(l,list);\n }\n\n\n public static void main(String[] args) {\n new Main().slove();\n }\n}",
"Main",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long MOD = 1000000000 + 7;",
"MOD",
"1000000000 + 7",
"1000000000",
"7",
"long dp[][];",
"dp",
"private void slove() {\n\n int n = sc.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n b[i] = sc.nextInt();\n }\n\n boolean ans = false;\n for (int i = 2; i < n; i++) {\n if (a[i] != b[i]) continue;\n if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {\n ans = true;\n break;\n }\n }\n\n System.out.println(ans?\"Yes\":\"No\");\n\n\n\n }",
"slove",
"{\n\n int n = sc.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n b[i] = sc.nextInt();\n }\n\n boolean ans = false;\n for (int i = 2; i < n; i++) {\n if (a[i] != b[i]) continue;\n if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {\n ans = true;\n break;\n }\n }\n\n System.out.println(ans?\"Yes\":\"No\");\n\n\n\n }",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"int[] b = new int[n];",
"b",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n b[i] = sc.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = sc.nextInt();\n b[i] = sc.nextInt();\n }",
"{\n a[i] = sc.nextInt();\n b[i] = sc.nextInt();\n }",
"a[i] = sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b[i] = sc.nextInt()",
"b[i]",
"b",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean ans = false;",
"ans",
"false",
"for (int i = 2; i < n; i++) {\n if (a[i] != b[i]) continue;\n if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {\n ans = true;\n break;\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if (a[i] != b[i]) continue;\n if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {\n ans = true;\n break;\n }\n }",
"{\n if (a[i] != b[i]) continue;\n if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {\n ans = true;\n break;\n }\n }",
"if (a[i] != b[i]) continue;",
"a[i] != b[i]",
"a[i]",
"a",
"i",
"b[i]",
"b",
"i",
"continue;",
"if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {\n ans = true;\n break;\n }",
"a[i-1] == b[i-1] && a[i-2] == b[i-2]",
"a[i-1] == b[i-1]",
"a[i-1]",
"a",
"i-1",
"i",
"1",
"b[i-1]",
"b",
"i-1",
"i",
"1",
"a[i-2] == b[i-2]",
"a[i-2]",
"a",
"i-2",
"i",
"2",
"b[i-2]",
"b",
"i-2",
"i",
"2",
"{\n ans = true;\n break;\n }",
"ans = true",
"ans",
"true",
"break;",
"System.out.println(ans?\"Yes\":\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"ans?\"Yes\":\"No\"",
"ans",
"\"Yes\"",
"\"No\"",
"private void build(Map<Integer, List<Integer>> edge, int l, int r) {\n List<Integer> list = edge.getOrDefault(l, new ArrayList<>());\n list.add(r);\n edge.put(l,list);\n }",
"build",
"{\n List<Integer> list = edge.getOrDefault(l, new ArrayList<>());\n list.add(r);\n edge.put(l,list);\n }",
"List<Integer> list = edge.getOrDefault(l, new ArrayList<>());",
"list",
"edge.getOrDefault(l, new ArrayList<>())",
"edge.getOrDefault",
"edge",
"l",
"new ArrayList<>()",
"list.add(r)",
"list.add",
"list",
"r",
"edge.put(l,list)",
"edge.put",
"edge",
"l",
"list",
"Map<Integer, List<Integer>> edge",
"edge",
"int l",
"l",
"int r",
"r",
"public static void main(String[] args) {\n new Main().slove();\n }",
"main",
"{\n new Main().slove();\n }",
"new Main().slove()",
"new Main().slove",
"new Main()",
"String[] args",
"args",
"public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n long MOD = 1000000000 + 7;\n\n long dp[][];\n\n private void slove() {\n\n int n = sc.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n b[i] = sc.nextInt();\n }\n\n boolean ans = false;\n for (int i = 2; i < n; i++) {\n if (a[i] != b[i]) continue;\n if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {\n ans = true;\n break;\n }\n }\n\n System.out.println(ans?\"Yes\":\"No\");\n\n\n\n }\n\n private void build(Map<Integer, List<Integer>> edge, int l, int r) {\n List<Integer> list = edge.getOrDefault(l, new ArrayList<>());\n list.add(r);\n edge.put(l,list);\n }\n\n\n public static void main(String[] args) {\n new Main().slove();\n }\n}",
"public class Main {\n\n Scanner sc = new Scanner(System.in);\n\n long MOD = 1000000000 + 7;\n\n long dp[][];\n\n private void slove() {\n\n int n = sc.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = sc.nextInt();\n b[i] = sc.nextInt();\n }\n\n boolean ans = false;\n for (int i = 2; i < n; i++) {\n if (a[i] != b[i]) continue;\n if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {\n ans = true;\n break;\n }\n }\n\n System.out.println(ans?\"Yes\":\"No\");\n\n\n\n }\n\n private void build(Map<Integer, List<Integer>> edge, int l, int r) {\n List<Integer> list = edge.getOrDefault(l, new ArrayList<>());\n list.add(r);\n edge.put(l,list);\n }\n\n\n public static void main(String[] args) {\n new Main().slove();\n }\n}",
"Main"
]
| //package src.com.jetman.atcoder;
import java.util.*;
/**
* @description:
* @author: Jetman
* @create: 2020-08-29 14:39
**/
public class Main {
Scanner sc = new Scanner(System.in);
long MOD = 1000000000 + 7;
long dp[][];
private void slove() {
int n = sc.nextInt();
int[] a = new int[n];
int[] b = new int[n];
for (int i = 0; i < n; i++) {
a[i] = sc.nextInt();
b[i] = sc.nextInt();
}
boolean ans = false;
for (int i = 2; i < n; i++) {
if (a[i] != b[i]) continue;
if (a[i-1] == b[i-1] && a[i-2] == b[i-2]) {
ans = true;
break;
}
}
System.out.println(ans?"Yes":"No");
}
private void build(Map<Integer, List<Integer>> edge, int l, int r) {
List<Integer> list = edge.getOrDefault(l, new ArrayList<>());
list.add(r);
edge.put(l,list);
}
public static void main(String[] args) {
new Main().slove();
}
}
|
[
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,
4,
18,
13,
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
],
[
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
],
[
8,
72
],
[
72,
73
],
[
73,
74
],
[
6,
75
],
[
75,
76
],
[
0,
77
],
[
77,
78
],
[
77,
79
]
]
| [
"import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) {\n cnt++;\n } else {\n cnt = 0;\n }\n if (cnt > 2) {\n System.out.println(\"Yes\");\n return;\n }\n }\n\n System.out.println(\"No\");\n\n sc.close();\n\n }\n\n }\n",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) {\n cnt++;\n } else {\n cnt = 0;\n }\n if (cnt > 2) {\n System.out.println(\"Yes\");\n return;\n }\n }\n\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\n int n = sc.nextInt();\n\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) {\n cnt++;\n } else {\n cnt = 0;\n }\n if (cnt > 2) {\n System.out.println(\"Yes\");\n return;\n }\n }\n\n System.out.println(\"No\");\n\n sc.close();\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) {\n cnt++;\n } else {\n cnt = 0;\n }\n if (cnt > 2) {\n System.out.println(\"Yes\");\n return;\n }\n }\n\n System.out.println(\"No\");\n\n sc.close();\n\n }",
"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",
"for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) {\n cnt++;\n } else {\n cnt = 0;\n }\n if (cnt > 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 a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) {\n cnt++;\n } else {\n cnt = 0;\n }\n if (cnt > 2) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) {\n cnt++;\n } else {\n cnt = 0;\n }\n if (cnt > 2) {\n System.out.println(\"Yes\");\n return;\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 cnt++;\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 > 2) {\n System.out.println(\"Yes\");\n return;\n }",
"cnt > 2",
"cnt",
"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\"",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) {\n cnt++;\n } else {\n cnt = 0;\n }\n if (cnt > 2) {\n System.out.println(\"Yes\");\n return;\n }\n }\n\n System.out.println(\"No\");\n\n sc.close();\n\n }\n\n }",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int n = sc.nextInt();\n\n int cnt = 0;\n\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if (a == b) {\n cnt++;\n } else {\n cnt = 0;\n }\n if (cnt > 2) {\n System.out.println(\"Yes\");\n return;\n }\n }\n\n System.out.println(\"No\");\n\n sc.close();\n\n }\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 cnt = 0;
for (int i = 0; i < n; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
if (a == b) {
cnt++;
} else {
cnt = 0;
}
if (cnt > 2) {
System.out.println("Yes");
return;
}
}
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,
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,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
3,
4,
18,
18,
13,
13,
13,
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
],
[
28,
30
],
[
8,
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
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
43,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
58,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
43,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
6,
88
],
[
88,
89
]
]
| [
"import java.util.Scanner;\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 String ans = \"No\";\n for(int i=0;i<N;i++){\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n if(d1[i] == d2[i]){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n ans = \"Yes\";\n break;\n }\n }\n System.out.println(ans);\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 int N = sc.nextInt();\n int[] d1 = new int[N];\n int[] d2 = new int[N];\n int count = 0;\n String ans = \"No\";\n for(int i=0;i<N;i++){\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n if(d1[i] == d2[i]){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n ans = \"Yes\";\n break;\n }\n }\n System.out.println(ans);\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 String ans = \"No\";\n for(int i=0;i<N;i++){\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n if(d1[i] == d2[i]){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n ans = \"Yes\";\n break;\n }\n }\n System.out.println(ans);\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 String ans = \"No\";\n for(int i=0;i<N;i++){\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n if(d1[i] == d2[i]){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n ans = \"Yes\";\n break;\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",
"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",
"String ans = \"No\";",
"ans",
"\"No\"",
"for(int i=0;i<N;i++){\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n if(d1[i] == d2[i]){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n ans = \"Yes\";\n break;\n }\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 if(d1[i] == d2[i]){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n ans = \"Yes\";\n break;\n }\n }",
"{\n d1[i] = sc.nextInt();\n d2[i] = sc.nextInt();\n if(d1[i] == d2[i]){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n ans = \"Yes\";\n break;\n }\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",
"if(d1[i] == d2[i]){\n count++;\n }else{\n count = 0;\n }",
"d1[i] == d2[i]",
"d1[i]",
"d1",
"i",
"d2[i]",
"d2",
"i",
"{\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;",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"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 = new int[N];
int[] d2 = new int[N];
int count = 0;
String ans = "No";
for(int i=0;i<N;i++){
d1[i] = sc.nextInt();
d2[i] = sc.nextInt();
if(d1[i] == d2[i]){
count++;
}else{
count = 0;
}
if(count == 3){
ans = "Yes";
break;
}
}
System.out.println(ans);
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
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,
4,
18,
18,
13,
13,
13,
4,
18,
13,
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
],
[
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
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
8,
71
],
[
71,
72
],
[
72,
73
],
[
6,
74
],
[
74,
75
],
[
0,
76
],
[
76,
77
],
[
76,
78
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String ans = \"No\";\n int n = sc.nextInt();\n int zoro = 0;\n for (int cnt = 0; cnt < n; cnt++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2) {\n zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n } else {\n zoro = 0;\n }\n }\n System.out.println(ans);\n sc.close();\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 String ans = \"No\";\n int n = sc.nextInt();\n int zoro = 0;\n for (int cnt = 0; cnt < n; cnt++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2) {\n zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n } else {\n zoro = 0;\n }\n }\n System.out.println(ans);\n sc.close();\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String ans = \"No\";\n int n = sc.nextInt();\n int zoro = 0;\n for (int cnt = 0; cnt < n; cnt++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2) {\n zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n } else {\n zoro = 0;\n }\n }\n System.out.println(ans);\n sc.close();\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n String ans = \"No\";\n int n = sc.nextInt();\n int zoro = 0;\n for (int cnt = 0; cnt < n; cnt++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2) {\n zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n } else {\n zoro = 0;\n }\n }\n System.out.println(ans);\n sc.close();\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"String ans = \"No\";",
"ans",
"\"No\"",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int zoro = 0;",
"zoro",
"0",
"for (int cnt = 0; cnt < n; cnt++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2) {\n zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n } else {\n zoro = 0;\n }\n }",
"int cnt = 0;",
"int cnt = 0;",
"cnt",
"0",
"cnt < n",
"cnt",
"n",
"cnt++",
"cnt++",
"cnt",
"{\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2) {\n zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n } else {\n zoro = 0;\n }\n }",
"{\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2) {\n zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n } else {\n zoro = 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 zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n } else {\n zoro = 0;\n }",
"d1 == d2",
"d1",
"d2",
"{\n zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n }",
"zoro++",
"zoro",
"if (zoro == 3) {\n ans = \"Yes\";\n }",
"zoro == 3",
"zoro",
"3",
"{\n ans = \"Yes\";\n }",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"{\n zoro = 0;\n }",
"zoro = 0",
"zoro",
"0",
"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 String ans = \"No\";\n int n = sc.nextInt();\n int zoro = 0;\n for (int cnt = 0; cnt < n; cnt++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2) {\n zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n } else {\n zoro = 0;\n }\n }\n System.out.println(ans);\n sc.close();\n }\n}",
"public class Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n String ans = \"No\";\n int n = sc.nextInt();\n int zoro = 0;\n for (int cnt = 0; cnt < n; cnt++) {\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if (d1 == d2) {\n zoro++;\n if (zoro == 3) {\n ans = \"Yes\";\n }\n } else {\n zoro = 0;\n }\n }\n System.out.println(ans);\n sc.close();\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String ans = "No";
int n = sc.nextInt();
int zoro = 0;
for (int cnt = 0; cnt < n; cnt++) {
int d1 = sc.nextInt();
int d2 = sc.nextInt();
if (d1 == d2) {
zoro++;
if (zoro == 3) {
ans = "Yes";
}
} else {
zoro = 0;
}
}
System.out.println(ans);
sc.close();
}
}
|
[
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,
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,
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
],
[
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
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
8,
25
],
[
25,
26
],
[
8,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
32,
34
],
[
27,
35
],
[
35,
36
],
[
36,
37
],
[
27,
38
],
[
39,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
39,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
39,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
50,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
8,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
74,
77
],
[
6,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
]
]
| [
"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 boolean isThree = false;\n int count = 0;\n int d1,d2;\n for (int i=0; i<n; i++) {\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n if (d1 == d2) {\n count++;\n if (count == 3) {\n isThree = true;\n }\n } else {\n count = 0;\n }\n }\n System.out.print(isThree ? \"Yes\" : \"No\");\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 boolean isThree = false;\n int count = 0;\n int d1,d2;\n for (int i=0; i<n; i++) {\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n if (d1 == d2) {\n count++;\n if (count == 3) {\n isThree = true;\n }\n } else {\n count = 0;\n }\n }\n System.out.print(isThree ? \"Yes\" : \"No\");\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n boolean isThree = false;\n int count = 0;\n int d1,d2;\n for (int i=0; i<n; i++) {\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n if (d1 == d2) {\n count++;\n if (count == 3) {\n isThree = true;\n }\n } else {\n count = 0;\n }\n }\n System.out.print(isThree ? \"Yes\" : \"No\");\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n boolean isThree = false;\n int count = 0;\n int d1,d2;\n for (int i=0; i<n; i++) {\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n if (d1 == d2) {\n count++;\n if (count == 3) {\n isThree = true;\n }\n } else {\n count = 0;\n }\n }\n System.out.print(isThree ? \"Yes\" : \"No\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean isThree = false;",
"isThree",
"false",
"int count = 0;",
"count",
"0",
"int d1",
"d1",
"d2;",
"d2",
"for (int i=0; i<n; i++) {\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n if (d1 == d2) {\n count++;\n if (count == 3) {\n isThree = true;\n }\n } else {\n count = 0;\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 if (d1 == d2) {\n count++;\n if (count == 3) {\n isThree = true;\n }\n } else {\n count = 0;\n }\n }",
"{\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n if (d1 == d2) {\n count++;\n if (count == 3) {\n isThree = true;\n }\n } else {\n count = 0;\n }\n }",
"d1 = sc.nextInt()",
"d1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d2 = sc.nextInt()",
"d2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (d1 == d2) {\n count++;\n if (count == 3) {\n isThree = true;\n }\n } else {\n count = 0;\n }",
"d1 == d2",
"d1",
"d2",
"{\n count++;\n if (count == 3) {\n isThree = true;\n }\n }",
"count++",
"count",
"if (count == 3) {\n isThree = true;\n }",
"count == 3",
"count",
"3",
"{\n isThree = true;\n }",
"isThree = true",
"isThree",
"true",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"System.out.print(isThree ? \"Yes\" : \"No\")",
"System.out.print",
"System.out",
"System",
"System.out",
"isThree ? \"Yes\" : \"No\"",
"isThree",
"\"Yes\"",
"\"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 boolean isThree = false;\n int count = 0;\n int d1,d2;\n for (int i=0; i<n; i++) {\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n if (d1 == d2) {\n count++;\n if (count == 3) {\n isThree = true;\n }\n } else {\n count = 0;\n }\n }\n System.out.print(isThree ? \"Yes\" : \"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 boolean isThree = false;\n int count = 0;\n int d1,d2;\n for (int i=0; i<n; i++) {\n d1 = sc.nextInt();\n d2 = sc.nextInt();\n if (d1 == d2) {\n count++;\n if (count == 3) {\n isThree = true;\n }\n } else {\n count = 0;\n }\n }\n System.out.print(isThree ? \"Yes\" : \"No\");\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();
boolean isThree = false;
int count = 0;
int d1,d2;
for (int i=0; i<n; i++) {
d1 = sc.nextInt();
d2 = sc.nextInt();
if (d1 == d2) {
count++;
if (count == 3) {
isThree = true;
}
} else {
count = 0;
}
}
System.out.print(isThree ? "Yes" : "No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
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,
11,
1,
41,
13,
17,
2,
2,
13,
17,
13,
1,
40,
13,
30,
30,
0,
13,
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,
4,
18,
18,
13,
13,
8,
13,
17,
17,
12,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
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
],
[
9,
15
],
[
15,
16
],
[
7,
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,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
49,
55
],
[
55,
56
],
[
56,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
19,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
67,
80
],
[
81,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
85,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
85,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
98,
104
],
[
97,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
105,
111
],
[
85,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
113,
119
],
[
112,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
120,
126
],
[
19,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
127,
132
],
[
132,
133
],
[
132,
134
],
[
132,
135
],
[
7,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
144,
145
],
[
145,
146
],
[
144,
147
],
[
136,
148
],
[
148,
149
]
]
| [
"import java.io.*;\nimport java.util.*;\n\nclass Main {\n\tpublic static void main(String[] $) {\n\t\tnew Main().run();\n\t}\n\t\n\tvoid run() {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint N=sc.nextInt();\n\t\tboolean ans=false;\n\t\tint[][] D=new int[N][2];\n\t\tfor (int i=0;i<N;++i) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}\n\t\tfor (int i=0;i+2<N;++i) {\n\t\t\tans|=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}\n\t\tSystem.out.println(ans?\"Yes\":\"No\");\n\t}\n\t\n\tvoid tr(Object...objects) {System.out.println(Arrays.deepToString(objects));}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main {\n\tpublic static void main(String[] $) {\n\t\tnew Main().run();\n\t}\n\t\n\tvoid run() {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint N=sc.nextInt();\n\t\tboolean ans=false;\n\t\tint[][] D=new int[N][2];\n\t\tfor (int i=0;i<N;++i) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}\n\t\tfor (int i=0;i+2<N;++i) {\n\t\t\tans|=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}\n\t\tSystem.out.println(ans?\"Yes\":\"No\");\n\t}\n\t\n\tvoid tr(Object...objects) {System.out.println(Arrays.deepToString(objects));}\n}",
"Main",
"public static void main(String[] $) {\n\t\tnew Main().run();\n\t}",
"main",
"{\n\t\tnew Main().run();\n\t}",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] $",
"$",
"void run() {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint N=sc.nextInt();\n\t\tboolean ans=false;\n\t\tint[][] D=new int[N][2];\n\t\tfor (int i=0;i<N;++i) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}\n\t\tfor (int i=0;i+2<N;++i) {\n\t\t\tans|=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}\n\t\tSystem.out.println(ans?\"Yes\":\"No\");\n\t}",
"run",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\tint N=sc.nextInt();\n\t\tboolean ans=false;\n\t\tint[][] D=new int[N][2];\n\t\tfor (int i=0;i<N;++i) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}\n\t\tfor (int i=0;i+2<N;++i) {\n\t\t\tans|=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}\n\t\tSystem.out.println(ans?\"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",
"boolean ans=false;",
"ans",
"false",
"int[][] D=new int[N][2];",
"D",
"new int[N][2]",
"N",
"2",
"for (int i=0;i<N;++i) {\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"++i",
"++i",
"i",
"{\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}",
"{\n\t\t\tD[i][0]=sc.nextInt();\n\t\t\tD[i][1]=sc.nextInt();\n\t\t}",
"D[i][0]=sc.nextInt()",
"D[i][0]",
"D[i]",
"D",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"D[i][1]=sc.nextInt()",
"D[i][1]",
"D[i]",
"D",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int i=0;i+2<N;++i) {\n\t\t\tans|=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}",
"int i=0;",
"int i=0;",
"i",
"0",
"i+2<N",
"i+2",
"i",
"2",
"N",
"++i",
"++i",
"i",
"{\n\t\t\tans|=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}",
"{\n\t\t\tans|=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}",
"ans|=D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1]",
"ans",
"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",
"System.out.println(ans?\"Yes\":\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"ans?\"Yes\":\"No\"",
"ans",
"\"Yes\"",
"\"No\"",
"void tr(Object...objects) {System.out.println(Arrays.deepToString(objects));}",
"tr",
"{System.out.println(Arrays.deepToString(objects));}",
"System.out.println(Arrays.deepToString(objects))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.deepToString(objects)",
"Arrays.deepToString",
"Arrays",
"objects",
"Object...objects",
"objects"
]
| import java.io.*;
import java.util.*;
class Main {
public static void main(String[] $) {
new Main().run();
}
void run() {
Scanner sc=new Scanner(System.in);
int N=sc.nextInt();
boolean ans=false;
int[][] D=new int[N][2];
for (int i=0;i<N;++i) {
D[i][0]=sc.nextInt();
D[i][1]=sc.nextInt();
}
for (int i=0;i+2<N;++i) {
ans|=D[i][0]==D[i][1]&&D[i+1][0]==D[i+1][1]&&D[i+2][0]==D[i+2][1];
}
System.out.println(ans?"Yes":"No");
}
void tr(Object...objects) {System.out.println(Arrays.deepToString(objects));}
}
|
[
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,
41,
13,
17,
41,
13,
17,
11,
1,
0,
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,
40,
13,
30,
14,
2,
13,
17,
0,
13,
17,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
14,
13,
4,
18,
13,
17,
4,
18,
13,
17,
4,
18,
18,
13,
13,
13,
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
],
[
20,
21
],
[
21,
22
],
[
20,
23
],
[
23,
24
],
[
24,
25
],
[
11,
26
],
[
26,
27
],
[
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
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
49,
54
],
[
46,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
60,
62
],
[
46,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
68,
70
],
[
46,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
71,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
82,
84
],
[
77,
85
],
[
85,
86
],
[
85,
87
],
[
11,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
92,
94
],
[
11,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
11,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
9,
111
],
[
111,
112
]
]
| [
"import java.io.*;\nimport java.util.*;\n\nclass Main\n{\n public static void main(String args[])throws Exception\n {\n BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb=new StringBuilder();\n int n=Integer.parseInt(bu.readLine());\n int i,l=0; boolean oc=false;\n for(i=0;i<n;i++)\n {\n String s[]=bu.readLine().split(\" \");\n int d1=Integer.parseInt(s[0]),d2=Integer.parseInt(s[1]);\n if(d1==d2) l++;\n else\n {\n if(l>=3) oc=true;\n l=0;\n }\n }\n if(l>=3) oc=true;\n if(oc) sb.append(\"Yes\\n\");\n else sb.append(\"No\\n\");\n System.out.print(sb);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main\n{\n public static void main(String args[])throws Exception\n {\n BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb=new StringBuilder();\n int n=Integer.parseInt(bu.readLine());\n int i,l=0; boolean oc=false;\n for(i=0;i<n;i++)\n {\n String s[]=bu.readLine().split(\" \");\n int d1=Integer.parseInt(s[0]),d2=Integer.parseInt(s[1]);\n if(d1==d2) l++;\n else\n {\n if(l>=3) oc=true;\n l=0;\n }\n }\n if(l>=3) oc=true;\n if(oc) sb.append(\"Yes\\n\");\n else sb.append(\"No\\n\");\n System.out.print(sb);\n }\n}",
"Main",
"public static void main(String args[])throws Exception\n {\n BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb=new StringBuilder();\n int n=Integer.parseInt(bu.readLine());\n int i,l=0; boolean oc=false;\n for(i=0;i<n;i++)\n {\n String s[]=bu.readLine().split(\" \");\n int d1=Integer.parseInt(s[0]),d2=Integer.parseInt(s[1]);\n if(d1==d2) l++;\n else\n {\n if(l>=3) oc=true;\n l=0;\n }\n }\n if(l>=3) oc=true;\n if(oc) sb.append(\"Yes\\n\");\n else sb.append(\"No\\n\");\n System.out.print(sb);\n }",
"main",
"{\n BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));\n StringBuilder sb=new StringBuilder();\n int n=Integer.parseInt(bu.readLine());\n int i,l=0; boolean oc=false;\n for(i=0;i<n;i++)\n {\n String s[]=bu.readLine().split(\" \");\n int d1=Integer.parseInt(s[0]),d2=Integer.parseInt(s[1]);\n if(d1==d2) l++;\n else\n {\n if(l>=3) oc=true;\n l=0;\n }\n }\n if(l>=3) oc=true;\n if(oc) sb.append(\"Yes\\n\");\n else sb.append(\"No\\n\");\n System.out.print(sb);\n }",
"BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));",
"bu",
"new BufferedReader(new InputStreamReader(System.in))",
"StringBuilder sb=new StringBuilder();",
"sb",
"new StringBuilder()",
"int n=Integer.parseInt(bu.readLine());",
"n",
"Integer.parseInt(bu.readLine())",
"Integer.parseInt",
"Integer",
"bu.readLine()",
"bu.readLine",
"bu",
"int i",
"i",
"l=0;",
"l",
"0",
"boolean oc=false;",
"oc",
"false",
"for(i=0;i<n;i++)\n {\n String s[]=bu.readLine().split(\" \");\n int d1=Integer.parseInt(s[0]),d2=Integer.parseInt(s[1]);\n if(d1==d2) l++;\n else\n {\n if(l>=3) oc=true;\n l=0;\n }\n }",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String s[]=bu.readLine().split(\" \");\n int d1=Integer.parseInt(s[0]),d2=Integer.parseInt(s[1]);\n if(d1==d2) l++;\n else\n {\n if(l>=3) oc=true;\n l=0;\n }\n }",
"{\n String s[]=bu.readLine().split(\" \");\n int d1=Integer.parseInt(s[0]),d2=Integer.parseInt(s[1]);\n if(d1==d2) l++;\n else\n {\n if(l>=3) oc=true;\n l=0;\n }\n }",
"String s[]=bu.readLine().split(\" \");",
"s",
"bu.readLine().split(\" \")",
"bu.readLine().split",
"bu.readLine()",
"bu.readLine",
"bu",
"\" \"",
"int d1=Integer.parseInt(s[0])",
"d1",
"Integer.parseInt(s[0])",
"Integer.parseInt",
"Integer",
"s[0]",
"s",
"0",
"d2=Integer.parseInt(s[1]);",
"d2",
"Integer.parseInt(s[1])",
"Integer.parseInt",
"Integer",
"s[1]",
"s",
"1",
"if(d1==d2) l++;\n else\n {\n if(l>=3) oc=true;\n l=0;\n }",
"d1==d2",
"d1",
"d2",
"l++",
"l",
"{\n if(l>=3) oc=true;\n l=0;\n }",
"if(l>=3) oc=true;",
"l>=3",
"l",
"3",
"oc=true",
"oc",
"true",
"l=0",
"l",
"0",
"if(l>=3) oc=true;",
"l>=3",
"l",
"3",
"oc=true",
"oc",
"true",
"if(oc) sb.append(\"Yes\\n\");\n else sb.append(\"No\\n\");",
"oc",
"sb.append(\"Yes\\n\")",
"sb.append",
"sb",
"\"Yes\\n\"",
"sb.append(\"No\\n\")",
"sb.append",
"sb",
"\"No\\n\"",
"System.out.print(sb)",
"System.out.print",
"System.out",
"System",
"System.out",
"sb",
"String args[]",
"args"
]
| import java.io.*;
import java.util.*;
class Main
{
public static void main(String args[])throws Exception
{
BufferedReader bu=new BufferedReader(new InputStreamReader(System.in));
StringBuilder sb=new StringBuilder();
int n=Integer.parseInt(bu.readLine());
int i,l=0; boolean oc=false;
for(i=0;i<n;i++)
{
String s[]=bu.readLine().split(" ");
int d1=Integer.parseInt(s[0]),d2=Integer.parseInt(s[1]);
if(d1==d2) l++;
else
{
if(l>=3) oc=true;
l=0;
}
}
if(l>=3) oc=true;
if(oc) sb.append("Yes\n");
else sb.append("No\n");
System.out.print(sb);
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
4,
18,
13,
41,
13,
17,
42,
2,
40,
13,
17,
30,
14,
2,
4,
18,
13,
4,
18,
13,
40,
13,
30,
0,
13,
4,
18,
13,
13,
13,
0,
13,
17,
0,
13,
4,
18,
13,
13,
13,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
14,
40,
4,
18,
13,
13,
4,
18,
13,
13,
17,
4,
18,
13,
13,
2,
4,
18,
13,
13,
17,
23,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
2,
4,
18,
13,
13,
17,
14,
2,
4,
18,
13,
13,
17,
30,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
14,
2,
13,
17,
29,
17,
0,
13,
4,
13,
13,
2,
13,
17,
14,
2,
2,
13,
17,
17,
29,
2,
2,
2,
2,
13,
13,
13,
13,
13,
29,
2,
2,
2,
2,
13,
13,
2,
2,
2,
13,
13,
13,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
41,
13,
20,
42,
2,
2,
13,
17,
17,
30,
4,
18,
13,
17,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
42,
2,
2,
13,
13,
17,
30,
4,
18,
13,
13,
0,
13,
13,
14,
2,
13,
17,
4,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
2,
13,
17,
0,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
9,
41,
13,
13,
41,
13,
2,
13,
13,
4,
18,
13,
13,
14,
2,
13,
13,
30,
9,
4,
18,
13,
2,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
20,
2,
13,
17,
41,
13,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
11,
1,
41,
13,
2,
13,
13,
2,
13,
13,
1,
0,
13,
13,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
4,
18,
13,
13,
29,
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,
41,
13,
12,
13,
30,
0,
13,
13,
0,
13,
13,
23,
13,
23,
13,
6,
13,
12,
13,
30,
29,
2,
18,
13,
13,
18,
13,
13,
23,
13,
23,
13,
13,
6,
13,
41,
13,
41,
13,
41,
13,
20,
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,
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,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
835,
11
],
[
835,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
14,
16
],
[
835,
17
],
[
17,
18
],
[
17,
19
],
[
835,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
22,
26
],
[
26,
27
],
[
26,
28
],
[
22,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
22,
34
],
[
34,
35
],
[
34,
36
],
[
22,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
37,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
51,
52
],
[
43,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
56,
60
],
[
53,
61
],
[
61,
62
],
[
61,
63
],
[
22,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
66,
70
],
[
22,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
71,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
20,
87
],
[
87,
88
],
[
835,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
92,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
98,
102
],
[
92,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
103,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
108,
111
],
[
107,
112
],
[
89,
113
],
[
113,
114
],
[
89,
115
],
[
115,
116
],
[
835,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
120,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
124,
129
],
[
119,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
131,
136
],
[
130,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
138,
141
],
[
117,
142
],
[
142,
143
],
[
117,
144
],
[
144,
145
],
[
835,
146
],
[
146,
147
],
[
146,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
152,
156
],
[
156,
157
],
[
148,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
160,
162
],
[
160,
163
],
[
163,
164
],
[
163,
165
],
[
148,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
166,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
175,
179
],
[
174,
180
],
[
173,
181
],
[
148,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
186,
188
],
[
185,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
190,
194
],
[
189,
195
],
[
184,
196
],
[
183,
197
],
[
146,
198
],
[
198,
199
],
[
146,
200
],
[
200,
201
],
[
835,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
207,
210
],
[
204,
211
],
[
211,
212
],
[
211,
213
],
[
204,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
216,
218
],
[
215,
219
],
[
214,
220
],
[
220,
221
],
[
221,
222
],
[
222,
223
],
[
221,
224
],
[
220,
225
],
[
225,
226
],
[
225,
227
],
[
204,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
228,
233
],
[
233,
234
],
[
233,
235
],
[
228,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
228,
240
],
[
241,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
243,
247
],
[
242,
248
],
[
248,
249
],
[
249,
250
],
[
250,
251
],
[
249,
252
],
[
248,
253
],
[
253,
254
],
[
253,
255
],
[
204,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
256,
260
],
[
260,
261
],
[
261,
262
],
[
260,
263
],
[
204,
264
],
[
264,
265
],
[
202,
266
],
[
266,
267
],
[
835,
268
],
[
268,
269
],
[
268,
270
],
[
270,
271
],
[
271,
272
],
[
271,
273
],
[
270,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
274,
278
],
[
278,
279
],
[
279,
280
],
[
279,
281
],
[
281,
282
],
[
281,
283
],
[
278,
284
],
[
284,
285
],
[
284,
286
],
[
270,
287
],
[
287,
288
],
[
268,
289
],
[
289,
290
],
[
835,
291
],
[
291,
292
],
[
291,
293
],
[
293,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
296,
299
],
[
293,
300
],
[
300,
301
],
[
300,
302
],
[
293,
303
],
[
303,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
303,
308
],
[
308,
309
],
[
308,
310
],
[
303,
311
],
[
311,
312
],
[
312,
313
],
[
303,
314
],
[
315,
315
],
[
315,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
317,
321
],
[
316,
322
],
[
315,
323
],
[
323,
324
],
[
323,
325
],
[
315,
326
],
[
326,
327
],
[
326,
328
],
[
328,
329
],
[
328,
330
],
[
315,
331
],
[
331,
332
],
[
332,
333
],
[
331,
334
],
[
315,
335
],
[
335,
336
],
[
336,
337
],
[
336,
338
],
[
335,
339
],
[
339,
340
],
[
315,
341
],
[
341,
342
],
[
342,
343
],
[
341,
344
],
[
344,
345
],
[
344,
346
],
[
293,
347
],
[
347,
348
],
[
291,
349
],
[
349,
350
],
[
835,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
354,
355
],
[
354,
356
],
[
353,
357
],
[
357,
358
],
[
357,
359
],
[
353,
360
],
[
360,
361
],
[
360,
362
],
[
363,
364
],
[
363,
365
],
[
353,
366
],
[
366,
367
],
[
366,
368
],
[
368,
369
],
[
369,
370
],
[
368,
371
],
[
353,
372
],
[
372,
373
],
[
373,
374
],
[
374,
375
],
[
374,
376
],
[
372,
377
],
[
377,
378
],
[
377,
379
],
[
372,
380
],
[
380,
381
],
[
381,
382
],
[
372,
383
],
[
384,
384
],
[
384,
385
],
[
385,
386
],
[
386,
387
],
[
387,
388
],
[
387,
389
],
[
386,
390
],
[
385,
391
],
[
391,
392
],
[
392,
393
],
[
393,
394
],
[
394,
395
],
[
394,
396
],
[
396,
397
],
[
396,
398
],
[
392,
399
],
[
399,
400
],
[
399,
401
],
[
392,
402
],
[
402,
403
],
[
403,
404
],
[
403,
405
],
[
392,
406
],
[
407,
407
],
[
407,
408
],
[
408,
409
],
[
409,
410
],
[
409,
411
],
[
408,
412
],
[
353,
413
],
[
413,
414
],
[
414,
415
],
[
415,
416
],
[
415,
417
],
[
413,
418
],
[
418,
419
],
[
418,
420
],
[
413,
421
],
[
421,
422
],
[
422,
423
],
[
413,
424
],
[
425,
425
],
[
425,
426
],
[
426,
427
],
[
427,
428
],
[
428,
429
],
[
428,
430
],
[
427,
431
],
[
426,
432
],
[
432,
433
],
[
433,
434
],
[
432,
435
],
[
353,
436
],
[
436,
437
],
[
835,
438
],
[
438,
439
],
[
438,
440
],
[
440,
441
],
[
441,
442
],
[
442,
443
],
[
442,
444
],
[
441,
445
],
[
445,
446
],
[
440,
447
],
[
447,
448
],
[
448,
449
],
[
448,
450
],
[
448,
451
],
[
451,
452
],
[
451,
453
],
[
438,
454
],
[
454,
455
],
[
438,
456
],
[
456,
457
],
[
835,
458
],
[
458,
459
],
[
458,
460
],
[
460,
461
],
[
458,
462
],
[
462,
463
],
[
458,
464
],
[
464,
465
],
[
464,
466
],
[
466,
467
],
[
467,
468
],
[
467,
469
],
[
466,
470
],
[
470,
471
],
[
470,
472
],
[
464,
473
],
[
473,
474
],
[
464,
475
],
[
475,
476
],
[
835,
477
],
[
477,
478
],
[
477,
479
],
[
479,
480
],
[
479,
481
],
[
481,
482
],
[
482,
483
],
[
483,
484
],
[
484,
485
],
[
484,
486
],
[
483,
487
],
[
487,
488
],
[
487,
489
],
[
479,
490
],
[
490,
491
],
[
479,
492
],
[
492,
493
],
[
477,
494
],
[
835,
495
],
[
495,
496
],
[
495,
497
],
[
497,
498
],
[
495,
499
],
[
499,
500
],
[
495,
501
],
[
501,
502
],
[
501,
503
],
[
835,
504
],
[
504,
505
],
[
504,
506
],
[
506,
507
],
[
506,
508
],
[
508,
509
],
[
508,
510
],
[
504,
511
],
[
511,
512
],
[
504,
513
],
[
513,
514
],
[
504,
515
],
[
515,
516
],
[
504,
517
],
[
517,
518
],
[
504,
519
],
[
519,
520
],
[
519,
521
],
[
521,
522
],
[
522,
523
],
[
522,
524
],
[
521,
525
],
[
525,
526
],
[
525,
527
],
[
521,
529
],
[
529,
530
],
[
529,
531
],
[
531,
532
],
[
531,
533
],
[
504,
534
],
[
534,
535
],
[
534,
536
],
[
536,
537
],
[
537,
538
],
[
537,
539
],
[
536,
540
],
[
540,
541
],
[
540,
542
],
[
536,
544
],
[
544,
545
],
[
544,
546
],
[
546,
547
],
[
546,
548
],
[
534,
549
],
[
549,
550
],
[
504,
551
],
[
551,
552
],
[
551,
553
],
[
553,
554
],
[
554,
555
],
[
554,
556
],
[
553,
558
],
[
558,
559
],
[
558,
560
],
[
553,
561
],
[
561,
562
],
[
553,
563
],
[
563,
564
],
[
564,
565
],
[
565,
566
],
[
565,
567
],
[
567,
568
],
[
564,
569
],
[
569,
570
],
[
563,
571
],
[
571,
572
],
[
572,
573
],
[
573,
574
],
[
573,
575
],
[
572,
576
],
[
571,
577
],
[
577,
578
],
[
578,
579
],
[
578,
580
],
[
580,
581
],
[
577,
582
],
[
553,
583
],
[
583,
584
],
[
504,
585
],
[
585,
586
],
[
585,
587
],
[
587,
588
],
[
588,
589
],
[
588,
590
],
[
587,
591
],
[
591,
592
],
[
591,
593
],
[
593,
594
],
[
587,
595
],
[
595,
596
],
[
596,
597
],
[
596,
598
],
[
595,
599
],
[
599,
600
],
[
599,
601
],
[
601,
602
],
[
587,
603
],
[
603,
604
],
[
603,
605
],
[
605,
606
],
[
605,
607
],
[
587,
608
],
[
608,
609
],
[
608,
610
],
[
610,
611
],
[
610,
612
],
[
612,
613
],
[
587,
614
],
[
614,
615
],
[
615,
616
],
[
616,
617
],
[
617,
618
],
[
617,
619
],
[
619,
620
],
[
616,
621
],
[
615,
622
],
[
622,
623
],
[
622,
624
],
[
614,
625
],
[
625,
626
],
[
626,
627
],
[
626,
628
],
[
628,
629
],
[
629,
630
],
[
630,
631
],
[
630,
632
],
[
629,
633
],
[
628,
634
],
[
587,
635
],
[
635,
636
],
[
635,
637
],
[
637,
638
],
[
638,
639
],
[
587,
640
],
[
640,
641
],
[
504,
642
],
[
642,
643
],
[
642,
644
],
[
644,
645
],
[
645,
646
],
[
645,
647
],
[
644,
648
],
[
648,
649
],
[
648,
650
],
[
650,
651
],
[
644,
652
],
[
652,
653
],
[
653,
654
],
[
653,
655
],
[
652,
656
],
[
656,
657
],
[
656,
658
],
[
658,
659
],
[
644,
660
],
[
660,
661
],
[
660,
662
],
[
662,
663
],
[
662,
664
],
[
644,
665
],
[
665,
666
],
[
665,
667
],
[
667,
668
],
[
667,
669
],
[
669,
670
],
[
644,
671
],
[
671,
672
],
[
672,
673
],
[
673,
674
],
[
674,
675
],
[
674,
676
],
[
676,
677
],
[
673,
678
],
[
672,
679
],
[
679,
680
],
[
679,
681
],
[
671,
682
],
[
682,
683
],
[
683,
684
],
[
683,
685
],
[
685,
686
],
[
686,
687
],
[
687,
688
],
[
687,
689
],
[
686,
690
],
[
685,
691
],
[
644,
692
],
[
692,
693
],
[
692,
694
],
[
694,
695
],
[
695,
696
],
[
644,
697
],
[
697,
698
],
[
504,
699
],
[
699,
700
],
[
699,
701
],
[
701,
702
],
[
702,
703
],
[
702,
704
],
[
701,
705
],
[
705,
706
],
[
705,
707
],
[
701,
708
],
[
708,
709
],
[
708,
710
],
[
710,
711
],
[
701,
712
],
[
712,
713
],
[
713,
714
],
[
713,
715
],
[
712,
716
],
[
716,
717
],
[
716,
718
],
[
718,
719
],
[
701,
720
],
[
720,
721
],
[
720,
722
],
[
722,
723
],
[
722,
724
],
[
701,
725
],
[
725,
726
],
[
725,
727
],
[
727,
728
],
[
727,
729
],
[
729,
730
],
[
701,
731
],
[
731,
732
],
[
732,
733
],
[
733,
734
],
[
734,
735
],
[
734,
736
],
[
736,
737
],
[
733,
738
],
[
732,
739
],
[
739,
740
],
[
739,
741
],
[
731,
742
],
[
742,
743
],
[
743,
744
],
[
743,
745
],
[
745,
746
],
[
746,
747
],
[
747,
748
],
[
747,
749
],
[
746,
750
],
[
745,
751
],
[
701,
752
],
[
752,
753
],
[
753,
754
],
[
753,
755
],
[
752,
756
],
[
756,
757
],
[
757,
758
],
[
758,
759
],
[
759,
760
],
[
760,
761
],
[
760,
762
],
[
762,
763
],
[
759,
764
],
[
758,
765
],
[
765,
766
],
[
765,
767
],
[
757,
768
],
[
768,
769
],
[
769,
770
],
[
769,
771
],
[
771,
772
],
[
772,
773
],
[
772,
774
],
[
771,
775
],
[
775,
776
],
[
775,
777
],
[
701,
778
],
[
778,
779
],
[
778,
780
],
[
780,
781
],
[
781,
782
],
[
701,
783
],
[
783,
784
],
[
504,
785
],
[
785,
786
],
[
785,
787
],
[
787,
788
],
[
788,
789
],
[
788,
790
],
[
790,
791
],
[
791,
792
],
[
790,
793
],
[
790,
794
],
[
794,
795
],
[
794,
796
],
[
790,
797
],
[
787,
798
],
[
798,
799
],
[
799,
800
],
[
799,
801
],
[
801,
802
],
[
798,
803
],
[
803,
804
],
[
804,
805
],
[
804,
806
],
[
803,
807
],
[
807,
808
],
[
504,
809
],
[
809,
810
],
[
809,
811
],
[
811,
812
],
[
812,
813
],
[
813,
814
],
[
813,
815
],
[
812,
816
],
[
816,
817
],
[
811,
818
],
[
818,
819
],
[
819,
820
],
[
819,
821
],
[
821,
822
],
[
504,
823
],
[
823,
824
],
[
823,
825
],
[
825,
826
],
[
826,
827
],
[
827,
828
],
[
827,
829
],
[
826,
830
],
[
825,
831
],
[
831,
832
],
[
832,
833
],
[
0,
834
],
[
834,
835
],
[
834,
836
]
]
| [
"import java.util.*;\nimport java.io.*;\nimport java.math.*;\npublic class Main{\n\tstatic long mod = (long)(1e9+7);\n\tpublic static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));\n\tpublic static void main(String[] args)throws IOException {\n\t\tScanner sc =new Scanner(System.in);\n\t\t//FastReader sc = new FastReader();\n\t\t\n\t\tint count = 0 ;\n\t\tint n = sc.nextInt();\n\t\tint temp = 0;\n\t\twhile(n-->0){\n\t\t\tif(sc.nextInt()==sc.nextInt())\n\t\t\t\ttemp++;\n\t\t\telse{\n\t\t\t\tcount = Math.max(temp, count);\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t}\n\t\tcount = Math.max(count,temp);\n\t\tif(count>2)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t}\n\t\n\t\n\t\n\t\n\t\n\tpublic static void add(TreeMap<Integer,Integer> hm, int val){\n\t\tif(!hm.containsKey(val))\n\t\t\thm.put(val,1);\n\t\telse hm.put(val, hm.get(val)+1);\n\t}\n\t\n\tpublic static void remove(TreeMap<Integer,Integer> hm, int val){\n\t\thm.put(val, hm.get(val)-1);\n\t\tif(hm.get(val)==0){\n\t\t\thm.remove(val);\n\t\t}\n\t}\n\t\t\t\n\t\t\t\n\tpublic static long power(long a, long b){\n\t\t\n\t\tlong temp = 0;\n\t\tif(b==0)\n\t\t\treturn 1;\n\t\t\n\t\ttemp = power(a, b/2);\n\t\tif(b%2==0)\n\t\t\treturn (temp%mod*temp%mod)%mod;\n\t\treturn (a%mod*(temp%mod*temp%mod)%mod)%mod;\n\t}\n\t\n\tpublic static ArrayList<Integer> primefactor(int n){\n\t\tint sqrt = (int)Math.sqrt(n);\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\twhile(n%2==0){\n\t\t\tal.add(2);\n\t\t\tn/=2;\n\t\t}\n\t\tfor(int i=3;i<=sqrt;i+=2){\n\t\t\twhile(n%i==0){\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}\n\t\t}\n\t\tif(n>2)\n\t\t\tal.add(n);\n\t\treturn al;\n\t}\n\t\n\tpublic static long sum(long val){\n\t\tlong fg =0 ;\n\t\twhile(val!=0){\n\t\t\tfg+=val%10;\n\t\t\tval/=10;\n\t\t}\n\t\treturn fg;\n\t}\n\t\n\t\n\t\n\tpublic static ArrayList<Long> factor(long n){\n\t\tlong sqrt = (long)Math.sqrt(n);\n\t\tArrayList<Long> al = new ArrayList<>();\n\t\tfor(long i=1;i<=sqrt;i++){\n\t\t\tif(n%i!=0)\n\t\t\t\tcontinue;\n\t\t\tlong first = i;\n\t\t\tlong second = n/i;\n\t\t\tal.add(i);\n\t\t\tif(first==second){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tal.add(n/i);\n\t\t}\n\t\treturn al;\n\t}\n\t\n\t\n\t\n\tpublic static ArrayList<Integer> comp(){\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\t\tint n = (int)2e5;\n\t\t\tboolean arr[] = new boolean[n+1];\n\t\t\tint sqrt = (int)Math.sqrt(n);\n\t\t\tfor(int i=2;i<=sqrt;i++){\n\t\t\t\tif(arr[i]==false){\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i=2;i<=n;i++){\n\t\t\t\tif(arr[i]==false)\n\t\t\t\t\tal.add(i);\n\t\t\t}\n\t\t\t\n\t\treturn al;\n\t}\n\t\n\tpublic static class pair{\n\t\tint x;\n\t\tint y;\n\t\tpair(int a, int b){\n\t\t\tx=a;\n\t\t\ty=b;\n\t\t}\n\t}\n\t\n\tpublic static class comp implements Comparator<pair>{\n\t\tpublic int compare(pair o1, pair o2){\n\t\t\treturn o1.x-o2.x;\n\t\t}\n\t}\n\t\n\t\n\t\n\tstatic class Node{\n\t\tint node;\n\t\tint d;\n\t\tArrayList<Integer> al = new ArrayList<>();\t\n\t}\n\t\n\n\tstatic int gcd(int a, int b) \n { \n if (b == 0) \n return a; \n return gcd(b, a % b); \n }\n\t\n\t\t\n\tstatic class FastReader \n\t{ \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 FastReader() \n\t\t{ \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 FastReader(String file_name) throws IOException \n\t\t{ \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{ \n\t\t\tbyte[] buf = new byte[64]; // line length \n\t\t\tint cnt = 0, c; \n\t\t\twhile ((c = read()) != -1) \n\t\t\t{ \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{ \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{ \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{ \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} \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 \n\t\tpublic double nextDouble() throws IOException \n\t\t{ \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} \n\t\t\twhile ((c = read()) >= '0' && c <= '9'); \n \n\t\t\tif (c == '.') \n\t\t\t{ \n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') \n\t\t\t\t{ \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\t\t\n\t\t\n \n\t\tprivate void fillBuffer() throws IOException \n\t\t{ \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{ \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{ \n\t\t\tif (din == null) \n\t\t\t\treturn; \n\t\t\tdin.close(); \n\t\t} \n\t} \n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main{\n\tstatic long mod = (long)(1e9+7);\n\tpublic static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));\n\tpublic static void main(String[] args)throws IOException {\n\t\tScanner sc =new Scanner(System.in);\n\t\t//FastReader sc = new FastReader();\n\t\t\n\t\tint count = 0 ;\n\t\tint n = sc.nextInt();\n\t\tint temp = 0;\n\t\twhile(n-->0){\n\t\t\tif(sc.nextInt()==sc.nextInt())\n\t\t\t\ttemp++;\n\t\t\telse{\n\t\t\t\tcount = Math.max(temp, count);\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t}\n\t\tcount = Math.max(count,temp);\n\t\tif(count>2)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t}\n\t\n\t\n\t\n\t\n\t\n\tpublic static void add(TreeMap<Integer,Integer> hm, int val){\n\t\tif(!hm.containsKey(val))\n\t\t\thm.put(val,1);\n\t\telse hm.put(val, hm.get(val)+1);\n\t}\n\t\n\tpublic static void remove(TreeMap<Integer,Integer> hm, int val){\n\t\thm.put(val, hm.get(val)-1);\n\t\tif(hm.get(val)==0){\n\t\t\thm.remove(val);\n\t\t}\n\t}\n\t\t\t\n\t\t\t\n\tpublic static long power(long a, long b){\n\t\t\n\t\tlong temp = 0;\n\t\tif(b==0)\n\t\t\treturn 1;\n\t\t\n\t\ttemp = power(a, b/2);\n\t\tif(b%2==0)\n\t\t\treturn (temp%mod*temp%mod)%mod;\n\t\treturn (a%mod*(temp%mod*temp%mod)%mod)%mod;\n\t}\n\t\n\tpublic static ArrayList<Integer> primefactor(int n){\n\t\tint sqrt = (int)Math.sqrt(n);\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\twhile(n%2==0){\n\t\t\tal.add(2);\n\t\t\tn/=2;\n\t\t}\n\t\tfor(int i=3;i<=sqrt;i+=2){\n\t\t\twhile(n%i==0){\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}\n\t\t}\n\t\tif(n>2)\n\t\t\tal.add(n);\n\t\treturn al;\n\t}\n\t\n\tpublic static long sum(long val){\n\t\tlong fg =0 ;\n\t\twhile(val!=0){\n\t\t\tfg+=val%10;\n\t\t\tval/=10;\n\t\t}\n\t\treturn fg;\n\t}\n\t\n\t\n\t\n\tpublic static ArrayList<Long> factor(long n){\n\t\tlong sqrt = (long)Math.sqrt(n);\n\t\tArrayList<Long> al = new ArrayList<>();\n\t\tfor(long i=1;i<=sqrt;i++){\n\t\t\tif(n%i!=0)\n\t\t\t\tcontinue;\n\t\t\tlong first = i;\n\t\t\tlong second = n/i;\n\t\t\tal.add(i);\n\t\t\tif(first==second){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tal.add(n/i);\n\t\t}\n\t\treturn al;\n\t}\n\t\n\t\n\t\n\tpublic static ArrayList<Integer> comp(){\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\t\tint n = (int)2e5;\n\t\t\tboolean arr[] = new boolean[n+1];\n\t\t\tint sqrt = (int)Math.sqrt(n);\n\t\t\tfor(int i=2;i<=sqrt;i++){\n\t\t\t\tif(arr[i]==false){\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i=2;i<=n;i++){\n\t\t\t\tif(arr[i]==false)\n\t\t\t\t\tal.add(i);\n\t\t\t}\n\t\t\t\n\t\treturn al;\n\t}\n\t\n\tpublic static class pair{\n\t\tint x;\n\t\tint y;\n\t\tpair(int a, int b){\n\t\t\tx=a;\n\t\t\ty=b;\n\t\t}\n\t}\n\t\n\tpublic static class comp implements Comparator<pair>{\n\t\tpublic int compare(pair o1, pair o2){\n\t\t\treturn o1.x-o2.x;\n\t\t}\n\t}\n\t\n\t\n\t\n\tstatic class Node{\n\t\tint node;\n\t\tint d;\n\t\tArrayList<Integer> al = new ArrayList<>();\t\n\t}\n\t\n\n\tstatic int gcd(int a, int b) \n { \n if (b == 0) \n return a; \n return gcd(b, a % b); \n }\n\t\n\t\t\n\tstatic class FastReader \n\t{ \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 FastReader() \n\t\t{ \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 FastReader(String file_name) throws IOException \n\t\t{ \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{ \n\t\t\tbyte[] buf = new byte[64]; // line length \n\t\t\tint cnt = 0, c; \n\t\t\twhile ((c = read()) != -1) \n\t\t\t{ \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{ \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{ \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{ \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} \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 \n\t\tpublic double nextDouble() throws IOException \n\t\t{ \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} \n\t\t\twhile ((c = read()) >= '0' && c <= '9'); \n \n\t\t\tif (c == '.') \n\t\t\t{ \n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') \n\t\t\t\t{ \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\t\t\n\t\t\n \n\t\tprivate void fillBuffer() throws IOException \n\t\t{ \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{ \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{ \n\t\t\tif (din == null) \n\t\t\t\treturn; \n\t\t\tdin.close(); \n\t\t} \n\t} \n}",
"Main",
"static long mod = (long)(1e9+7);",
"mod",
"(long)(1e9+7)",
"1e9",
"7",
"public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));",
"out",
"new PrintWriter (new BufferedOutputStream(System.out))",
"public static void main(String[] args)throws IOException {\n\t\tScanner sc =new Scanner(System.in);\n\t\t//FastReader sc = new FastReader();\n\t\t\n\t\tint count = 0 ;\n\t\tint n = sc.nextInt();\n\t\tint temp = 0;\n\t\twhile(n-->0){\n\t\t\tif(sc.nextInt()==sc.nextInt())\n\t\t\t\ttemp++;\n\t\t\telse{\n\t\t\t\tcount = Math.max(temp, count);\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t}\n\t\tcount = Math.max(count,temp);\n\t\tif(count>2)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc =new Scanner(System.in);\n\t\t//FastReader sc = new FastReader();\n\t\t\n\t\tint count = 0 ;\n\t\tint n = sc.nextInt();\n\t\tint temp = 0;\n\t\twhile(n-->0){\n\t\t\tif(sc.nextInt()==sc.nextInt())\n\t\t\t\ttemp++;\n\t\t\telse{\n\t\t\t\tcount = Math.max(temp, count);\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t}\n\t\tcount = Math.max(count,temp);\n\t\tif(count>2)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t}",
"Scanner sc =new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int count = 0 ;",
"count",
"0",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int temp = 0;",
"temp",
"0",
"while(n-->0){\n\t\t\tif(sc.nextInt()==sc.nextInt())\n\t\t\t\ttemp++;\n\t\t\telse{\n\t\t\t\tcount = Math.max(temp, count);\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t}",
"n-->0",
"n--",
"n",
"0",
"{\n\t\t\tif(sc.nextInt()==sc.nextInt())\n\t\t\t\ttemp++;\n\t\t\telse{\n\t\t\t\tcount = Math.max(temp, count);\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t}",
"if(sc.nextInt()==sc.nextInt())\n\t\t\t\ttemp++;\n\t\t\telse{\n\t\t\t\tcount = Math.max(temp, count);\n\t\t\t\ttemp = 0;\n\t\t\t}",
"sc.nextInt()==sc.nextInt()",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.nextInt()",
"sc.nextInt",
"sc",
"temp++",
"temp",
"{\n\t\t\t\tcount = Math.max(temp, count);\n\t\t\t\ttemp = 0;\n\t\t\t}",
"count = Math.max(temp, count)",
"count",
"Math.max(temp, count)",
"Math.max",
"Math",
"temp",
"count",
"temp = 0",
"temp",
"0",
"count = Math.max(count,temp)",
"count",
"Math.max(count,temp)",
"Math.max",
"Math",
"count",
"temp",
"if(count>2)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");",
"count>2",
"count",
"2",
"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 static void add(TreeMap<Integer,Integer> hm, int val){\n\t\tif(!hm.containsKey(val))\n\t\t\thm.put(val,1);\n\t\telse hm.put(val, hm.get(val)+1);\n\t}",
"add",
"{\n\t\tif(!hm.containsKey(val))\n\t\t\thm.put(val,1);\n\t\telse hm.put(val, hm.get(val)+1);\n\t}",
"if(!hm.containsKey(val))\n\t\t\thm.put(val,1);\n\t\telse hm.put(val, hm.get(val)+1);",
"!hm.containsKey(val)",
"hm.containsKey(val)",
"hm.containsKey",
"hm",
"val",
"hm.put(val,1)",
"hm.put",
"hm",
"val",
"1",
"hm.put(val, hm.get(val)+1)",
"hm.put",
"hm",
"val",
"hm.get(val)+1",
"hm.get(val)",
"hm.get",
"hm",
"val",
"1",
"TreeMap<Integer,Integer> hm",
"hm",
"int val",
"val",
"public static void remove(TreeMap<Integer,Integer> hm, int val){\n\t\thm.put(val, hm.get(val)-1);\n\t\tif(hm.get(val)==0){\n\t\t\thm.remove(val);\n\t\t}\n\t}",
"remove",
"{\n\t\thm.put(val, hm.get(val)-1);\n\t\tif(hm.get(val)==0){\n\t\t\thm.remove(val);\n\t\t}\n\t}",
"hm.put(val, hm.get(val)-1)",
"hm.put",
"hm",
"val",
"hm.get(val)-1",
"hm.get(val)",
"hm.get",
"hm",
"val",
"1",
"if(hm.get(val)==0){\n\t\t\thm.remove(val);\n\t\t}",
"hm.get(val)==0",
"hm.get(val)",
"hm.get",
"hm",
"val",
"0",
"{\n\t\t\thm.remove(val);\n\t\t}",
"hm.remove(val)",
"hm.remove",
"hm",
"val",
"TreeMap<Integer,Integer> hm",
"hm",
"int val",
"val",
"public static long power(long a, long b){\n\t\t\n\t\tlong temp = 0;\n\t\tif(b==0)\n\t\t\treturn 1;\n\t\t\n\t\ttemp = power(a, b/2);\n\t\tif(b%2==0)\n\t\t\treturn (temp%mod*temp%mod)%mod;\n\t\treturn (a%mod*(temp%mod*temp%mod)%mod)%mod;\n\t}",
"power",
"{\n\t\t\n\t\tlong temp = 0;\n\t\tif(b==0)\n\t\t\treturn 1;\n\t\t\n\t\ttemp = power(a, b/2);\n\t\tif(b%2==0)\n\t\t\treturn (temp%mod*temp%mod)%mod;\n\t\treturn (a%mod*(temp%mod*temp%mod)%mod)%mod;\n\t}",
"long temp = 0;",
"temp",
"0",
"if(b==0)\n\t\t\treturn 1;",
"b==0",
"b",
"0",
"return 1;",
"1",
"temp = power(a, b/2)",
"temp",
"power(a, b/2)",
"power",
"a",
"b/2",
"b",
"2",
"if(b%2==0)\n\t\t\treturn (temp%mod*temp%mod)%mod;",
"b%2==0",
"b%2",
"b",
"2",
"0",
"return (temp%mod*temp%mod)%mod;",
"(temp%mod*temp%mod)%mod",
"(temp%mod*temp%mod)",
"temp%mod*temp",
"temp%mod",
"temp",
"mod",
"temp",
"mod",
"mod",
"return (a%mod*(temp%mod*temp%mod)%mod)%mod;",
"(a%mod*(temp%mod*temp%mod)%mod)%mod",
"(a%mod*(temp%mod*temp%mod)%mod)",
"a%mod*(temp%mod*temp%mod)",
"a%mod",
"a",
"mod",
"(temp%mod*temp%mod)",
"temp%mod*temp",
"temp%mod",
"temp",
"mod",
"temp",
"mod",
"mod",
"mod",
"long a",
"a",
"long b",
"b",
"public static ArrayList<Integer> primefactor(int n){\n\t\tint sqrt = (int)Math.sqrt(n);\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\twhile(n%2==0){\n\t\t\tal.add(2);\n\t\t\tn/=2;\n\t\t}\n\t\tfor(int i=3;i<=sqrt;i+=2){\n\t\t\twhile(n%i==0){\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}\n\t\t}\n\t\tif(n>2)\n\t\t\tal.add(n);\n\t\treturn al;\n\t}",
"primefactor",
"{\n\t\tint sqrt = (int)Math.sqrt(n);\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\twhile(n%2==0){\n\t\t\tal.add(2);\n\t\t\tn/=2;\n\t\t}\n\t\tfor(int i=3;i<=sqrt;i+=2){\n\t\t\twhile(n%i==0){\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}\n\t\t}\n\t\tif(n>2)\n\t\t\tal.add(n);\n\t\treturn al;\n\t}",
"int sqrt = (int)Math.sqrt(n);",
"sqrt",
"(int)Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"ArrayList<Integer> al = new ArrayList<>();",
"al",
"new ArrayList<>()",
"while(n%2==0){\n\t\t\tal.add(2);\n\t\t\tn/=2;\n\t\t}",
"n%2==0",
"n%2",
"n",
"2",
"0",
"{\n\t\t\tal.add(2);\n\t\t\tn/=2;\n\t\t}",
"al.add(2)",
"al.add",
"al",
"2",
"n/=2",
"n",
"2",
"for(int i=3;i<=sqrt;i+=2){\n\t\t\twhile(n%i==0){\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}\n\t\t}",
"int i=3;",
"int i=3;",
"i",
"3",
"i<=sqrt",
"i",
"sqrt",
"i+=2",
"i+=2",
"i",
"2",
"{\n\t\t\twhile(n%i==0){\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}\n\t\t}",
"{\n\t\t\twhile(n%i==0){\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}\n\t\t}",
"while(n%i==0){\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}",
"n%i==0",
"n%i",
"n",
"i",
"0",
"{\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}",
"al.add(i)",
"al.add",
"al",
"i",
"n/=i",
"n",
"i",
"if(n>2)\n\t\t\tal.add(n);",
"n>2",
"n",
"2",
"al.add(n)",
"al.add",
"al",
"n",
"return al;",
"al",
"int n",
"n",
"public static long sum(long val){\n\t\tlong fg =0 ;\n\t\twhile(val!=0){\n\t\t\tfg+=val%10;\n\t\t\tval/=10;\n\t\t}\n\t\treturn fg;\n\t}",
"sum",
"{\n\t\tlong fg =0 ;\n\t\twhile(val!=0){\n\t\t\tfg+=val%10;\n\t\t\tval/=10;\n\t\t}\n\t\treturn fg;\n\t}",
"long fg =0 ;",
"fg",
"0",
"while(val!=0){\n\t\t\tfg+=val%10;\n\t\t\tval/=10;\n\t\t}",
"val!=0",
"val",
"0",
"{\n\t\t\tfg+=val%10;\n\t\t\tval/=10;\n\t\t}",
"fg+=val%10",
"fg",
"val%10",
"val",
"10",
"val/=10",
"val",
"10",
"return fg;",
"fg",
"long val",
"val",
"public static ArrayList<Long> factor(long n){\n\t\tlong sqrt = (long)Math.sqrt(n);\n\t\tArrayList<Long> al = new ArrayList<>();\n\t\tfor(long i=1;i<=sqrt;i++){\n\t\t\tif(n%i!=0)\n\t\t\t\tcontinue;\n\t\t\tlong first = i;\n\t\t\tlong second = n/i;\n\t\t\tal.add(i);\n\t\t\tif(first==second){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tal.add(n/i);\n\t\t}\n\t\treturn al;\n\t}",
"factor",
"{\n\t\tlong sqrt = (long)Math.sqrt(n);\n\t\tArrayList<Long> al = new ArrayList<>();\n\t\tfor(long i=1;i<=sqrt;i++){\n\t\t\tif(n%i!=0)\n\t\t\t\tcontinue;\n\t\t\tlong first = i;\n\t\t\tlong second = n/i;\n\t\t\tal.add(i);\n\t\t\tif(first==second){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tal.add(n/i);\n\t\t}\n\t\treturn al;\n\t}",
"long sqrt = (long)Math.sqrt(n);",
"sqrt",
"(long)Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"ArrayList<Long> al = new ArrayList<>();",
"al",
"new ArrayList<>()",
"for(long i=1;i<=sqrt;i++){\n\t\t\tif(n%i!=0)\n\t\t\t\tcontinue;\n\t\t\tlong first = i;\n\t\t\tlong second = n/i;\n\t\t\tal.add(i);\n\t\t\tif(first==second){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tal.add(n/i);\n\t\t}",
"long i=1;",
"long i=1;",
"i",
"1",
"i<=sqrt",
"i",
"sqrt",
"i++",
"i++",
"i",
"{\n\t\t\tif(n%i!=0)\n\t\t\t\tcontinue;\n\t\t\tlong first = i;\n\t\t\tlong second = n/i;\n\t\t\tal.add(i);\n\t\t\tif(first==second){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tal.add(n/i);\n\t\t}",
"{\n\t\t\tif(n%i!=0)\n\t\t\t\tcontinue;\n\t\t\tlong first = i;\n\t\t\tlong second = n/i;\n\t\t\tal.add(i);\n\t\t\tif(first==second){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tal.add(n/i);\n\t\t}",
"if(n%i!=0)\n\t\t\t\tcontinue;",
"n%i!=0",
"n%i",
"n",
"i",
"0",
"continue;",
"long first = i;",
"first",
"i",
"long second = n/i;",
"second",
"n/i",
"n",
"i",
"al.add(i)",
"al.add",
"al",
"i",
"if(first==second){\n\t\t\t\tcontinue;\n\t\t\t}",
"first==second",
"first",
"second",
"{\n\t\t\t\tcontinue;\n\t\t\t}",
"continue;",
"al.add(n/i)",
"al.add",
"al",
"n/i",
"n",
"i",
"return al;",
"al",
"long n",
"n",
"public static ArrayList<Integer> comp(){\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\t\tint n = (int)2e5;\n\t\t\tboolean arr[] = new boolean[n+1];\n\t\t\tint sqrt = (int)Math.sqrt(n);\n\t\t\tfor(int i=2;i<=sqrt;i++){\n\t\t\t\tif(arr[i]==false){\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i=2;i<=n;i++){\n\t\t\t\tif(arr[i]==false)\n\t\t\t\t\tal.add(i);\n\t\t\t}\n\t\t\t\n\t\treturn al;\n\t}",
"comp",
"{\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\t\tint n = (int)2e5;\n\t\t\tboolean arr[] = new boolean[n+1];\n\t\t\tint sqrt = (int)Math.sqrt(n);\n\t\t\tfor(int i=2;i<=sqrt;i++){\n\t\t\t\tif(arr[i]==false){\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i=2;i<=n;i++){\n\t\t\t\tif(arr[i]==false)\n\t\t\t\t\tal.add(i);\n\t\t\t}\n\t\t\t\n\t\treturn al;\n\t}",
"ArrayList<Integer> al = new ArrayList<>();",
"al",
"new ArrayList<>()",
"int n = (int)2e5;",
"n",
"(int)2e5",
"boolean arr[] = new boolean[n+1];",
"arr",
"new boolean[n+1]",
"n+1",
"n",
"1",
"int sqrt = (int)Math.sqrt(n);",
"sqrt",
"(int)Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"for(int i=2;i<=sqrt;i++){\n\t\t\t\tif(arr[i]==false){\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=sqrt",
"i",
"sqrt",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(arr[i]==false){\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(arr[i]==false){\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"if(arr[i]==false){\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}",
"arr[i]==false",
"arr[i]",
"arr",
"i",
"false",
"{\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}",
"for(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}",
"int j=i*i;",
"int j=i*i;",
"j",
"i*i",
"i",
"i",
"j<=n",
"j",
"n",
"j+=i",
"j+=i",
"j",
"i",
"{\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}",
"arr[j]=true",
"arr[j]",
"arr",
"j",
"true",
"for(int i=2;i<=n;i++){\n\t\t\t\tif(arr[i]==false)\n\t\t\t\t\tal.add(i);\n\t\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(arr[i]==false)\n\t\t\t\t\tal.add(i);\n\t\t\t}",
"{\n\t\t\t\tif(arr[i]==false)\n\t\t\t\t\tal.add(i);\n\t\t\t}",
"if(arr[i]==false)\n\t\t\t\t\tal.add(i);",
"arr[i]==false",
"arr[i]",
"arr",
"i",
"false",
"al.add(i)",
"al.add",
"al",
"i",
"return al;",
"al",
"static int gcd(int a, int b) \n { \n if (b == 0) \n return a; \n return gcd(b, a % b); \n }",
"gcd",
"{ \n if (b == 0) \n return a; \n return gcd(b, a % b); \n }",
"if (b == 0) \n return a;",
"b == 0",
"b",
"0",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public static class pair{\n\t\tint x;\n\t\tint y;\n\t\tpair(int a, int b){\n\t\t\tx=a;\n\t\t\ty=b;\n\t\t}\n\t}",
"pair",
"int x;",
"x",
"int y;",
"y",
"pair(int a, int b){\n\t\t\tx=a;\n\t\t\ty=b;\n\t\t}",
"pair",
"{\n\t\t\tx=a;\n\t\t\ty=b;\n\t\t}",
"x=a",
"x",
"a",
"y=b",
"y",
"b",
"int a",
"a",
"int b",
"b",
"public static class comp implements Comparator<pair>{\n\t\tpublic int compare(pair o1, pair o2){\n\t\t\treturn o1.x-o2.x;\n\t\t}\n\t}",
"comp",
"public int compare(pair o1, pair o2){\n\t\t\treturn o1.x-o2.x;\n\t\t}",
"compare",
"{\n\t\t\treturn o1.x-o2.x;\n\t\t}",
"return o1.x-o2.x;",
"o1.x-o2.x",
"o1.x",
"o1",
"o1.x",
"o2.x",
"o2",
"o2.x",
"pair o1",
"o1",
"pair o2",
"o2",
"Comparator",
"static class Node{\n\t\tint node;\n\t\tint d;\n\t\tArrayList<Integer> al = new ArrayList<>();\t\n\t}",
"Node",
"int node;",
"node",
"int d;",
"d",
"ArrayList<Integer> al = new ArrayList<>();",
"al",
"new ArrayList<>()",
"static class FastReader \n\t{ \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 FastReader() \n\t\t{ \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 FastReader(String file_name) throws IOException \n\t\t{ \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{ \n\t\t\tbyte[] buf = new byte[64]; // line length \n\t\t\tint cnt = 0, c; \n\t\t\twhile ((c = read()) != -1) \n\t\t\t{ \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{ \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{ \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{ \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} \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 \n\t\tpublic double nextDouble() throws IOException \n\t\t{ \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} \n\t\t\twhile ((c = read()) >= '0' && c <= '9'); \n \n\t\t\tif (c == '.') \n\t\t\t{ \n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') \n\t\t\t\t{ \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\t\t\n\t\t\n \n\t\tprivate void fillBuffer() throws IOException \n\t\t{ \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{ \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{ \n\t\t\tif (din == null) \n\t\t\t\treturn; \n\t\t\tdin.close(); \n\t\t} \n\t}",
"FastReader",
"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 FastReader() \n\t\t{ \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}",
"FastReader",
"{ \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 FastReader(String file_name) throws IOException \n\t\t{ \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}",
"FastReader",
"{ \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{ \n\t\t\tbyte[] buf = new byte[64]; // line length \n\t\t\tint cnt = 0, c; \n\t\t\twhile ((c = read()) != -1) \n\t\t\t{ \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[64]; // line length \n\t\t\tint cnt = 0, c; \n\t\t\twhile ((c = read()) != -1) \n\t\t\t{ \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[64];",
"buf",
"new byte[64]",
"64",
"int cnt = 0",
"cnt",
"0",
"c;",
"c",
"while ((c = read()) != -1) \n\t\t\t{ \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{ \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{ \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{ \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{ \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{ \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} \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\t} \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\t} \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'",
"{ \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{ \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} \n\t\t\twhile ((c = read()) >= '0' && c <= '9'); \n \n\t\t\tif (c == '.') \n\t\t\t{ \n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') \n\t\t\t\t{ \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} \n\t\t\twhile ((c = read()) >= '0' && c <= '9'); \n \n\t\t\tif (c == '.') \n\t\t\t{ \n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') \n\t\t\t\t{ \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} \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'",
"{ \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{ \n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') \n\t\t\t\t{ \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{ \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{ \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{ \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{ \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{ \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 long mod = (long)(1e9+7);\n\tpublic static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));\n\tpublic static void main(String[] args)throws IOException {\n\t\tScanner sc =new Scanner(System.in);\n\t\t//FastReader sc = new FastReader();\n\t\t\n\t\tint count = 0 ;\n\t\tint n = sc.nextInt();\n\t\tint temp = 0;\n\t\twhile(n-->0){\n\t\t\tif(sc.nextInt()==sc.nextInt())\n\t\t\t\ttemp++;\n\t\t\telse{\n\t\t\t\tcount = Math.max(temp, count);\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t}\n\t\tcount = Math.max(count,temp);\n\t\tif(count>2)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t}\n\t\n\t\n\t\n\t\n\t\n\tpublic static void add(TreeMap<Integer,Integer> hm, int val){\n\t\tif(!hm.containsKey(val))\n\t\t\thm.put(val,1);\n\t\telse hm.put(val, hm.get(val)+1);\n\t}\n\t\n\tpublic static void remove(TreeMap<Integer,Integer> hm, int val){\n\t\thm.put(val, hm.get(val)-1);\n\t\tif(hm.get(val)==0){\n\t\t\thm.remove(val);\n\t\t}\n\t}\n\t\t\t\n\t\t\t\n\tpublic static long power(long a, long b){\n\t\t\n\t\tlong temp = 0;\n\t\tif(b==0)\n\t\t\treturn 1;\n\t\t\n\t\ttemp = power(a, b/2);\n\t\tif(b%2==0)\n\t\t\treturn (temp%mod*temp%mod)%mod;\n\t\treturn (a%mod*(temp%mod*temp%mod)%mod)%mod;\n\t}\n\t\n\tpublic static ArrayList<Integer> primefactor(int n){\n\t\tint sqrt = (int)Math.sqrt(n);\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\twhile(n%2==0){\n\t\t\tal.add(2);\n\t\t\tn/=2;\n\t\t}\n\t\tfor(int i=3;i<=sqrt;i+=2){\n\t\t\twhile(n%i==0){\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}\n\t\t}\n\t\tif(n>2)\n\t\t\tal.add(n);\n\t\treturn al;\n\t}\n\t\n\tpublic static long sum(long val){\n\t\tlong fg =0 ;\n\t\twhile(val!=0){\n\t\t\tfg+=val%10;\n\t\t\tval/=10;\n\t\t}\n\t\treturn fg;\n\t}\n\t\n\t\n\t\n\tpublic static ArrayList<Long> factor(long n){\n\t\tlong sqrt = (long)Math.sqrt(n);\n\t\tArrayList<Long> al = new ArrayList<>();\n\t\tfor(long i=1;i<=sqrt;i++){\n\t\t\tif(n%i!=0)\n\t\t\t\tcontinue;\n\t\t\tlong first = i;\n\t\t\tlong second = n/i;\n\t\t\tal.add(i);\n\t\t\tif(first==second){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tal.add(n/i);\n\t\t}\n\t\treturn al;\n\t}\n\t\n\t\n\t\n\tpublic static ArrayList<Integer> comp(){\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\t\tint n = (int)2e5;\n\t\t\tboolean arr[] = new boolean[n+1];\n\t\t\tint sqrt = (int)Math.sqrt(n);\n\t\t\tfor(int i=2;i<=sqrt;i++){\n\t\t\t\tif(arr[i]==false){\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i=2;i<=n;i++){\n\t\t\t\tif(arr[i]==false)\n\t\t\t\t\tal.add(i);\n\t\t\t}\n\t\t\t\n\t\treturn al;\n\t}\n\t\n\tpublic static class pair{\n\t\tint x;\n\t\tint y;\n\t\tpair(int a, int b){\n\t\t\tx=a;\n\t\t\ty=b;\n\t\t}\n\t}\n\t\n\tpublic static class comp implements Comparator<pair>{\n\t\tpublic int compare(pair o1, pair o2){\n\t\t\treturn o1.x-o2.x;\n\t\t}\n\t}\n\t\n\t\n\t\n\tstatic class Node{\n\t\tint node;\n\t\tint d;\n\t\tArrayList<Integer> al = new ArrayList<>();\t\n\t}\n\t\n\n\tstatic int gcd(int a, int b) \n { \n if (b == 0) \n return a; \n return gcd(b, a % b); \n }\n\t\n\t\t\n\tstatic class FastReader \n\t{ \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 FastReader() \n\t\t{ \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 FastReader(String file_name) throws IOException \n\t\t{ \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{ \n\t\t\tbyte[] buf = new byte[64]; // line length \n\t\t\tint cnt = 0, c; \n\t\t\twhile ((c = read()) != -1) \n\t\t\t{ \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{ \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{ \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{ \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} \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 \n\t\tpublic double nextDouble() throws IOException \n\t\t{ \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} \n\t\t\twhile ((c = read()) >= '0' && c <= '9'); \n \n\t\t\tif (c == '.') \n\t\t\t{ \n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') \n\t\t\t\t{ \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\t\t\n\t\t\n \n\t\tprivate void fillBuffer() throws IOException \n\t\t{ \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{ \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{ \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 long mod = (long)(1e9+7);\n\tpublic static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));\n\tpublic static void main(String[] args)throws IOException {\n\t\tScanner sc =new Scanner(System.in);\n\t\t//FastReader sc = new FastReader();\n\t\t\n\t\tint count = 0 ;\n\t\tint n = sc.nextInt();\n\t\tint temp = 0;\n\t\twhile(n-->0){\n\t\t\tif(sc.nextInt()==sc.nextInt())\n\t\t\t\ttemp++;\n\t\t\telse{\n\t\t\t\tcount = Math.max(temp, count);\n\t\t\t\ttemp = 0;\n\t\t\t}\n\t\t}\n\t\tcount = Math.max(count,temp);\n\t\tif(count>2)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");\n\t\t\n\t}\n\t\n\t\n\t\n\t\n\t\n\tpublic static void add(TreeMap<Integer,Integer> hm, int val){\n\t\tif(!hm.containsKey(val))\n\t\t\thm.put(val,1);\n\t\telse hm.put(val, hm.get(val)+1);\n\t}\n\t\n\tpublic static void remove(TreeMap<Integer,Integer> hm, int val){\n\t\thm.put(val, hm.get(val)-1);\n\t\tif(hm.get(val)==0){\n\t\t\thm.remove(val);\n\t\t}\n\t}\n\t\t\t\n\t\t\t\n\tpublic static long power(long a, long b){\n\t\t\n\t\tlong temp = 0;\n\t\tif(b==0)\n\t\t\treturn 1;\n\t\t\n\t\ttemp = power(a, b/2);\n\t\tif(b%2==0)\n\t\t\treturn (temp%mod*temp%mod)%mod;\n\t\treturn (a%mod*(temp%mod*temp%mod)%mod)%mod;\n\t}\n\t\n\tpublic static ArrayList<Integer> primefactor(int n){\n\t\tint sqrt = (int)Math.sqrt(n);\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\twhile(n%2==0){\n\t\t\tal.add(2);\n\t\t\tn/=2;\n\t\t}\n\t\tfor(int i=3;i<=sqrt;i+=2){\n\t\t\twhile(n%i==0){\n\t\t\t\tal.add(i);\n\t\t\t\tn/=i;\n\t\t\t}\n\t\t}\n\t\tif(n>2)\n\t\t\tal.add(n);\n\t\treturn al;\n\t}\n\t\n\tpublic static long sum(long val){\n\t\tlong fg =0 ;\n\t\twhile(val!=0){\n\t\t\tfg+=val%10;\n\t\t\tval/=10;\n\t\t}\n\t\treturn fg;\n\t}\n\t\n\t\n\t\n\tpublic static ArrayList<Long> factor(long n){\n\t\tlong sqrt = (long)Math.sqrt(n);\n\t\tArrayList<Long> al = new ArrayList<>();\n\t\tfor(long i=1;i<=sqrt;i++){\n\t\t\tif(n%i!=0)\n\t\t\t\tcontinue;\n\t\t\tlong first = i;\n\t\t\tlong second = n/i;\n\t\t\tal.add(i);\n\t\t\tif(first==second){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tal.add(n/i);\n\t\t}\n\t\treturn al;\n\t}\n\t\n\t\n\t\n\tpublic static ArrayList<Integer> comp(){\n\t\tArrayList<Integer> al = new ArrayList<>();\n\t\t\tint n = (int)2e5;\n\t\t\tboolean arr[] = new boolean[n+1];\n\t\t\tint sqrt = (int)Math.sqrt(n);\n\t\t\tfor(int i=2;i<=sqrt;i++){\n\t\t\t\tif(arr[i]==false){\n\t\t\t\t\tfor(int j=i*i;j<=n;j+=i){\n\t\t\t\t\t\tarr[j]=true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor(int i=2;i<=n;i++){\n\t\t\t\tif(arr[i]==false)\n\t\t\t\t\tal.add(i);\n\t\t\t}\n\t\t\t\n\t\treturn al;\n\t}\n\t\n\tpublic static class pair{\n\t\tint x;\n\t\tint y;\n\t\tpair(int a, int b){\n\t\t\tx=a;\n\t\t\ty=b;\n\t\t}\n\t}\n\t\n\tpublic static class comp implements Comparator<pair>{\n\t\tpublic int compare(pair o1, pair o2){\n\t\t\treturn o1.x-o2.x;\n\t\t}\n\t}\n\t\n\t\n\t\n\tstatic class Node{\n\t\tint node;\n\t\tint d;\n\t\tArrayList<Integer> al = new ArrayList<>();\t\n\t}\n\t\n\n\tstatic int gcd(int a, int b) \n { \n if (b == 0) \n return a; \n return gcd(b, a % b); \n }\n\t\n\t\t\n\tstatic class FastReader \n\t{ \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 FastReader() \n\t\t{ \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 FastReader(String file_name) throws IOException \n\t\t{ \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{ \n\t\t\tbyte[] buf = new byte[64]; // line length \n\t\t\tint cnt = 0, c; \n\t\t\twhile ((c = read()) != -1) \n\t\t\t{ \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{ \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{ \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{ \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} \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 \n\t\tpublic double nextDouble() throws IOException \n\t\t{ \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} \n\t\t\twhile ((c = read()) >= '0' && c <= '9'); \n \n\t\t\tif (c == '.') \n\t\t\t{ \n\t\t\t\twhile ((c = read()) >= '0' && c <= '9') \n\t\t\t\t{ \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\t\t\n\t\t\n \n\t\tprivate void fillBuffer() throws IOException \n\t\t{ \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{ \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{ \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.util.*;
import java.io.*;
import java.math.*;
public class Main{
static long mod = (long)(1e9+7);
public static PrintWriter out = new PrintWriter (new BufferedOutputStream(System.out));
public static void main(String[] args)throws IOException {
Scanner sc =new Scanner(System.in);
//FastReader sc = new FastReader();
int count = 0 ;
int n = sc.nextInt();
int temp = 0;
while(n-->0){
if(sc.nextInt()==sc.nextInt())
temp++;
else{
count = Math.max(temp, count);
temp = 0;
}
}
count = Math.max(count,temp);
if(count>2)
System.out.println("Yes");
else System.out.println("No");
}
public static void add(TreeMap<Integer,Integer> hm, int val){
if(!hm.containsKey(val))
hm.put(val,1);
else hm.put(val, hm.get(val)+1);
}
public static void remove(TreeMap<Integer,Integer> hm, int val){
hm.put(val, hm.get(val)-1);
if(hm.get(val)==0){
hm.remove(val);
}
}
public static long power(long a, long b){
long temp = 0;
if(b==0)
return 1;
temp = power(a, b/2);
if(b%2==0)
return (temp%mod*temp%mod)%mod;
return (a%mod*(temp%mod*temp%mod)%mod)%mod;
}
public static ArrayList<Integer> primefactor(int n){
int sqrt = (int)Math.sqrt(n);
ArrayList<Integer> al = new ArrayList<>();
while(n%2==0){
al.add(2);
n/=2;
}
for(int i=3;i<=sqrt;i+=2){
while(n%i==0){
al.add(i);
n/=i;
}
}
if(n>2)
al.add(n);
return al;
}
public static long sum(long val){
long fg =0 ;
while(val!=0){
fg+=val%10;
val/=10;
}
return fg;
}
public static ArrayList<Long> factor(long n){
long sqrt = (long)Math.sqrt(n);
ArrayList<Long> al = new ArrayList<>();
for(long i=1;i<=sqrt;i++){
if(n%i!=0)
continue;
long first = i;
long second = n/i;
al.add(i);
if(first==second){
continue;
}
al.add(n/i);
}
return al;
}
public static ArrayList<Integer> comp(){
ArrayList<Integer> al = new ArrayList<>();
int n = (int)2e5;
boolean arr[] = new boolean[n+1];
int sqrt = (int)Math.sqrt(n);
for(int i=2;i<=sqrt;i++){
if(arr[i]==false){
for(int j=i*i;j<=n;j+=i){
arr[j]=true;
}
}
}
for(int i=2;i<=n;i++){
if(arr[i]==false)
al.add(i);
}
return al;
}
public static class pair{
int x;
int y;
pair(int a, int b){
x=a;
y=b;
}
}
public static class comp implements Comparator<pair>{
public int compare(pair o1, pair o2){
return o1.x-o2.x;
}
}
static class Node{
int node;
int d;
ArrayList<Integer> al = new ArrayList<>();
}
static int gcd(int a, int b)
{
if (b == 0)
return a;
return gcd(b, a % b);
}
static class FastReader
{
final private int BUFFER_SIZE = 1 << 16;
private DataInputStream din;
private byte[] buffer;
private int bufferPointer, bytesRead;
public FastReader()
{
din = new DataInputStream(System.in);
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
public FastReader(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[64]; // 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();
}
}
} |
[
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,
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
],
[
113,
5
],
[
113,
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
],
[
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
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
74,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
73,
85
],
[
85,
86
],
[
86,
87
],
[
73,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
72,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
96,
103
],
[
8,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
6,
110
],
[
110,
111
],
[
0,
112
],
[
112,
113
],
[
112,
114
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0 ; i < n ; i++) {\n for (int j = 0 ; j < 2 ; j++) {\n d[i][j] = sc.nextInt();\n }\n }\n int c = 0;\n for (int i = 0 ; i < n ; i++) {\n if (d[i][0] == d[i][1]) {\n c++;\n } else {\n c = 0;\n }\n if (c >= 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n }\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0 ; i < n ; i++) {\n for (int j = 0 ; j < 2 ; j++) {\n d[i][j] = sc.nextInt();\n }\n }\n int c = 0;\n for (int i = 0 ; i < n ; i++) {\n if (d[i][0] == d[i][1]) {\n c++;\n } else {\n c = 0;\n }\n if (c >= 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n }\n\n}",
"Main",
"public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0 ; i < n ; i++) {\n for (int j = 0 ; j < 2 ; j++) {\n d[i][j] = sc.nextInt();\n }\n }\n int c = 0;\n for (int i = 0 ; i < n ; i++) {\n if (d[i][0] == d[i][1]) {\n c++;\n } else {\n c = 0;\n }\n if (c >= 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n }",
"main",
"{\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0 ; i < n ; i++) {\n for (int j = 0 ; j < 2 ; j++) {\n d[i][j] = sc.nextInt();\n }\n }\n int c = 0;\n for (int i = 0 ; i < n ; i++) {\n if (d[i][0] == d[i][1]) {\n c++;\n } else {\n c = 0;\n }\n if (c >= 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n }",
"@SuppressWarnings(\"resource\")\n 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 for (int j = 0 ; j < 2 ; j++) {\n d[i][j] = sc.nextInt();\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 d[i][j] = sc.nextInt();\n }\n }",
"{\n for (int j = 0 ; j < 2 ; j++) {\n d[i][j] = sc.nextInt();\n }\n }",
"for (int j = 0 ; j < 2 ; j++) {\n d[i][j] = sc.nextInt();\n }",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < 2",
"j",
"2",
"j++",
"j++",
"j",
"{\n d[i][j] = sc.nextInt();\n }",
"{\n d[i][j] = sc.nextInt();\n }",
"d[i][j] = sc.nextInt()",
"d[i][j]",
"d[i]",
"d",
"i",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int c = 0;",
"c",
"0",
"for (int i = 0 ; i < n ; i++) {\n if (d[i][0] == d[i][1]) {\n c++;\n } else {\n c = 0;\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 if (d[i][0] == d[i][1]) {\n c++;\n } else {\n c = 0;\n }\n if (c >= 3) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"{\n if (d[i][0] == d[i][1]) {\n c++;\n } else {\n c = 0;\n }\n if (c >= 3) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"if (d[i][0] == d[i][1]) {\n c++;\n } else {\n c = 0;\n }",
"d[i][0] == d[i][1]",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"{\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\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0 ; i < n ; i++) {\n for (int j = 0 ; j < 2 ; j++) {\n d[i][j] = sc.nextInt();\n }\n }\n int c = 0;\n for (int i = 0 ; i < n ; i++) {\n if (d[i][0] == d[i][1]) {\n c++;\n } else {\n c = 0;\n }\n if (c >= 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n @SuppressWarnings(\"resource\")\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for (int i = 0 ; i < n ; i++) {\n for (int j = 0 ; j < 2 ; j++) {\n d[i][j] = sc.nextInt();\n }\n }\n int c = 0;\n for (int i = 0 ; i < n ; i++) {\n if (d[i][0] == d[i][1]) {\n c++;\n } else {\n c = 0;\n }\n if (c >= 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\n }\n\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
@SuppressWarnings("resource")
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 c = 0;
for (int i = 0 ; i < n ; i++) {
if (d[i][0] == d[i][1]) {
c++;
} else {
c = 0;
}
if (c >= 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,
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,
14,
2,
18,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
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
]
| [
[
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
],
[
28,
30
],
[
8,
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
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
8,
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
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
71,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
8,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
95,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
6,
113
],
[
113,
114
]
]
| [
"import java.util.Scanner;\nclass 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\tint[] arr=new int[n];\n\t\tint[] arr1=new int[n];\n\t\tint count=0,flag=0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tarr[i]=sc.nextInt();\n\t\t\tarr1[i]=sc.nextInt();\n\t\t}\n\t\tfor(int i=0;i<n;i++) \n\t\t{\n\t\t\t\t\n\t\t\tif(arr[i]==arr1[i])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tif(count>=3)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\tif(flag==1)\n\t\t{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"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\tint[] arr=new int[n];\n\t\tint[] arr1=new int[n];\n\t\tint count=0,flag=0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tarr[i]=sc.nextInt();\n\t\t\tarr1[i]=sc.nextInt();\n\t\t}\n\t\tfor(int i=0;i<n;i++) \n\t\t{\n\t\t\t\t\n\t\t\tif(arr[i]==arr1[i])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tif(count>=3)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\tif(flag==1)\n\t\t{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\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\tint[] arr=new int[n];\n\t\tint[] arr1=new int[n];\n\t\tint count=0,flag=0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tarr[i]=sc.nextInt();\n\t\t\tarr1[i]=sc.nextInt();\n\t\t}\n\t\tfor(int i=0;i<n;i++) \n\t\t{\n\t\t\t\t\n\t\t\tif(arr[i]==arr1[i])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tif(count>=3)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\tif(flag==1)\n\t\t{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse\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 n=sc.nextInt();\n\t\tint[] arr=new int[n];\n\t\tint[] arr1=new int[n];\n\t\tint count=0,flag=0;\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\t\tarr[i]=sc.nextInt();\n\t\t\tarr1[i]=sc.nextInt();\n\t\t}\n\t\tfor(int i=0;i<n;i++) \n\t\t{\n\t\t\t\t\n\t\t\tif(arr[i]==arr1[i])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tif(count>=3)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\t\n\t\t\n\t\tif(flag==1)\n\t\t{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse\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 n=sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[] arr=new int[n];",
"arr",
"new int[n]",
"n",
"int[] arr1=new int[n];",
"arr1",
"new int[n]",
"n",
"int count=0",
"count",
"0",
"flag=0;",
"flag",
"0",
"for(int i=0;i<n;i++)\n\t\t{\n\t\t\tarr[i]=sc.nextInt();\n\t\t\tarr1[i]=sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tarr[i]=sc.nextInt();\n\t\t\tarr1[i]=sc.nextInt();\n\t\t}",
"{\n\t\t\tarr[i]=sc.nextInt();\n\t\t\tarr1[i]=sc.nextInt();\n\t\t}",
"arr[i]=sc.nextInt()",
"arr[i]",
"arr",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"arr1[i]=sc.nextInt()",
"arr1[i]",
"arr1",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<n;i++) \n\t\t{\n\t\t\t\t\n\t\t\tif(arr[i]==arr1[i])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tif(count>=3)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcount=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\t\t\n\t\t\tif(arr[i]==arr1[i])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tif(count>=3)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\t\n\t\t}",
"{\n\t\t\t\t\n\t\t\tif(arr[i]==arr1[i])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tif(count>=3)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t\t\n\t\t}",
"if(arr[i]==arr1[i])\n\t\t\t{\n\t\t\t\tcount++;\n\t\t\t\tif(count>=3)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcount=0;\n\t\t\t}",
"arr[i]==arr1[i]",
"arr[i]",
"arr",
"i",
"arr1[i]",
"arr1",
"i",
"{\n\t\t\t\tcount++;\n\t\t\t\tif(count>=3)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}",
"count++",
"count",
"if(count>=3)\n\t\t\t\t{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}",
"count>=3",
"count",
"3",
"{\n\t\t\t\t\tflag=1;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t}",
"flag=1",
"flag",
"1",
"break;",
"{\n\t\t\t\tcount=0;\n\t\t\t}",
"count=0",
"count",
"0",
"if(flag==1)\n\t\t{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"flag==1",
"flag",
"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\"",
"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[] arr=new int[n];
int[] arr1=new int[n];
int count=0,flag=0;
for(int i=0;i<n;i++)
{
arr[i]=sc.nextInt();
arr1[i]=sc.nextInt();
}
for(int i=0;i<n;i++)
{
if(arr[i]==arr1[i])
{
count++;
if(count>=3)
{
flag=1;
break;
}
}
else
{
count=0;
}
}
if(flag==1)
{
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,
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,
18,
13,
13,
17,
29,
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
],
[
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
],
[
43,
49
],
[
49,
50
],
[
49,
51
],
[
32,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
56,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
6,
70
],
[
70,
71
],
[
0,
72
],
[
72,
73
],
[
72,
74
]
]
| [
"import java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n int n=sc.nextInt();\n int strike=0;\n for(int i=0;i<n;i++) {\n \t int x=sc.nextInt();\n \t int y=sc.nextInt();\n \t if(x==y)strike++;\n \t else strike=0;\n \t if(strike==3) {\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \t }\n }\n System.out.println(\"No\");\n\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n int n=sc.nextInt();\n int strike=0;\n for(int i=0;i<n;i++) {\n \t int x=sc.nextInt();\n \t int y=sc.nextInt();\n \t if(x==y)strike++;\n \t else strike=0;\n \t if(strike==3) {\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \t }\n }\n System.out.println(\"No\");\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n int n=sc.nextInt();\n int strike=0;\n for(int i=0;i<n;i++) {\n \t int x=sc.nextInt();\n \t int y=sc.nextInt();\n \t if(x==y)strike++;\n \t else strike=0;\n \t if(strike==3) {\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \t }\n }\n System.out.println(\"No\");\n\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n int n=sc.nextInt();\n int strike=0;\n for(int i=0;i<n;i++) {\n \t int x=sc.nextInt();\n \t int y=sc.nextInt();\n \t if(x==y)strike++;\n \t else strike=0;\n \t if(strike==3) {\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \t }\n }\n System.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 strike=0;",
"strike",
"0",
"for(int i=0;i<n;i++) {\n \t int x=sc.nextInt();\n \t int y=sc.nextInt();\n \t if(x==y)strike++;\n \t else strike=0;\n \t if(strike==3) {\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \t }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \t int x=sc.nextInt();\n \t int y=sc.nextInt();\n \t if(x==y)strike++;\n \t else strike=0;\n \t if(strike==3) {\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \t }\n }",
"{\n \t int x=sc.nextInt();\n \t int y=sc.nextInt();\n \t if(x==y)strike++;\n \t else strike=0;\n \t if(strike==3) {\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \t }\n }",
"int x=sc.nextInt();",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int y=sc.nextInt();",
"y",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(x==y)strike++;\n \t else strike=0;",
"x==y",
"x",
"y",
"strike++",
"strike",
"strike=0",
"strike",
"0",
"if(strike==3) {\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \t }",
"strike==3",
"strike",
"3",
"{\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \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 int n=sc.nextInt();\n int strike=0;\n for(int i=0;i<n;i++) {\n \t int x=sc.nextInt();\n \t int y=sc.nextInt();\n \t if(x==y)strike++;\n \t else strike=0;\n \t if(strike==3) {\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \t }\n }\n System.out.println(\"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 int n=sc.nextInt();\n int strike=0;\n for(int i=0;i<n;i++) {\n \t int x=sc.nextInt();\n \t int y=sc.nextInt();\n \t if(x==y)strike++;\n \t else strike=0;\n \t if(strike==3) {\n \t\t System.out.println(\"Yes\");\n \t\t return;\n \t }\n }\n System.out.println(\"No\");\n\n\t}\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 strike=0;
for(int i=0;i<n;i++) {
int x=sc.nextInt();
int y=sc.nextInt();
if(x==y)strike++;
else strike=0;
if(strike==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,
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,
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,
13,
17,
30,
0,
13,
17,
3,
30,
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
],
[
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
],
[
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
],
[
55,
57
],
[
8,
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
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
71,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
8,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
95,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
6,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
]
| [
"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 n=sc.nextInt();\n\t\tint a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tboolean flag=false;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t\tb[i]=sc.nextInt();\n\t\t}\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(a[i]==b[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\t\tif(flag)\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",
"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 a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tboolean flag=false;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t\tb[i]=sc.nextInt();\n\t\t}\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(a[i]==b[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\t\tif(flag)\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 a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tboolean flag=false;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t\tb[i]=sc.nextInt();\n\t\t}\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(a[i]==b[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\t\tif(flag)\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 a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tboolean flag=false;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t\tb[i]=sc.nextInt();\n\t\t}\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(a[i]==b[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\t\tif(flag)\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 a[]=new int[n];",
"a",
"new int[n]",
"n",
"int b[]=new int[n];",
"b",
"new int[n]",
"n",
"boolean flag=false;",
"flag",
"false",
"for(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t\tb[i]=sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ta[i]=sc.nextInt();\n\t\t\tb[i]=sc.nextInt();\n\t\t}",
"{\n\t\t\ta[i]=sc.nextInt();\n\t\t\tb[i]=sc.nextInt();\n\t\t}",
"a[i]=sc.nextInt()",
"a[i]",
"a",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b[i]=sc.nextInt()",
"b[i]",
"b",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count=0;",
"count",
"0",
"for(int i=0;i<n;i++) {\n\t\t\tif(a[i]==b[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount=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\tif(a[i]==b[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(a[i]==b[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}",
"if(a[i]==b[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}",
"a[i]==b[i]",
"a[i]",
"a",
"i",
"b[i]",
"b",
"i",
"{\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"count++",
"count",
"if(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"count==3",
"count",
"3",
"{\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"flag=true",
"flag",
"true",
"break;",
"{\n\t\t\t\tcount=0;\n\t\t\t}",
"count=0",
"count",
"0",
"if(flag)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.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\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tboolean flag=false;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t\tb[i]=sc.nextInt();\n\t\t}\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(a[i]==b[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\t\tif(flag)\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 a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tboolean flag=false;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=sc.nextInt();\n\t\t\tb[i]=sc.nextInt();\n\t\t}\n\t\tint count=0;\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tif(a[i]==b[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count==3) {\n\t\t\t\t\tflag=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\t\tif(flag)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.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 a[]=new int[n];
int b[]=new int[n];
boolean flag=false;
for(int i=0;i<n;i++) {
a[i]=sc.nextInt();
b[i]=sc.nextInt();
}
int count=0;
for(int i=0;i<n;i++) {
if(a[i]==b[i]) {
count++;
if(count==3) {
flag=true;
break;
}
}
else {
count=0;
}
}
if(flag)
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,
0,
13,
17,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
4,
18,
13,
14,
13,
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
],
[
88,
5
],
[
88,
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
],
[
51,
53
],
[
46,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
35,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
8,
66
],
[
66,
67
],
[
67,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
69,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
6,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.Scanner;\n\n// 提出時にclass Main に書き換え\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(); // int Nを受け取る\n\t\tint zolo = 0; // ゾロ目が連続して出た回数\n\t\tboolean three = false; // ゾロ目が3回連続して出たフラグ\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tint D1 = sc.nextInt(); // int D1を受け取る\n\t\t\tint D2 = sc.nextInt(); // int D2を受け取る\n\t\t\tif(D1 == D2) {\n\t\t\t\tzolo += 1;\n\t\t\t} else {\n\t\t\t\tzolo = 0;\n\t\t\t}\n\t\t\tif(zolo == 3) {\n\t\t\t\tthree = true;\n\t\t\t}\n\t\t}\n\t\tsc.close(); // 標準入力を終了\n\n\t\tif (three) {\n\t\t\t// ゾロ目が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\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(); // int Nを受け取る\n\t\tint zolo = 0; // ゾロ目が連続して出た回数\n\t\tboolean three = false; // ゾロ目が3回連続して出たフラグ\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tint D1 = sc.nextInt(); // int D1を受け取る\n\t\t\tint D2 = sc.nextInt(); // int D2を受け取る\n\t\t\tif(D1 == D2) {\n\t\t\t\tzolo += 1;\n\t\t\t} else {\n\t\t\t\tzolo = 0;\n\t\t\t}\n\t\t\tif(zolo == 3) {\n\t\t\t\tthree = true;\n\t\t\t}\n\t\t}\n\t\tsc.close(); // 標準入力を終了\n\n\t\tif (three) {\n\t\t\t// ゾロ目が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\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(); // int Nを受け取る\n\t\tint zolo = 0; // ゾロ目が連続して出た回数\n\t\tboolean three = false; // ゾロ目が3回連続して出たフラグ\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tint D1 = sc.nextInt(); // int D1を受け取る\n\t\t\tint D2 = sc.nextInt(); // int D2を受け取る\n\t\t\tif(D1 == D2) {\n\t\t\t\tzolo += 1;\n\t\t\t} else {\n\t\t\t\tzolo = 0;\n\t\t\t}\n\t\t\tif(zolo == 3) {\n\t\t\t\tthree = true;\n\t\t\t}\n\t\t}\n\t\tsc.close(); // 標準入力を終了\n\n\t\tif (three) {\n\t\t\t// ゾロ目が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\t\t// 標準入力を受け取る\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt(); // int Nを受け取る\n\t\tint zolo = 0; // ゾロ目が連続して出た回数\n\t\tboolean three = false; // ゾロ目が3回連続して出たフラグ\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tint D1 = sc.nextInt(); // int D1を受け取る\n\t\t\tint D2 = sc.nextInt(); // int D2を受け取る\n\t\t\tif(D1 == D2) {\n\t\t\t\tzolo += 1;\n\t\t\t} else {\n\t\t\t\tzolo = 0;\n\t\t\t}\n\t\t\tif(zolo == 3) {\n\t\t\t\tthree = true;\n\t\t\t}\n\t\t}\n\t\tsc.close(); // 標準入力を終了\n\n\t\tif (three) {\n\t\t\t// ゾロ目が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 N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int zolo = 0;",
"zolo",
"0",
"boolean three = false;",
"three",
"false",
"for(int i = 0; i < N; i++) {\n\t\t\tint D1 = sc.nextInt(); // int D1を受け取る\n\t\t\tint D2 = sc.nextInt(); // int D2を受け取る\n\t\t\tif(D1 == D2) {\n\t\t\t\tzolo += 1;\n\t\t\t} else {\n\t\t\t\tzolo = 0;\n\t\t\t}\n\t\t\tif(zolo == 3) {\n\t\t\t\tthree = 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 D1 = sc.nextInt(); // int D1を受け取る\n\t\t\tint D2 = sc.nextInt(); // int D2を受け取る\n\t\t\tif(D1 == D2) {\n\t\t\t\tzolo += 1;\n\t\t\t} else {\n\t\t\t\tzolo = 0;\n\t\t\t}\n\t\t\tif(zolo == 3) {\n\t\t\t\tthree = true;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint D1 = sc.nextInt(); // int D1を受け取る\n\t\t\tint D2 = sc.nextInt(); // int D2を受け取る\n\t\t\tif(D1 == D2) {\n\t\t\t\tzolo += 1;\n\t\t\t} else {\n\t\t\t\tzolo = 0;\n\t\t\t}\n\t\t\tif(zolo == 3) {\n\t\t\t\tthree = true;\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\tzolo += 1;\n\t\t\t} else {\n\t\t\t\tzolo = 0;\n\t\t\t}",
"D1 == D2",
"D1",
"D2",
"{\n\t\t\t\tzolo += 1;\n\t\t\t}",
"zolo += 1",
"zolo",
"1",
"{\n\t\t\t\tzolo = 0;\n\t\t\t}",
"zolo = 0",
"zolo",
"0",
"if(zolo == 3) {\n\t\t\t\tthree = true;\n\t\t\t}",
"zolo == 3",
"zolo",
"3",
"{\n\t\t\t\tthree = true;\n\t\t\t}",
"three = true",
"three",
"true",
"sc.close()",
"sc.close",
"sc",
"if (three) {\n\t\t\t// ゾロ目が3回以上続けて出た\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"three",
"{\n\t\t\t// ゾロ目が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\t\t// 標準入力を受け取る\n\t\tScanner sc = new Scanner(System.in);\n\t\tint N = sc.nextInt(); // int Nを受け取る\n\t\tint zolo = 0; // ゾロ目が連続して出た回数\n\t\tboolean three = false; // ゾロ目が3回連続して出たフラグ\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tint D1 = sc.nextInt(); // int D1を受け取る\n\t\t\tint D2 = sc.nextInt(); // int D2を受け取る\n\t\t\tif(D1 == D2) {\n\t\t\t\tzolo += 1;\n\t\t\t} else {\n\t\t\t\tzolo = 0;\n\t\t\t}\n\t\t\tif(zolo == 3) {\n\t\t\t\tthree = true;\n\t\t\t}\n\t\t}\n\t\tsc.close(); // 標準入力を終了\n\n\t\tif (three) {\n\t\t\t// ゾロ目が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\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(); // int Nを受け取る\n\t\tint zolo = 0; // ゾロ目が連続して出た回数\n\t\tboolean three = false; // ゾロ目が3回連続して出たフラグ\n\t\tfor(int i = 0; i < N; i++) {\n\t\t\tint D1 = sc.nextInt(); // int D1を受け取る\n\t\t\tint D2 = sc.nextInt(); // int D2を受け取る\n\t\t\tif(D1 == D2) {\n\t\t\t\tzolo += 1;\n\t\t\t} else {\n\t\t\t\tzolo = 0;\n\t\t\t}\n\t\t\tif(zolo == 3) {\n\t\t\t\tthree = true;\n\t\t\t}\n\t\t}\n\t\tsc.close(); // 標準入力を終了\n\n\t\tif (three) {\n\t\t\t// ゾロ目が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\n}",
"Main"
]
| import java.util.Scanner;
// 提出時にclass Main に書き換え
public class Main {
public static void main(String[] args) {
// 標準入力を受け取る
Scanner sc = new Scanner(System.in);
int N = sc.nextInt(); // int Nを受け取る
int zolo = 0; // ゾロ目が連続して出た回数
boolean three = false; // ゾロ目が3回連続して出たフラグ
for(int i = 0; i < N; i++) {
int D1 = sc.nextInt(); // int D1を受け取る
int D2 = sc.nextInt(); // int D2を受け取る
if(D1 == D2) {
zolo += 1;
} else {
zolo = 0;
}
if(zolo == 3) {
three = true;
}
}
sc.close(); // 標準入力を終了
if (three) {
// ゾロ目が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,
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,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
17,
41,
13,
20,
2,
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,
18,
13,
2,
13,
17,
2,
18,
13,
13,
17,
30,
0,
18,
13,
2,
13,
17,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
41,
13,
17,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
29,
4,
18,
13,
29,
17,
12,
13,
30,
42,
2,
2,
13,
17,
2,
13,
18,
13,
13,
30,
0,
13,
4,
18,
4,
13,
17,
0,
13,
17,
29,
18,
13,
40,
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,
29,
20,
12,
13,
30,
29,
20,
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,
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,
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,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
0,
18,
13,
13,
4,
18,
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
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
21
],
[
0,
22
],
[
22,
23
],
[
22,
24
],
[
0,
25
],
[
494,
26
],
[
494,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
29,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
29,
40
],
[
40,
41
],
[
40,
42
],
[
29,
43
],
[
43,
44
],
[
43,
45
],
[
29,
46
],
[
46,
47
],
[
46,
48
],
[
29,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
49,
53
],
[
49,
54
],
[
29,
55
],
[
55,
56
],
[
56,
57
],
[
27,
58
],
[
58,
59
],
[
494,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
72,
76
],
[
64,
77
],
[
77,
78
],
[
77,
79
],
[
80,
81
],
[
80,
82
],
[
64,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
83,
94
],
[
95,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
97,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
96,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
96,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
121,
127
],
[
64,
128
],
[
128,
129
],
[
128,
130
],
[
64,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
136,
137
],
[
136,
138
],
[
131,
139
],
[
139,
140
],
[
140,
141
],
[
131,
142
],
[
143,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
144,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
64,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
157,
158
],
[
158,
159
],
[
157,
160
],
[
154,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
162,
165
],
[
62,
166
],
[
166,
167
],
[
62,
168
],
[
168,
169
],
[
62,
170
],
[
170,
171
],
[
494,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
172,
176
],
[
176,
177
],
[
172,
178
],
[
178,
179
],
[
178,
180
],
[
172,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
181,
187
],
[
187,
188
],
[
172,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
192,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
191,
204
],
[
204,
205
],
[
172,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
210,
214
],
[
214,
215
],
[
214,
216
],
[
216,
217
],
[
216,
218
],
[
209,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
222,
226
],
[
219,
227
],
[
227,
228
],
[
227,
229
],
[
208,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
172,
235
],
[
235,
236
],
[
235,
237
],
[
237,
238
],
[
238,
239
],
[
239,
240
],
[
240,
241
],
[
239,
242
],
[
242,
243
],
[
172,
244
],
[
244,
245
],
[
244,
246
],
[
246,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
248,
251
],
[
251,
252
],
[
172,
253
],
[
253,
254
],
[
253,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
257,
260
],
[
260,
261
],
[
172,
262
],
[
262,
263
],
[
262,
264
],
[
264,
265
],
[
265,
266
],
[
172,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
270,
271
],
[
172,
272
],
[
272,
273
],
[
272,
274
],
[
274,
275
],
[
275,
276
],
[
275,
277
],
[
274,
279
],
[
279,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
279,
284
],
[
284,
285
],
[
284,
286
],
[
279,
287
],
[
287,
288
],
[
288,
289
],
[
279,
290
],
[
291,
291
],
[
291,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
292,
296
],
[
296,
297
],
[
274,
298
],
[
298,
299
],
[
272,
300
],
[
300,
301
],
[
172,
302
],
[
302,
303
],
[
302,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
304,
309
],
[
309,
310
],
[
310,
311
],
[
311,
312
],
[
311,
313
],
[
309,
314
],
[
314,
315
],
[
314,
316
],
[
309,
317
],
[
317,
318
],
[
318,
319
],
[
309,
320
],
[
321,
321
],
[
321,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
322,
326
],
[
326,
327
],
[
304,
328
],
[
328,
329
],
[
302,
330
],
[
330,
331
],
[
172,
332
],
[
332,
333
],
[
332,
334
],
[
334,
335
],
[
335,
336
],
[
335,
337
],
[
334,
339
],
[
339,
340
],
[
340,
341
],
[
341,
342
],
[
341,
343
],
[
339,
344
],
[
344,
345
],
[
344,
346
],
[
339,
347
],
[
347,
348
],
[
348,
349
],
[
339,
350
],
[
351,
351
],
[
351,
352
],
[
352,
353
],
[
353,
354
],
[
353,
355
],
[
352,
356
],
[
356,
357
],
[
334,
358
],
[
358,
359
],
[
332,
360
],
[
360,
361
],
[
172,
362
],
[
362,
363
],
[
362,
364
],
[
364,
365
],
[
365,
366
],
[
365,
367
],
[
364,
370
],
[
370,
371
],
[
371,
372
],
[
372,
373
],
[
372,
374
],
[
370,
375
],
[
375,
376
],
[
375,
377
],
[
370,
378
],
[
378,
379
],
[
379,
380
],
[
370,
381
],
[
382,
382
],
[
382,
383
],
[
383,
384
],
[
384,
385
],
[
385,
386
],
[
385,
387
],
[
383,
388
],
[
388,
389
],
[
388,
390
],
[
383,
391
],
[
391,
392
],
[
392,
393
],
[
383,
394
],
[
395,
395
],
[
395,
396
],
[
396,
397
],
[
397,
398
],
[
398,
399
],
[
398,
400
],
[
397,
401
],
[
396,
402
],
[
402,
403
],
[
364,
404
],
[
404,
405
],
[
362,
406
],
[
406,
407
],
[
362,
408
],
[
408,
409
],
[
172,
410
],
[
410,
411
],
[
410,
412
],
[
412,
413
],
[
413,
414
],
[
413,
415
],
[
412,
418
],
[
418,
419
],
[
419,
420
],
[
420,
421
],
[
420,
422
],
[
418,
423
],
[
423,
424
],
[
423,
425
],
[
418,
426
],
[
426,
427
],
[
427,
428
],
[
418,
429
],
[
430,
430
],
[
430,
431
],
[
431,
432
],
[
432,
433
],
[
433,
434
],
[
433,
435
],
[
431,
436
],
[
436,
437
],
[
436,
438
],
[
431,
439
],
[
439,
440
],
[
440,
441
],
[
431,
442
],
[
443,
443
],
[
443,
444
],
[
444,
445
],
[
445,
446
],
[
446,
447
],
[
446,
448
],
[
445,
449
],
[
444,
450
],
[
450,
451
],
[
412,
452
],
[
452,
453
],
[
410,
454
],
[
454,
455
],
[
410,
456
],
[
456,
457
],
[
172,
458
],
[
458,
459
],
[
458,
460
],
[
460,
461
],
[
461,
462
],
[
461,
463
],
[
460,
465
],
[
465,
466
],
[
466,
467
],
[
467,
468
],
[
467,
469
],
[
465,
470
],
[
470,
471
],
[
470,
472
],
[
465,
473
],
[
473,
474
],
[
474,
475
],
[
465,
476
],
[
477,
477
],
[
477,
478
],
[
478,
479
],
[
478,
480
],
[
480,
481
],
[
477,
482
],
[
482,
483
],
[
483,
484
],
[
483,
485
],
[
482,
486
],
[
486,
487
],
[
487,
488
],
[
460,
489
],
[
489,
490
],
[
458,
491
],
[
491,
492
],
[
0,
493
],
[
493,
494
],
[
493,
495
]
]
| [
"\nimport 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.math.BigDecimal;\nimport java.math.BigInteger;\n\npublic class Main {\npublic static void main(String[] args) {\n\tInputStream inputStream = System.in;\n\tOutputStream outputStream = System.out;\n\tFastInput in = new FastInput(inputStream);\n\tPrintWriter out = new PrintWriter(outputStream);\n\tABC179B solver = new ABC179B();\n\tsolver.solve(1, in, out);\n\tout.close();\n}\n\nstatic class ABC179B {\n\n\tpublic void solve(int testNum, FastInput in, PrintWriter out) {\n\t\t\n\t\tint n = in.nextInt();\n\t\tint [][]a = in.nextInt2DArray(n, 2);\n\t\t\n\t\tint []sum = new int [n+1];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tif(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean f = false;\n\n\t\tfor(int i = 1; i <= n ; i++) {\n\t\t\tif(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(f){\n\t\t\tout.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tout.println(\"No\");\n\t\t}\n\t}\n\n}\nstatic class FastInput{\n\tprivate final BufferedReader in;\n\tprivate String[] buff;\n\tprivate int index = 0;\n\t\n\tpublic FastInput(InputStream is) {\n\t\tin = new BufferedReader(new InputStreamReader(is));\n\t}\n\tString nextLine() {\n\t\ttry {\n\t\t\treturn in.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}\n\tString next() {\n\t\twhile (buff == null || index >= buff.length) {\n\t\t\tbuff = nextLine().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\t\treturn buff[index++];\n\t}\n\tint nextInt() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t\n\tlong nextLong() {\n\t\treturn Long.parseLong(next());\n\t}\n\t\n\tDouble nextDouble() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t\n\tBigInteger nextBigInteger() {\n\t\treturn new BigInteger(next());\n\t}\n\t\n\tBigDecimal nextBigDecimal() {\n\t\treturn new BigDecimal(next());\n\t}\n\t\n\tpublic int[] nextIntArray(final int n) {\n\t\tfinal int[] res = new int [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextInt();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic long[] nextLongArray(final int n) {\n\t\tfinal long[] res= new long [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextLong();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic double[] nextDoubleArray(final int n ) {\n\t\tfinal double[] res = new double [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextDouble();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t\n\tpublic int[][] nextInt2DArray(final int n , final int m){\n\t\tint [][]res = new int [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\tpublic long[][] nextLong2DArray(final int n , final int m){\n\t\tlong [][]res = new long [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic char[][] nextChar2DArray(final int n){\n\t\tchar [][]res = new char [n][];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tString s = next();\n\t\t\tres[i] = s.toCharArray();\n\t\t}\n\t\t\n\t\treturn res;\n\t}\n}\n}\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.io.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"public class Main {\npublic static void main(String[] args) {\n\tInputStream inputStream = System.in;\n\tOutputStream outputStream = System.out;\n\tFastInput in = new FastInput(inputStream);\n\tPrintWriter out = new PrintWriter(outputStream);\n\tABC179B solver = new ABC179B();\n\tsolver.solve(1, in, out);\n\tout.close();\n}\n\nstatic class ABC179B {\n\n\tpublic void solve(int testNum, FastInput in, PrintWriter out) {\n\t\t\n\t\tint n = in.nextInt();\n\t\tint [][]a = in.nextInt2DArray(n, 2);\n\t\t\n\t\tint []sum = new int [n+1];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tif(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean f = false;\n\n\t\tfor(int i = 1; i <= n ; i++) {\n\t\t\tif(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(f){\n\t\t\tout.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tout.println(\"No\");\n\t\t}\n\t}\n\n}\nstatic class FastInput{\n\tprivate final BufferedReader in;\n\tprivate String[] buff;\n\tprivate int index = 0;\n\t\n\tpublic FastInput(InputStream is) {\n\t\tin = new BufferedReader(new InputStreamReader(is));\n\t}\n\tString nextLine() {\n\t\ttry {\n\t\t\treturn in.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}\n\tString next() {\n\t\twhile (buff == null || index >= buff.length) {\n\t\t\tbuff = nextLine().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\t\treturn buff[index++];\n\t}\n\tint nextInt() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t\n\tlong nextLong() {\n\t\treturn Long.parseLong(next());\n\t}\n\t\n\tDouble nextDouble() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t\n\tBigInteger nextBigInteger() {\n\t\treturn new BigInteger(next());\n\t}\n\t\n\tBigDecimal nextBigDecimal() {\n\t\treturn new BigDecimal(next());\n\t}\n\t\n\tpublic int[] nextIntArray(final int n) {\n\t\tfinal int[] res = new int [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextInt();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic long[] nextLongArray(final int n) {\n\t\tfinal long[] res= new long [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextLong();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic double[] nextDoubleArray(final int n ) {\n\t\tfinal double[] res = new double [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextDouble();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t\n\tpublic int[][] nextInt2DArray(final int n , final int m){\n\t\tint [][]res = new int [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\tpublic long[][] nextLong2DArray(final int n , final int m){\n\t\tlong [][]res = new long [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic char[][] nextChar2DArray(final int n){\n\t\tchar [][]res = new char [n][];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tString s = next();\n\t\t\tres[i] = s.toCharArray();\n\t\t}\n\t\t\n\t\treturn res;\n\t}\n}\n}",
"Main",
"public static void main(String[] args) {\n\tInputStream inputStream = System.in;\n\tOutputStream outputStream = System.out;\n\tFastInput in = new FastInput(inputStream);\n\tPrintWriter out = new PrintWriter(outputStream);\n\tABC179B solver = new ABC179B();\n\tsolver.solve(1, in, out);\n\tout.close();\n}",
"main",
"{\n\tInputStream inputStream = System.in;\n\tOutputStream outputStream = System.out;\n\tFastInput in = new FastInput(inputStream);\n\tPrintWriter out = new PrintWriter(outputStream);\n\tABC179B solver = new ABC179B();\n\tsolver.solve(1, in, out);\n\tout.close();\n}",
"InputStream inputStream = System.in;",
"inputStream",
"System.in",
"System",
"System.in",
"OutputStream outputStream = System.out;",
"outputStream",
"System.out",
"System",
"System.out",
"FastInput in = new FastInput(inputStream);",
"in",
"new FastInput(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"ABC179B solver = new ABC179B();",
"solver",
"new ABC179B()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class ABC179B {\n\n\tpublic void solve(int testNum, FastInput in, PrintWriter out) {\n\t\t\n\t\tint n = in.nextInt();\n\t\tint [][]a = in.nextInt2DArray(n, 2);\n\t\t\n\t\tint []sum = new int [n+1];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tif(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean f = false;\n\n\t\tfor(int i = 1; i <= n ; i++) {\n\t\t\tif(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(f){\n\t\t\tout.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tout.println(\"No\");\n\t\t}\n\t}\n\n}",
"ABC179B",
"public void solve(int testNum, FastInput in, PrintWriter out) {\n\t\t\n\t\tint n = in.nextInt();\n\t\tint [][]a = in.nextInt2DArray(n, 2);\n\t\t\n\t\tint []sum = new int [n+1];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tif(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean f = false;\n\n\t\tfor(int i = 1; i <= n ; i++) {\n\t\t\tif(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(f){\n\t\t\tout.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tout.println(\"No\");\n\t\t}\n\t}",
"solve",
"{\n\t\t\n\t\tint n = in.nextInt();\n\t\tint [][]a = in.nextInt2DArray(n, 2);\n\t\t\n\t\tint []sum = new int [n+1];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tif(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean f = false;\n\n\t\tfor(int i = 1; i <= n ; i++) {\n\t\t\tif(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(f){\n\t\t\tout.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tout.println(\"No\");\n\t\t}\n\t}",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int [][]a = in.nextInt2DArray(n, 2);",
"a",
"in.nextInt2DArray(n, 2)",
"in.nextInt2DArray",
"in",
"n",
"2",
"int []sum = new int [n+1];",
"sum",
"new int [n+1]",
"n+1",
"n",
"1",
"for(int i = 0 ; i < n ;i++) {\n\t\t\tif(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 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\tif(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}\n\t\t}",
"if(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}",
"a[i][0] == a[i][1]",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"{\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}",
"sum[i+1] = sum[i] + 1",
"sum[i+1]",
"sum",
"i+1",
"i",
"1",
"sum[i] + 1",
"sum[i]",
"sum",
"i",
"1",
"{\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}",
"sum[i+1] = 0",
"sum[i+1]",
"sum",
"i+1",
"i",
"1",
"0",
"boolean f = false;",
"f",
"false",
"for(int i = 1; i <= n ; i++) {\n\t\t\tif(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tif(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}",
"if(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}",
"sum[i] >= 3",
"sum[i]",
"sum",
"i",
"3",
"{\n\t\t\t\tf = true;\n\t\t\t}",
"f = true",
"f",
"true",
"if(f){\n\t\t\tout.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tout.println(\"No\");\n\t\t}",
"f",
"{\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\"",
"int testNum",
"testNum",
"FastInput in",
"in",
"PrintWriter out",
"out",
"static class FastInput{\n\tprivate final BufferedReader in;\n\tprivate String[] buff;\n\tprivate int index = 0;\n\t\n\tpublic FastInput(InputStream is) {\n\t\tin = new BufferedReader(new InputStreamReader(is));\n\t}\n\tString nextLine() {\n\t\ttry {\n\t\t\treturn in.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}\n\tString next() {\n\t\twhile (buff == null || index >= buff.length) {\n\t\t\tbuff = nextLine().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\t\treturn buff[index++];\n\t}\n\tint nextInt() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t\n\tlong nextLong() {\n\t\treturn Long.parseLong(next());\n\t}\n\t\n\tDouble nextDouble() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t\n\tBigInteger nextBigInteger() {\n\t\treturn new BigInteger(next());\n\t}\n\t\n\tBigDecimal nextBigDecimal() {\n\t\treturn new BigDecimal(next());\n\t}\n\t\n\tpublic int[] nextIntArray(final int n) {\n\t\tfinal int[] res = new int [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextInt();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic long[] nextLongArray(final int n) {\n\t\tfinal long[] res= new long [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextLong();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic double[] nextDoubleArray(final int n ) {\n\t\tfinal double[] res = new double [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextDouble();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t\n\tpublic int[][] nextInt2DArray(final int n , final int m){\n\t\tint [][]res = new int [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\tpublic long[][] nextLong2DArray(final int n , final int m){\n\t\tlong [][]res = new long [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic char[][] nextChar2DArray(final int n){\n\t\tchar [][]res = new char [n][];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tString s = next();\n\t\t\tres[i] = s.toCharArray();\n\t\t}\n\t\t\n\t\treturn res;\n\t}\n}",
"FastInput",
"private final BufferedReader in;",
"in",
"private String[] buff;",
"buff",
"private int index = 0;",
"index",
"0",
"public FastInput(InputStream is) {\n\t\tin = new BufferedReader(new InputStreamReader(is));\n\t}",
"FastInput",
"{\n\t\tin = new BufferedReader(new InputStreamReader(is));\n\t}",
"in = new BufferedReader(new InputStreamReader(is))",
"in",
"new BufferedReader(new InputStreamReader(is))",
"InputStream is",
"is",
"String nextLine() {\n\t\ttry {\n\t\t\treturn in.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"nextLine",
"{\n\t\ttry {\n\t\t\treturn in.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"try {\n\t\t\treturn in.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\treturn in.readLine();\n\t\t}",
"return in.readLine();",
"in.readLine()",
"in.readLine",
"in",
"return null;",
"null",
"String next() {\n\t\twhile (buff == null || index >= buff.length) {\n\t\t\tbuff = nextLine().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\t\treturn buff[index++];\n\t}",
"next",
"{\n\t\twhile (buff == null || index >= buff.length) {\n\t\t\tbuff = nextLine().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\t\treturn buff[index++];\n\t}",
"while (buff == null || index >= buff.length) {\n\t\t\tbuff = nextLine().split(\" \");\n\t\t\tindex = 0;\n\t\t}",
"buff == null || index >= buff.length",
"buff == null",
"buff",
"null",
"index >= buff.length",
"index",
"buff.length",
"buff",
"buff.length",
"{\n\t\t\tbuff = nextLine().split(\" \");\n\t\t\tindex = 0;\n\t\t}",
"buff = nextLine().split(\" \")",
"buff",
"nextLine().split(\" \")",
"nextLine().split",
"nextLine()",
"nextLine",
"\" \"",
"index = 0",
"index",
"0",
"return buff[index++];",
"buff[index++]",
"buff",
"index++",
"index",
"int nextInt() {\n\t\treturn Integer.parseInt(next());\n\t}",
"nextInt",
"{\n\t\treturn Integer.parseInt(next());\n\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"long nextLong() {\n\t\treturn Long.parseLong(next());\n\t}",
"nextLong",
"{\n\t\treturn Long.parseLong(next());\n\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"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",
"BigInteger nextBigInteger() {\n\t\treturn new BigInteger(next());\n\t}",
"nextBigInteger",
"{\n\t\treturn new BigInteger(next());\n\t}",
"return new BigInteger(next());",
"new BigInteger(next())",
"BigDecimal nextBigDecimal() {\n\t\treturn new BigDecimal(next());\n\t}",
"nextBigDecimal",
"{\n\t\treturn new BigDecimal(next());\n\t}",
"return new BigDecimal(next());",
"new BigDecimal(next())",
"public int[] nextIntArray(final int n) {\n\t\tfinal int[] res = new int [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextInt();\n\t\t}\n\t\treturn res;\n\t}",
"nextIntArray",
"{\n\t\tfinal int[] res = new int [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextInt();\n\t\t}\n\t\treturn res;\n\t}",
"final int[] res = new int [n];",
"res",
"new int [n]",
"n",
"for(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextInt();\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tres[i] = nextInt();\n\t\t}",
"{\n\t\t\tres[i] = nextInt();\n\t\t}",
"res[i] = nextInt()",
"res[i]",
"res",
"i",
"nextInt()",
"nextInt",
"return res;",
"res",
"final int n",
"n",
"public long[] nextLongArray(final int n) {\n\t\tfinal long[] res= new long [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextLong();\n\t\t}\n\t\treturn res;\n\t}",
"nextLongArray",
"{\n\t\tfinal long[] res= new long [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextLong();\n\t\t}\n\t\treturn res;\n\t}",
"final long[] res= new long [n];",
"res",
"new long [n]",
"n",
"for(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextLong();\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tres[i] = nextLong();\n\t\t}",
"{\n\t\t\tres[i] = nextLong();\n\t\t}",
"res[i] = nextLong()",
"res[i]",
"res",
"i",
"nextLong()",
"nextLong",
"return res;",
"res",
"final int n",
"n",
"public double[] nextDoubleArray(final int n ) {\n\t\tfinal double[] res = new double [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextDouble();\n\t\t}\n\t\treturn res;\n\t}",
"nextDoubleArray",
"{\n\t\tfinal double[] res = new double [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextDouble();\n\t\t}\n\t\treturn res;\n\t}",
"final double[] res = new double [n];",
"res",
"new double [n]",
"n",
"for(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextDouble();\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tres[i] = nextDouble();\n\t\t}",
"{\n\t\t\tres[i] = nextDouble();\n\t\t}",
"res[i] = nextDouble()",
"res[i]",
"res",
"i",
"nextDouble()",
"nextDouble",
"return res;",
"res",
"final int n",
"n",
"public int[][] nextInt2DArray(final int n , final int m){\n\t\tint [][]res = new int [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"nextInt2DArray",
"{\n\t\tint [][]res = new int [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"int [][]res = new int [n][m];",
"res",
"new int [n][m]",
"n",
"m",
"for(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = 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 < m ;j++) {\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}\n\t\t}",
"for(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"{\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}",
"{\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}",
"res[i][j] = nextInt()",
"res[i][j]",
"res[i]",
"res",
"i",
"j",
"nextInt()",
"nextInt",
"return res;",
"res",
"final int n",
"n",
"final int m",
"m",
"public long[][] nextLong2DArray(final int n , final int m){\n\t\tlong [][]res = new long [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"nextLong2DArray",
"{\n\t\tlong [][]res = new long [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"long [][]res = new long [n][m];",
"res",
"new long [n][m]",
"n",
"m",
"for(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\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 < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}\n\t\t}",
"for(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < m",
"j",
"m",
"j++",
"j++",
"j",
"{\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}",
"{\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}",
"res[i][j] = nextLong()",
"res[i][j]",
"res[i]",
"res",
"i",
"j",
"nextLong()",
"nextLong",
"return res;",
"res",
"final int n",
"n",
"final int m",
"m",
"public char[][] nextChar2DArray(final int n){\n\t\tchar [][]res = new char [n][];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tString s = next();\n\t\t\tres[i] = s.toCharArray();\n\t\t}\n\t\t\n\t\treturn res;\n\t}",
"nextChar2DArray",
"{\n\t\tchar [][]res = new char [n][];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tString s = next();\n\t\t\tres[i] = s.toCharArray();\n\t\t}\n\t\t\n\t\treturn res;\n\t}",
"char [][]res = new char [n][];",
"res",
"new char [n][]",
"n",
"for(int i = 0 ; i < n ;i++) {\n\t\t\tString s = next();\n\t\t\tres[i] = s.toCharArray();\n\t\t}",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tString s = next();\n\t\t\tres[i] = s.toCharArray();\n\t\t}",
"{\n\t\t\tString s = next();\n\t\t\tres[i] = s.toCharArray();\n\t\t}",
"String s = next();",
"s",
"next()",
"next",
"res[i] = s.toCharArray()",
"res[i]",
"res",
"i",
"s.toCharArray()",
"s.toCharArray",
"s",
"return res;",
"res",
"final int n",
"n",
"public class Main {\npublic static void main(String[] args) {\n\tInputStream inputStream = System.in;\n\tOutputStream outputStream = System.out;\n\tFastInput in = new FastInput(inputStream);\n\tPrintWriter out = new PrintWriter(outputStream);\n\tABC179B solver = new ABC179B();\n\tsolver.solve(1, in, out);\n\tout.close();\n}\n\nstatic class ABC179B {\n\n\tpublic void solve(int testNum, FastInput in, PrintWriter out) {\n\t\t\n\t\tint n = in.nextInt();\n\t\tint [][]a = in.nextInt2DArray(n, 2);\n\t\t\n\t\tint []sum = new int [n+1];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tif(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean f = false;\n\n\t\tfor(int i = 1; i <= n ; i++) {\n\t\t\tif(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(f){\n\t\t\tout.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tout.println(\"No\");\n\t\t}\n\t}\n\n}\nstatic class FastInput{\n\tprivate final BufferedReader in;\n\tprivate String[] buff;\n\tprivate int index = 0;\n\t\n\tpublic FastInput(InputStream is) {\n\t\tin = new BufferedReader(new InputStreamReader(is));\n\t}\n\tString nextLine() {\n\t\ttry {\n\t\t\treturn in.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}\n\tString next() {\n\t\twhile (buff == null || index >= buff.length) {\n\t\t\tbuff = nextLine().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\t\treturn buff[index++];\n\t}\n\tint nextInt() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t\n\tlong nextLong() {\n\t\treturn Long.parseLong(next());\n\t}\n\t\n\tDouble nextDouble() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t\n\tBigInteger nextBigInteger() {\n\t\treturn new BigInteger(next());\n\t}\n\t\n\tBigDecimal nextBigDecimal() {\n\t\treturn new BigDecimal(next());\n\t}\n\t\n\tpublic int[] nextIntArray(final int n) {\n\t\tfinal int[] res = new int [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextInt();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic long[] nextLongArray(final int n) {\n\t\tfinal long[] res= new long [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextLong();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic double[] nextDoubleArray(final int n ) {\n\t\tfinal double[] res = new double [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextDouble();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t\n\tpublic int[][] nextInt2DArray(final int n , final int m){\n\t\tint [][]res = new int [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\tpublic long[][] nextLong2DArray(final int n , final int m){\n\t\tlong [][]res = new long [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic char[][] nextChar2DArray(final int n){\n\t\tchar [][]res = new char [n][];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tString s = next();\n\t\t\tres[i] = s.toCharArray();\n\t\t}\n\t\t\n\t\treturn res;\n\t}\n}\n}",
"public class Main {\npublic static void main(String[] args) {\n\tInputStream inputStream = System.in;\n\tOutputStream outputStream = System.out;\n\tFastInput in = new FastInput(inputStream);\n\tPrintWriter out = new PrintWriter(outputStream);\n\tABC179B solver = new ABC179B();\n\tsolver.solve(1, in, out);\n\tout.close();\n}\n\nstatic class ABC179B {\n\n\tpublic void solve(int testNum, FastInput in, PrintWriter out) {\n\t\t\n\t\tint n = in.nextInt();\n\t\tint [][]a = in.nextInt2DArray(n, 2);\n\t\t\n\t\tint []sum = new int [n+1];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tif(a[i][0] == a[i][1]) {\n\t\t\t\tsum[i+1] = sum[i] + 1; \n\t\t\t}\n\t\t\telse {\n\t\t\t\tsum[i+1] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tboolean f = false;\n\n\t\tfor(int i = 1; i <= n ; i++) {\n\t\t\tif(sum[i] >= 3) {\n\t\t\t\tf = true;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(f){\n\t\t\tout.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tout.println(\"No\");\n\t\t}\n\t}\n\n}\nstatic class FastInput{\n\tprivate final BufferedReader in;\n\tprivate String[] buff;\n\tprivate int index = 0;\n\t\n\tpublic FastInput(InputStream is) {\n\t\tin = new BufferedReader(new InputStreamReader(is));\n\t}\n\tString nextLine() {\n\t\ttry {\n\t\t\treturn in.readLine();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}\n\tString next() {\n\t\twhile (buff == null || index >= buff.length) {\n\t\t\tbuff = nextLine().split(\" \");\n\t\t\tindex = 0;\n\t\t}\n\t\treturn buff[index++];\n\t}\n\tint nextInt() {\n\t\treturn Integer.parseInt(next());\n\t}\n\t\n\tlong nextLong() {\n\t\treturn Long.parseLong(next());\n\t}\n\t\n\tDouble nextDouble() {\n\t\treturn Double.parseDouble(next());\n\t}\n\t\n\tBigInteger nextBigInteger() {\n\t\treturn new BigInteger(next());\n\t}\n\t\n\tBigDecimal nextBigDecimal() {\n\t\treturn new BigDecimal(next());\n\t}\n\t\n\tpublic int[] nextIntArray(final int n) {\n\t\tfinal int[] res = new int [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextInt();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic long[] nextLongArray(final int n) {\n\t\tfinal long[] res= new long [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextLong();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic double[] nextDoubleArray(final int n ) {\n\t\tfinal double[] res = new double [n];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tres[i] = nextDouble();\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t\n\tpublic int[][] nextInt2DArray(final int n , final int m){\n\t\tint [][]res = new int [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextInt();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\tpublic long[][] nextLong2DArray(final int n , final int m){\n\t\tlong [][]res = new long [n][m];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tfor(int j = 0 ; j < m ;j++) {\n\t\t\t\tres[i][j] = nextLong();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\tpublic char[][] nextChar2DArray(final int n){\n\t\tchar [][]res = new char [n][];\n\t\t\n\t\tfor(int i = 0 ; i < n ;i++) {\n\t\t\tString s = next();\n\t\t\tres[i] = s.toCharArray();\n\t\t}\n\t\t\n\t\treturn res;\n\t}\n}\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.math.BigDecimal;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
FastInput in = new FastInput(inputStream);
PrintWriter out = new PrintWriter(outputStream);
ABC179B solver = new ABC179B();
solver.solve(1, in, out);
out.close();
}
static class ABC179B {
public void solve(int testNum, FastInput in, PrintWriter out) {
int n = in.nextInt();
int [][]a = in.nextInt2DArray(n, 2);
int []sum = new int [n+1];
for(int i = 0 ; i < n ;i++) {
if(a[i][0] == a[i][1]) {
sum[i+1] = sum[i] + 1;
}
else {
sum[i+1] = 0;
}
}
boolean f = false;
for(int i = 1; i <= n ; i++) {
if(sum[i] >= 3) {
f = true;
}
}
if(f){
out.println("Yes");
}
else {
out.println("No");
}
}
}
static class FastInput{
private final BufferedReader in;
private String[] buff;
private int index = 0;
public FastInput(InputStream is) {
in = new BufferedReader(new InputStreamReader(is));
}
String nextLine() {
try {
return in.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return null;
}
String next() {
while (buff == null || index >= buff.length) {
buff = nextLine().split(" ");
index = 0;
}
return buff[index++];
}
int nextInt() {
return Integer.parseInt(next());
}
long nextLong() {
return Long.parseLong(next());
}
Double nextDouble() {
return Double.parseDouble(next());
}
BigInteger nextBigInteger() {
return new BigInteger(next());
}
BigDecimal nextBigDecimal() {
return new BigDecimal(next());
}
public int[] nextIntArray(final int n) {
final int[] res = new int [n];
for(int i = 0 ; i < n ;i++) {
res[i] = nextInt();
}
return res;
}
public long[] nextLongArray(final int n) {
final long[] res= new long [n];
for(int i = 0 ; i < n ;i++) {
res[i] = nextLong();
}
return res;
}
public double[] nextDoubleArray(final int n ) {
final double[] res = new double [n];
for(int i = 0 ; i < n ;i++) {
res[i] = nextDouble();
}
return res;
}
public int[][] nextInt2DArray(final int n , final int m){
int [][]res = new int [n][m];
for(int i = 0 ; i < n ;i++) {
for(int j = 0 ; j < m ;j++) {
res[i][j] = nextInt();
}
}
return res;
}
public long[][] nextLong2DArray(final int n , final int m){
long [][]res = new long [n][m];
for(int i = 0 ; i < n ;i++) {
for(int j = 0 ; j < m ;j++) {
res[i][j] = nextLong();
}
}
return res;
}
public char[][] nextChar2DArray(final int n){
char [][]res = new char [n][];
for(int i = 0 ; i < n ;i++) {
String s = next();
res[i] = s.toCharArray();
}
return res;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
18,
13,
13,
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,
13,
17,
0,
13,
17,
14,
40,
13,
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
],
[
182,
14
],
[
182,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
17,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
17,
31
],
[
31,
32
],
[
31,
33
],
[
17,
34
],
[
34,
35
],
[
34,
36
],
[
17,
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
],
[
53,
54
],
[
49,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
60,
66
],
[
66,
67
],
[
66,
68
],
[
49,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
73,
75
],
[
17,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
76,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
15,
91
],
[
91,
92
],
[
182,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
93,
97
],
[
97,
98
],
[
93,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
93,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
108,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
118,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
107,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
93,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
137,
140
],
[
140,
141
],
[
93,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
149,
150
],
[
93,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
158,
159
],
[
93,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
162,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
166,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
162,
179
],
[
179,
180
],
[
0,
181
],
[
181,
182
],
[
181,
183
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n\n public static void main(String[] args) {\n FastReader fs = new FastReader();\n final int inf = Integer.MAX_VALUE;\n int n = fs.nextInt();\n boolean ok = false;\n int cnt = 0;\n for (int i = 0; i < n; i ++) {\n int x = fs.nextInt();\n int y = fs.nextInt();\n if (x == y) cnt ++;\n else cnt = 0;\n if (cnt >= 3) ok = true;\n }\n if (!ok) System.out.println(\"No\");\n else System.out.println(\"Yes\");\n\n\n\n\n\n }\n\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n 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.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n FastReader fs = new FastReader();\n final int inf = Integer.MAX_VALUE;\n int n = fs.nextInt();\n boolean ok = false;\n int cnt = 0;\n for (int i = 0; i < n; i ++) {\n int x = fs.nextInt();\n int y = fs.nextInt();\n if (x == y) cnt ++;\n else cnt = 0;\n if (cnt >= 3) ok = true;\n }\n if (!ok) System.out.println(\"No\");\n else System.out.println(\"Yes\");\n\n\n\n\n\n }\n\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n 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 void main(String[] args) {\n FastReader fs = new FastReader();\n final int inf = Integer.MAX_VALUE;\n int n = fs.nextInt();\n boolean ok = false;\n int cnt = 0;\n for (int i = 0; i < n; i ++) {\n int x = fs.nextInt();\n int y = fs.nextInt();\n if (x == y) cnt ++;\n else cnt = 0;\n if (cnt >= 3) ok = true;\n }\n if (!ok) System.out.println(\"No\");\n else System.out.println(\"Yes\");\n\n\n\n\n\n }",
"main",
"{\n FastReader fs = new FastReader();\n final int inf = Integer.MAX_VALUE;\n int n = fs.nextInt();\n boolean ok = false;\n int cnt = 0;\n for (int i = 0; i < n; i ++) {\n int x = fs.nextInt();\n int y = fs.nextInt();\n if (x == y) cnt ++;\n else cnt = 0;\n if (cnt >= 3) ok = true;\n }\n if (!ok) System.out.println(\"No\");\n else System.out.println(\"Yes\");\n\n\n\n\n\n }",
"FastReader fs = new FastReader();",
"fs",
"new FastReader()",
"final int inf = Integer.MAX_VALUE;",
"inf",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"int n = fs.nextInt();",
"n",
"fs.nextInt()",
"fs.nextInt",
"fs",
"boolean ok = false;",
"ok",
"false",
"int cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < n; i ++) {\n int x = fs.nextInt();\n int y = fs.nextInt();\n if (x == y) cnt ++;\n else cnt = 0;\n if (cnt >= 3) ok = true;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i ++",
"i ++",
"i",
"{\n int x = fs.nextInt();\n int y = fs.nextInt();\n if (x == y) cnt ++;\n else cnt = 0;\n if (cnt >= 3) ok = true;\n }",
"{\n int x = fs.nextInt();\n int y = fs.nextInt();\n if (x == y) cnt ++;\n else cnt = 0;\n if (cnt >= 3) ok = true;\n }",
"int x = fs.nextInt();",
"x",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int y = fs.nextInt();",
"y",
"fs.nextInt()",
"fs.nextInt",
"fs",
"if (x == y) cnt ++;\n else cnt = 0;",
"x == y",
"x",
"y",
"cnt ++",
"cnt",
"cnt = 0",
"cnt",
"0",
"if (cnt >= 3) ok = true;",
"cnt >= 3",
"cnt",
"3",
"ok = true",
"ok",
"true",
"if (!ok) System.out.println(\"No\");\n else System.out.println(\"Yes\");",
"!ok",
"ok",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"String[] args",
"args",
"static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n 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 }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }",
"FastReader",
"{\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 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\n public static void main(String[] args) {\n FastReader fs = new FastReader();\n final int inf = Integer.MAX_VALUE;\n int n = fs.nextInt();\n boolean ok = false;\n int cnt = 0;\n for (int i = 0; i < n; i ++) {\n int x = fs.nextInt();\n int y = fs.nextInt();\n if (x == y) cnt ++;\n else cnt = 0;\n if (cnt >= 3) ok = true;\n }\n if (!ok) System.out.println(\"No\");\n else System.out.println(\"Yes\");\n\n\n\n\n\n }\n\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n 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\n public static void main(String[] args) {\n FastReader fs = new FastReader();\n final int inf = Integer.MAX_VALUE;\n int n = fs.nextInt();\n boolean ok = false;\n int cnt = 0;\n for (int i = 0; i < n; i ++) {\n int x = fs.nextInt();\n int y = fs.nextInt();\n if (x == y) cnt ++;\n else cnt = 0;\n if (cnt >= 3) ok = true;\n }\n if (!ok) System.out.println(\"No\");\n else System.out.println(\"Yes\");\n\n\n\n\n\n }\n\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader() {\n br = new BufferedReader(new\n 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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
FastReader fs = new FastReader();
final int inf = Integer.MAX_VALUE;
int n = fs.nextInt();
boolean ok = false;
int cnt = 0;
for (int i = 0; i < n; i ++) {
int x = fs.nextInt();
int y = fs.nextInt();
if (x == y) cnt ++;
else cnt = 0;
if (cnt >= 3) ok = true;
}
if (!ok) System.out.println("No");
else System.out.println("Yes");
}
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
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,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
0,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
18,
13,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
18,
13,
18,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
2,
13,
17,
13,
1,
40,
13,
30,
30,
14,
4,
13,
13,
30,
0,
13,
17,
3,
14,
13,
30,
4,
18,
18,
13,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
14,
2,
2,
4,
13,
13,
4,
13,
2,
13,
17,
4,
13,
2,
13,
17,
30,
29,
17,
30,
29,
17,
23,
13,
12,
13,
30,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
29,
17,
30,
29,
17,
23,
13,
12,
13,
30,
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
],
[
197,
11
],
[
197,
12
],
[
12,
13
],
[
197,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
16,
23
],
[
23,
24
],
[
23,
25
],
[
16,
26
],
[
26,
27
],
[
27,
28
],
[
16,
29
],
[
29,
30
],
[
30,
31
],
[
14,
32
],
[
32,
33
],
[
197,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
36,
45
],
[
45,
46
],
[
45,
47
],
[
36,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
65,
70
],
[
62,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
71,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
62,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
36,
95
],
[
95,
96
],
[
95,
97
],
[
36,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
98,
108
],
[
108,
109
],
[
109,
110
],
[
98,
111
],
[
112,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
36,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
125,
130
],
[
122,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
34,
138
],
[
138,
139
],
[
197,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
145,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
151,
153
],
[
145,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
156,
158
],
[
143,
159
],
[
159,
160
],
[
160,
161
],
[
143,
162
],
[
162,
163
],
[
163,
164
],
[
140,
165
],
[
165,
166
],
[
197,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
171,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
181
],
[
170,
182
],
[
182,
183
],
[
183,
184
],
[
170,
185
],
[
185,
186
],
[
186,
187
],
[
167,
188
],
[
188,
189
],
[
197,
190
],
[
190,
191
],
[
190,
192
],
[
197,
193
],
[
193,
194
],
[
193,
195
],
[
0,
196
],
[
196,
197
],
[
196,
198
]
]
| [
"import java.util.*;\nimport java.io.*;\nimport java.nio.charset.StandardCharsets;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tint[][] D;\n\n\tMain(BufferedReader in) throws IOException {\n\t\tint N = Integer.parseInt(in.readLine());\n\t\tD = new int[N][2];\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tString[] tokens = in.readLine().split(\" \");\n\t\t\tD[i][0] = Integer.parseInt(tokens[0]);\n\t\t\tD[i][1] = Integer.parseInt(tokens[1]);\n\t\t}\n\n\t\tboolean result = false;\n\t\tfor (int i = 0; i + 2 < N; ++i) {\n\t\t\tif (check(i)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (result) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n\tboolean check(int i) {\n\t\tif (isSame(i) && isSame(i + 1) && isSame(i + 2)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tboolean isSame(int i) {\n\t\tif (D[i][0] == D[i][1]) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tvoid calc() {\n\t}\n\n\tvoid showResult() {\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.nio.charset.StandardCharsets;",
"StandardCharsets",
"java.nio.charset",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tint[][] D;\n\n\tMain(BufferedReader in) throws IOException {\n\t\tint N = Integer.parseInt(in.readLine());\n\t\tD = new int[N][2];\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tString[] tokens = in.readLine().split(\" \");\n\t\t\tD[i][0] = Integer.parseInt(tokens[0]);\n\t\t\tD[i][1] = Integer.parseInt(tokens[1]);\n\t\t}\n\n\t\tboolean result = false;\n\t\tfor (int i = 0; i + 2 < N; ++i) {\n\t\t\tif (check(i)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (result) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n\tboolean check(int i) {\n\t\tif (isSame(i) && isSame(i + 1) && isSame(i + 2)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tboolean isSame(int i) {\n\t\tif (D[i][0] == D[i][1]) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tvoid calc() {\n\t}\n\n\tvoid showResult() {\n\t}\n}",
"Main",
"int[][] D;",
"D",
"public static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}",
"main",
"{\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}",
"InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);",
"reader",
"new InputStreamReader(System.in, StandardCharsets.UTF_8)",
"BufferedReader in = new BufferedReader(reader);",
"in",
"new BufferedReader(reader)",
"Main ins = new Main(in);",
"ins",
"new Main(in)",
"ins.calc()",
"ins.calc",
"ins",
"ins.showResult()",
"ins.showResult",
"ins",
"String[] args",
"args",
"Main(BufferedReader in) throws IOException {\n\t\tint N = Integer.parseInt(in.readLine());\n\t\tD = new int[N][2];\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tString[] tokens = in.readLine().split(\" \");\n\t\t\tD[i][0] = Integer.parseInt(tokens[0]);\n\t\t\tD[i][1] = Integer.parseInt(tokens[1]);\n\t\t}\n\n\t\tboolean result = false;\n\t\tfor (int i = 0; i + 2 < N; ++i) {\n\t\t\tif (check(i)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (result) {\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\t\tint N = Integer.parseInt(in.readLine());\n\t\tD = new int[N][2];\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tString[] tokens = in.readLine().split(\" \");\n\t\t\tD[i][0] = Integer.parseInt(tokens[0]);\n\t\t\tD[i][1] = Integer.parseInt(tokens[1]);\n\t\t}\n\n\t\tboolean result = false;\n\t\tfor (int i = 0; i + 2 < N; ++i) {\n\t\t\tif (check(i)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (result) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"int N = Integer.parseInt(in.readLine());",
"N",
"Integer.parseInt(in.readLine())",
"Integer.parseInt",
"Integer",
"in.readLine()",
"in.readLine",
"in",
"D = new int[N][2]",
"D",
"new int[N][2]",
"N",
"2",
"for (int i = 0; i < N; ++i) {\n\t\t\tString[] tokens = in.readLine().split(\" \");\n\t\t\tD[i][0] = Integer.parseInt(tokens[0]);\n\t\t\tD[i][1] = Integer.parseInt(tokens[1]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"++i",
"++i",
"i",
"{\n\t\t\tString[] tokens = in.readLine().split(\" \");\n\t\t\tD[i][0] = Integer.parseInt(tokens[0]);\n\t\t\tD[i][1] = Integer.parseInt(tokens[1]);\n\t\t}",
"{\n\t\t\tString[] tokens = in.readLine().split(\" \");\n\t\t\tD[i][0] = Integer.parseInt(tokens[0]);\n\t\t\tD[i][1] = Integer.parseInt(tokens[1]);\n\t\t}",
"String[] tokens = in.readLine().split(\" \");",
"tokens",
"in.readLine().split(\" \")",
"in.readLine().split",
"in.readLine()",
"in.readLine",
"in",
"\" \"",
"D[i][0] = Integer.parseInt(tokens[0])",
"D[i][0]",
"D[i]",
"D",
"i",
"0",
"Integer.parseInt(tokens[0])",
"Integer.parseInt",
"Integer",
"tokens[0]",
"tokens",
"0",
"D[i][1] = Integer.parseInt(tokens[1])",
"D[i][1]",
"D[i]",
"D",
"i",
"1",
"Integer.parseInt(tokens[1])",
"Integer.parseInt",
"Integer",
"tokens[1]",
"tokens",
"1",
"boolean result = false;",
"result",
"false",
"for (int i = 0; i + 2 < N; ++i) {\n\t\t\tif (check(i)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i + 2 < N",
"i + 2",
"i",
"2",
"N",
"++i",
"++i",
"i",
"{\n\t\t\tif (check(i)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (check(i)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if (check(i)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}",
"check(i)",
"check",
"i",
"{\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}",
"result = true",
"result",
"true",
"break;",
"if (result) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"result",
"{\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\"",
"BufferedReader in",
"in",
"boolean check(int i) {\n\t\tif (isSame(i) && isSame(i + 1) && isSame(i + 2)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"check",
"{\n\t\tif (isSame(i) && isSame(i + 1) && isSame(i + 2)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"if (isSame(i) && isSame(i + 1) && isSame(i + 2)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}",
"isSame(i) && isSame(i + 1) && isSame(i + 2)",
"isSame(i) && isSame(i + 1) && isSame(i + 2)",
"isSame(i)",
"isSame",
"i",
"isSame(i + 1)",
"isSame",
"i + 1",
"i",
"1",
"isSame(i + 2)",
"isSame",
"i + 2",
"i",
"2",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"int i",
"i",
"boolean isSame(int i) {\n\t\tif (D[i][0] == D[i][1]) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"isSame",
"{\n\t\tif (D[i][0] == D[i][1]) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"if (D[i][0] == D[i][1]) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\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\treturn true;\n\t\t}",
"return true;",
"true",
"{\n\t\t\treturn false;\n\t\t}",
"return false;",
"false",
"int i",
"i",
"void calc() {\n\t}",
"calc",
"{\n\t}",
"void showResult() {\n\t}",
"showResult",
"{\n\t}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tint[][] D;\n\n\tMain(BufferedReader in) throws IOException {\n\t\tint N = Integer.parseInt(in.readLine());\n\t\tD = new int[N][2];\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tString[] tokens = in.readLine().split(\" \");\n\t\t\tD[i][0] = Integer.parseInt(tokens[0]);\n\t\t\tD[i][1] = Integer.parseInt(tokens[1]);\n\t\t}\n\n\t\tboolean result = false;\n\t\tfor (int i = 0; i + 2 < N; ++i) {\n\t\t\tif (check(i)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (result) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n\tboolean check(int i) {\n\t\tif (isSame(i) && isSame(i + 1) && isSame(i + 2)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tboolean isSame(int i) {\n\t\tif (D[i][0] == D[i][1]) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tvoid calc() {\n\t}\n\n\tvoid showResult() {\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\t\tInputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);\n\t\tBufferedReader in = new BufferedReader(reader);\n\t\tMain ins = new Main(in);\n\t\tins.calc();\n\t\tins.showResult();\n\t}\n\n\tint[][] D;\n\n\tMain(BufferedReader in) throws IOException {\n\t\tint N = Integer.parseInt(in.readLine());\n\t\tD = new int[N][2];\n\t\tfor (int i = 0; i < N; ++i) {\n\t\t\tString[] tokens = in.readLine().split(\" \");\n\t\t\tD[i][0] = Integer.parseInt(tokens[0]);\n\t\t\tD[i][1] = Integer.parseInt(tokens[1]);\n\t\t}\n\n\t\tboolean result = false;\n\t\tfor (int i = 0; i + 2 < N; ++i) {\n\t\t\tif (check(i)) {\n\t\t\t\tresult = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (result) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t} else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}\n\n\tboolean check(int i) {\n\t\tif (isSame(i) && isSame(i + 1) && isSame(i + 2)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tboolean isSame(int i) {\n\t\tif (D[i][0] == D[i][1]) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tvoid calc() {\n\t}\n\n\tvoid showResult() {\n\t}\n}",
"Main"
]
| import java.util.*;
import java.io.*;
import java.nio.charset.StandardCharsets;
public class Main {
public static void main(String[] args) throws IOException {
InputStreamReader reader = new InputStreamReader(System.in, StandardCharsets.UTF_8);
BufferedReader in = new BufferedReader(reader);
Main ins = new Main(in);
ins.calc();
ins.showResult();
}
int[][] D;
Main(BufferedReader in) throws IOException {
int N = Integer.parseInt(in.readLine());
D = new int[N][2];
for (int i = 0; i < N; ++i) {
String[] tokens = in.readLine().split(" ");
D[i][0] = Integer.parseInt(tokens[0]);
D[i][1] = Integer.parseInt(tokens[1]);
}
boolean result = false;
for (int i = 0; i + 2 < N; ++i) {
if (check(i)) {
result = true;
break;
}
}
if (result) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
boolean check(int i) {
if (isSame(i) && isSame(i + 1) && isSame(i + 2)) {
return true;
} else {
return false;
}
}
boolean isSame(int i) {
if (D[i][0] == D[i][1]) {
return true;
} else {
return false;
}
}
void calc() {
}
void showResult() {
}
} |
[
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,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
84,
5
],
[
84,
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
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
]
| [
"import java.util.*;\n\npublic class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int count = 0;\n boolean key = false;\n for (int i = 0; i < N; i++) {\n int D1 = sc.nextInt();\n int D2 = sc.nextInt();\n if (D1 == D2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n key = true;\n }\n }\n if (key) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int count = 0;\n boolean key = false;\n for (int i = 0; i < N; i++) {\n int D1 = sc.nextInt();\n int D2 = sc.nextInt();\n if (D1 == D2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n key = true;\n }\n }\n if (key) {\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 count = 0;\n boolean key = false;\n for (int i = 0; i < N; i++) {\n int D1 = sc.nextInt();\n int D2 = sc.nextInt();\n if (D1 == D2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n key = true;\n }\n }\n if (key) {\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 count = 0;\n boolean key = false;\n for (int i = 0; i < N; i++) {\n int D1 = sc.nextInt();\n int D2 = sc.nextInt();\n if (D1 == D2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n key = true;\n }\n }\n if (key) {\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 count = 0;",
"count",
"0",
"boolean key = false;",
"key",
"false",
"for (int i = 0; i < N; i++) {\n int D1 = sc.nextInt();\n int D2 = sc.nextInt();\n if (D1 == D2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n key = true;\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 count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n key = true;\n }\n }",
"{\n int D1 = sc.nextInt();\n int D2 = sc.nextInt();\n if (D1 == D2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n key = true;\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 } 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 key = true;\n }",
"count == 3",
"count",
"3",
"{\n key = true;\n }",
"key = true",
"key",
"true",
"if (key) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"key",
"{\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 \n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int count = 0;\n boolean key = false;\n for (int i = 0; i < N; i++) {\n int D1 = sc.nextInt();\n int D2 = sc.nextInt();\n if (D1 == D2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n key = true;\n }\n }\n if (key) {\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 Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int count = 0;\n boolean key = false;\n for (int i = 0; i < N; i++) {\n int D1 = sc.nextInt();\n int D2 = sc.nextInt();\n if (D1 == D2) {\n count++;\n } else {\n count = 0;\n }\n if (count == 3) {\n key = true;\n }\n }\n if (key) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\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 count = 0;
boolean key = false;
for (int i = 0; i < N; i++) {
int D1 = sc.nextInt();
int D2 = sc.nextInt();
if (D1 == D2) {
count++;
} else {
count = 0;
}
if (count == 3) {
key = true;
}
}
if (key) {
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,
42,
2,
40,
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,
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
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
23,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
28,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
28,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
39,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
8,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
58,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
6,
76
],
[
76,
77
]
]
| [
"import java.util.*;\nclass Main {\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int c=0;\n int flg=0;\n while(n-->0){\n int x = sc.nextInt();\n int y = sc.nextInt();\n \n if(x==y){\n c++;\n if(c>=3){\n flg=1;\n }\n }\n else{\n c=0;\n }\n }\n if(flg==0){\n System.out.println(\"No\");\n }\n else{\n System.out.println(\"Yes\");\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 c=0;\n int flg=0;\n while(n-->0){\n int x = sc.nextInt();\n int y = sc.nextInt();\n \n if(x==y){\n c++;\n if(c>=3){\n flg=1;\n }\n }\n else{\n c=0;\n }\n }\n if(flg==0){\n System.out.println(\"No\");\n }\n else{\n System.out.println(\"Yes\");\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int c=0;\n int flg=0;\n while(n-->0){\n int x = sc.nextInt();\n int y = sc.nextInt();\n \n if(x==y){\n c++;\n if(c>=3){\n flg=1;\n }\n }\n else{\n c=0;\n }\n }\n if(flg==0){\n System.out.println(\"No\");\n }\n else{\n System.out.println(\"Yes\");\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int c=0;\n int flg=0;\n while(n-->0){\n int x = sc.nextInt();\n int y = sc.nextInt();\n \n if(x==y){\n c++;\n if(c>=3){\n flg=1;\n }\n }\n else{\n c=0;\n }\n }\n if(flg==0){\n System.out.println(\"No\");\n }\n else{\n System.out.println(\"Yes\");\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",
"int flg=0;",
"flg",
"0",
"while(n-->0){\n int x = sc.nextInt();\n int y = sc.nextInt();\n \n if(x==y){\n c++;\n if(c>=3){\n flg=1;\n }\n }\n else{\n c=0;\n }\n }",
"n-->0",
"n--",
"n",
"0",
"{\n int x = sc.nextInt();\n int y = sc.nextInt();\n \n if(x==y){\n c++;\n if(c>=3){\n flg=1;\n }\n }\n else{\n c=0;\n }\n }",
"int x = sc.nextInt();",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int y = sc.nextInt();",
"y",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(x==y){\n c++;\n if(c>=3){\n flg=1;\n }\n }\n else{\n c=0;\n }",
"x==y",
"x",
"y",
"{\n c++;\n if(c>=3){\n flg=1;\n }\n }",
"c++",
"c",
"if(c>=3){\n flg=1;\n }",
"c>=3",
"c",
"3",
"{\n flg=1;\n }",
"flg=1",
"flg",
"1",
"{\n c=0;\n }",
"c=0",
"c",
"0",
"if(flg==0){\n System.out.println(\"No\");\n }\n else{\n System.out.println(\"Yes\");\n }",
"flg==0",
"flg",
"0",
"{\n System.out.println(\"No\");\n }",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"{\n System.out.println(\"Yes\");\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"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 c=0;
int flg=0;
while(n-->0){
int x = sc.nextInt();
int y = sc.nextInt();
if(x==y){
c++;
if(c>=3){
flg=1;
}
}
else{
c=0;
}
}
if(flg==0){
System.out.println("No");
}
else{
System.out.println("Yes");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
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,
14,
2,
18,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
3,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
96,
5
],
[
96,
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,
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
],
[
40,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
40,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
63,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
70,
77
],
[
55,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
8,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
6,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
]
| [
"import java.util.*;\npublic class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt(),f=0;\n int[] d1=new int[n],d2=new int[n];\n for(int i=0;i<n;i++){\n d1[i]=sc.nextInt();\n d2[i]=sc.nextInt();\n if(d1[i]==d2[i]){\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }else{\n f=0;\n }\n }\n if(f<3){\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 sc = new Scanner(System.in);\n int n=sc.nextInt(),f=0;\n int[] d1=new int[n],d2=new int[n];\n for(int i=0;i<n;i++){\n d1[i]=sc.nextInt();\n d2[i]=sc.nextInt();\n if(d1[i]==d2[i]){\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }else{\n f=0;\n }\n }\n if(f<3){\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(),f=0;\n int[] d1=new int[n],d2=new int[n];\n for(int i=0;i<n;i++){\n d1[i]=sc.nextInt();\n d2[i]=sc.nextInt();\n if(d1[i]==d2[i]){\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }else{\n f=0;\n }\n }\n if(f<3){\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt(),f=0;\n int[] d1=new int[n],d2=new int[n];\n for(int i=0;i<n;i++){\n d1[i]=sc.nextInt();\n d2[i]=sc.nextInt();\n if(d1[i]==d2[i]){\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }else{\n f=0;\n }\n }\n if(f<3){\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",
"f=0;",
"f",
"0",
"int[] d1=new int[n]",
"d1",
"new int[n]",
"n",
"d2=new int[n];",
"d2",
"new int[n]",
"n",
"for(int i=0;i<n;i++){\n d1[i]=sc.nextInt();\n d2[i]=sc.nextInt();\n if(d1[i]==d2[i]){\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }else{\n f=0;\n }\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 if(d1[i]==d2[i]){\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }else{\n f=0;\n }\n }",
"{\n d1[i]=sc.nextInt();\n d2[i]=sc.nextInt();\n if(d1[i]==d2[i]){\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }else{\n f=0;\n }\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",
"if(d1[i]==d2[i]){\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }else{\n f=0;\n }",
"d1[i]==d2[i]",
"d1[i]",
"d1",
"i",
"d2[i]",
"d2",
"i",
"{\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }",
"f++",
"f",
"if(f==3){\n System.out.println(\"Yes\");\n break;\n }",
"f==3",
"f",
"3",
"{\n System.out.println(\"Yes\");\n break;\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"break;",
"{\n f=0;\n }",
"f=0",
"f",
"0",
"if(f<3){\n System.out.println(\"No\");\n }",
"f<3",
"f",
"3",
"{\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 sc = new Scanner(System.in);\n int n=sc.nextInt(),f=0;\n int[] d1=new int[n],d2=new int[n];\n for(int i=0;i<n;i++){\n d1[i]=sc.nextInt();\n d2[i]=sc.nextInt();\n if(d1[i]==d2[i]){\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }else{\n f=0;\n }\n }\n if(f<3){\n System.out.println(\"No\");\n }\n }\n}",
"public class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n=sc.nextInt(),f=0;\n int[] d1=new int[n],d2=new int[n];\n for(int i=0;i<n;i++){\n d1[i]=sc.nextInt();\n d2[i]=sc.nextInt();\n if(d1[i]==d2[i]){\n f++;\n if(f==3){\n System.out.println(\"Yes\");\n break;\n }\n }else{\n f=0;\n }\n }\n if(f<3){\n System.out.println(\"No\");\n }\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(),f=0;
int[] d1=new int[n],d2=new int[n];
for(int i=0;i<n;i++){
d1[i]=sc.nextInt();
d2[i]=sc.nextInt();
if(d1[i]==d2[i]){
f++;
if(f==3){
System.out.println("Yes");
break;
}
}else{
f=0;
}
}
if(f<3){
System.out.println("No");
}
}
} |
[
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,
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,
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,
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
],
[
121,
8
],
[
121,
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
],
[
26,
28
],
[
11,
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
],
[
11,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
62,
73
],
[
74,
74
],
[
74,
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
],
[
87,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
75,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
11,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
100,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
9,
118
],
[
118,
119
],
[
0,
120
],
[
120,
121
],
[
120,
122
]
]
| [
"import java.io.IOException;\nimport java.util.Scanner;\n\npublic class Main {\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int n = Integer.parseInt(sc.nextLine());\n int counter = 0;\n\n int[][] result = new int[n][2];\n for(int i=0; i < n; i++){\n result[i][0] = sc.nextInt();\n result[i][1] = sc.nextInt();\n }\n\n for(int i=0; i< n; i++){\n if(result[i][0] == result[i][1]){\n counter++;\n if(counter == 3){\n break;\n }\n }else {\n counter = 0;\n }\n }\n\n if(counter == 3){\n System.out.println(\"Yes\");\n }else {\n System.out.println((\"No\"));\n }\n\n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int n = Integer.parseInt(sc.nextLine());\n int counter = 0;\n\n int[][] result = new int[n][2];\n for(int i=0; i < n; i++){\n result[i][0] = sc.nextInt();\n result[i][1] = sc.nextInt();\n }\n\n for(int i=0; i< n; i++){\n if(result[i][0] == result[i][1]){\n counter++;\n if(counter == 3){\n break;\n }\n }else {\n counter = 0;\n }\n }\n\n if(counter == 3){\n System.out.println(\"Yes\");\n }else {\n System.out.println((\"No\"));\n }\n\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int n = Integer.parseInt(sc.nextLine());\n int counter = 0;\n\n int[][] result = new int[n][2];\n for(int i=0; i < n; i++){\n result[i][0] = sc.nextInt();\n result[i][1] = sc.nextInt();\n }\n\n for(int i=0; i< n; i++){\n if(result[i][0] == result[i][1]){\n counter++;\n if(counter == 3){\n break;\n }\n }else {\n counter = 0;\n }\n }\n\n if(counter == 3){\n System.out.println(\"Yes\");\n }else {\n System.out.println((\"No\"));\n }\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int n = Integer.parseInt(sc.nextLine());\n int counter = 0;\n\n int[][] result = new int[n][2];\n for(int i=0; i < n; i++){\n result[i][0] = sc.nextInt();\n result[i][1] = sc.nextInt();\n }\n\n for(int i=0; i< n; i++){\n if(result[i][0] == result[i][1]){\n counter++;\n if(counter == 3){\n break;\n }\n }else {\n counter = 0;\n }\n }\n\n if(counter == 3){\n System.out.println(\"Yes\");\n }else {\n System.out.println((\"No\"));\n }\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int n = Integer.parseInt(sc.nextLine());",
"n",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int counter = 0;",
"counter",
"0",
"int[][] result = new int[n][2];",
"result",
"new int[n][2]",
"n",
"2",
"for(int i=0; i < n; i++){\n result[i][0] = sc.nextInt();\n result[i][1] = sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n result[i][0] = sc.nextInt();\n result[i][1] = sc.nextInt();\n }",
"{\n result[i][0] = sc.nextInt();\n result[i][1] = sc.nextInt();\n }",
"result[i][0] = sc.nextInt()",
"result[i][0]",
"result[i]",
"result",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"result[i][1] = sc.nextInt()",
"result[i][1]",
"result[i]",
"result",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0; i< n; i++){\n if(result[i][0] == result[i][1]){\n counter++;\n if(counter == 3){\n break;\n }\n }else {\n counter = 0;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i< n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(result[i][0] == result[i][1]){\n counter++;\n if(counter == 3){\n break;\n }\n }else {\n counter = 0;\n }\n }",
"{\n if(result[i][0] == result[i][1]){\n counter++;\n if(counter == 3){\n break;\n }\n }else {\n counter = 0;\n }\n }",
"if(result[i][0] == result[i][1]){\n counter++;\n if(counter == 3){\n break;\n }\n }else {\n counter = 0;\n }",
"result[i][0] == result[i][1]",
"result[i][0]",
"result[i]",
"result",
"i",
"0",
"result[i][1]",
"result[i]",
"result",
"i",
"1",
"{\n counter++;\n if(counter == 3){\n break;\n }\n }",
"counter++",
"counter",
"if(counter == 3){\n break;\n }",
"counter == 3",
"counter",
"3",
"{\n break;\n }",
"break;",
"{\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\")",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int n = Integer.parseInt(sc.nextLine());\n int counter = 0;\n\n int[][] result = new int[n][2];\n for(int i=0; i < n; i++){\n result[i][0] = sc.nextInt();\n result[i][1] = sc.nextInt();\n }\n\n for(int i=0; i< n; i++){\n if(result[i][0] == result[i][1]){\n counter++;\n if(counter == 3){\n break;\n }\n }else {\n counter = 0;\n }\n }\n\n if(counter == 3){\n System.out.println(\"Yes\");\n }else {\n System.out.println((\"No\"));\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n\n int n = Integer.parseInt(sc.nextLine());\n int counter = 0;\n\n int[][] result = new int[n][2];\n for(int i=0; i < n; i++){\n result[i][0] = sc.nextInt();\n result[i][1] = sc.nextInt();\n }\n\n for(int i=0; i< n; i++){\n if(result[i][0] == result[i][1]){\n counter++;\n if(counter == 3){\n break;\n }\n }else {\n counter = 0;\n }\n }\n\n if(counter == 3){\n System.out.println(\"Yes\");\n }else {\n System.out.println((\"No\"));\n }\n\n }\n}",
"Main"
]
| import java.io.IOException;
import java.util.Scanner;
public class Main {
public static void main(String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
int n = Integer.parseInt(sc.nextLine());
int counter = 0;
int[][] result = new int[n][2];
for(int i=0; i < n; i++){
result[i][0] = sc.nextInt();
result[i][1] = sc.nextInt();
}
for(int i=0; i< n; i++){
if(result[i][0] == result[i][1]){
counter++;
if(counter == 3){
break;
}
}else {
counter = 0;
}
}
if(counter == 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,
13,
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,
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,
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
],
[
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
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
60,
70
],
[
70,
71
],
[
71,
72
],
[
60,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
77,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
90,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
97,
103
],
[
77,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
105,
111
],
[
104,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
112,
118
],
[
75,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
8,
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
],
[
6,
140
],
[
140,
141
]
]
| [
"import java.util.*;\n\nclass Main{\n public static void main(String[] args){\n Scanner s=new Scanner(System.in);\n int n=s.nextInt();\n int arr[][]=new int[n][n];\n for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n arr[i][j]=s.nextInt();\n }\n }\n int flag=0;\n for(int i=0;i<=n-3;i++){\n if(arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]){\n flag=1;\n break;\n }\n }\n \n if(flag==1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String[] args){\n Scanner s=new Scanner(System.in);\n int n=s.nextInt();\n int arr[][]=new int[n][n];\n for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n arr[i][j]=s.nextInt();\n }\n }\n int flag=0;\n for(int i=0;i<=n-3;i++){\n if(arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]){\n flag=1;\n break;\n }\n }\n \n if(flag==1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner s=new Scanner(System.in);\n int n=s.nextInt();\n int arr[][]=new int[n][n];\n for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n arr[i][j]=s.nextInt();\n }\n }\n int flag=0;\n for(int i=0;i<=n-3;i++){\n if(arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]){\n flag=1;\n break;\n }\n }\n \n if(flag==1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"main",
"{\n Scanner s=new Scanner(System.in);\n int n=s.nextInt();\n int arr[][]=new int[n][n];\n for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n arr[i][j]=s.nextInt();\n }\n }\n int flag=0;\n for(int i=0;i<=n-3;i++){\n if(arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]){\n flag=1;\n break;\n }\n }\n \n if(flag==1)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"Scanner s=new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int n=s.nextInt();",
"n",
"s.nextInt()",
"s.nextInt",
"s",
"int arr[][]=new int[n][n];",
"arr",
"new int[n][n]",
"n",
"n",
"for(int i=0;i<n;i++){\n for(int j=0;j<2;j++){\n arr[i][j]=s.nextInt();\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 arr[i][j]=s.nextInt();\n }\n }",
"{\n for(int j=0;j<2;j++){\n arr[i][j]=s.nextInt();\n }\n }",
"for(int j=0;j<2;j++){\n arr[i][j]=s.nextInt();\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<2",
"j",
"2",
"j++",
"j++",
"j",
"{\n arr[i][j]=s.nextInt();\n }",
"{\n arr[i][j]=s.nextInt();\n }",
"arr[i][j]=s.nextInt()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"s.nextInt()",
"s.nextInt",
"s",
"int flag=0;",
"flag",
"0",
"for(int i=0;i<=n-3;i++){\n if(arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]){\n flag=1;\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(arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]){\n flag=1;\n break;\n }\n }",
"{\n if(arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]){\n flag=1;\n break;\n }\n }",
"if(arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]){\n flag=1;\n break;\n }",
"arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]",
"arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]",
"arr[i][0]==arr[i][1]",
"arr[i][0]",
"arr[i]",
"arr",
"i",
"0",
"arr[i][1]",
"arr[i]",
"arr",
"i",
"1",
"arr[i+1][0]==arr[i+1][1]",
"arr[i+1][0]",
"arr[i+1]",
"arr",
"i+1",
"i",
"1",
"0",
"arr[i+1][1]",
"arr[i+1]",
"arr",
"i+1",
"i",
"1",
"1",
"arr[i+2][0]==arr[i+2][1]",
"arr[i+2][0]",
"arr[i+2]",
"arr",
"i+2",
"i",
"2",
"0",
"arr[i+2][1]",
"arr[i+2]",
"arr",
"i+2",
"i",
"2",
"1",
"{\n flag=1;\n break;\n }",
"flag=1",
"flag",
"1",
"break;",
"if(flag==1)\n System.out.println(\"Yes\");\n else\n System.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"
]
| import java.util.*;
class Main{
public static void main(String[] args){
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int arr[][]=new int[n][n];
for(int i=0;i<n;i++){
for(int j=0;j<2;j++){
arr[i][j]=s.nextInt();
}
}
int flag=0;
for(int i=0;i<=n-3;i++){
if(arr[i][0]==arr[i][1] && arr[i+1][0]==arr[i+1][1] && arr[i+2][0]==arr[i+2][1]){
flag=1;
break;
}
}
if(flag==1)
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,
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,
40,
13,
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,
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
],
[
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
],
[
211,
26
],
[
211,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
29,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
29,
38
],
[
38,
39
],
[
38,
40
],
[
29,
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
],
[
56,
61
],
[
61,
62
],
[
61,
63
],
[
56,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
29,
78
],
[
78,
79
],
[
78,
80
],
[
29,
81
],
[
81,
82
],
[
81,
83
],
[
29,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
89,
90
],
[
89,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
84,
95
],
[
96,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
98,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
97,
109
],
[
109,
110
],
[
97,
111
],
[
111,
112
],
[
111,
113
],
[
96,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
118,
120
],
[
29,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
126,
129
],
[
27,
130
],
[
130,
131
],
[
211,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
137,
138
],
[
137,
139
],
[
132,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
143,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
148,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
142,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
132,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
170,
171
],
[
132,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
174,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
179,
184
],
[
184,
185
],
[
184,
186
],
[
179,
187
],
[
187,
188
],
[
188,
189
],
[
179,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
191,
195
],
[
195,
196
],
[
174,
197
],
[
197,
198
],
[
172,
199
],
[
199,
200
],
[
132,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
206,
207
],
[
205,
208
],
[
208,
209
],
[
0,
210
],
[
210,
211
],
[
210,
212
]
]
| [
"import java.io.*;\nimport java.math.*;\nimport java.security.*;\nimport java.text.*;\nimport java.time.LocalTime;\nimport java.util.*;\nimport java.util.concurrent.*;\nimport java.util.regex.*;\n\n\npublic class Main {\n\n public static void main(String[] args) {\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt();\n \tint [][] arr = new int [n][2];\n \t\n \tfor(int i=0; i<n; i++) {\n \t\tfor(int j=0; j<2; j++) {\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}\n \t}\n \t\n \tboolean works = false;\n \tint count = 0;\n \t\n \tfor(int i=0; i<n; i++) {\n \t\t\tif(arr[i][0] == arr[i][1]) count++;\n \t\t\telse count = 0;\n \t\t\tif(count == 3) works = true;\n \t}\n \t\n \tSystem.out.println((works) ? \"Yes\" : \"No\");\n \t\n \t\n }\n\n static class FastScanner{\n \t\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st = new StringTokenizer(\"\");\n \tString next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}\n \t\n \tint nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}\n \t\n \tint [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}\n \t\n \tlong nextLong() {\n \t\treturn Long.parseLong(next());\n \t}\n \t\n \t\n }\n \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.time.LocalTime;",
"LocalTime",
"java.time",
"import java.util.*;",
"util.*",
"java",
"import java.util.concurrent.*;",
"concurrent.*",
"java.util",
"import java.util.regex.*;",
"regex.*",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt();\n \tint [][] arr = new int [n][2];\n \t\n \tfor(int i=0; i<n; i++) {\n \t\tfor(int j=0; j<2; j++) {\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}\n \t}\n \t\n \tboolean works = false;\n \tint count = 0;\n \t\n \tfor(int i=0; i<n; i++) {\n \t\t\tif(arr[i][0] == arr[i][1]) count++;\n \t\t\telse count = 0;\n \t\t\tif(count == 3) works = true;\n \t}\n \t\n \tSystem.out.println((works) ? \"Yes\" : \"No\");\n \t\n \t\n }\n\n static class FastScanner{\n \t\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st = new StringTokenizer(\"\");\n \tString next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}\n \t\n \tint nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}\n \t\n \tint [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}\n \t\n \tlong nextLong() {\n \t\treturn Long.parseLong(next());\n \t}\n \t\n \t\n }\n \n \n}",
"Main",
"public static void main(String[] args) {\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt();\n \tint [][] arr = new int [n][2];\n \t\n \tfor(int i=0; i<n; i++) {\n \t\tfor(int j=0; j<2; j++) {\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}\n \t}\n \t\n \tboolean works = false;\n \tint count = 0;\n \t\n \tfor(int i=0; i<n; i++) {\n \t\t\tif(arr[i][0] == arr[i][1]) count++;\n \t\t\telse count = 0;\n \t\t\tif(count == 3) works = true;\n \t}\n \t\n \tSystem.out.println((works) ? \"Yes\" : \"No\");\n \t\n \t\n }",
"main",
"{\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt();\n \tint [][] arr = new int [n][2];\n \t\n \tfor(int i=0; i<n; i++) {\n \t\tfor(int j=0; j<2; j++) {\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}\n \t}\n \t\n \tboolean works = false;\n \tint count = 0;\n \t\n \tfor(int i=0; i<n; i++) {\n \t\t\tif(arr[i][0] == arr[i][1]) count++;\n \t\t\telse count = 0;\n \t\t\tif(count == 3) works = true;\n \t}\n \t\n \tSystem.out.println((works) ? \"Yes\" : \"No\");\n \t\n \t\n }",
"FastScanner scan = new FastScanner();",
"scan",
"new FastScanner()",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int [][] arr = new int [n][2];",
"arr",
"new int [n][2]",
"n",
"2",
"for(int i=0; i<n; i++) {\n \t\tfor(int j=0; j<2; j++) {\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \t\tfor(int j=0; j<2; j++) {\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}\n \t}",
"{\n \t\tfor(int j=0; j<2; j++) {\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}\n \t}",
"for(int j=0; j<2; j++) {\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<2",
"j",
"2",
"j++",
"j++",
"j",
"{\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}",
"{\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}",
"arr[i][j] = scan.nextInt()",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"scan.nextInt()",
"scan.nextInt",
"scan",
"boolean works = false;",
"works",
"false",
"int count = 0;",
"count",
"0",
"for(int i=0; i<n; i++) {\n \t\t\tif(arr[i][0] == arr[i][1]) count++;\n \t\t\telse count = 0;\n \t\t\tif(count == 3) works = true;\n \t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n \t\t\tif(arr[i][0] == arr[i][1]) count++;\n \t\t\telse count = 0;\n \t\t\tif(count == 3) works = true;\n \t}",
"{\n \t\t\tif(arr[i][0] == arr[i][1]) count++;\n \t\t\telse count = 0;\n \t\t\tif(count == 3) works = true;\n \t}",
"if(arr[i][0] == arr[i][1]) count++;\n \t\t\telse count = 0;",
"arr[i][0] == arr[i][1]",
"arr[i][0]",
"arr[i]",
"arr",
"i",
"0",
"arr[i][1]",
"arr[i]",
"arr",
"i",
"1",
"count++",
"count",
"count = 0",
"count",
"0",
"if(count == 3) works = true;",
"count == 3",
"count",
"3",
"works = true",
"works",
"true",
"System.out.println((works) ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"(works) ? \"Yes\" : \"No\"",
"(works)",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"static class FastScanner{\n \t\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st = new StringTokenizer(\"\");\n \tString next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}\n \t\n \tint nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}\n \t\n \tint [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}\n \t\n \tlong nextLong() {\n \t\treturn Long.parseLong(next());\n \t}\n \t\n \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(\"\")",
"String next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}",
"next",
"{\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}",
"while(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"try {\n \t\t\t\tst = new StringTokenizer(br.readLine());\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\tst = new StringTokenizer(br.readLine());\n \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\treturn Integer.parseInt(next());\n \t}",
"nextInt",
"{\n \t\treturn Integer.parseInt(next());\n \t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"int [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}",
"readArray",
"{\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \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\treturn Long.parseLong(next());\n \t}",
"nextLong",
"{\n \t\treturn Long.parseLong(next());\n \t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"public class Main {\n\n public static void main(String[] args) {\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt();\n \tint [][] arr = new int [n][2];\n \t\n \tfor(int i=0; i<n; i++) {\n \t\tfor(int j=0; j<2; j++) {\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}\n \t}\n \t\n \tboolean works = false;\n \tint count = 0;\n \t\n \tfor(int i=0; i<n; i++) {\n \t\t\tif(arr[i][0] == arr[i][1]) count++;\n \t\t\telse count = 0;\n \t\t\tif(count == 3) works = true;\n \t}\n \t\n \tSystem.out.println((works) ? \"Yes\" : \"No\");\n \t\n \t\n }\n\n static class FastScanner{\n \t\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st = new StringTokenizer(\"\");\n \tString next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}\n \t\n \tint nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}\n \t\n \tint [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}\n \t\n \tlong nextLong() {\n \t\treturn Long.parseLong(next());\n \t}\n \t\n \t\n }\n \n \n}",
"public class Main {\n\n public static void main(String[] args) {\n \n \tFastScanner scan = new FastScanner();\n \t\n \tint n = scan.nextInt();\n \tint [][] arr = new int [n][2];\n \t\n \tfor(int i=0; i<n; i++) {\n \t\tfor(int j=0; j<2; j++) {\n \t\t\tarr[i][j] = scan.nextInt();\n \t\t}\n \t}\n \t\n \tboolean works = false;\n \tint count = 0;\n \t\n \tfor(int i=0; i<n; i++) {\n \t\t\tif(arr[i][0] == arr[i][1]) count++;\n \t\t\telse count = 0;\n \t\t\tif(count == 3) works = true;\n \t}\n \t\n \tSystem.out.println((works) ? \"Yes\" : \"No\");\n \t\n \t\n }\n\n static class FastScanner{\n \t\n \tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \tStringTokenizer st = new StringTokenizer(\"\");\n \tString next() {\n \t\twhile(!st.hasMoreTokens())\n \t\t\ttry {\n \t\t\t\tst = new StringTokenizer(br.readLine());\n \t\t\t} catch (IOException e){\n \t\t\t\te.printStackTrace();\n \t\t\t}\n \t\treturn st.nextToken();\n \t}\n \t\n \tint nextInt() {\n \t\treturn Integer.parseInt(next());\n \t}\n \t\n \tint [] readArray(int n) {\n \t\tint [] a = new int[n];\n \t\tfor(int i=0; i<n ; i++) a[i] = nextInt();\n \t\treturn a;\n \t}\n \t\n \tlong nextLong() {\n \t\treturn Long.parseLong(next());\n \t}\n \t\n \t\n }\n \n \n}",
"Main"
]
| import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.time.LocalTime;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;
public class Main {
public static void main(String[] args) {
FastScanner scan = new FastScanner();
int n = scan.nextInt();
int [][] arr = new int [n][2];
for(int i=0; i<n; i++) {
for(int j=0; j<2; j++) {
arr[i][j] = scan.nextInt();
}
}
boolean works = false;
int count = 0;
for(int i=0; i<n; i++) {
if(arr[i][0] == arr[i][1]) count++;
else count = 0;
if(count == 3) works = true;
}
System.out.println((works) ? "Yes" : "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 [] 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());
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
2,
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,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
14,
2,
2,
18,
13,
13,
18,
13,
2,
13,
17,
18,
13,
2,
13,
17,
29,
17,
29,
17,
12,
13,
30,
0,
13,
20,
0,
13,
17,
0,
13,
20,
4,
18,
13,
8,
4,
13,
17,
17,
4,
18,
13,
4,
18,
13,
12,
13,
30,
4,
18,
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,
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
],
[
180,
8
],
[
180,
9
],
[
9,
10
],
[
180,
11
],
[
11,
12
],
[
180,
13
],
[
13,
14
],
[
180,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
17,
22
],
[
22,
23
],
[
22,
24
],
[
25,
26
],
[
25,
27
],
[
17,
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
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
40,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
17,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
58,
68
],
[
68,
69
],
[
69,
70
],
[
58,
71
],
[
71,
72
],
[
72,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
74,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
72,
88
],
[
88,
89
],
[
17,
90
],
[
90,
91
],
[
180,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
98,
100
],
[
94,
101
],
[
101,
102
],
[
101,
103
],
[
94,
104
],
[
104,
105
],
[
105,
106
],
[
104,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
107,
111
],
[
94,
112
],
[
112,
113
],
[
113,
114
],
[
94,
115
],
[
115,
116
],
[
116,
117
],
[
180,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
118,
124
],
[
124,
125
],
[
180,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
129,
138
],
[
138,
139
],
[
138,
140
],
[
128,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
180,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
150,
151
],
[
180,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
159,
160
],
[
180,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
165,
168
],
[
168,
169
],
[
180,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
174,
177
],
[
177,
178
],
[
0,
179
],
[
179,
180
],
[
179,
181
]
]
| [
"/**\n * @author sakt_coder\n * created on 2020-09-19 17:34\n */\nimport java.io.*;\nimport java.util.*;\npublic class Main\n{\n\t\n\tprivate boolean solve()throws Exception\n\t{\n\t\tint n=nextInt();\n\t\tboolean d[]=new boolean[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\n\t\t\tint first=nextInt();\n\t\t\tint second=nextInt();\n\t\t\tif(first==second)\n\t\t\t\td[i]=true;\n\t\t}\n\t\tfor(int i=1;i<=n-2;i++)\n\t\t\tif(d[i] && d[i+1] && d[i+2])\n\t\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\t \n\t///////////////////////////////////////////////////////////\n\n\tpublic void run()throws Exception\n\t{\n\t\tbr=new BufferedReader(new InputStreamReader(System.in));\n\t\tst=null;\n\t\tout=new PrintWriter(System.out);\n\n\t\tout.println(solve()?\"Yes\":\"No\");\n\t\t\n\t\tbr.close();\n\t\tout.close();\n\t}\n\tpublic static void main(String args[])throws Exception{\n\t\tnew Main().run();\n\t}\n\tBufferedReader br;\n\tStringTokenizer st;\n\tPrintWriter out;\n\tString nextToken()throws Exception{\n\t\twhile(st==null || !st.hasMoreTokens())\n\t\tst=new StringTokenizer(br.readLine());\n\t\treturn st.nextToken();\n\t}\n\tString nextLine()throws Exception{\n\t\treturn br.readLine();\n\t}\n\tint nextInt()throws Exception{\n\t\treturn Integer.parseInt(nextToken());\n\t}\n\tlong nextLong()throws Exception{\n\t\treturn Long.parseLong(nextToken());\n\t}\n\tdouble nextDouble()throws Exception{\n\t\treturn Double.parseDouble(nextToken());\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main\n{\n\t\n\tprivate boolean solve()throws Exception\n\t{\n\t\tint n=nextInt();\n\t\tboolean d[]=new boolean[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\n\t\t\tint first=nextInt();\n\t\t\tint second=nextInt();\n\t\t\tif(first==second)\n\t\t\t\td[i]=true;\n\t\t}\n\t\tfor(int i=1;i<=n-2;i++)\n\t\t\tif(d[i] && d[i+1] && d[i+2])\n\t\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\t \n\t///////////////////////////////////////////////////////////\n\n\tpublic void run()throws Exception\n\t{\n\t\tbr=new BufferedReader(new InputStreamReader(System.in));\n\t\tst=null;\n\t\tout=new PrintWriter(System.out);\n\n\t\tout.println(solve()?\"Yes\":\"No\");\n\t\t\n\t\tbr.close();\n\t\tout.close();\n\t}\n\tpublic static void main(String args[])throws Exception{\n\t\tnew Main().run();\n\t}\n\tBufferedReader br;\n\tStringTokenizer st;\n\tPrintWriter out;\n\tString nextToken()throws Exception{\n\t\twhile(st==null || !st.hasMoreTokens())\n\t\tst=new StringTokenizer(br.readLine());\n\t\treturn st.nextToken();\n\t}\n\tString nextLine()throws Exception{\n\t\treturn br.readLine();\n\t}\n\tint nextInt()throws Exception{\n\t\treturn Integer.parseInt(nextToken());\n\t}\n\tlong nextLong()throws Exception{\n\t\treturn Long.parseLong(nextToken());\n\t}\n\tdouble nextDouble()throws Exception{\n\t\treturn Double.parseDouble(nextToken());\n\t}\n}",
"Main",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"PrintWriter out;",
"out",
"private boolean solve()throws Exception\n\t{\n\t\tint n=nextInt();\n\t\tboolean d[]=new boolean[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\n\t\t\tint first=nextInt();\n\t\t\tint second=nextInt();\n\t\t\tif(first==second)\n\t\t\t\td[i]=true;\n\t\t}\n\t\tfor(int i=1;i<=n-2;i++)\n\t\t\tif(d[i] && d[i+1] && d[i+2])\n\t\t\t\treturn true;\n\t\treturn false;\n\t}",
"solve",
"{\n\t\tint n=nextInt();\n\t\tboolean d[]=new boolean[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\n\t\t\tint first=nextInt();\n\t\t\tint second=nextInt();\n\t\t\tif(first==second)\n\t\t\t\td[i]=true;\n\t\t}\n\t\tfor(int i=1;i<=n-2;i++)\n\t\t\tif(d[i] && d[i+1] && d[i+2])\n\t\t\t\treturn true;\n\t\treturn false;\n\t}",
"int n=nextInt();",
"n",
"nextInt()",
"nextInt",
"boolean d[]=new boolean[n+1];",
"d",
"new boolean[n+1]",
"n+1",
"n",
"1",
"for(int i=1;i<=n;i++)\n\t\t{\n\t\t\tint first=nextInt();\n\t\t\tint second=nextInt();\n\t\t\tif(first==second)\n\t\t\t\td[i]=true;\n\t\t}",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint first=nextInt();\n\t\t\tint second=nextInt();\n\t\t\tif(first==second)\n\t\t\t\td[i]=true;\n\t\t}",
"{\n\t\t\tint first=nextInt();\n\t\t\tint second=nextInt();\n\t\t\tif(first==second)\n\t\t\t\td[i]=true;\n\t\t}",
"int first=nextInt();",
"first",
"nextInt()",
"nextInt",
"int second=nextInt();",
"second",
"nextInt()",
"nextInt",
"if(first==second)\n\t\t\t\td[i]=true;",
"first==second",
"first",
"second",
"d[i]=true",
"d[i]",
"d",
"i",
"true",
"for(int i=1;i<=n-2;i++)\n\t\t\tif(d[i] && d[i+1] && d[i+2])\n\t\t\t\treturn true;",
"int i=1;",
"int i=1;",
"i",
"1",
"i<=n-2",
"i",
"n-2",
"n",
"2",
"i++",
"i++",
"i",
"if(d[i] && d[i+1] && d[i+2])\n\t\t\t\treturn true;",
"if(d[i] && d[i+1] && d[i+2])\n\t\t\t\treturn true;",
"d[i] && d[i+1] && d[i+2]",
"d[i] && d[i+1] && d[i+2]",
"d[i]",
"d",
"i",
"d[i+1]",
"d",
"i+1",
"i",
"1",
"d[i+2]",
"d",
"i+2",
"i",
"2",
"return true;",
"true",
"return false;",
"false",
"public void run()throws Exception\n\t{\n\t\tbr=new BufferedReader(new InputStreamReader(System.in));\n\t\tst=null;\n\t\tout=new PrintWriter(System.out);\n\n\t\tout.println(solve()?\"Yes\":\"No\");\n\t\t\n\t\tbr.close();\n\t\tout.close();\n\t}",
"run",
"{\n\t\tbr=new BufferedReader(new InputStreamReader(System.in));\n\t\tst=null;\n\t\tout=new PrintWriter(System.out);\n\n\t\tout.println(solve()?\"Yes\":\"No\");\n\t\t\n\t\tbr.close();\n\t\tout.close();\n\t}",
"br=new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"st=null",
"st",
"null",
"out=new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"out.println(solve()?\"Yes\":\"No\")",
"out.println",
"out",
"solve()?\"Yes\":\"No\"",
"solve()",
"solve",
"\"Yes\"",
"\"No\"",
"br.close()",
"br.close",
"br",
"out.close()",
"out.close",
"out",
"public static void main(String args[])throws Exception{\n\t\tnew Main().run();\n\t}",
"main",
"{\n\t\tnew Main().run();\n\t}",
"new Main().run()",
"new Main().run",
"new Main()",
"String args[]",
"args",
"String nextToken()throws Exception{\n\t\twhile(st==null || !st.hasMoreTokens())\n\t\tst=new StringTokenizer(br.readLine());\n\t\treturn st.nextToken();\n\t}",
"nextToken",
"{\n\t\twhile(st==null || !st.hasMoreTokens())\n\t\tst=new StringTokenizer(br.readLine());\n\t\treturn st.nextToken();\n\t}",
"while(st==null || !st.hasMoreTokens())\n\t\tst=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",
"String nextLine()throws Exception{\n\t\treturn br.readLine();\n\t}",
"nextLine",
"{\n\t\treturn br.readLine();\n\t}",
"return br.readLine();",
"br.readLine()",
"br.readLine",
"br",
"int nextInt()throws Exception{\n\t\treturn Integer.parseInt(nextToken());\n\t}",
"nextInt",
"{\n\t\treturn Integer.parseInt(nextToken());\n\t}",
"return Integer.parseInt(nextToken());",
"Integer.parseInt(nextToken())",
"Integer.parseInt",
"Integer",
"nextToken()",
"nextToken",
"long nextLong()throws Exception{\n\t\treturn Long.parseLong(nextToken());\n\t}",
"nextLong",
"{\n\t\treturn Long.parseLong(nextToken());\n\t}",
"return Long.parseLong(nextToken());",
"Long.parseLong(nextToken())",
"Long.parseLong",
"Long",
"nextToken()",
"nextToken",
"double nextDouble()throws Exception{\n\t\treturn Double.parseDouble(nextToken());\n\t}",
"nextDouble",
"{\n\t\treturn Double.parseDouble(nextToken());\n\t}",
"return Double.parseDouble(nextToken());",
"Double.parseDouble(nextToken())",
"Double.parseDouble",
"Double",
"nextToken()",
"nextToken",
"public class Main\n{\n\t\n\tprivate boolean solve()throws Exception\n\t{\n\t\tint n=nextInt();\n\t\tboolean d[]=new boolean[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\n\t\t\tint first=nextInt();\n\t\t\tint second=nextInt();\n\t\t\tif(first==second)\n\t\t\t\td[i]=true;\n\t\t}\n\t\tfor(int i=1;i<=n-2;i++)\n\t\t\tif(d[i] && d[i+1] && d[i+2])\n\t\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\t \n\t///////////////////////////////////////////////////////////\n\n\tpublic void run()throws Exception\n\t{\n\t\tbr=new BufferedReader(new InputStreamReader(System.in));\n\t\tst=null;\n\t\tout=new PrintWriter(System.out);\n\n\t\tout.println(solve()?\"Yes\":\"No\");\n\t\t\n\t\tbr.close();\n\t\tout.close();\n\t}\n\tpublic static void main(String args[])throws Exception{\n\t\tnew Main().run();\n\t}\n\tBufferedReader br;\n\tStringTokenizer st;\n\tPrintWriter out;\n\tString nextToken()throws Exception{\n\t\twhile(st==null || !st.hasMoreTokens())\n\t\tst=new StringTokenizer(br.readLine());\n\t\treturn st.nextToken();\n\t}\n\tString nextLine()throws Exception{\n\t\treturn br.readLine();\n\t}\n\tint nextInt()throws Exception{\n\t\treturn Integer.parseInt(nextToken());\n\t}\n\tlong nextLong()throws Exception{\n\t\treturn Long.parseLong(nextToken());\n\t}\n\tdouble nextDouble()throws Exception{\n\t\treturn Double.parseDouble(nextToken());\n\t}\n}",
"public class Main\n{\n\t\n\tprivate boolean solve()throws Exception\n\t{\n\t\tint n=nextInt();\n\t\tboolean d[]=new boolean[n+1];\n\t\tfor(int i=1;i<=n;i++)\n\t\t{\n\t\t\tint first=nextInt();\n\t\t\tint second=nextInt();\n\t\t\tif(first==second)\n\t\t\t\td[i]=true;\n\t\t}\n\t\tfor(int i=1;i<=n-2;i++)\n\t\t\tif(d[i] && d[i+1] && d[i+2])\n\t\t\t\treturn true;\n\t\treturn false;\n\t}\n\n\t \n\t///////////////////////////////////////////////////////////\n\n\tpublic void run()throws Exception\n\t{\n\t\tbr=new BufferedReader(new InputStreamReader(System.in));\n\t\tst=null;\n\t\tout=new PrintWriter(System.out);\n\n\t\tout.println(solve()?\"Yes\":\"No\");\n\t\t\n\t\tbr.close();\n\t\tout.close();\n\t}\n\tpublic static void main(String args[])throws Exception{\n\t\tnew Main().run();\n\t}\n\tBufferedReader br;\n\tStringTokenizer st;\n\tPrintWriter out;\n\tString nextToken()throws Exception{\n\t\twhile(st==null || !st.hasMoreTokens())\n\t\tst=new StringTokenizer(br.readLine());\n\t\treturn st.nextToken();\n\t}\n\tString nextLine()throws Exception{\n\t\treturn br.readLine();\n\t}\n\tint nextInt()throws Exception{\n\t\treturn Integer.parseInt(nextToken());\n\t}\n\tlong nextLong()throws Exception{\n\t\treturn Long.parseLong(nextToken());\n\t}\n\tdouble nextDouble()throws Exception{\n\t\treturn Double.parseDouble(nextToken());\n\t}\n}",
"Main"
]
| /**
* @author sakt_coder
* created on 2020-09-19 17:34
*/
import java.io.*;
import java.util.*;
public class Main
{
private boolean solve()throws Exception
{
int n=nextInt();
boolean d[]=new boolean[n+1];
for(int i=1;i<=n;i++)
{
int first=nextInt();
int second=nextInt();
if(first==second)
d[i]=true;
}
for(int i=1;i<=n-2;i++)
if(d[i] && d[i+1] && d[i+2])
return true;
return false;
}
///////////////////////////////////////////////////////////
public void run()throws Exception
{
br=new BufferedReader(new InputStreamReader(System.in));
st=null;
out=new PrintWriter(System.out);
out.println(solve()?"Yes":"No");
br.close();
out.close();
}
public static void main(String args[])throws Exception{
new Main().run();
}
BufferedReader br;
StringTokenizer st;
PrintWriter out;
String nextToken()throws Exception{
while(st==null || !st.hasMoreTokens())
st=new StringTokenizer(br.readLine());
return st.nextToken();
}
String nextLine()throws Exception{
return br.readLine();
}
int nextInt()throws Exception{
return Integer.parseInt(nextToken());
}
long nextLong()throws Exception{
return Long.parseLong(nextToken());
}
double nextDouble()throws Exception{
return Double.parseDouble(nextToken());
}
}
|
[
7,
6,
12,
13,
30,
29,
4,
18,
20,
18,
13,
13,
23,
13,
23,
13,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
2,
17,
17,
12,
13,
30,
41,
13,
20,
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,
41,
13,
17,
42,
2,
13,
13,
30,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
41,
13,
2,
13,
17,
41,
13,
17,
42,
2,
2,
13,
13,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
40,
13,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
3,
0,
13,
13,
30,
40,
13,
14,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
18,
13,
13,
18,
13,
2,
2,
18,
13,
13,
13,
17,
13,
30,
0,
13,
2,
18,
13,
13,
2,
13,
18,
13,
2,
2,
18,
13,
13,
13,
17,
14,
2,
13,
13,
29,
17,
29,
17,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
41,
13,
13,
42,
2,
13,
13,
30,
41,
13,
2,
2,
13,
13,
17,
14,
2,
13,
4,
18,
13,
13,
30,
0,
13,
13,
30,
0,
13,
2,
13,
17,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
2,
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,
4,
18,
13,
13,
20,
23,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
13,
18,
13,
13,
0,
18,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
42,
2,
13,
13,
30,
41,
13,
18,
13,
13,
0,
18,
13,
40,
13,
18,
13,
13,
0,
18,
13,
40,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
18,
13,
13,
17,
29,
17,
41,
13,
2,
18,
13,
13,
17,
42,
2,
13,
17,
30,
14,
2,
18,
13,
13,
18,
13,
2,
13,
17,
30,
3,
40,
13,
14,
2,
13,
17,
29,
17,
41,
13,
2,
18,
13,
13,
17,
11,
1,
41,
13,
2,
18,
13,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
13,
13,
3,
0,
13,
4,
13,
13,
13,
13,
0,
13,
4,
13,
13,
2,
13,
17,
2,
18,
13,
13,
17,
29,
17,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
17,
29,
2,
4,
13,
13,
2,
4,
13,
13,
4,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
13,
2,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
17,
0,
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,
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,
14,
2,
13,
17,
29,
17,
14,
2,
13,
17,
29,
17,
14,
2,
2,
2,
13,
17,
17,
2,
2,
13,
17,
17,
29,
17,
11,
1,
41,
13,
17,
2,
2,
13,
13,
13,
1,
0,
13,
2,
13,
17,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
2,
13,
17,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
13,
29,
13,
23,
13,
23,
13,
6,
13,
41,
13,
17,
41,
13,
41,
13,
12,
13,
30,
0,
13,
13,
0,
13,
20,
2,
13,
17,
0,
13,
20,
2,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
13,
23,
13,
12,
13,
30,
42,
2,
13,
18,
13,
13,
30,
0,
18,
13,
13,
18,
13,
18,
13,
13,
0,
13,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
41,
13,
4,
13,
13,
14,
2,
13,
13,
29,
14,
2,
18,
13,
13,
18,
13,
13,
30,
0,
18,
13,
13,
13,
30,
0,
18,
13,
13,
13,
14,
2,
18,
13,
13,
18,
13,
13,
30,
40,
18,
13,
13,
40,
13,
23,
13,
23,
13,
12,
13,
30,
29,
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,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
13,
0,
13,
13,
23,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
2,
3
],
[
2,
4
],
[
4,
5
],
[
5,
6
],
[
6,
7
],
[
7,
8
],
[
6,
9
],
[
9,
10
],
[
9,
11
],
[
2,
12
],
[
12,
13
],
[
2,
14
],
[
14,
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
],
[
970,
29
],
[
970,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
970,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
970,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
46,
48
],
[
42,
49
],
[
49,
50
],
[
49,
51
],
[
42,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
42,
57
],
[
57,
58
],
[
57,
59
],
[
42,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
62,
73
],
[
74,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
74,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
84,
90
],
[
90,
91
],
[
91,
92
],
[
42,
93
],
[
93,
94
],
[
93,
95
],
[
42,
96
],
[
96,
97
],
[
96,
98
],
[
42,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
105,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
104,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
116,
122
],
[
122,
123
],
[
122,
124
],
[
116,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
131,
135
],
[
130,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
125,
141
],
[
141,
142
],
[
142,
143
],
[
141,
144
],
[
144,
145
],
[
116,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
146,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
116,
155
],
[
155,
156
],
[
155,
157
],
[
104,
158
],
[
158,
159
],
[
159,
160
],
[
42,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
164,
167
],
[
161,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
169,
172
],
[
42,
173
],
[
173,
174
],
[
174,
175
],
[
42,
176
],
[
176,
177
],
[
177,
178
],
[
40,
179
],
[
179,
180
],
[
970,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
187,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
194,
196
],
[
187,
197
],
[
197,
198
],
[
198,
199
],
[
187,
200
],
[
201,
201
],
[
201,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
204,
208
],
[
208,
209
],
[
208,
210
],
[
211,
211
],
[
211,
212
],
[
212,
213
],
[
212,
214
],
[
211,
215
],
[
211,
216
],
[
203,
217
],
[
202,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
221,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
227,
229
],
[
230,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
230,
234
],
[
230,
235
],
[
183,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
236,
240
],
[
240,
241
],
[
183,
242
],
[
242,
243
],
[
181,
244
],
[
244,
245
],
[
181,
246
],
[
246,
247
],
[
181,
248
],
[
248,
249
],
[
181,
250
],
[
250,
251
],
[
970,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
255,
256
],
[
255,
257
],
[
254,
258
],
[
258,
259
],
[
258,
260
],
[
254,
261
],
[
261,
262
],
[
262,
263
],
[
262,
264
],
[
261,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
268,
269
],
[
269,
270
],
[
269,
271
],
[
268,
272
],
[
265,
273
],
[
273,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
277,
278
],
[
276,
279
],
[
273,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
273,
284
],
[
284,
285
],
[
285,
286
],
[
285,
287
],
[
287,
288
],
[
287,
289
],
[
254,
290
],
[
290,
291
],
[
252,
292
],
[
292,
293
],
[
252,
294
],
[
294,
295
],
[
252,
296
],
[
296,
297
],
[
970,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
301,
305
],
[
305,
306
],
[
300,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
310,
311
],
[
310,
312
],
[
308,
313
],
[
298,
314
],
[
314,
315
],
[
298,
316
],
[
316,
317
],
[
970,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
321,
322
],
[
322,
323
],
[
323,
324
],
[
323,
325
],
[
322,
326
],
[
326,
327
],
[
326,
328
],
[
326,
329
],
[
318,
330
],
[
330,
331
],
[
318,
332
],
[
332,
333
],
[
970,
334
],
[
334,
335
],
[
334,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
337,
340
],
[
337,
341
],
[
334,
342
],
[
342,
343
],
[
334,
344
],
[
344,
345
],
[
970,
346
],
[
346,
347
],
[
346,
348
],
[
348,
349
],
[
349,
350
],
[
349,
351
],
[
351,
352
],
[
351,
353
],
[
348,
354
],
[
354,
355
],
[
355,
356
],
[
355,
357
],
[
354,
358
],
[
358,
359
],
[
358,
360
],
[
348,
361
],
[
361,
362
],
[
362,
363
],
[
362,
364
],
[
361,
365
],
[
348,
366
],
[
366,
367
],
[
346,
368
],
[
368,
369
],
[
346,
370
],
[
370,
371
],
[
346,
372
],
[
372,
373
],
[
970,
374
],
[
374,
375
],
[
374,
376
],
[
376,
377
],
[
377,
378
],
[
378,
379
],
[
378,
380
],
[
377,
381
],
[
381,
382
],
[
382,
383
],
[
382,
384
],
[
384,
385
],
[
384,
386
],
[
381,
387
],
[
387,
388
],
[
388,
389
],
[
388,
390
],
[
390,
391
],
[
387,
392
],
[
392,
393
],
[
392,
394
],
[
381,
395
],
[
395,
396
],
[
396,
397
],
[
396,
398
],
[
398,
399
],
[
395,
400
],
[
376,
401
],
[
401,
402
],
[
374,
403
],
[
403,
404
],
[
374,
405
],
[
405,
406
],
[
374,
407
],
[
407,
408
],
[
970,
409
],
[
409,
410
],
[
409,
411
],
[
411,
412
],
[
412,
413
],
[
413,
414
],
[
414,
415
],
[
414,
416
],
[
413,
417
],
[
412,
418
],
[
418,
419
],
[
411,
420
],
[
420,
421
],
[
420,
422
],
[
422,
423
],
[
423,
424
],
[
423,
425
],
[
422,
426
],
[
411,
427
],
[
427,
428
],
[
428,
429
],
[
428,
430
],
[
427,
431
],
[
431,
432
],
[
432,
433
],
[
433,
434
],
[
434,
435
],
[
434,
436
],
[
433,
437
],
[
437,
438
],
[
437,
439
],
[
439,
440
],
[
439,
441
],
[
432,
442
],
[
442,
443
],
[
431,
444
],
[
444,
445
],
[
411,
446
],
[
446,
447
],
[
447,
448
],
[
447,
449
],
[
446,
450
],
[
450,
451
],
[
411,
452
],
[
452,
453
],
[
452,
454
],
[
454,
455
],
[
455,
456
],
[
455,
457
],
[
454,
458
],
[
411,
459
],
[
459,
460
],
[
460,
461
],
[
461,
462
],
[
461,
463
],
[
463,
464
],
[
464,
465
],
[
464,
466
],
[
463,
467
],
[
459,
468
],
[
468,
469
],
[
468,
470
],
[
459,
471
],
[
471,
472
],
[
472,
473
],
[
459,
474
],
[
475,
475
],
[
475,
476
],
[
476,
477
],
[
477,
478
],
[
478,
479
],
[
478,
480
],
[
477,
481
],
[
481,
482
],
[
481,
483
],
[
476,
484
],
[
484,
485
],
[
485,
486
],
[
485,
487
],
[
484,
488
],
[
411,
489
],
[
489,
490
],
[
489,
491
],
[
491,
492
],
[
491,
493
],
[
491,
494
],
[
491,
495
],
[
411,
496
],
[
496,
497
],
[
496,
498
],
[
498,
499
],
[
498,
500
],
[
498,
501
],
[
501,
502
],
[
501,
503
],
[
498,
504
],
[
504,
505
],
[
505,
506
],
[
505,
507
],
[
504,
508
],
[
411,
509
],
[
509,
510
],
[
409,
511
],
[
511,
512
],
[
970,
513
],
[
513,
514
],
[
513,
515
],
[
515,
516
],
[
516,
517
],
[
517,
518
],
[
517,
519
],
[
516,
520
],
[
520,
521
],
[
515,
522
],
[
522,
523
],
[
523,
524
],
[
524,
525
],
[
524,
526
],
[
523,
527
],
[
527,
528
],
[
528,
529
],
[
528,
530
],
[
527,
531
],
[
531,
532
],
[
531,
533
],
[
533,
534
],
[
533,
535
],
[
513,
536
],
[
536,
537
],
[
513,
538
],
[
538,
539
],
[
970,
540
],
[
540,
541
],
[
540,
542
],
[
542,
543
],
[
543,
544
],
[
543,
545
],
[
542,
546
],
[
546,
547
],
[
547,
548
],
[
548,
549
],
[
548,
550
],
[
546,
551
],
[
551,
552
],
[
551,
553
],
[
546,
554
],
[
554,
555
],
[
555,
556
],
[
546,
557
],
[
557,
558
],
[
558,
559
],
[
558,
560
],
[
560,
561
],
[
560,
562
],
[
542,
563
],
[
563,
564
],
[
540,
565
],
[
565,
566
],
[
970,
567
],
[
567,
568
],
[
567,
569
],
[
569,
570
],
[
570,
571
],
[
570,
572
],
[
569,
573
],
[
573,
574
],
[
573,
575
],
[
575,
576
],
[
575,
577
],
[
569,
578
],
[
578,
579
],
[
579,
580
],
[
579,
581
],
[
578,
582
],
[
582,
583
],
[
583,
584
],
[
584,
585
],
[
585,
586
],
[
585,
587
],
[
584,
588
],
[
583,
589
],
[
589,
590
],
[
589,
591
],
[
591,
592
],
[
592,
593
],
[
592,
594
],
[
591,
595
],
[
582,
596
],
[
596,
597
],
[
596,
598
],
[
598,
599
],
[
599,
600
],
[
599,
601
],
[
598,
602
],
[
569,
603
],
[
603,
604
],
[
567,
605
],
[
605,
606
],
[
567,
607
],
[
607,
608
],
[
567,
609
],
[
609,
610
],
[
970,
611
],
[
611,
612
],
[
611,
613
],
[
613,
614
],
[
614,
615
],
[
615,
616
],
[
615,
617
],
[
615,
618
],
[
618,
619
],
[
618,
620
],
[
615,
621
],
[
611,
622
],
[
622,
623
],
[
611,
624
],
[
624,
625
],
[
970,
626
],
[
626,
627
],
[
626,
628
],
[
628,
629
],
[
629,
630
],
[
630,
631
],
[
630,
632
],
[
629,
633
],
[
633,
634
],
[
628,
635
],
[
635,
636
],
[
636,
637
],
[
636,
638
],
[
635,
639
],
[
639,
640
],
[
628,
641
],
[
641,
642
],
[
642,
643
],
[
643,
644
],
[
644,
645
],
[
644,
646
],
[
643,
647
],
[
642,
648
],
[
648,
649
],
[
649,
650
],
[
649,
651
],
[
648,
652
],
[
641,
653
],
[
653,
654
],
[
628,
655
],
[
655,
656
],
[
656,
657
],
[
657,
658
],
[
657,
659
],
[
655,
660
],
[
660,
661
],
[
661,
662
],
[
661,
663
],
[
660,
664
],
[
655,
665
],
[
665,
666
],
[
666,
667
],
[
666,
668
],
[
668,
669
],
[
668,
670
],
[
655,
671
],
[
671,
672
],
[
672,
673
],
[
673,
674
],
[
674,
675
],
[
675,
676
],
[
675,
677
],
[
674,
678
],
[
673,
679
],
[
679,
680
],
[
680,
681
],
[
680,
682
],
[
682,
683
],
[
682,
684
],
[
679,
685
],
[
672,
686
],
[
686,
687
],
[
628,
688
],
[
688,
689
],
[
626,
690
],
[
690,
691
],
[
970,
692
],
[
692,
693
],
[
692,
694
],
[
694,
695
],
[
695,
696
],
[
695,
697
],
[
694,
698
],
[
698,
699
],
[
698,
700
],
[
694,
701
],
[
701,
702
],
[
701,
703
],
[
703,
704
],
[
704,
705
],
[
703,
706
],
[
694,
707
],
[
707,
708
],
[
707,
709
],
[
709,
710
],
[
710,
711
],
[
709,
712
],
[
694,
713
],
[
713,
714
],
[
713,
715
],
[
715,
716
],
[
716,
717
],
[
715,
718
],
[
694,
719
],
[
719,
720
],
[
692,
721
],
[
721,
722
],
[
692,
723
],
[
723,
724
],
[
970,
725
],
[
725,
726
],
[
725,
727
],
[
727,
728
],
[
727,
729
],
[
725,
730
],
[
730,
731
],
[
725,
732
],
[
732,
733
],
[
725,
734
],
[
734,
735
],
[
734,
736
],
[
736,
737
],
[
737,
738
],
[
737,
739
],
[
736,
740
],
[
740,
741
],
[
740,
742
],
[
743,
744
],
[
743,
745
],
[
736,
746
],
[
746,
747
],
[
746,
748
],
[
749,
750
],
[
749,
751
],
[
736,
752
],
[
752,
753
],
[
753,
754
],
[
754,
755
],
[
754,
756
],
[
752,
757
],
[
757,
758
],
[
757,
759
],
[
752,
760
],
[
760,
761
],
[
761,
762
],
[
752,
763
],
[
764,
764
],
[
764,
765
],
[
765,
766
],
[
766,
767
],
[
766,
768
],
[
765,
769
],
[
734,
770
],
[
770,
771
],
[
725,
772
],
[
772,
773
],
[
772,
774
],
[
774,
775
],
[
775,
776
],
[
776,
777
],
[
776,
778
],
[
778,
779
],
[
778,
780
],
[
775,
781
],
[
781,
782
],
[
782,
783
],
[
783,
784
],
[
783,
785
],
[
782,
786
],
[
786,
787
],
[
786,
788
],
[
788,
789
],
[
788,
790
],
[
781,
791
],
[
791,
792
],
[
791,
793
],
[
793,
794
],
[
793,
795
],
[
774,
796
],
[
796,
797
],
[
772,
798
],
[
798,
799
],
[
725,
800
],
[
800,
801
],
[
800,
802
],
[
802,
803
],
[
803,
804
],
[
803,
805
],
[
805,
806
],
[
805,
807
],
[
802,
808
],
[
808,
809
],
[
808,
810
],
[
810,
811
],
[
810,
812
],
[
802,
813
],
[
813,
814
],
[
814,
815
],
[
814,
816
],
[
813,
817
],
[
802,
818
],
[
818,
819
],
[
819,
820
],
[
820,
821
],
[
820,
822
],
[
819,
823
],
[
823,
824
],
[
823,
825
],
[
818,
826
],
[
826,
827
],
[
827,
828
],
[
828,
829
],
[
828,
830
],
[
827,
831
],
[
818,
832
],
[
832,
833
],
[
833,
834
],
[
834,
835
],
[
834,
836
],
[
833,
837
],
[
832,
838
],
[
838,
839
],
[
839,
840
],
[
840,
841
],
[
840,
842
],
[
839,
843
],
[
843,
844
],
[
843,
845
],
[
838,
846
],
[
846,
847
],
[
847,
848
],
[
848,
849
],
[
848,
850
],
[
802,
851
],
[
851,
852
],
[
800,
853
],
[
853,
854
],
[
800,
855
],
[
855,
856
],
[
725,
857
],
[
857,
858
],
[
857,
859
],
[
859,
860
],
[
860,
861
],
[
970,
862
],
[
862,
863
],
[
862,
864
],
[
864,
865
],
[
862,
866
],
[
866,
867
],
[
862,
868
],
[
868,
869
],
[
868,
870
],
[
870,
871
],
[
871,
872
],
[
871,
873
],
[
862,
874
],
[
874,
875
],
[
874,
876
],
[
876,
877
],
[
877,
878
],
[
878,
879
],
[
879,
880
],
[
879,
881
],
[
878,
882
],
[
882,
883
],
[
883,
884
],
[
884,
885
],
[
877,
886
],
[
886,
887
],
[
887,
888
],
[
888,
889
],
[
888,
890
],
[
890,
891
],
[
891,
892
],
[
892,
893
],
[
887,
894
],
[
894,
895
],
[
895,
896
],
[
895,
897
],
[
876,
898
],
[
898,
899
],
[
899,
900
],
[
900,
901
],
[
862,
902
],
[
902,
903
],
[
902,
904
],
[
904,
905
],
[
905,
906
],
[
906,
907
],
[
907,
908
],
[
906,
909
],
[
909,
910
],
[
862,
911
],
[
911,
912
],
[
911,
913
],
[
913,
914
],
[
914,
915
],
[
915,
916
],
[
916,
917
],
[
915,
918
],
[
918,
919
],
[
862,
920
],
[
920,
921
],
[
920,
922
],
[
922,
923
],
[
923,
924
],
[
924,
925
],
[
925,
926
],
[
924,
927
],
[
927,
928
],
[
862,
929
],
[
929,
930
],
[
929,
931
],
[
931,
932
],
[
932,
933
],
[
932,
934
],
[
931,
935
],
[
935,
936
],
[
936,
937
],
[
936,
938
],
[
938,
939
],
[
939,
940
],
[
940,
941
],
[
935,
942
],
[
942,
943
],
[
943,
944
],
[
943,
945
],
[
945,
946
],
[
946,
947
],
[
931,
948
],
[
948,
949
],
[
970,
950
],
[
950,
951
],
[
950,
952
],
[
952,
953
],
[
950,
954
],
[
954,
955
],
[
950,
956
],
[
956,
957
],
[
956,
958
],
[
958,
959
],
[
959,
960
],
[
959,
961
],
[
958,
962
],
[
962,
963
],
[
962,
964
],
[
956,
965
],
[
965,
966
],
[
956,
967
],
[
967,
968
],
[
0,
969
],
[
969,
970
],
[
969,
971
]
]
| [
"import java.io.*;\nimport java.math.BigDecimal;\nimport java.math.BigInteger;\nimport java.util.*;\n \npublic class Main {\n\tstatic final int INF = (int) (1e9 + 10);\n\tstatic final int MOD = (int) (1e9 + 7);\n \n\t// static final int N = (int) (4e5 + 5);\n\t// static ArrayList<Integer>[] graph;\n\t// static boolean visited[];\n\t// static long size[];\n \n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint 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 int i =0;\n boolean got = false;\n while(i < n){\n if(a[i][0] == a[i][1]){\n int j = i+1;\n int c =1;\n while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }\n if(c >= 3){\n got = true;\n break;\n }\n i = j;\n }else{\n i++;\n }\n }\n if(got){\n pr.println(\"Yes\");\n }else{\n pr.println(\"No\");\n }\n \n \n \n\t\t\n\t\t\n\t\tpr.flush();\n\t\tpr.close();\n\t}\n static class Unionfind{\n private int count = 0;\n private int[] parent , rank;\n public Unionfind(int n ){\n count = n;\n parent =new int[n+1];\n rank =new int[n+1];\n for(int i = 1 ; i <= n ; i++){\n parent[i] = i;\n }\n }\n public int find(int p){\n while(p != parent[p]){\n parent[p] = parent[parent[p]];\n p = parent[p];\n }\n return p;\n }\n public void union(int p , int q){\n int rootP = find(p);\n int rootQ= find(q);\n if(rootP == rootQ) return;\n if(rank[rootQ] > rank[rootP]){\n parent[rootP] = rootQ;\n }else{\n parent[rootQ] = rootP;\n if(rank[rootP]== rank[rootQ]){\n rank[rootP]++;\n }\n }\n count--;\n }\n public int count(){\n return count;\n }\n}\n\n\t/*\n\t * Template From Here\n\t */\n\tprivate static boolean possible(long[] arr, int[] f, long mid, long k) {\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n\tpublic static int lowerBound(ArrayList<Integer> array, int length, long value) {\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}\n \n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n \n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n \n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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 \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n \n\tstatic long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n \n\tstatic long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n \n\tpublic static void sortbyColumn(int[][] att, int col) {\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}\n \n\tstatic class pair {\n\t\tint V, I;\n \n\t\tpair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}\n\t}\n \n\tpublic static int[] swap(int data[], int left, int right) {\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}\n \n\tpublic static int[] reverse(int data[], int left, int right) {\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}\n \n\tpublic static boolean findNextPermutation(int data[]) {\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}\n \n\tstatic long nCr(long n, long r) {\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}\n \n\tstatic long fact(long n) {\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}\n \n\t/*\n\t * static boolean prime[] = new boolean[1000007];\n\t * \n\t * public static void sieveOfEratosthenes(int n) {\n\t * \n\t * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=\n\t * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]\n\t * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=\n\t * p) prime[i] = false; } }\n\t * \n\t * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //\n\t * if(prime[i] == true) // System.out.print(i + \" \"); // } }\n\t */\n \n\tstatic long power(long fac2, int y, int p) {\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}\n \n\tstatic long modInverse(long fac2, int p) {\n\t\treturn power(fac2, p - 2, p);\n\t}\n \n\tstatic boolean isPrime(int n) {\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}\n \n\tpublic static BigInteger lcmm(String a, String b) {\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}\n \n}\n ",
"Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}",
"@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}",
"compare",
"{\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}",
"return new Integer(entry1[col]).compareTo(entry2[col]);",
"new Integer(entry1[col]).compareTo(entry2[col])",
"new Integer(entry1[col]).compareTo",
"new Integer(entry1[col])",
"entry2[col]",
"entry2",
"col",
"final int[] entry1",
"entry1",
"final int[] entry2",
"entry2",
"import java.io.*;",
"io.*",
"java",
"import java.math.BigDecimal;",
"BigDecimal",
"java.math",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic final int INF = (int) (1e9 + 10);\n\tstatic final int MOD = (int) (1e9 + 7);\n \n\t// static final int N = (int) (4e5 + 5);\n\t// static ArrayList<Integer>[] graph;\n\t// static boolean visited[];\n\t// static long size[];\n \n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint 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 int i =0;\n boolean got = false;\n while(i < n){\n if(a[i][0] == a[i][1]){\n int j = i+1;\n int c =1;\n while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }\n if(c >= 3){\n got = true;\n break;\n }\n i = j;\n }else{\n i++;\n }\n }\n if(got){\n pr.println(\"Yes\");\n }else{\n pr.println(\"No\");\n }\n \n \n \n\t\t\n\t\t\n\t\tpr.flush();\n\t\tpr.close();\n\t}\n static class Unionfind{\n private int count = 0;\n private int[] parent , rank;\n public Unionfind(int n ){\n count = n;\n parent =new int[n+1];\n rank =new int[n+1];\n for(int i = 1 ; i <= n ; i++){\n parent[i] = i;\n }\n }\n public int find(int p){\n while(p != parent[p]){\n parent[p] = parent[parent[p]];\n p = parent[p];\n }\n return p;\n }\n public void union(int p , int q){\n int rootP = find(p);\n int rootQ= find(q);\n if(rootP == rootQ) return;\n if(rank[rootQ] > rank[rootP]){\n parent[rootP] = rootQ;\n }else{\n parent[rootQ] = rootP;\n if(rank[rootP]== rank[rootQ]){\n rank[rootP]++;\n }\n }\n count--;\n }\n public int count(){\n return count;\n }\n}\n\n\t/*\n\t * Template From Here\n\t */\n\tprivate static boolean possible(long[] arr, int[] f, long mid, long k) {\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n\tpublic static int lowerBound(ArrayList<Integer> array, int length, long value) {\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}\n \n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n \n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n \n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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 \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n \n\tstatic long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n \n\tstatic long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n \n\tpublic static void sortbyColumn(int[][] att, int col) {\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}\n \n\tstatic class pair {\n\t\tint V, I;\n \n\t\tpair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}\n\t}\n \n\tpublic static int[] swap(int data[], int left, int right) {\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}\n \n\tpublic static int[] reverse(int data[], int left, int right) {\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}\n \n\tpublic static boolean findNextPermutation(int data[]) {\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}\n \n\tstatic long nCr(long n, long r) {\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}\n \n\tstatic long fact(long n) {\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}\n \n\t/*\n\t * static boolean prime[] = new boolean[1000007];\n\t * \n\t * public static void sieveOfEratosthenes(int n) {\n\t * \n\t * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=\n\t * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]\n\t * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=\n\t * p) prime[i] = false; } }\n\t * \n\t * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //\n\t * if(prime[i] == true) // System.out.print(i + \" \"); // } }\n\t */\n \n\tstatic long power(long fac2, int y, int p) {\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}\n \n\tstatic long modInverse(long fac2, int p) {\n\t\treturn power(fac2, p - 2, p);\n\t}\n \n\tstatic boolean isPrime(int n) {\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}\n \n\tpublic static BigInteger lcmm(String a, String b) {\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}\n \n}",
"Main",
"static final int INF = (int) (1e9 + 10);",
"INF",
"(int) (1e9 + 10)",
"1e9",
"10",
"static final int MOD = (int) (1e9 + 7);",
"MOD",
"(int) (1e9 + 7)",
"1e9",
"7",
"public static void main(String[] args) throws NumberFormatException, IOException {\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint 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 int i =0;\n boolean got = false;\n while(i < n){\n if(a[i][0] == a[i][1]){\n int j = i+1;\n int c =1;\n while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }\n if(c >= 3){\n got = true;\n break;\n }\n i = j;\n }else{\n i++;\n }\n }\n if(got){\n pr.println(\"Yes\");\n }else{\n pr.println(\"No\");\n }\n \n \n \n\t\t\n\t\t\n\t\tpr.flush();\n\t\tpr.close();\n\t}",
"main",
"{\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint 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 int i =0;\n boolean got = false;\n while(i < n){\n if(a[i][0] == a[i][1]){\n int j = i+1;\n int c =1;\n while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }\n if(c >= 3){\n got = true;\n break;\n }\n i = j;\n }else{\n i++;\n }\n }\n if(got){\n pr.println(\"Yes\");\n }else{\n pr.println(\"No\");\n }\n \n \n \n\t\t\n\t\t\n\t\tpr.flush();\n\t\tpr.close();\n\t}",
"FastReader sc = new FastReader();",
"sc",
"new FastReader()",
"PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));",
"pr",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(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",
"int i =0;",
"i",
"0",
"boolean got = false;",
"got",
"false",
"while(i < n){\n if(a[i][0] == a[i][1]){\n int j = i+1;\n int c =1;\n while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }\n if(c >= 3){\n got = true;\n break;\n }\n i = j;\n }else{\n i++;\n }\n }",
"i < n",
"i",
"n",
"{\n if(a[i][0] == a[i][1]){\n int j = i+1;\n int c =1;\n while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }\n if(c >= 3){\n got = true;\n break;\n }\n i = j;\n }else{\n i++;\n }\n }",
"if(a[i][0] == a[i][1]){\n int j = i+1;\n int c =1;\n while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }\n if(c >= 3){\n got = true;\n break;\n }\n i = j;\n }else{\n i++;\n }",
"a[i][0] == a[i][1]",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"{\n int j = i+1;\n int c =1;\n while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }\n if(c >= 3){\n got = true;\n break;\n }\n i = j;\n }",
"int j = i+1;",
"j",
"i+1",
"i",
"1",
"int c =1;",
"c",
"1",
"while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }",
"j < n && a[j][0] == a[j][1]",
"j < n",
"j",
"n",
"a[j][0] == a[j][1]",
"a[j][0]",
"a[j]",
"a",
"j",
"0",
"a[j][1]",
"a[j]",
"a",
"j",
"1",
"{\n j++;\n c++;\n }",
"j++",
"j",
"c++",
"c",
"if(c >= 3){\n got = true;\n break;\n }",
"c >= 3",
"c",
"3",
"{\n got = true;\n break;\n }",
"got = true",
"got",
"true",
"break;",
"i = j",
"i",
"j",
"{\n i++;\n }",
"i++",
"i",
"if(got){\n pr.println(\"Yes\");\n }else{\n pr.println(\"No\");\n }",
"got",
"{\n pr.println(\"Yes\");\n }",
"pr.println(\"Yes\")",
"pr.println",
"pr",
"\"Yes\"",
"{\n pr.println(\"No\");\n }",
"pr.println(\"No\")",
"pr.println",
"pr",
"\"No\"",
"pr.flush()",
"pr.flush",
"pr",
"pr.close()",
"pr.close",
"pr",
"String[] args",
"args",
"/*\n\t * Template From Here\n\t */\n\tprivate static boolean possible(long[] arr, int[] f, long mid, long k) {\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"possible",
"{\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}",
"long c = 0;",
"c",
"0",
"for (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\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\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}",
"{\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}",
"if ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}",
"(arr[i] * f[f.length - i - 1]) > mid",
"(arr[i] * f[f.length - i - 1])",
"arr[i]",
"arr",
"i",
"f[f.length - i - 1]",
"f",
"f.length - i - 1",
"f.length - i - 1",
"f.length",
"f",
"f.length",
"i",
"1",
"mid",
"{\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}",
"c += (arr[i] - (mid / f[f.length - i - 1]))",
"c",
"(arr[i] - (mid / f[f.length - i - 1]))",
"arr[i]",
"arr",
"i",
"(mid / f[f.length - i - 1])",
"mid",
"f[f.length - i - 1]",
"f",
"f.length - i - 1",
"f.length - i - 1",
"f.length",
"f",
"f.length",
"i",
"1",
"if (c <= k)\n\t\t\treturn true;",
"c <= k",
"c",
"k",
"return true;",
"true",
"return false;",
"false",
"long[] arr",
"arr",
"int[] f",
"f",
"long mid",
"mid",
"long k",
"k",
"public static int lowerBound(ArrayList<Integer> array, int length, long value) {\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}",
"lowerBound",
"{\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}",
"int low = 0;",
"low",
"0",
"int high = length;",
"high",
"length",
"while (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}",
"low < high",
"low",
"high",
"{\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}",
"final int mid = (low + high) / 2;",
"mid",
"(low + high) / 2",
"(low + high)",
"low",
"high",
"2",
"if (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}",
"value <= array.get(mid)",
"value",
"array.get(mid)",
"array.get",
"array",
"mid",
"{\n\t\t\t\thigh = mid;\n\t\t\t}",
"high = mid",
"high",
"mid",
"{\n\t\t\t\tlow = mid + 1;\n\t\t\t}",
"low = mid + 1",
"low",
"mid + 1",
"mid",
"1",
"return low;",
"low",
"ArrayList<Integer> array",
"array",
"int length",
"length",
"long value",
"value",
"static long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}",
"gcd",
"{\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}",
"if (a == 0)\n\t\t\treturn b;",
"a == 0",
"a",
"0",
"return b;",
"b",
"return gcd(b % a, a);",
"gcd(b % a, a)",
"gcd",
"b % a",
"b",
"a",
"a",
"long a",
"a",
"long 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",
"public static void sortbyColumn(int[][] att, int col) {\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}",
"sortbyColumn",
"{\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}",
"Arrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t})",
"Arrays.sort",
"Arrays",
"att",
"new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}",
"int[][] att",
"att",
"int col",
"col",
"public static int[] swap(int data[], int left, int right) {\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}",
"swap",
"{\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}",
"int temp = data[left];",
"temp",
"data[left]",
"data",
"left",
"data[left] = data[right]",
"data[left]",
"data",
"left",
"data[right]",
"data",
"right",
"data[right] = temp",
"data[right]",
"data",
"right",
"temp",
"return data;",
"data",
"int data[]",
"data",
"int left",
"left",
"int right",
"right",
"public static int[] reverse(int data[], int left, int right) {\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}",
"reverse",
"{\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}",
"while (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}",
"left < right",
"left",
"right",
"{\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}",
"int temp = data[left];",
"temp",
"data[left]",
"data",
"left",
"data[left++] = data[right]",
"data[left++]",
"data",
"left++",
"left",
"data[right]",
"data",
"right",
"data[right--] = temp",
"data[right--]",
"data",
"right--",
"right",
"temp",
"return data;",
"data",
"int data[]",
"data",
"int left",
"left",
"int right",
"right",
"public static boolean findNextPermutation(int data[]) {\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}",
"findNextPermutation",
"{\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}",
"if (data.length <= 1)\n\t\t\treturn false;",
"data.length <= 1",
"data.length",
"data",
"data.length",
"1",
"return false;",
"false",
"int last = data.length - 2;",
"last",
"data.length - 2",
"data.length",
"data",
"data.length",
"2",
"while (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}",
"last >= 0",
"last",
"0",
"{\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}",
"if (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}",
"data[last] < data[last + 1]",
"data[last]",
"data",
"last",
"data[last + 1]",
"data",
"last + 1",
"last",
"1",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"last--",
"last",
"if (last < 0)\n\t\t\treturn false;",
"last < 0",
"last",
"0",
"return false;",
"false",
"int nextGreater = data.length - 1;",
"nextGreater",
"data.length - 1",
"data.length",
"data",
"data.length",
"1",
"for (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"int i = data.length - 1;",
"int i = data.length - 1;",
"i",
"data.length - 1",
"data.length",
"data",
"data.length",
"1",
"i > last",
"i",
"last",
"i--",
"i--",
"i",
"{\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}",
"data[i] > data[last]",
"data[i]",
"data",
"i",
"data[last]",
"data",
"last",
"{\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}",
"nextGreater = i",
"nextGreater",
"i",
"break;",
"data = swap(data, nextGreater, last)",
"data",
"swap(data, nextGreater, last)",
"swap",
"data",
"nextGreater",
"last",
"data = reverse(data, last + 1, data.length - 1)",
"data",
"reverse(data, last + 1, data.length - 1)",
"reverse",
"data",
"last + 1",
"last",
"1",
"data.length - 1",
"data.length",
"data",
"data.length",
"1",
"return true;",
"true",
"int data[]",
"data",
"static long nCr(long n, long r) {\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}",
"nCr",
"{\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}",
"if (n == r)\n\t\t\treturn 1;",
"n == r",
"n",
"r",
"return 1;",
"1",
"return fact(n) / (fact(r) * fact(n - r));",
"fact(n) / (fact(r) * fact(n - r))",
"fact(n)",
"fact",
"n",
"(fact(r) * fact(n - r))",
"fact(r)",
"fact",
"r",
"fact(n - r)",
"fact",
"n - r",
"n",
"r",
"long n",
"n",
"long r",
"r",
"static long fact(long n) {\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}",
"fact",
"{\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}",
"long res = 1;",
"res",
"1",
"for (long i = 2; i <= n; i++)\n\t\t\tres = res * i;",
"long i = 2;",
"long i = 2;",
"i",
"2",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"res = res * i;",
"res = res * i",
"res",
"res * i",
"res",
"i",
"return res;",
"res",
"long n",
"n",
"static long power(long fac2, int y, int p) {\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}",
"power",
"{\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}",
"long res = 1;",
"res",
"1",
"fac2 = fac2 % p",
"fac2",
"fac2 % p",
"fac2",
"p",
"while (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}",
"y > 0",
"y",
"0",
"{\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}",
"if (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;",
"y % 2 == 1",
"y % 2",
"y",
"2",
"1",
"res = (res * fac2) % p",
"res",
"(res * fac2) % p",
"(res * fac2)",
"res",
"fac2",
"p",
"fac2 = (fac2 * fac2) % p",
"fac2",
"(fac2 * fac2) % p",
"(fac2 * fac2)",
"fac2",
"fac2",
"p",
"return res;",
"res",
"long fac2",
"fac2",
"int y",
"y",
"int p",
"p",
"static long modInverse(long fac2, int p) {\n\t\treturn power(fac2, p - 2, p);\n\t}",
"modInverse",
"{\n\t\treturn power(fac2, p - 2, p);\n\t}",
"return power(fac2, p - 2, p);",
"power(fac2, p - 2, p)",
"power",
"fac2",
"p - 2",
"p",
"2",
"p",
"long fac2",
"fac2",
"int p",
"p",
"static boolean isPrime(int n) {\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}",
"if (n <= 1)\n\t\t\treturn false;",
"n <= 1",
"n",
"1",
"return false;",
"false",
"if (n <= 3)\n\t\t\treturn true;",
"n <= 3",
"n",
"3",
"return true;",
"true",
"if (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;",
"n % 2 == 0 || n % 3 == 0",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"n % 3 == 0",
"n % 3",
"n",
"3",
"0",
"return false;",
"false",
"for (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;",
"int i = 5;",
"int i = 5;",
"i",
"5",
"i * i <= n",
"i * i",
"i",
"i",
"n",
"i = i + 6",
"i = i + 6",
"i",
"i + 6",
"i",
"6",
"if (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;",
"if (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;",
"n % i == 0 || n % (i + 2) == 0",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"n % (i + 2) == 0",
"n % (i + 2)",
"n",
"(i + 2)",
"i",
"2",
"0",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public static BigInteger lcmm(String a, String b) {\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}",
"lcmm",
"{\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}",
"BigInteger s = new BigInteger(a);",
"s",
"new BigInteger(a)",
"BigInteger s1 = new BigInteger(b);",
"s1",
"new BigInteger(b)",
"BigInteger mul = s.multiply(s1);",
"mul",
"s.multiply(s1)",
"s.multiply",
"s",
"s1",
"BigInteger gcd = s.gcd(s1);",
"gcd",
"s.gcd(s1)",
"s.gcd",
"s",
"s1",
"BigInteger lcm = mul.divide(gcd);",
"lcm",
"mul.divide(gcd)",
"mul.divide",
"mul",
"gcd",
"return lcm;",
"lcm",
"String a",
"a",
"String b",
"b",
"static class Unionfind{\n private int count = 0;\n private int[] parent , rank;\n public Unionfind(int n ){\n count = n;\n parent =new int[n+1];\n rank =new int[n+1];\n for(int i = 1 ; i <= n ; i++){\n parent[i] = i;\n }\n }\n public int find(int p){\n while(p != parent[p]){\n parent[p] = parent[parent[p]];\n p = parent[p];\n }\n return p;\n }\n public void union(int p , int q){\n int rootP = find(p);\n int rootQ= find(q);\n if(rootP == rootQ) return;\n if(rank[rootQ] > rank[rootP]){\n parent[rootP] = rootQ;\n }else{\n parent[rootQ] = rootP;\n if(rank[rootP]== rank[rootQ]){\n rank[rootP]++;\n }\n }\n count--;\n }\n public int count(){\n return count;\n }\n}",
"Unionfind",
"private int count = 0;",
"count",
"0",
"private int[] parent",
"parent",
"rank;",
"rank",
"public Unionfind(int n ){\n count = n;\n parent =new int[n+1];\n rank =new int[n+1];\n for(int i = 1 ; i <= n ; i++){\n parent[i] = i;\n }\n }",
"Unionfind",
"{\n count = n;\n parent =new int[n+1];\n rank =new int[n+1];\n for(int i = 1 ; i <= n ; i++){\n parent[i] = i;\n }\n }",
"count = n",
"count",
"n",
"parent =new int[n+1]",
"parent",
"new int[n+1]",
"n+1",
"n",
"1",
"rank =new int[n+1]",
"rank",
"new int[n+1]",
"n+1",
"n",
"1",
"for(int i = 1 ; i <= n ; i++){\n parent[i] = i;\n }",
"int i = 1 ;",
"int i = 1 ;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n parent[i] = i;\n }",
"{\n parent[i] = i;\n }",
"parent[i] = i",
"parent[i]",
"parent",
"i",
"i",
"int n",
"n",
"public int find(int p){\n while(p != parent[p]){\n parent[p] = parent[parent[p]];\n p = parent[p];\n }\n return p;\n }",
"find",
"{\n while(p != parent[p]){\n parent[p] = parent[parent[p]];\n p = parent[p];\n }\n return p;\n }",
"while(p != parent[p]){\n parent[p] = parent[parent[p]];\n p = parent[p];\n }",
"p != parent[p]",
"p",
"parent[p]",
"parent",
"p",
"{\n parent[p] = parent[parent[p]];\n p = parent[p];\n }",
"parent[p] = parent[parent[p]]",
"parent[p]",
"parent",
"p",
"parent[parent[p]]",
"parent",
"parent[p]",
"parent",
"p",
"p = parent[p]",
"p",
"parent[p]",
"parent",
"p",
"return p;",
"p",
"int p",
"p",
"public void union(int p , int q){\n int rootP = find(p);\n int rootQ= find(q);\n if(rootP == rootQ) return;\n if(rank[rootQ] > rank[rootP]){\n parent[rootP] = rootQ;\n }else{\n parent[rootQ] = rootP;\n if(rank[rootP]== rank[rootQ]){\n rank[rootP]++;\n }\n }\n count--;\n }",
"union",
"{\n int rootP = find(p);\n int rootQ= find(q);\n if(rootP == rootQ) return;\n if(rank[rootQ] > rank[rootP]){\n parent[rootP] = rootQ;\n }else{\n parent[rootQ] = rootP;\n if(rank[rootP]== rank[rootQ]){\n rank[rootP]++;\n }\n }\n count--;\n }",
"int rootP = find(p);",
"rootP",
"find(p)",
"find",
"p",
"int rootQ= find(q);",
"rootQ",
"find(q)",
"find",
"q",
"if(rootP == rootQ) return;",
"rootP == rootQ",
"rootP",
"rootQ",
"return;",
"if(rank[rootQ] > rank[rootP]){\n parent[rootP] = rootQ;\n }else{\n parent[rootQ] = rootP;\n if(rank[rootP]== rank[rootQ]){\n rank[rootP]++;\n }\n }",
"rank[rootQ] > rank[rootP]",
"rank[rootQ]",
"rank",
"rootQ",
"rank[rootP]",
"rank",
"rootP",
"{\n parent[rootP] = rootQ;\n }",
"parent[rootP] = rootQ",
"parent[rootP]",
"parent",
"rootP",
"rootQ",
"{\n parent[rootQ] = rootP;\n if(rank[rootP]== rank[rootQ]){\n rank[rootP]++;\n }\n }",
"parent[rootQ] = rootP",
"parent[rootQ]",
"parent",
"rootQ",
"rootP",
"if(rank[rootP]== rank[rootQ]){\n rank[rootP]++;\n }",
"rank[rootP]== rank[rootQ]",
"rank[rootP]",
"rank",
"rootP",
"rank[rootQ]",
"rank",
"rootQ",
"{\n rank[rootP]++;\n }",
"rank[rootP]++",
"rank[rootP]",
"rank",
"rootP",
"count--",
"count",
"int p",
"p",
"int q",
"q",
"public int count(){\n return count;\n }",
"count",
"{\n return count;\n }",
"return count;",
"count",
"static class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n \n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n \n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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 \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"FastReader",
"{\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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.hasMoreElements()) {\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.hasMoreElements()) {\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.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"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",
"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",
"double nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"String nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}",
"nextLine",
"{\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}",
"String str = \"\";",
"str",
"\"\"",
"try {\n\t\t\t\tstr = br.readLine();\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\tstr = br.readLine();\n\t\t\t}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"static class pair {\n\t\tint V, I;\n \n\t\tpair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}\n\t}",
"pair",
"int V",
"V",
"I;",
"I",
"pair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}",
"pair",
"{\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}",
"V = v",
"V",
"v",
"I = i",
"I",
"i",
"int v",
"v",
"int i",
"i",
"public class Main {\n\tstatic final int INF = (int) (1e9 + 10);\n\tstatic final int MOD = (int) (1e9 + 7);\n \n\t// static final int N = (int) (4e5 + 5);\n\t// static ArrayList<Integer>[] graph;\n\t// static boolean visited[];\n\t// static long size[];\n \n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint 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 int i =0;\n boolean got = false;\n while(i < n){\n if(a[i][0] == a[i][1]){\n int j = i+1;\n int c =1;\n while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }\n if(c >= 3){\n got = true;\n break;\n }\n i = j;\n }else{\n i++;\n }\n }\n if(got){\n pr.println(\"Yes\");\n }else{\n pr.println(\"No\");\n }\n \n \n \n\t\t\n\t\t\n\t\tpr.flush();\n\t\tpr.close();\n\t}\n static class Unionfind{\n private int count = 0;\n private int[] parent , rank;\n public Unionfind(int n ){\n count = n;\n parent =new int[n+1];\n rank =new int[n+1];\n for(int i = 1 ; i <= n ; i++){\n parent[i] = i;\n }\n }\n public int find(int p){\n while(p != parent[p]){\n parent[p] = parent[parent[p]];\n p = parent[p];\n }\n return p;\n }\n public void union(int p , int q){\n int rootP = find(p);\n int rootQ= find(q);\n if(rootP == rootQ) return;\n if(rank[rootQ] > rank[rootP]){\n parent[rootP] = rootQ;\n }else{\n parent[rootQ] = rootP;\n if(rank[rootP]== rank[rootQ]){\n rank[rootP]++;\n }\n }\n count--;\n }\n public int count(){\n return count;\n }\n}\n\n\t/*\n\t * Template From Here\n\t */\n\tprivate static boolean possible(long[] arr, int[] f, long mid, long k) {\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n\tpublic static int lowerBound(ArrayList<Integer> array, int length, long value) {\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}\n \n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n \n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n \n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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 \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n \n\tstatic long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n \n\tstatic long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n \n\tpublic static void sortbyColumn(int[][] att, int col) {\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}\n \n\tstatic class pair {\n\t\tint V, I;\n \n\t\tpair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}\n\t}\n \n\tpublic static int[] swap(int data[], int left, int right) {\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}\n \n\tpublic static int[] reverse(int data[], int left, int right) {\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}\n \n\tpublic static boolean findNextPermutation(int data[]) {\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}\n \n\tstatic long nCr(long n, long r) {\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}\n \n\tstatic long fact(long n) {\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}\n \n\t/*\n\t * static boolean prime[] = new boolean[1000007];\n\t * \n\t * public static void sieveOfEratosthenes(int n) {\n\t * \n\t * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=\n\t * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]\n\t * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=\n\t * p) prime[i] = false; } }\n\t * \n\t * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //\n\t * if(prime[i] == true) // System.out.print(i + \" \"); // } }\n\t */\n \n\tstatic long power(long fac2, int y, int p) {\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}\n \n\tstatic long modInverse(long fac2, int p) {\n\t\treturn power(fac2, p - 2, p);\n\t}\n \n\tstatic boolean isPrime(int n) {\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}\n \n\tpublic static BigInteger lcmm(String a, String b) {\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}\n \n}",
"public class Main {\n\tstatic final int INF = (int) (1e9 + 10);\n\tstatic final int MOD = (int) (1e9 + 7);\n \n\t// static final int N = (int) (4e5 + 5);\n\t// static ArrayList<Integer>[] graph;\n\t// static boolean visited[];\n\t// static long size[];\n \n\tpublic static void main(String[] args) throws NumberFormatException, IOException {\n\t\tFastReader sc = new FastReader();\n\t\tPrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tint 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 int i =0;\n boolean got = false;\n while(i < n){\n if(a[i][0] == a[i][1]){\n int j = i+1;\n int c =1;\n while(j < n && a[j][0] == a[j][1]){\n j++;\n c++;\n }\n if(c >= 3){\n got = true;\n break;\n }\n i = j;\n }else{\n i++;\n }\n }\n if(got){\n pr.println(\"Yes\");\n }else{\n pr.println(\"No\");\n }\n \n \n \n\t\t\n\t\t\n\t\tpr.flush();\n\t\tpr.close();\n\t}\n static class Unionfind{\n private int count = 0;\n private int[] parent , rank;\n public Unionfind(int n ){\n count = n;\n parent =new int[n+1];\n rank =new int[n+1];\n for(int i = 1 ; i <= n ; i++){\n parent[i] = i;\n }\n }\n public int find(int p){\n while(p != parent[p]){\n parent[p] = parent[parent[p]];\n p = parent[p];\n }\n return p;\n }\n public void union(int p , int q){\n int rootP = find(p);\n int rootQ= find(q);\n if(rootP == rootQ) return;\n if(rank[rootQ] > rank[rootP]){\n parent[rootP] = rootQ;\n }else{\n parent[rootQ] = rootP;\n if(rank[rootP]== rank[rootQ]){\n rank[rootP]++;\n }\n }\n count--;\n }\n public int count(){\n return count;\n }\n}\n\n\t/*\n\t * Template From Here\n\t */\n\tprivate static boolean possible(long[] arr, int[] f, long mid, long k) {\n\t\tlong c = 0;\n \n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tif ((arr[i] * f[f.length - i - 1]) > mid) {\n\t\t\t\tc += (arr[i] - (mid / f[f.length - i - 1]));\n\t\t\t}\n\t\t}\n\t\t// System.out.println(mid+\" \"+c);\n\t\tif (c <= k)\n\t\t\treturn true;\n\t\treturn false;\n\t}\n \n\tpublic static int lowerBound(ArrayList<Integer> array, int length, long value) {\n\t\tint low = 0;\n\t\tint high = length;\n\t\twhile (low < high) {\n\t\t\tfinal int mid = (low + high) / 2;\n\t\t\tif (value <= array.get(mid)) {\n\t\t\t\thigh = mid;\n\t\t\t} else {\n\t\t\t\tlow = mid + 1;\n\t\t\t}\n\t\t}\n\t\treturn low;\n\t}\n \n\tstatic class FastReader {\n\t\tBufferedReader br;\n\t\tStringTokenizer st;\n \n\t\tpublic FastReader() {\n\t\t\tbr = new BufferedReader(new InputStreamReader(System.in));\n\t\t}\n \n\t\tString next() {\n\t\t\twhile (st == null || !st.hasMoreElements()) {\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 \n\t\tint nextInt() {\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n \n\t\tlong nextLong() {\n\t\t\treturn Long.parseLong(next());\n\t\t}\n \n\t\tdouble nextDouble() {\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n \n\t\tString nextLine() {\n\t\t\tString str = \"\";\n\t\t\ttry {\n\t\t\t\tstr = br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn str;\n\t\t}\n\t}\n \n\tstatic long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n \n\tstatic long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n \n\tpublic static void sortbyColumn(int[][] att, int col) {\n\t\t// Using built-in sort function Arrays.sort\n\t\tArrays.sort(att, new Comparator<int[]>() {\n \n\t\t\t@Override\n\t\t\t// Compare values according to columns\n\t\t\tpublic int compare(final int[] entry1, final int[] entry2) {\n \n\t\t\t\t// To sort in descending order revert\n\t\t\t\t// the '>' Operator\n\t\t\t\t// if (entry1[col] > entry2[col])\n\t\t\t\t// return 1;\n\t\t\t\t// else //(entry1[col] >= entry2[col])\n\t\t\t\t// return -1;\n\t\t\t\treturn new Integer(entry1[col]).compareTo(entry2[col]);\n\t\t\t\t// return entry1[col].\n\t\t\t}\n\t\t}); // End of function call sort().\n\t}\n \n\tstatic class pair {\n\t\tint V, I;\n \n\t\tpair(int v, int i) {\n\t\t\tV = v;\n\t\t\tI = i;\n\t\t}\n\t}\n \n\tpublic static int[] swap(int data[], int left, int right) {\n\t\tint temp = data[left];\n\t\tdata[left] = data[right];\n\t\tdata[right] = temp;\n\t\treturn data;\n\t}\n \n\tpublic static int[] reverse(int data[], int left, int right) {\n\t\twhile (left < right) {\n\t\t\tint temp = data[left];\n\t\t\tdata[left++] = data[right];\n\t\t\tdata[right--] = temp;\n\t\t}\n\t\treturn data;\n\t}\n \n\tpublic static boolean findNextPermutation(int data[]) {\n\t\tif (data.length <= 1)\n\t\t\treturn false;\n \n\t\tint last = data.length - 2;\n\t\twhile (last >= 0) {\n\t\t\tif (data[last] < data[last + 1]) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlast--;\n\t\t}\n\t\tif (last < 0)\n\t\t\treturn false;\n \n\t\tint nextGreater = data.length - 1;\n\t\tfor (int i = data.length - 1; i > last; i--) {\n\t\t\tif (data[i] > data[last]) {\n\t\t\t\tnextGreater = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tdata = swap(data, nextGreater, last);\n\t\tdata = reverse(data, last + 1, data.length - 1);\n\t\treturn true;\n\t}\n \n\tstatic long nCr(long n, long r) {\n\t\tif (n == r)\n\t\t\treturn 1;\n\t\treturn fact(n) / (fact(r) * fact(n - r));\n\t}\n \n\tstatic long fact(long n) {\n\t\tlong res = 1;\n\t\tfor (long i = 2; i <= n; i++)\n\t\t\tres = res * i;\n\t\treturn res;\n\t}\n \n\t/*\n\t * static boolean prime[] = new boolean[1000007];\n\t * \n\t * public static void sieveOfEratosthenes(int n) {\n\t * \n\t * for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=\n\t * n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]\n\t * == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=\n\t * p) prime[i] = false; } }\n\t * \n\t * // Print all prime numbers // for(int i = 2; i <= n; i++) // { //\n\t * if(prime[i] == true) // System.out.print(i + \" \"); // } }\n\t */\n \n\tstatic long power(long fac2, int y, int p) {\n\t\tlong res = 1;\n\t\tfac2 = fac2 % p;\n\t\twhile (y > 0) {\n\t\t\tif (y % 2 == 1)\n\t\t\t\tres = (res * fac2) % p;\n\t\t\tfac2 = (fac2 * fac2) % p;\n\t\t}\n\t\treturn res;\n\t}\n \n\tstatic long modInverse(long fac2, int p) {\n\t\treturn power(fac2, p - 2, p);\n\t}\n \n\tstatic boolean isPrime(int n) {\n\t\t// Corner cases\n\t\tif (n <= 1)\n\t\t\treturn false;\n\t\tif (n <= 3)\n\t\t\treturn true;\n \n\t\t// This is checked so that we can skip\n\t\t// middle five numbers in below loop\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n \n\t\tfor (int i = 5; i * i <= n; i = i + 6)\n\t\t\tif (n % i == 0 || n % (i + 2) == 0)\n\t\t\t\treturn false;\n \n\t\treturn true;\n\t}\n \n\tpublic static BigInteger lcmm(String a, String b) {\n\t\tBigInteger s = new BigInteger(a);\n\t\tBigInteger s1 = new BigInteger(b);\n\t\tBigInteger mul = s.multiply(s1);\n\t\tBigInteger gcd = s.gcd(s1);\n\t\tBigInteger lcm = mul.divide(gcd);\n\t\treturn lcm;\n\t}\n \n}",
"Main"
]
| import java.io.*;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.*;
public class Main {
static final int INF = (int) (1e9 + 10);
static final int MOD = (int) (1e9 + 7);
// static final int N = (int) (4e5 + 5);
// static ArrayList<Integer>[] graph;
// static boolean visited[];
// static long size[];
public static void main(String[] args) throws NumberFormatException, IOException {
FastReader sc = new FastReader();
PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
BufferedReader br = new BufferedReader(new InputStreamReader(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();
}
int i =0;
boolean got = false;
while(i < n){
if(a[i][0] == a[i][1]){
int j = i+1;
int c =1;
while(j < n && a[j][0] == a[j][1]){
j++;
c++;
}
if(c >= 3){
got = true;
break;
}
i = j;
}else{
i++;
}
}
if(got){
pr.println("Yes");
}else{
pr.println("No");
}
pr.flush();
pr.close();
}
static class Unionfind{
private int count = 0;
private int[] parent , rank;
public Unionfind(int n ){
count = n;
parent =new int[n+1];
rank =new int[n+1];
for(int i = 1 ; i <= n ; i++){
parent[i] = i;
}
}
public int find(int p){
while(p != parent[p]){
parent[p] = parent[parent[p]];
p = parent[p];
}
return p;
}
public void union(int p , int q){
int rootP = find(p);
int rootQ= find(q);
if(rootP == rootQ) return;
if(rank[rootQ] > rank[rootP]){
parent[rootP] = rootQ;
}else{
parent[rootQ] = rootP;
if(rank[rootP]== rank[rootQ]){
rank[rootP]++;
}
}
count--;
}
public int count(){
return count;
}
}
/*
* Template From Here
*/
private static boolean possible(long[] arr, int[] f, long mid, long k) {
long c = 0;
for (int i = 0; i < arr.length; i++) {
if ((arr[i] * f[f.length - i - 1]) > mid) {
c += (arr[i] - (mid / f[f.length - i - 1]));
}
}
// System.out.println(mid+" "+c);
if (c <= k)
return true;
return false;
}
public static int lowerBound(ArrayList<Integer> array, int length, long value) {
int low = 0;
int high = length;
while (low < high) {
final int mid = (low + high) / 2;
if (value <= array.get(mid)) {
high = mid;
} else {
low = mid + 1;
}
}
return low;
}
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader() {
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;
}
}
static long gcd(long a, long b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
static long lcm(long a, long b) {
return (a * b) / gcd(a, b);
}
public static void sortbyColumn(int[][] att, int col) {
// Using built-in sort function Arrays.sort
Arrays.sort(att, new Comparator<int[]>() {
@Override
// Compare values according to columns
public int compare(final int[] entry1, final int[] entry2) {
// To sort in descending order revert
// the '>' Operator
// if (entry1[col] > entry2[col])
// return 1;
// else //(entry1[col] >= entry2[col])
// return -1;
return new Integer(entry1[col]).compareTo(entry2[col]);
// return entry1[col].
}
}); // End of function call sort().
}
static class pair {
int V, I;
pair(int v, int i) {
V = v;
I = i;
}
}
public static int[] swap(int data[], int left, int right) {
int temp = data[left];
data[left] = data[right];
data[right] = temp;
return data;
}
public static int[] reverse(int data[], int left, int right) {
while (left < right) {
int temp = data[left];
data[left++] = data[right];
data[right--] = temp;
}
return data;
}
public static boolean findNextPermutation(int data[]) {
if (data.length <= 1)
return false;
int last = data.length - 2;
while (last >= 0) {
if (data[last] < data[last + 1]) {
break;
}
last--;
}
if (last < 0)
return false;
int nextGreater = data.length - 1;
for (int i = data.length - 1; i > last; i--) {
if (data[i] > data[last]) {
nextGreater = i;
break;
}
}
data = swap(data, nextGreater, last);
data = reverse(data, last + 1, data.length - 1);
return true;
}
static long nCr(long n, long r) {
if (n == r)
return 1;
return fact(n) / (fact(r) * fact(n - r));
}
static long fact(long n) {
long res = 1;
for (long i = 2; i <= n; i++)
res = res * i;
return res;
}
/*
* static boolean prime[] = new boolean[1000007];
*
* public static void sieveOfEratosthenes(int n) {
*
* for (int i = 0; i < n; i++) prime[i] = true; * for (int p = 2; p * p <=
* n; p++) { // If prime[p] is not changed, then it is a prime if (prime[p]
* == true) { // Update all multiples of p for (int i = p * p; i <= n; i +=
* p) prime[i] = false; } }
*
* // Print all prime numbers // for(int i = 2; i <= n; i++) // { //
* if(prime[i] == true) // System.out.print(i + " "); // } }
*/
static long power(long fac2, int y, int p) {
long res = 1;
fac2 = fac2 % p;
while (y > 0) {
if (y % 2 == 1)
res = (res * fac2) % p;
fac2 = (fac2 * fac2) % p;
}
return res;
}
static long modInverse(long fac2, int p) {
return power(fac2, p - 2, p);
}
static boolean isPrime(int n) {
// Corner cases
if (n <= 1)
return false;
if (n <= 3)
return true;
// This is checked so that we can skip
// middle five numbers in below loop
if (n % 2 == 0 || n % 3 == 0)
return false;
for (int i = 5; i * i <= n; i = i + 6)
if (n % i == 0 || n % (i + 2) == 0)
return false;
return true;
}
public static BigInteger lcmm(String a, String b) {
BigInteger s = new BigInteger(a);
BigInteger s1 = new BigInteger(b);
BigInteger mul = s.multiply(s1);
BigInteger gcd = s.gcd(s1);
BigInteger lcm = mul.divide(gcd);
return lcm;
}
}
|
[
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,
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,
3,
30,
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
],
[
182,
14
],
[
182,
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,
29
],
[
29,
30
],
[
29,
31
],
[
17,
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
],
[
59,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
55,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
17,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
75,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
15,
91
],
[
91,
92
],
[
182,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
93,
97
],
[
97,
98
],
[
93,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
93,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
108,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
118,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
107,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
93,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
137,
140
],
[
140,
141
],
[
93,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
149,
150
],
[
93,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
158,
159
],
[
93,
160
],
[
160,
161
],
[
160,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
162,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
166,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
162,
179
],
[
179,
180
],
[
0,
181
],
[
181,
182
],
[
181,
183
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\npublic class Main\n{\n static class FastReader\n {\n BufferedReader br;\n StringTokenizer st;\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\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 \n public static void main(String[] args)\n {\n FastReader s=new FastReader();\n int d=s.nextInt();\n int count=0;\n boolean ans=false;\n for(int i=0;i<d;i++) {\n \tint x=s.nextInt();\n \tint y=s.nextInt();\n \t\n \tif(x==y) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(ans==true) \n System.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\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.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main\n{\n static class FastReader\n {\n BufferedReader br;\n StringTokenizer st;\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\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 \n public static void main(String[] args)\n {\n FastReader s=new FastReader();\n int d=s.nextInt();\n int count=0;\n boolean ans=false;\n for(int i=0;i<d;i++) {\n \tint x=s.nextInt();\n \tint y=s.nextInt();\n \t\n \tif(x==y) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(ans==true) \n System.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args)\n {\n FastReader s=new FastReader();\n int d=s.nextInt();\n int count=0;\n boolean ans=false;\n for(int i=0;i<d;i++) {\n \tint x=s.nextInt();\n \tint y=s.nextInt();\n \t\n \tif(x==y) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(ans==true) \n System.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\n }",
"main",
"{\n FastReader s=new FastReader();\n int d=s.nextInt();\n int count=0;\n boolean ans=false;\n for(int i=0;i<d;i++) {\n \tint x=s.nextInt();\n \tint y=s.nextInt();\n \t\n \tif(x==y) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(ans==true) \n System.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\n }",
"FastReader s=new FastReader();",
"s",
"new FastReader()",
"int d=s.nextInt();",
"d",
"s.nextInt()",
"s.nextInt",
"s",
"int count=0;",
"count",
"0",
"boolean ans=false;",
"ans",
"false",
"for(int i=0;i<d;i++) {\n \tint x=s.nextInt();\n \tint y=s.nextInt();\n \t\n \tif(x==y) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<d",
"i",
"d",
"i++",
"i++",
"i",
"{\n \tint x=s.nextInt();\n \tint y=s.nextInt();\n \t\n \tif(x==y) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }",
"{\n \tint x=s.nextInt();\n \tint y=s.nextInt();\n \t\n \tif(x==y) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }",
"int x=s.nextInt();",
"x",
"s.nextInt()",
"s.nextInt",
"s",
"int y=s.nextInt();",
"y",
"s.nextInt()",
"s.nextInt",
"s",
"if(x==y) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}",
"x==y",
"x",
"y",
"{\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}",
"count++",
"count",
"if(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}",
"count==3",
"count",
"3",
"{\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}",
"ans=true",
"ans",
"true",
"break;",
"{\n \t\tcount=0;\n \t}",
"count=0",
"count",
"0",
"if(ans==true) \n System.out.println(\"Yes\");\n else\n \tSystem.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",
"static class FastReader\n {\n BufferedReader br;\n StringTokenizer st;\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\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 }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\n }",
"FastReader",
"{\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{\n static class FastReader\n {\n BufferedReader br;\n StringTokenizer st;\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\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 \n public static void main(String[] args)\n {\n FastReader s=new FastReader();\n int d=s.nextInt();\n int count=0;\n boolean ans=false;\n for(int i=0;i<d;i++) {\n \tint x=s.nextInt();\n \tint y=s.nextInt();\n \t\n \tif(x==y) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(ans==true) \n System.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\n }\n}",
"public class Main\n{\n static class FastReader\n {\n BufferedReader br;\n StringTokenizer st;\n public FastReader()\n {\n br = new BufferedReader(new\n InputStreamReader(System.in));\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 \n public static void main(String[] args)\n {\n FastReader s=new FastReader();\n int d=s.nextInt();\n int count=0;\n boolean ans=false;\n for(int i=0;i<d;i++) {\n \tint x=s.nextInt();\n \tint y=s.nextInt();\n \t\n \tif(x==y) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tans=true;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(ans==true) \n System.out.println(\"Yes\");\n else\n \tSystem.out.println(\"No\");\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main
{
static class FastReader
{
BufferedReader br;
StringTokenizer st;
public FastReader()
{
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;
}
}
public static void main(String[] args)
{
FastReader s=new FastReader();
int d=s.nextInt();
int count=0;
boolean ans=false;
for(int i=0;i<d;i++) {
int x=s.nextInt();
int y=s.nextInt();
if(x==y) {
count++;
if(count==3) {
ans=true;
break;
}
}
else {
count=0;
}
}
if(ans==true)
System.out.println("Yes");
else
System.out.println("No");
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
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,
3,
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
],
[
137,
5
],
[
137,
6
],
[
6,
7
],
[
6,
8
],
[
137,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
11,
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
],
[
11,
53
],
[
53,
54
],
[
53,
55
],
[
11,
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
],
[
11,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
120,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
9,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
]
| [
"\nimport java.util.*;\npublic class Main {\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) \n\t{\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{\n\t\t\tarr[i][0] = sc.nextInt();\n\t\t\tarr[i][1] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++)\n\t\t{\n\t\t\tif((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) \n\t{\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{\n\t\t\tarr[i][0] = sc.nextInt();\n\t\t\tarr[i][1] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++)\n\t\t{\n\t\t\tif((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\n\t}\n\n}",
"Main",
"public static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) \n\t{\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{\n\t\t\tarr[i][0] = sc.nextInt();\n\t\t\tarr[i][1] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++)\n\t\t{\n\t\t\tif((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\n\t}",
"main",
"{\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{\n\t\t\tarr[i][0] = sc.nextInt();\n\t\t\tarr[i][1] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++)\n\t\t{\n\t\t\tif((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\n\t}",
"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{\n\t\t\tarr[i][0] = sc.nextInt();\n\t\t\tarr[i][1] = sc.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tarr[i][0] = sc.nextInt();\n\t\t\tarr[i][1] = sc.nextInt();\n\t\t}",
"{\n\t\t\tarr[i][0] = sc.nextInt();\n\t\t\tarr[i][1] = sc.nextInt();\n\t\t}",
"arr[i][0] = sc.nextInt()",
"arr[i][0]",
"arr[i]",
"arr",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"arr[i][1] = sc.nextInt()",
"arr[i][1]",
"arr[i]",
"arr",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean flag = false;",
"flag",
"false",
"for(int i=0;i<n-2;i++)\n\t\t{\n\t\t\tif((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\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((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}",
"(arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1])",
"(arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1])",
"(arr[i][0]==arr[i][1])",
"arr[i][0]",
"arr[i]",
"arr",
"i",
"0",
"arr[i][1]",
"arr[i]",
"arr",
"i",
"1",
"(arr[i+1][0]==arr[i+1][1])",
"arr[i+1][0]",
"arr[i+1]",
"arr",
"i+1",
"i",
"1",
"0",
"arr[i+1][1]",
"arr[i+1]",
"arr",
"i+1",
"i",
"1",
"1",
"(arr[i+2][0]==arr[i+2][1])",
"arr[i+2][0]",
"arr[i+2]",
"arr",
"i+2",
"i",
"2",
"0",
"arr[i+2][1]",
"arr[i+2]",
"arr",
"i+2",
"i",
"2",
"1",
"{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}",
"flag = true",
"flag",
"true",
"break;",
"if(flag)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.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\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) \n\t{\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{\n\t\t\tarr[i][0] = sc.nextInt();\n\t\t\tarr[i][1] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++)\n\t\t{\n\t\t\tif((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\n\t}\n\n}",
"public class Main {\n\tpublic static Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) \n\t{\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{\n\t\t\tarr[i][0] = sc.nextInt();\n\t\t\tarr[i][1] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++)\n\t\t{\n\t\t\tif((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))\n\t\t\t{\n\t\t\t\tflag = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(flag)\n\t\t\tSystem.out.println(\"Yes\");\n\t\telse\n\t\t\tSystem.out.println(\"No\");\n\n\t}\n\n}",
"Main"
]
|
import java.util.*;
public class Main {
public static Scanner sc = new Scanner(System.in);
public static void main(String[] args)
{
int n = sc.nextInt();
int[][]arr = new int[n][2];
for(int i=0;i<n;i++)
{
arr[i][0] = sc.nextInt();
arr[i][1] = sc.nextInt();
}
boolean flag = false;
for(int i=0;i<n-2;i++)
{
if((arr[i][0]==arr[i][1]) && (arr[i+1][0]==arr[i+1][1]) && (arr[i+2][0]==arr[i+2][1]))
{
flag = true;
break;
}
}
if(flag)
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,
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,
14,
2,
18,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
30,
0,
13,
17,
14,
13,
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
],
[
100,
5
],
[
100,
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,
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
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
43,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
63,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
58,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
8,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
81,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
6,
97
],
[
97,
98
],
[
0,
99
],
[
99,
100
],
[
99,
101
]
]
| [
"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 a = sc.nextInt();\n\t\tint b = 0;\n\t\tboolean c = false;\n\t\t// 文字列の入力\n\t\tint[] d = new int[a];\n\t\tint[] e = new int[a];\n\t\tfor(int i = 0; i < a; i++){\n\t\t\td[i] = sc.nextInt();\n\t\t\te[i] = sc.nextInt();\n\t\t\tif(d[i] == e[i]){\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tb = 0;\n\t\t\t}\n\t\t}\n\t\tif(c){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t} \n\t\t\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\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint b = 0;\n\t\tboolean c = false;\n\t\t// 文字列の入力\n\t\tint[] d = new int[a];\n\t\tint[] e = new int[a];\n\t\tfor(int i = 0; i < a; i++){\n\t\t\td[i] = sc.nextInt();\n\t\t\te[i] = sc.nextInt();\n\t\t\tif(d[i] == e[i]){\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tb = 0;\n\t\t\t}\n\t\t}\n\t\tif(c){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t} \n\t\t\n\t\t\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint b = 0;\n\t\tboolean c = false;\n\t\t// 文字列の入力\n\t\tint[] d = new int[a];\n\t\tint[] e = new int[a];\n\t\tfor(int i = 0; i < a; i++){\n\t\t\td[i] = sc.nextInt();\n\t\t\te[i] = sc.nextInt();\n\t\t\tif(d[i] == e[i]){\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tb = 0;\n\t\t\t}\n\t\t}\n\t\tif(c){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t} \n\t\t\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint b = 0;\n\t\tboolean c = false;\n\t\t// 文字列の入力\n\t\tint[] d = new int[a];\n\t\tint[] e = new int[a];\n\t\tfor(int i = 0; i < a; i++){\n\t\t\td[i] = sc.nextInt();\n\t\t\te[i] = sc.nextInt();\n\t\t\tif(d[i] == e[i]){\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tb = 0;\n\t\t\t}\n\t\t}\n\t\tif(c){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t} \n\t\t\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 b = 0;",
"b",
"0",
"boolean c = false;",
"c",
"false",
"int[] d = new int[a];",
"d",
"new int[a]",
"a",
"int[] e = new int[a];",
"e",
"new int[a]",
"a",
"for(int i = 0; i < a; i++){\n\t\t\td[i] = sc.nextInt();\n\t\t\te[i] = sc.nextInt();\n\t\t\tif(d[i] == e[i]){\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tb = 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\td[i] = sc.nextInt();\n\t\t\te[i] = sc.nextInt();\n\t\t\tif(d[i] == e[i]){\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tb = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\td[i] = sc.nextInt();\n\t\t\te[i] = sc.nextInt();\n\t\t\tif(d[i] == e[i]){\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tb = 0;\n\t\t\t}\n\t\t}",
"d[i] = sc.nextInt()",
"d[i]",
"d",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"e[i] = sc.nextInt()",
"e[i]",
"e",
"i",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(d[i] == e[i]){\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tb = 0;\n\t\t\t}",
"d[i] == e[i]",
"d[i]",
"d",
"i",
"e[i]",
"e",
"i",
"{\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}",
"b++",
"b",
"if(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}",
"b == 3",
"b",
"3",
"{\n\t\t\t\t\tc = true;\n\t\t\t\t}",
"c = true",
"c",
"true",
"{\n\t\t\t\tb = 0;\n\t\t\t}",
"b = 0",
"b",
"0",
"if(c){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"c",
"{\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\t\tScanner sc = new Scanner(System.in);\n\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint b = 0;\n\t\tboolean c = false;\n\t\t// 文字列の入力\n\t\tint[] d = new int[a];\n\t\tint[] e = new int[a];\n\t\tfor(int i = 0; i < a; i++){\n\t\t\td[i] = sc.nextInt();\n\t\t\te[i] = sc.nextInt();\n\t\t\tif(d[i] == e[i]){\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tb = 0;\n\t\t\t}\n\t\t}\n\t\tif(c){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t} \n\t\t\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\t\t// 整数の入力\n\t\tint a = sc.nextInt();\n\t\tint b = 0;\n\t\tboolean c = false;\n\t\t// 文字列の入力\n\t\tint[] d = new int[a];\n\t\tint[] e = new int[a];\n\t\tfor(int i = 0; i < a; i++){\n\t\t\td[i] = sc.nextInt();\n\t\t\te[i] = sc.nextInt();\n\t\t\tif(d[i] == e[i]){\n\t\t\t\tb++;\n\t\t\t\tif(b == 3){\n\t\t\t\t\tc = true;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tb = 0;\n\t\t\t}\n\t\t}\n\t\tif(c){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t} \n\t\t\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 a = sc.nextInt();
int b = 0;
boolean c = false;
// 文字列の入力
int[] d = new int[a];
int[] e = new int[a];
for(int i = 0; i < a; i++){
d[i] = sc.nextInt();
e[i] = sc.nextInt();
if(d[i] == e[i]){
b++;
if(b == 3){
c = true;
}
}else{
b = 0;
}
}
if(c){
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,
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,
0,
13,
4,
18,
13,
13,
13,
30,
0,
13,
17,
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
],
[
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
],
[
55,
57
],
[
8,
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
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
84,
88
],
[
71,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
8,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
93,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
6,
109
],
[
109,
110
],
[
0,
111
],
[
111,
112
],
[
111,
113
]
]
| [
"import java.util.*;\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[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tint count = 0,max = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(d1[i] == d2[i]){\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(max >= 3) System.out.println(\"Yes\");\n\t\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\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; i++){\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tint count = 0,max = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(d1[i] == d2[i]){\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(max >= 3) System.out.println(\"Yes\");\n\t\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\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; i++){\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tint count = 0,max = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(d1[i] == d2[i]){\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(max >= 3) 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\tint[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tint count = 0,max = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(d1[i] == d2[i]){\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(max >= 3) 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",
"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\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",
"i",
"n",
"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",
"int count = 0",
"count",
"0",
"max = 0;",
"max",
"0",
"for(int i = 0; i < n; i++){\n\t\t\tif(d1[i] == d2[i]){\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}else{\n\t\t\t\tcount = 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\tif(d1[i] == d2[i]){\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(d1[i] == d2[i]){\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}",
"if(d1[i] == d2[i]){\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}",
"d1[i] == d2[i]",
"d1[i]",
"d1",
"i",
"d2[i]",
"d2",
"i",
"{\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}",
"count++",
"count",
"max = Math.max(max, count)",
"max",
"Math.max(max, count)",
"Math.max",
"Math",
"max",
"count",
"{\n\t\t\t\tcount = 0;\n\t\t\t}",
"count = 0",
"count",
"0",
"if(max >= 3) System.out.println(\"Yes\");\n\t\telse System.out.println(\"No\");",
"max >= 3",
"max",
"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[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\t\tfor(int i = 0; i < n; i++){\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tint count = 0,max = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(d1[i] == d2[i]){\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(max >= 3) System.out.println(\"Yes\");\n\t\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\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; i++){\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\t\n\t\tint count = 0,max = 0;\n\t\tfor(int i = 0; i < n; i++){\n\t\t\tif(d1[i] == d2[i]){\n\t\t\t\tcount++;\n\t\t\t\tmax = Math.max(max, count);\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(max >= 3) System.out.println(\"Yes\");\n\t\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[] d1 = new int[n];
int[] d2 = new int[n];
for(int i = 0; i < n; i++){
d1[i] = sc.nextInt();
d2[i] = sc.nextInt();
}
int count = 0,max = 0;
for(int i = 0; i < n; i++){
if(d1[i] == d2[i]){
count++;
max = Math.max(max, count);
}else{
count = 0;
}
}
if(max >= 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,
38,
5,
13,
30,
4,
18,
18,
13,
13,
17,
29,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
4,
18,
13,
41,
13,
17,
41,
13,
20,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
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,
3,
14,
13,
4,
18,
13,
17,
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
],
[
185,
11
],
[
185,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
19,
24
],
[
18,
25
],
[
15,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
26,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
26,
43
],
[
43,
44
],
[
43,
45
],
[
26,
46
],
[
46,
47
],
[
46,
48
],
[
26,
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
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
66,
73
],
[
63,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
74,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
96,
98
],
[
26,
99
],
[
99,
100
],
[
99,
101
],
[
26,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
102,
112
],
[
112,
113
],
[
113,
114
],
[
102,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
120,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
119,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
135,
136
],
[
135,
137
],
[
132,
138
],
[
131,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
139,
145
],
[
119,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
150,
152
],
[
147,
153
],
[
146,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
157,
159
],
[
154,
160
],
[
117,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
26,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
168,
171
],
[
166,
172
],
[
172,
173
],
[
173,
174
],
[
172,
175
],
[
26,
176
],
[
176,
177
],
[
177,
178
],
[
26,
179
],
[
179,
180
],
[
180,
181
],
[
12,
182
],
[
182,
183
],
[
0,
184
],
[
184,
185
],
[
184,
186
]
]
| [
"/* package codechef; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\n// import java.math.*;\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\t// your code goes here\n\t\ttry{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter ot=new PrintWriter(System.out);\n int n=Integer.parseInt(br.readLine().trim());\n \n int total=0;\n int a[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }\n boolean bool=false;\n for(int i=0;i<n-2;i++)\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 {\n bool=true;\n break;\n }\n }\n if(bool)\n ot.println(\"Yes\");\n else\n ot.println(\"No\");\n // while(t-->0)\n // {\n \n // }\n br.close();\n ot.close();\n \n } catch(Exception e){\n System.err.println(\"ERROR\");\n return;\n }\n }\n}\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\t// your code goes here\n\t\ttry{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter ot=new PrintWriter(System.out);\n int n=Integer.parseInt(br.readLine().trim());\n \n int total=0;\n int a[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }\n boolean bool=false;\n for(int i=0;i<n-2;i++)\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 {\n bool=true;\n break;\n }\n }\n if(bool)\n ot.println(\"Yes\");\n else\n ot.println(\"No\");\n // while(t-->0)\n // {\n \n // }\n br.close();\n ot.close();\n \n } catch(Exception e){\n System.err.println(\"ERROR\");\n return;\n }\n }\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\ttry{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter ot=new PrintWriter(System.out);\n int n=Integer.parseInt(br.readLine().trim());\n \n int total=0;\n int a[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }\n boolean bool=false;\n for(int i=0;i<n-2;i++)\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 {\n bool=true;\n break;\n }\n }\n if(bool)\n ot.println(\"Yes\");\n else\n ot.println(\"No\");\n // while(t-->0)\n // {\n \n // }\n br.close();\n ot.close();\n \n } catch(Exception e){\n System.err.println(\"ERROR\");\n return;\n }\n }",
"main",
"{\n\t\t// your code goes here\n\t\ttry{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter ot=new PrintWriter(System.out);\n int n=Integer.parseInt(br.readLine().trim());\n \n int total=0;\n int a[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }\n boolean bool=false;\n for(int i=0;i<n-2;i++)\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 {\n bool=true;\n break;\n }\n }\n if(bool)\n ot.println(\"Yes\");\n else\n ot.println(\"No\");\n // while(t-->0)\n // {\n \n // }\n br.close();\n ot.close();\n \n } catch(Exception e){\n System.err.println(\"ERROR\");\n return;\n }\n }",
"try{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter ot=new PrintWriter(System.out);\n int n=Integer.parseInt(br.readLine().trim());\n \n int total=0;\n int a[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }\n boolean bool=false;\n for(int i=0;i<n-2;i++)\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 {\n bool=true;\n break;\n }\n }\n if(bool)\n ot.println(\"Yes\");\n else\n ot.println(\"No\");\n // while(t-->0)\n // {\n \n // }\n br.close();\n ot.close();\n \n } catch(Exception e){\n System.err.println(\"ERROR\");\n return;\n }",
"catch(Exception e){\n System.err.println(\"ERROR\");\n return;\n }",
"Exception e",
"{\n System.err.println(\"ERROR\");\n return;\n }",
"System.err.println(\"ERROR\")",
"System.err.println",
"System.err",
"System",
"System.err",
"\"ERROR\"",
"return;",
"{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter ot=new PrintWriter(System.out);\n int n=Integer.parseInt(br.readLine().trim());\n \n int total=0;\n int a[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }\n boolean bool=false;\n for(int i=0;i<n-2;i++)\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 {\n bool=true;\n break;\n }\n }\n if(bool)\n ot.println(\"Yes\");\n else\n ot.println(\"No\");\n // while(t-->0)\n // {\n \n // }\n br.close();\n ot.close();\n \n }",
"BufferedReader br=new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"PrintWriter ot=new PrintWriter(System.out);",
"ot",
"new PrintWriter(System.out)",
"int n=Integer.parseInt(br.readLine().trim());",
"n",
"Integer.parseInt(br.readLine().trim())",
"Integer.parseInt",
"Integer",
"br.readLine().trim()",
"br.readLine().trim",
"br.readLine()",
"br.readLine",
"br",
"int total=0;",
"total",
"0",
"int a[][]=new int[n][2];",
"a",
"new int[n][2]",
"n",
"2",
"for(int i=0;i<n;i++)\n {\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }",
"{\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }",
"String s[]=br.readLine().trim().split(\" \");",
"s",
"br.readLine().trim().split(\" \")",
"br.readLine().trim().split",
"br.readLine().trim()",
"br.readLine().trim",
"br.readLine()",
"br.readLine",
"br",
"\" \"",
"for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<2",
"j",
"2",
"j++",
"j++",
"j",
"{\n a[i][j]=Integer.parseInt(s[j]);\n }",
"{\n a[i][j]=Integer.parseInt(s[j]);\n }",
"a[i][j]=Integer.parseInt(s[j])",
"a[i][j]",
"a[i]",
"a",
"i",
"j",
"Integer.parseInt(s[j])",
"Integer.parseInt",
"Integer",
"s[j]",
"s",
"j",
"boolean bool=false;",
"bool",
"false",
"for(int i=0;i<n-2;i++)\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 {\n bool=true;\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 {\n bool=true;\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 {\n bool=true;\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 {\n bool=true;\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 bool=true;\n break;\n }",
"bool=true",
"bool",
"true",
"break;",
"if(bool)\n ot.println(\"Yes\");\n else\n ot.println(\"No\");",
"bool",
"ot.println(\"Yes\")",
"ot.println",
"ot",
"\"Yes\"",
"ot.println(\"No\")",
"ot.println",
"ot",
"\"No\"",
"br.close()",
"br.close",
"br",
"ot.close()",
"ot.close",
"ot",
"String[] args",
"args",
"public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\ttry{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter ot=new PrintWriter(System.out);\n int n=Integer.parseInt(br.readLine().trim());\n \n int total=0;\n int a[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }\n boolean bool=false;\n for(int i=0;i<n-2;i++)\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 {\n bool=true;\n break;\n }\n }\n if(bool)\n ot.println(\"Yes\");\n else\n ot.println(\"No\");\n // while(t-->0)\n // {\n \n // }\n br.close();\n ot.close();\n \n } catch(Exception e){\n System.err.println(\"ERROR\");\n return;\n }\n }\n}",
"public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\t// your code goes here\n\t\ttry{\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n PrintWriter ot=new PrintWriter(System.out);\n int n=Integer.parseInt(br.readLine().trim());\n \n int total=0;\n int a[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n String s[]=br.readLine().trim().split(\" \");\n for(int j=0;j<2;j++)\n {\n a[i][j]=Integer.parseInt(s[j]);\n }\n }\n boolean bool=false;\n for(int i=0;i<n-2;i++)\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 {\n bool=true;\n break;\n }\n }\n if(bool)\n ot.println(\"Yes\");\n else\n ot.println(\"No\");\n // while(t-->0)\n // {\n \n // }\n br.close();\n ot.close();\n \n } catch(Exception e){\n System.err.println(\"ERROR\");\n return;\n }\n }\n}",
"Main"
]
| /* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
// import java.math.*;
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
{
// your code goes here
try{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
PrintWriter ot=new PrintWriter(System.out);
int n=Integer.parseInt(br.readLine().trim());
int total=0;
int a[][]=new int[n][2];
for(int i=0;i<n;i++)
{
String s[]=br.readLine().trim().split(" ");
for(int j=0;j<2;j++)
{
a[i][j]=Integer.parseInt(s[j]);
}
}
boolean bool=false;
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])
{
bool=true;
break;
}
}
if(bool)
ot.println("Yes");
else
ot.println("No");
// while(t-->0)
// {
// }
br.close();
ot.close();
} catch(Exception e){
System.err.println("ERROR");
return;
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
4,
13,
41,
13,
17,
41,
13,
17,
41,
13,
18,
13,
13,
42,
2,
13,
13,
30,
41,
13,
4,
13,
41,
13,
4,
13,
14,
2,
13,
13,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
30,
0,
13,
17,
40,
13,
4,
18,
13,
8,
2,
13,
17,
17,
17,
12,
13,
30,
0,
13,
8,
4,
18,
13,
18,
13,
13,
20,
0,
13,
20,
41,
13,
4,
18,
13,
4,
13,
4,
18,
13,
14,
40,
4,
18,
13,
4,
13,
2,
2,
4,
18,
13,
13,
17,
12,
13,
30,
4,
18,
20,
23,
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,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
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,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
13,
29,
13,
23,
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,
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,
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
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
543,
17
],
[
543,
18
],
[
18,
19
],
[
543,
20
],
[
20,
21
],
[
543,
22
],
[
22,
23
],
[
22,
24
],
[
543,
25
],
[
25,
26
],
[
25,
27
],
[
543,
29
],
[
29,
30
],
[
29,
31
],
[
543,
32
],
[
32,
33
],
[
32,
34
],
[
543,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
37,
45
],
[
45,
46
],
[
45,
47
],
[
37,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
50,
52
],
[
37,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
57,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
75,
79
],
[
66,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
57,
84
],
[
84,
85
],
[
37,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
89,
94
],
[
543,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
100,
104
],
[
104,
105
],
[
104,
106
],
[
100,
107
],
[
97,
108
],
[
108,
109
],
[
108,
110
],
[
97,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
97,
116
],
[
116,
117
],
[
97,
118
],
[
118,
119
],
[
119,
120
],
[
97,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
121,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
129,
133
],
[
128,
134
],
[
543,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
135,
141
],
[
141,
142
],
[
543,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
146,
151
],
[
151,
152
],
[
145,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
153,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
165,
166
],
[
161,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
170,
173
],
[
157,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
174,
178
],
[
178,
179
],
[
179,
180
],
[
145,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
543,
186
],
[
186,
187
],
[
186,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
191,
195
],
[
195,
196
],
[
195,
197
],
[
186,
198
],
[
198,
199
],
[
543,
200
],
[
200,
201
],
[
200,
202
],
[
202,
203
],
[
203,
204
],
[
202,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
207,
212
],
[
212,
213
],
[
206,
214
],
[
214,
215
],
[
214,
216
],
[
202,
217
],
[
217,
218
],
[
543,
219
],
[
219,
220
],
[
219,
221
],
[
221,
222
],
[
222,
223
],
[
223,
224
],
[
224,
225
],
[
223,
226
],
[
226,
227
],
[
543,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
232,
233
],
[
543,
234
],
[
234,
235
],
[
234,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
236,
241
],
[
241,
242
],
[
241,
243
],
[
236,
244
],
[
244,
245
],
[
245,
246
],
[
246,
247
],
[
246,
248
],
[
244,
249
],
[
249,
250
],
[
250,
251
],
[
251,
252
],
[
250,
253
],
[
249,
254
],
[
254,
255
],
[
254,
256
],
[
256,
257
],
[
236,
258
],
[
258,
259
],
[
259,
260
],
[
260,
261
],
[
543,
262
],
[
262,
263
],
[
262,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
264,
269
],
[
269,
270
],
[
269,
271
],
[
271,
272
],
[
264,
273
],
[
273,
274
],
[
273,
275
],
[
264,
276
],
[
276,
277
],
[
277,
278
],
[
278,
279
],
[
278,
280
],
[
277,
281
],
[
281,
282
],
[
282,
283
],
[
282,
284
],
[
276,
285
],
[
285,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
289,
290
],
[
286,
291
],
[
285,
292
],
[
292,
293
],
[
292,
294
],
[
294,
295
],
[
264,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
297,
301
],
[
297,
302
],
[
302,
303
],
[
303,
304
],
[
302,
305
],
[
302,
306
],
[
262,
307
],
[
307,
308
],
[
543,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
311,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
316,
321
],
[
321,
322
],
[
321,
323
],
[
316,
324
],
[
324,
325
],
[
325,
326
],
[
316,
327
],
[
327,
328
],
[
328,
329
],
[
329,
330
],
[
329,
331
],
[
328,
332
],
[
332,
333
],
[
332,
334
],
[
311,
335
],
[
335,
336
],
[
309,
337
],
[
337,
338
],
[
309,
339
],
[
339,
340
],
[
543,
341
],
[
341,
342
],
[
341,
343
],
[
343,
344
],
[
344,
345
],
[
344,
346
],
[
343,
348
],
[
348,
349
],
[
349,
350
],
[
350,
351
],
[
350,
352
],
[
348,
353
],
[
353,
354
],
[
353,
355
],
[
348,
356
],
[
356,
357
],
[
357,
358
],
[
348,
359
],
[
359,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
360,
364
],
[
364,
365
],
[
343,
366
],
[
366,
367
],
[
341,
368
],
[
368,
369
],
[
543,
370
],
[
370,
371
],
[
370,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
372,
376
],
[
376,
377
],
[
372,
378
],
[
378,
379
],
[
378,
380
],
[
372,
381
],
[
381,
382
],
[
382,
383
],
[
383,
384
],
[
384,
385
],
[
384,
386
],
[
386,
387
],
[
383,
388
],
[
388,
389
],
[
382,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
393,
394
],
[
393,
395
],
[
392,
396
],
[
396,
397
],
[
396,
398
],
[
391,
399
],
[
399,
400
],
[
399,
401
],
[
372,
402
],
[
402,
403
],
[
403,
404
],
[
403,
405
],
[
402,
406
],
[
406,
407
],
[
407,
408
],
[
407,
409
],
[
406,
410
],
[
410,
411
],
[
410,
412
],
[
412,
413
],
[
372,
414
],
[
414,
415
],
[
414,
416
],
[
416,
417
],
[
417,
418
],
[
418,
419
],
[
419,
420
],
[
419,
421
],
[
418,
422
],
[
422,
423
],
[
422,
424
],
[
417,
425
],
[
425,
426
],
[
426,
427
],
[
426,
428
],
[
428,
429
],
[
429,
430
],
[
429,
431
],
[
428,
432
],
[
432,
433
],
[
432,
434
],
[
417,
435
],
[
435,
436
],
[
436,
437
],
[
437,
438
],
[
437,
439
],
[
439,
440
],
[
437,
441
],
[
416,
442
],
[
442,
443
],
[
442,
444
],
[
444,
445
],
[
543,
446
],
[
446,
447
],
[
446,
448
],
[
448,
449
],
[
449,
450
],
[
449,
451
],
[
448,
452
],
[
452,
453
],
[
448,
454
],
[
454,
455
],
[
454,
456
],
[
448,
457
],
[
457,
458
],
[
458,
459
],
[
459,
460
],
[
460,
461
],
[
460,
462
],
[
462,
463
],
[
459,
464
],
[
464,
465
],
[
458,
466
],
[
466,
467
],
[
467,
468
],
[
468,
469
],
[
469,
470
],
[
469,
471
],
[
468,
472
],
[
472,
473
],
[
472,
474
],
[
467,
475
],
[
475,
476
],
[
475,
477
],
[
448,
478
],
[
478,
479
],
[
479,
480
],
[
479,
481
],
[
478,
482
],
[
482,
483
],
[
483,
484
],
[
483,
485
],
[
482,
486
],
[
486,
487
],
[
486,
488
],
[
488,
489
],
[
448,
490
],
[
490,
491
],
[
490,
492
],
[
492,
493
],
[
493,
494
],
[
494,
495
],
[
495,
496
],
[
495,
497
],
[
494,
498
],
[
498,
499
],
[
498,
500
],
[
493,
501
],
[
501,
502
],
[
502,
503
],
[
502,
504
],
[
504,
505
],
[
505,
506
],
[
505,
507
],
[
504,
508
],
[
508,
509
],
[
508,
510
],
[
493,
511
],
[
511,
512
],
[
512,
513
],
[
513,
514
],
[
513,
515
],
[
515,
516
],
[
513,
517
],
[
492,
518
],
[
518,
519
],
[
518,
520
],
[
520,
521
],
[
543,
522
],
[
522,
523
],
[
522,
524
],
[
524,
525
],
[
525,
526
],
[
526,
527
],
[
527,
528
],
[
528,
529
],
[
526,
530
],
[
525,
531
],
[
531,
532
],
[
532,
533
],
[
533,
534
],
[
533,
535
],
[
531,
536
],
[
536,
537
],
[
537,
538
],
[
536,
539
],
[
522,
540
],
[
540,
541
],
[
0,
542
],
[
542,
543
],
[
542,
544
]
]
| [
"import java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.*;\n\npublic class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n\n void solve() throws IOException {\n int N = ni();\n int i = 0, count = 0, ans = Integer.MIN_VALUE;\n while(i < N) {\n int a = ni(), b = ni();\n if(a == b) {\n count++;\n ans = Math.max(count, ans);\n } else {\n count = 0;\n }\n i++;\n }\n out.println(ans >= 3 ? \"Yes\" : \"No\");\n }\n\n void run() throws Exception\n {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n\n long s = System.currentTimeMillis();\n solve();\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n\n public static void main(String[] args) throws Exception { new Main().run(); }\n\n private byte[] inbuf = new byte[1024];\n public int lenbuf = 0, ptrbuf = 0;\n\n private int readByte()\n {\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 }\n return inbuf[ptrbuf++];\n }\n\n private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n\n private double nd() { return Double.parseDouble(ns()); }\n private char nc() { return (char)skip(); }\n\n private String ns()\n {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n private char[] ns(int n)\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 }\n return n == p ? buf : Arrays.copyOf(buf, p);\n }\n\n private char[][] nm(int n, int m)\n {\n char[][] map = new char[n][];\n for(int i = 0;i < n;i++)map[i] = ns(m);\n return map;\n }\n\n private int[] na(int n)\n {\n int[] a = new int[n];\n for(int i = 0;i < n;i++)a[i] = ni();\n return a;\n }\n\n private int ni()\n {\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\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 private long nl()\n {\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\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 private void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n\n}",
"import java.io.ByteArrayInputStream;",
"ByteArrayInputStream",
"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.util.*;",
"util.*",
"java",
"public class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n\n void solve() throws IOException {\n int N = ni();\n int i = 0, count = 0, ans = Integer.MIN_VALUE;\n while(i < N) {\n int a = ni(), b = ni();\n if(a == b) {\n count++;\n ans = Math.max(count, ans);\n } else {\n count = 0;\n }\n i++;\n }\n out.println(ans >= 3 ? \"Yes\" : \"No\");\n }\n\n void run() throws Exception\n {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n\n long s = System.currentTimeMillis();\n solve();\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n\n public static void main(String[] args) throws Exception { new Main().run(); }\n\n private byte[] inbuf = new byte[1024];\n public int lenbuf = 0, ptrbuf = 0;\n\n private int readByte()\n {\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 }\n return inbuf[ptrbuf++];\n }\n\n private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n\n private double nd() { return Double.parseDouble(ns()); }\n private char nc() { return (char)skip(); }\n\n private String ns()\n {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n private char[] ns(int n)\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 }\n return n == p ? buf : Arrays.copyOf(buf, p);\n }\n\n private char[][] nm(int n, int m)\n {\n char[][] map = new char[n][];\n for(int i = 0;i < n;i++)map[i] = ns(m);\n return map;\n }\n\n private int[] na(int n)\n {\n int[] a = new int[n];\n for(int i = 0;i < n;i++)a[i] = ni();\n return a;\n }\n\n private int ni()\n {\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\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 private long nl()\n {\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\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 private void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n\n}",
"Main",
"InputStream is;",
"is",
"PrintWriter out;",
"out",
"String INPUT = \"\";",
"INPUT",
"\"\"",
"private byte[] inbuf = new byte[1024];",
"inbuf",
"new byte[1024]",
"1024",
"public int lenbuf = 0",
"lenbuf",
"0",
"ptrbuf = 0;",
"ptrbuf",
"0",
"void solve() throws IOException {\n int N = ni();\n int i = 0, count = 0, ans = Integer.MIN_VALUE;\n while(i < N) {\n int a = ni(), b = ni();\n if(a == b) {\n count++;\n ans = Math.max(count, ans);\n } else {\n count = 0;\n }\n i++;\n }\n out.println(ans >= 3 ? \"Yes\" : \"No\");\n }",
"solve",
"{\n int N = ni();\n int i = 0, count = 0, ans = Integer.MIN_VALUE;\n while(i < N) {\n int a = ni(), b = ni();\n if(a == b) {\n count++;\n ans = Math.max(count, ans);\n } else {\n count = 0;\n }\n i++;\n }\n out.println(ans >= 3 ? \"Yes\" : \"No\");\n }",
"int N = ni();",
"N",
"ni()",
"ni",
"int i = 0",
"i",
"0",
"count = 0",
"count",
"0",
"ans = Integer.MIN_VALUE;",
"ans",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"while(i < N) {\n int a = ni(), b = ni();\n if(a == b) {\n count++;\n ans = Math.max(count, ans);\n } else {\n count = 0;\n }\n i++;\n }",
"i < N",
"i",
"N",
"{\n int a = ni(), b = ni();\n if(a == b) {\n count++;\n ans = Math.max(count, ans);\n } else {\n count = 0;\n }\n i++;\n }",
"int a = ni()",
"a",
"ni()",
"ni",
"b = ni();",
"b",
"ni()",
"ni",
"if(a == b) {\n count++;\n ans = Math.max(count, ans);\n } else {\n count = 0;\n }",
"a == b",
"a",
"b",
"{\n count++;\n ans = Math.max(count, ans);\n }",
"count++",
"count",
"ans = Math.max(count, ans)",
"ans",
"Math.max(count, ans)",
"Math.max",
"Math",
"count",
"ans",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"i++",
"i",
"out.println(ans >= 3 ? \"Yes\" : \"No\")",
"out.println",
"out",
"ans >= 3 ? \"Yes\" : \"No\"",
"ans >= 3",
"ans",
"3",
"\"Yes\"",
"\"No\"",
"void run() throws Exception\n {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n\n long s = System.currentTimeMillis();\n solve();\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\n long s = System.currentTimeMillis();\n solve();\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",
"solve()",
"solve",
"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\"",
"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",
"private int readByte()\n {\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 }\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 }\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",
"private 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",
"private 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",
"private double nd() { return Double.parseDouble(ns()); }",
"nd",
"{ return Double.parseDouble(ns()); }",
"return Double.parseDouble(ns());",
"Double.parseDouble(ns())",
"Double.parseDouble",
"Double",
"ns()",
"ns",
"private char nc() { return (char)skip(); }",
"nc",
"{ return (char)skip(); }",
"return (char)skip();",
"(char)skip()",
"skip",
"private String ns()\n {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"ns",
"{\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }",
"int b = skip();",
"b",
"skip()",
"skip",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')\n sb.appendCodePoint(b);\n b = readByte();\n }",
"!(isSpaceChar(b))",
"(isSpaceChar(b))",
"isSpaceChar",
"b",
"{ // when nextLine, (isSpaceChar(b) && b != ' ')\n sb.appendCodePoint(b);\n b = readByte();\n }",
"sb.appendCodePoint(b)",
"sb.appendCodePoint",
"sb",
"b",
"b = readByte()",
"b",
"readByte()",
"readByte",
"return sb.toString();",
"sb.toString()",
"sb.toString",
"sb",
"private char[] ns(int n)\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 }\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 }\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",
"private char[][] nm(int n, int m)\n {\n char[][] map = new char[n][];\n for(int i = 0;i < n;i++)map[i] = ns(m);\n return map;\n }",
"nm",
"{\n char[][] map = new char[n][];\n for(int i = 0;i < n;i++)map[i] = ns(m);\n return map;\n }",
"char[][] map = new char[n][];",
"map",
"new char[n][]",
"n",
"for(int i = 0;i < n;i++)map[i] = ns(m);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"map[i] = ns(m);",
"map[i] = ns(m)",
"map[i]",
"map",
"i",
"ns(m)",
"ns",
"m",
"return map;",
"map",
"int n",
"n",
"int m",
"m",
"private int[] na(int n)\n {\n int[] a = new int[n];\n for(int i = 0;i < n;i++)a[i] = ni();\n return a;\n }",
"na",
"{\n int[] a = new int[n];\n for(int i = 0;i < n;i++)a[i] = ni();\n return a;\n }",
"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]",
"a",
"i",
"ni()",
"ni",
"return a;",
"a",
"int n",
"n",
"private int ni()\n {\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\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\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",
"private long nl()\n {\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\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\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",
"private 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 void solve() throws IOException {\n int N = ni();\n int i = 0, count = 0, ans = Integer.MIN_VALUE;\n while(i < N) {\n int a = ni(), b = ni();\n if(a == b) {\n count++;\n ans = Math.max(count, ans);\n } else {\n count = 0;\n }\n i++;\n }\n out.println(ans >= 3 ? \"Yes\" : \"No\");\n }\n\n void run() throws Exception\n {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n\n long s = System.currentTimeMillis();\n solve();\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n\n public static void main(String[] args) throws Exception { new Main().run(); }\n\n private byte[] inbuf = new byte[1024];\n public int lenbuf = 0, ptrbuf = 0;\n\n private int readByte()\n {\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 }\n return inbuf[ptrbuf++];\n }\n\n private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n\n private double nd() { return Double.parseDouble(ns()); }\n private char nc() { return (char)skip(); }\n\n private String ns()\n {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n private char[] ns(int n)\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 }\n return n == p ? buf : Arrays.copyOf(buf, p);\n }\n\n private char[][] nm(int n, int m)\n {\n char[][] map = new char[n][];\n for(int i = 0;i < n;i++)map[i] = ns(m);\n return map;\n }\n\n private int[] na(int n)\n {\n int[] a = new int[n];\n for(int i = 0;i < n;i++)a[i] = ni();\n return a;\n }\n\n private int ni()\n {\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\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 private long nl()\n {\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\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 private void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n\n}",
"public class Main {\n InputStream is;\n PrintWriter out;\n String INPUT = \"\";\n\n void solve() throws IOException {\n int N = ni();\n int i = 0, count = 0, ans = Integer.MIN_VALUE;\n while(i < N) {\n int a = ni(), b = ni();\n if(a == b) {\n count++;\n ans = Math.max(count, ans);\n } else {\n count = 0;\n }\n i++;\n }\n out.println(ans >= 3 ? \"Yes\" : \"No\");\n }\n\n void run() throws Exception\n {\n is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n out = new PrintWriter(System.out);\n\n long s = System.currentTimeMillis();\n solve();\n out.flush();\n if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+\"ms\");\n }\n\n public static void main(String[] args) throws Exception { new Main().run(); }\n\n private byte[] inbuf = new byte[1024];\n public int lenbuf = 0, ptrbuf = 0;\n\n private int readByte()\n {\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 }\n return inbuf[ptrbuf++];\n }\n\n private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }\n private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }\n\n private double nd() { return Double.parseDouble(ns()); }\n private char nc() { return (char)skip(); }\n\n private String ns()\n {\n int b = skip();\n StringBuilder sb = new StringBuilder();\n while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')\n sb.appendCodePoint(b);\n b = readByte();\n }\n return sb.toString();\n }\n\n private char[] ns(int n)\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 }\n return n == p ? buf : Arrays.copyOf(buf, p);\n }\n\n private char[][] nm(int n, int m)\n {\n char[][] map = new char[n][];\n for(int i = 0;i < n;i++)map[i] = ns(m);\n return map;\n }\n\n private int[] na(int n)\n {\n int[] a = new int[n];\n for(int i = 0;i < n;i++)a[i] = ni();\n return a;\n }\n\n private int ni()\n {\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\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 private long nl()\n {\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\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 private void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }\n\n}",
"Main"
]
| import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
public class Main {
InputStream is;
PrintWriter out;
String INPUT = "";
void solve() throws IOException {
int N = ni();
int i = 0, count = 0, ans = Integer.MIN_VALUE;
while(i < N) {
int a = ni(), b = ni();
if(a == b) {
count++;
ans = Math.max(count, ans);
} else {
count = 0;
}
i++;
}
out.println(ans >= 3 ? "Yes" : "No");
}
void run() throws Exception
{
is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
out = new PrintWriter(System.out);
long s = System.currentTimeMillis();
solve();
out.flush();
if(!INPUT.isEmpty())tr(System.currentTimeMillis()-s+"ms");
}
public static void main(String[] args) throws Exception { new Main().run(); }
private byte[] inbuf = new byte[1024];
public int lenbuf = 0, ptrbuf = 0;
private 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++];
}
private boolean isSpaceChar(int c) { return !(c >= 33 && c <= 126); }
private int skip() { int b; while((b = readByte()) != -1 && isSpaceChar(b)); return b; }
private double nd() { return Double.parseDouble(ns()); }
private char nc() { return (char)skip(); }
private String ns()
{
int b = skip();
StringBuilder sb = new StringBuilder();
while(!(isSpaceChar(b))){ // when nextLine, (isSpaceChar(b) && b != ' ')
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
private 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);
}
private char[][] nm(int n, int m)
{
char[][] map = new char[n][];
for(int i = 0;i < n;i++)map[i] = ns(m);
return map;
}
private int[] na(int n)
{
int[] a = new int[n];
for(int i = 0;i < n;i++)a[i] = ni();
return a;
}
private 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();
}
}
private 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();
}
}
private void tr(Object... o) { if(INPUT.length() > 0)System.out.println(Arrays.deepToString(o)); }
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
2,
17,
13,
11,
1,
41,
13,
17,
2,
13,
2,
17,
13,
1,
0,
13,
17,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
2,
13,
17,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
17,
2,
13,
17,
1,
0,
13,
17,
30,
30,
14,
2,
2,
2,
18,
13,
13,
18,
13,
2,
13,
17,
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,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
123,
5
],
[
123,
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
],
[
34,
36
],
[
23,
37
],
[
38,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
8,
55
],
[
55,
56
],
[
55,
57
],
[
8,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
58,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
58,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
78,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
78,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
88,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
78,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
99,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
76,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
8,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
6,
120
],
[
120,
121
],
[
0,
122
],
[
122,
123
],
[
122,
124
]
]
| [
"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\n\t\t//入力値取得\n\t\tint N = scan.nextInt();\n\n\t\tint[] D = new int[2 * N];\n\n\t\tfor (int i = 0; i < 2 * N; i += 2) {\n\t\t\tD[i] = scan.nextInt();\n\t\t\tD[i + 1] = scan.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\n\t\tfor (int i = 0; i < 2 * (N - 2); i += 2) {\n\t\t\tif (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\n\t\t//結果出力\n\t\tSystem.out.println(ans);\n\t}\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\n\t\t//入力値取得\n\t\tint N = scan.nextInt();\n\n\t\tint[] D = new int[2 * N];\n\n\t\tfor (int i = 0; i < 2 * N; i += 2) {\n\t\t\tD[i] = scan.nextInt();\n\t\t\tD[i + 1] = scan.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\n\t\tfor (int i = 0; i < 2 * (N - 2); i += 2) {\n\t\t\tif (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\n\t\t//結果出力\n\t\tSystem.out.println(ans);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\t//入力値取得\n\t\tint N = scan.nextInt();\n\n\t\tint[] D = new int[2 * N];\n\n\t\tfor (int i = 0; i < 2 * N; i += 2) {\n\t\t\tD[i] = scan.nextInt();\n\t\t\tD[i + 1] = scan.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\n\t\tfor (int i = 0; i < 2 * (N - 2); i += 2) {\n\t\t\tif (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\n\t\t//結果出力\n\t\tSystem.out.println(ans);\n\t}",
"main",
"{\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\t//入力値取得\n\t\tint N = scan.nextInt();\n\n\t\tint[] D = new int[2 * N];\n\n\t\tfor (int i = 0; i < 2 * N; i += 2) {\n\t\t\tD[i] = scan.nextInt();\n\t\t\tD[i + 1] = scan.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\n\t\tfor (int i = 0; i < 2 * (N - 2); i += 2) {\n\t\t\tif (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\n\t\t//結果出力\n\t\tSystem.out.println(ans);\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] D = new int[2 * N];",
"D",
"new int[2 * N]",
"2 * N",
"2",
"N",
"for (int i = 0; i < 2 * N; i += 2) {\n\t\t\tD[i] = scan.nextInt();\n\t\t\tD[i + 1] = scan.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 2 * N",
"i",
"2 * N",
"2",
"N",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tD[i] = scan.nextInt();\n\t\t\tD[i + 1] = scan.nextInt();\n\t\t}",
"{\n\t\t\tD[i] = scan.nextInt();\n\t\t\tD[i + 1] = scan.nextInt();\n\t\t}",
"D[i] = scan.nextInt()",
"D[i]",
"D",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"D[i + 1] = scan.nextInt()",
"D[i + 1]",
"D",
"i + 1",
"i",
"1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"String ans = \"No\";",
"ans",
"\"No\"",
"for (int i = 0; i < 2 * (N - 2); i += 2) {\n\t\t\tif (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 2 * (N - 2)",
"i",
"2 * (N - 2)",
"2",
"(N - 2)",
"N",
"2",
"i += 2",
"i += 2",
"i",
"2",
"{\n\t\t\tif (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}",
"if (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}",
"D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]",
"D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]",
"D[i] == D[i + 1]",
"D[i]",
"D",
"i",
"D[i + 1]",
"D",
"i + 1",
"i",
"1",
"D[i + 2] == D[i + 3]",
"D[i + 2]",
"D",
"i + 2",
"i",
"2",
"D[i + 3]",
"D",
"i + 3",
"i",
"3",
"D[i + 4] == D[i + 5]",
"D[i + 4]",
"D",
"i + 4",
"i",
"4",
"D[i + 5]",
"D",
"i + 5",
"i",
"5",
"{\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\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\t//入力値取得\n\t\tint N = scan.nextInt();\n\n\t\tint[] D = new int[2 * N];\n\n\t\tfor (int i = 0; i < 2 * N; i += 2) {\n\t\t\tD[i] = scan.nextInt();\n\t\t\tD[i + 1] = scan.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\n\t\tfor (int i = 0; i < 2 * (N - 2); i += 2) {\n\t\t\tif (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\n\t\t//結果出力\n\t\tSystem.out.println(ans);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\t//入力値取得\n\t\tint N = scan.nextInt();\n\n\t\tint[] D = new int[2 * N];\n\n\t\tfor (int i = 0; i < 2 * N; i += 2) {\n\t\t\tD[i] = scan.nextInt();\n\t\t\tD[i + 1] = scan.nextInt();\n\t\t}\n\t\tString ans = \"No\";\n\n\t\tfor (int i = 0; i < 2 * (N - 2); i += 2) {\n\t\t\tif (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {\n\t\t\t\tans = \"Yes\";\n\t\t\t}\n\t\t}\n\n\t\t//結果出力\n\t\tSystem.out.println(ans);\n\t}\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[] D = new int[2 * N];
for (int i = 0; i < 2 * N; i += 2) {
D[i] = scan.nextInt();
D[i + 1] = scan.nextInt();
}
String ans = "No";
for (int i = 0; i < 2 * (N - 2); i += 2) {
if (D[i] == D[i + 1] && D[i + 2] == D[i + 3] && D[i + 4] == D[i + 5]) {
ans = "Yes";
}
}
//結果出力
System.out.println(ans);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
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,
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,
13,
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
],
[
147,
11
],
[
147,
12
],
[
12,
13
],
[
12,
14
],
[
147,
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,
29
],
[
29,
30
],
[
29,
31
],
[
17,
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
],
[
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
],
[
98,
99
],
[
98,
100
],
[
95,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
102,
108
],
[
82,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
113,
115
],
[
110,
116
],
[
109,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
120,
122
],
[
117,
123
],
[
80,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
17,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
133,
135
],
[
131,
136
],
[
128,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
138,
143
],
[
15,
144
],
[
144,
145
],
[
0,
146
],
[
146,
147
],
[
146,
148
]
]
| [
"import java.util.*;\nimport java.io.*;\nimport java.math.BigInteger;\n \npublic class Main {\n\tpublic static long mod = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\tScanner s = new Scanner(System.in);\n\tint N = s.nextInt();\n\tboolean is = false;\n\tint[][] D = new int[N][2];\n\tfor(int i = 0; i < N; i++){\n\t\tD[i][0] = s.nextInt();\n\t\tD[i][1] = s.nextInt();\n\t}\n\n\tfor(int i = 0; i < N-2; i++){\n\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\tis = true;\n\t\t}\n\t}\n\tif(is){\n\t\tSystem.out.println(\"Yes\");\n\t}else{\n\t\tSystem.out.println(\"No\");\n\t}\n\t\n \n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"public class Main {\n\tpublic static long mod = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\tScanner s = new Scanner(System.in);\n\tint N = s.nextInt();\n\tboolean is = false;\n\tint[][] D = new int[N][2];\n\tfor(int i = 0; i < N; i++){\n\t\tD[i][0] = s.nextInt();\n\t\tD[i][1] = s.nextInt();\n\t}\n\n\tfor(int i = 0; i < N-2; i++){\n\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\tis = true;\n\t\t}\n\t}\n\tif(is){\n\t\tSystem.out.println(\"Yes\");\n\t}else{\n\t\tSystem.out.println(\"No\");\n\t}\n\t\n \n }\n}",
"Main",
"public static long mod = 1000000007;",
"mod",
"1000000007",
"public static void main(String[] args) {\n\tScanner s = new Scanner(System.in);\n\tint N = s.nextInt();\n\tboolean is = false;\n\tint[][] D = new int[N][2];\n\tfor(int i = 0; i < N; i++){\n\t\tD[i][0] = s.nextInt();\n\t\tD[i][1] = s.nextInt();\n\t}\n\n\tfor(int i = 0; i < N-2; i++){\n\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\tis = true;\n\t\t}\n\t}\n\tif(is){\n\t\tSystem.out.println(\"Yes\");\n\t}else{\n\t\tSystem.out.println(\"No\");\n\t}\n\t\n \n }",
"main",
"{\n\tScanner s = new Scanner(System.in);\n\tint N = s.nextInt();\n\tboolean is = false;\n\tint[][] D = new int[N][2];\n\tfor(int i = 0; i < N; i++){\n\t\tD[i][0] = s.nextInt();\n\t\tD[i][1] = s.nextInt();\n\t}\n\n\tfor(int i = 0; i < N-2; i++){\n\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\tis = true;\n\t\t}\n\t}\n\tif(is){\n\t\tSystem.out.println(\"Yes\");\n\t}else{\n\t\tSystem.out.println(\"No\");\n\t}\n\t\n \n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int N = s.nextInt();",
"N",
"s.nextInt()",
"s.nextInt",
"s",
"boolean is = false;",
"is",
"false",
"int[][] D = new int[N][2];",
"D",
"new int[N][2]",
"N",
"2",
"for(int i = 0; i < N; i++){\n\t\tD[i][0] = s.nextInt();\n\t\tD[i][1] = s.nextInt();\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\tD[i][0] = s.nextInt();\n\t\tD[i][1] = s.nextInt();\n\t}",
"{\n\t\tD[i][0] = s.nextInt();\n\t\tD[i][1] = s.nextInt();\n\t}",
"D[i][0] = s.nextInt()",
"D[i][0]",
"D[i]",
"D",
"i",
"0",
"s.nextInt()",
"s.nextInt",
"s",
"D[i][1] = s.nextInt()",
"D[i][1]",
"D[i]",
"D",
"i",
"1",
"s.nextInt()",
"s.nextInt",
"s",
"for(int i = 0; i < N-2; i++){\n\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\tis = true;\n\t\t}\n\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N-2",
"i",
"N-2",
"N",
"2",
"i++",
"i++",
"i",
"{\n\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\tis = true;\n\t\t}\n\t}",
"{\n\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\tis = true;\n\t\t}\n\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\tis = true;\n\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\tis = true;\n\t\t}",
"is = true",
"is",
"true",
"if(is){\n\t\tSystem.out.println(\"Yes\");\n\t}else{\n\t\tSystem.out.println(\"No\");\n\t}",
"is",
"{\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 long mod = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\tScanner s = new Scanner(System.in);\n\tint N = s.nextInt();\n\tboolean is = false;\n\tint[][] D = new int[N][2];\n\tfor(int i = 0; i < N; i++){\n\t\tD[i][0] = s.nextInt();\n\t\tD[i][1] = s.nextInt();\n\t}\n\n\tfor(int i = 0; i < N-2; i++){\n\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\tis = true;\n\t\t}\n\t}\n\tif(is){\n\t\tSystem.out.println(\"Yes\");\n\t}else{\n\t\tSystem.out.println(\"No\");\n\t}\n\t\n \n }\n}",
"public class Main {\n\tpublic static long mod = 1000000007;\n\t\n\tpublic static void main(String[] args) {\n\tScanner s = new Scanner(System.in);\n\tint N = s.nextInt();\n\tboolean is = false;\n\tint[][] D = new int[N][2];\n\tfor(int i = 0; i < N; i++){\n\t\tD[i][0] = s.nextInt();\n\t\tD[i][1] = s.nextInt();\n\t}\n\n\tfor(int i = 0; i < N-2; i++){\n\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\tis = true;\n\t\t}\n\t}\n\tif(is){\n\t\tSystem.out.println(\"Yes\");\n\t}else{\n\t\tSystem.out.println(\"No\");\n\t}\n\t\n \n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
import java.math.BigInteger;
public class Main {
public static long mod = 1000000007;
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
int N = s.nextInt();
boolean is = false;
int[][] D = new int[N][2];
for(int i = 0; i < N; i++){
D[i][0] = s.nextInt();
D[i][1] = s.nextInt();
}
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])){
is = true;
}
}
if(is){
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,
20,
12,
13,
30,
41,
13,
4,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
14,
2,
4,
18,
13,
17,
4,
18,
13,
17,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
13,
17,
29,
4,
13,
17,
12,
13,
30,
4,
18,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
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,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
13,
4,
13,
17,
12,
13,
30,
29,
4,
13,
4,
13,
17,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
29,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
29,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
14,
2,
13,
13,
30,
29,
4,
18,
13,
13,
13,
14,
2,
13,
13,
30,
29,
4,
18,
13,
13,
13,
30,
37,
20,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
29,
20,
23,
13,
23,
13,
12,
13,
30,
4,
18,
13,
17,
17,
4,
18,
13,
17,
17,
4,
18,
13,
17,
17,
4,
13,
4,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
17,
41,
13,
41,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
30,
42,
2,
0,
13,
4,
18,
13,
17,
30,
4,
18,
13,
13,
0,
13,
4,
18,
13,
12,
13,
30,
29,
2,
13,
13,
12,
13,
30,
14,
4,
13,
30,
29,
4,
18,
13,
40,
13,
30,
37,
20,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
384,
11
],
[
384,
12
],
[
12,
13
],
[
12,
14
],
[
384,
15
],
[
15,
16
],
[
15,
17
],
[
384,
18
],
[
18,
19
],
[
18,
20
],
[
384,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
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
],
[
43,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
49,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
48,
58
],
[
58,
59
],
[
59,
60
],
[
48,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
43,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
23,
74
],
[
74,
75
],
[
74,
76
],
[
384,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
384,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
83,
90
],
[
90,
91
],
[
384,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
94,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
92,
107
],
[
107,
108
],
[
384,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
384,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
384,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
130,
131
],
[
384,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
139,
140
],
[
384,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
145,
148
],
[
148,
149
],
[
384,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
154,
156
],
[
156,
157
],
[
154,
158
],
[
384,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
163,
167
],
[
384,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
170,
175
],
[
175,
176
],
[
175,
177
],
[
170,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
178,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
178,
188
],
[
188,
189
],
[
189,
190
],
[
178,
191
],
[
192,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
193,
196
],
[
196,
197
],
[
197,
198
],
[
196,
199
],
[
199,
200
],
[
200,
201
],
[
199,
202
],
[
170,
203
],
[
203,
204
],
[
384,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
208,
210
],
[
210,
211
],
[
207,
212
],
[
212,
213
],
[
212,
214
],
[
207,
215
],
[
215,
216
],
[
216,
217
],
[
217,
218
],
[
217,
219
],
[
215,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
223,
224
],
[
215,
225
],
[
225,
226
],
[
226,
227
],
[
215,
228
],
[
229,
229
],
[
229,
230
],
[
230,
231
],
[
231,
232
],
[
230,
233
],
[
233,
234
],
[
234,
235
],
[
233,
236
],
[
236,
237
],
[
237,
238
],
[
236,
239
],
[
207,
240
],
[
240,
241
],
[
384,
242
],
[
242,
243
],
[
242,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
247,
248
],
[
248,
249
],
[
247,
250
],
[
244,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
251,
255
],
[
255,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
257,
260
],
[
257,
261
],
[
251,
262
],
[
262,
263
],
[
263,
264
],
[
263,
265
],
[
262,
266
],
[
266,
267
],
[
267,
268
],
[
268,
269
],
[
269,
270
],
[
268,
271
],
[
268,
272
],
[
262,
273
],
[
273,
274
],
[
274,
275
],
[
242,
276
],
[
276,
277
],
[
242,
278
],
[
278,
279
],
[
384,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
283,
284
],
[
283,
285
],
[
285,
286
],
[
286,
287
],
[
285,
288
],
[
282,
289
],
[
289,
290
],
[
280,
291
],
[
291,
292
],
[
280,
293
],
[
293,
294
],
[
384,
295
],
[
295,
296
],
[
295,
297
],
[
297,
298
],
[
298,
299
],
[
299,
300
],
[
298,
301
],
[
298,
302
],
[
297,
303
],
[
303,
304
],
[
304,
305
],
[
303,
306
],
[
303,
307
],
[
297,
308
],
[
308,
309
],
[
309,
310
],
[
308,
311
],
[
308,
312
],
[
297,
313
],
[
313,
314
],
[
297,
315
],
[
315,
316
],
[
295,
317
],
[
317,
318
],
[
384,
319
],
[
319,
320
],
[
319,
321
],
[
321,
322
],
[
321,
323
],
[
319,
324
],
[
324,
325
],
[
324,
326
],
[
319,
327
],
[
327,
328
],
[
319,
329
],
[
329,
330
],
[
319,
331
],
[
331,
332
],
[
331,
333
],
[
333,
334
],
[
334,
335
],
[
334,
336
],
[
333,
337
],
[
337,
338
],
[
338,
339
],
[
338,
340
],
[
337,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
344,
345
],
[
344,
346
],
[
346,
347
],
[
347,
348
],
[
343,
349
],
[
342,
350
],
[
350,
351
],
[
351,
352
],
[
352,
353
],
[
351,
354
],
[
333,
355
],
[
355,
356
],
[
355,
357
],
[
357,
358
],
[
358,
359
],
[
319,
360
],
[
360,
361
],
[
360,
362
],
[
362,
363
],
[
363,
364
],
[
364,
365
],
[
364,
366
],
[
319,
367
],
[
367,
368
],
[
367,
369
],
[
369,
370
],
[
370,
371
],
[
371,
372
],
[
370,
373
],
[
373,
374
],
[
374,
375
],
[
375,
376
],
[
376,
377
],
[
375,
378
],
[
378,
379
],
[
370,
380
],
[
380,
381
],
[
381,
382
],
[
0,
383
],
[
383,
384
],
[
383,
385
]
]
| [
"import java.util.*; import java.io.*; import java.math.*;\npublic class Main{\n\tstatic void solve(){//Here is the main function\n\t\tint N = nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tArrayList<Integer> tmp = nextIntArray();\n\t\t\tif(tmp.get(0) == tmp.get(1)){\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\tmyout(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tmyout(\"No\");\n\n\t}\n\t//Method addition frame start\n\n\n\n\t//Method addition frame end\n\n\t//Don't have to see. start------------------------------------------\n\tstatic class InputIterator{\n\t\tArrayList<String> inputLine = new ArrayList<String>(1024);\n\t\tint index = 0; int max; String read;\n\t\tInputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}\n\t\tboolean hasNext(){return (index < max);}\n\t\tString next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}\n\t}\n\tstatic HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();\n\tstatic InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic void flush(){out.flush();}\n\tstatic void myout(Object t){out.println(t);}\n\tstatic void myerr(Object t){System.err.print(\"debug:\");System.err.println(t);}\n\tstatic String next(){return ii.next();}\n\tstatic boolean hasNext(){return ii.hasNext();}\n\tstatic int nextInt(){return Integer.parseInt(next());}\n\tstatic long nextLong(){return Long.parseLong(next());}\n\tstatic double nextDouble(){return Double.parseDouble(next());}\n\tstatic ArrayList<String> nextStrArray(){return myconv(next(), 8);}\n\tstatic ArrayList<String> nextCharArray(){return myconv(next(), 0);}\n\tstatic ArrayList<Integer> nextIntArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic ArrayList<Long> nextLongArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\t@SuppressWarnings(\"unchecked\")\n\tstatic String myconv(Object list, int no){//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}\n\tstatic ArrayList<String> myconv(String str, int no){//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}\n\tpublic static void main(String[] args){\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}\n\t//Don't have to see. end------------------------------------------\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main{\n\tstatic void solve(){//Here is the main function\n\t\tint N = nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tArrayList<Integer> tmp = nextIntArray();\n\t\t\tif(tmp.get(0) == tmp.get(1)){\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\tmyout(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tmyout(\"No\");\n\n\t}\n\t//Method addition frame start\n\n\n\n\t//Method addition frame end\n\n\t//Don't have to see. start------------------------------------------\n\tstatic class InputIterator{\n\t\tArrayList<String> inputLine = new ArrayList<String>(1024);\n\t\tint index = 0; int max; String read;\n\t\tInputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}\n\t\tboolean hasNext(){return (index < max);}\n\t\tString next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}\n\t}\n\tstatic HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();\n\tstatic InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic void flush(){out.flush();}\n\tstatic void myout(Object t){out.println(t);}\n\tstatic void myerr(Object t){System.err.print(\"debug:\");System.err.println(t);}\n\tstatic String next(){return ii.next();}\n\tstatic boolean hasNext(){return ii.hasNext();}\n\tstatic int nextInt(){return Integer.parseInt(next());}\n\tstatic long nextLong(){return Long.parseLong(next());}\n\tstatic double nextDouble(){return Double.parseDouble(next());}\n\tstatic ArrayList<String> nextStrArray(){return myconv(next(), 8);}\n\tstatic ArrayList<String> nextCharArray(){return myconv(next(), 0);}\n\tstatic ArrayList<Integer> nextIntArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic ArrayList<Long> nextLongArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\t@SuppressWarnings(\"unchecked\")\n\tstatic String myconv(Object list, int no){//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}\n\tstatic ArrayList<String> myconv(String str, int no){//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}\n\tpublic static void main(String[] args){\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}\n\t//Don't have to see. end------------------------------------------\n}",
"Main",
"static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();",
"CONVSTR",
"new HashMap<Integer, String>()",
"static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.",
"ii",
"new InputIterator()",
"static PrintWriter out = new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"static void solve(){//Here is the main function\n\t\tint N = nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tArrayList<Integer> tmp = nextIntArray();\n\t\t\tif(tmp.get(0) == tmp.get(1)){\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\tmyout(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tmyout(\"No\");\n\n\t}",
"solve",
"{//Here is the main function\n\t\tint N = nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tArrayList<Integer> tmp = nextIntArray();\n\t\t\tif(tmp.get(0) == tmp.get(1)){\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\tmyout(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tmyout(\"No\");\n\n\t}",
"int N = nextInt();",
"N",
"nextInt()",
"nextInt",
"int count = 0;",
"count",
"0",
"for(int i = 0; i < N; i++){\n\t\t\tArrayList<Integer> tmp = nextIntArray();\n\t\t\tif(tmp.get(0) == tmp.get(1)){\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\tmyout(\"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\tArrayList<Integer> tmp = nextIntArray();\n\t\t\tif(tmp.get(0) == tmp.get(1)){\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\tmyout(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"{\n\t\t\tArrayList<Integer> tmp = nextIntArray();\n\t\t\tif(tmp.get(0) == tmp.get(1)){\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\tmyout(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"ArrayList<Integer> tmp = nextIntArray();",
"tmp",
"nextIntArray()",
"nextIntArray",
"if(tmp.get(0) == tmp.get(1)){\n\t\t\t\tcount++;\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}",
"tmp.get(0) == tmp.get(1)",
"tmp.get(0)",
"tmp.get",
"tmp",
"0",
"tmp.get(1)",
"tmp.get",
"tmp",
"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\tmyout(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"count == 3",
"count",
"3",
"{\n\t\t\t\tmyout(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"myout(\"Yes\")",
"myout",
"\"Yes\"",
"return;",
"myout(\"No\")",
"myout",
"\"No\"",
"static void flush(){out.flush();}",
"flush",
"{out.flush();}",
"out.flush()",
"out.flush",
"out",
"static void myout(Object t){out.println(t);}",
"myout",
"{out.println(t);}",
"out.println(t)",
"out.println",
"out",
"t",
"Object t",
"t",
"static void myerr(Object t){System.err.print(\"debug:\");System.err.println(t);}",
"myerr",
"{System.err.print(\"debug:\");System.err.println(t);}",
"System.err.print(\"debug:\")",
"System.err.print",
"System.err",
"System",
"System.err",
"\"debug:\"",
"System.err.println(t)",
"System.err.println",
"System.err",
"System",
"System.err",
"t",
"Object t",
"t",
"static String next(){return ii.next();}",
"next",
"{return ii.next();}",
"return ii.next();",
"ii.next()",
"ii.next",
"ii",
"static boolean hasNext(){return ii.hasNext();}",
"hasNext",
"{return ii.hasNext();}",
"return ii.hasNext();",
"ii.hasNext()",
"ii.hasNext",
"ii",
"static int nextInt(){return Integer.parseInt(next());}",
"nextInt",
"{return Integer.parseInt(next());}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"static long nextLong(){return Long.parseLong(next());}",
"nextLong",
"{return Long.parseLong(next());}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"static double nextDouble(){return Double.parseDouble(next());}",
"nextDouble",
"{return Double.parseDouble(next());}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"static ArrayList<String> nextStrArray(){return myconv(next(), 8);}",
"nextStrArray",
"{return myconv(next(), 8);}",
"return myconv(next(), 8);",
"myconv(next(), 8)",
"myconv",
"next()",
"next",
"8",
"static ArrayList<String> nextCharArray(){return myconv(next(), 0);}",
"nextCharArray",
"{return myconv(next(), 0);}",
"return myconv(next(), 0);",
"myconv(next(), 0)",
"myconv",
"next()",
"next",
"0",
"static ArrayList<Integer> nextIntArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}",
"nextIntArray",
"{\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}",
"ArrayList<String> input = nextStrArray();",
"input",
"nextStrArray()",
"nextStrArray",
"ArrayList<Integer> ret = new ArrayList<Integer>(input.size());",
"ret",
"new ArrayList<Integer>(input.size())",
"for(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < input.size()",
"i",
"input.size()",
"input.size",
"input",
"i++",
"i++",
"i",
"{\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}",
"{\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}",
"ret.add(Integer.parseInt(input.get(i)))",
"ret.add",
"ret",
"Integer.parseInt(input.get(i))",
"Integer.parseInt",
"Integer",
"input.get(i)",
"input.get",
"input",
"i",
"return ret;",
"ret",
"static ArrayList<Long> nextLongArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}",
"nextLongArray",
"{\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}",
"ArrayList<String> input = nextStrArray();",
"input",
"nextStrArray()",
"nextStrArray",
"ArrayList<Long> ret = new ArrayList<Long>(input.size());",
"ret",
"new ArrayList<Long>(input.size())",
"for(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < input.size()",
"i",
"input.size()",
"input.size",
"input",
"i++",
"i++",
"i",
"{\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}",
"{\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}",
"ret.add(Long.parseLong(input.get(i)))",
"ret.add",
"ret",
"Long.parseLong(input.get(i))",
"Long.parseLong",
"Long",
"input.get(i)",
"input.get",
"input",
"i",
"return ret;",
"ret",
"@SuppressWarnings(\"unchecked\")\n\tstatic String myconv(Object list, int no){//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}",
"myconv",
"{//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}",
"String joinString = CONVSTR.get(no);",
"joinString",
"CONVSTR.get(no)",
"CONVSTR.get",
"CONVSTR",
"no",
"if(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}",
"list instanceof String[]",
"list",
"String[]",
"{\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}",
"return String.join(joinString, (String[])list);",
"String.join(joinString, (String[])list)",
"String.join",
"String",
"joinString",
"(String[])list",
"if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}",
"list instanceof ArrayList",
"list",
"ArrayList",
"{\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}",
"return String.join(joinString, (ArrayList)list);",
"String.join(joinString, (ArrayList)list)",
"String.join",
"String",
"joinString",
"(ArrayList)list",
"{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}",
"throw new ClassCastException(\"Don't join\");",
"new ClassCastException(\"Don't join\")",
"Object list",
"list",
"int no",
"no",
"static ArrayList<String> myconv(String str, int no){//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}",
"myconv",
"{//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}",
"String splitString = CONVSTR.get(no);",
"splitString",
"CONVSTR.get(no)",
"CONVSTR.get",
"CONVSTR",
"no",
"return new ArrayList<String>(Arrays.asList(str.split(splitString)));",
"new ArrayList<String>(Arrays.asList(str.split(splitString)))",
"String str",
"str",
"int no",
"no",
"public static void main(String[] args){\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}",
"main",
"{\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}",
"CONVSTR.put(8, \" \")",
"CONVSTR.put",
"CONVSTR",
"8",
"\" \"",
"CONVSTR.put(9, \"\\n\")",
"CONVSTR.put",
"CONVSTR",
"9",
"\"\\n\"",
"CONVSTR.put(0, \"\")",
"CONVSTR.put",
"CONVSTR",
"0",
"\"\"",
"solve()",
"solve",
"flush()",
"flush",
"String[] args",
"args",
"static class InputIterator{\n\t\tArrayList<String> inputLine = new ArrayList<String>(1024);\n\t\tint index = 0; int max; String read;\n\t\tInputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}\n\t\tboolean hasNext(){return (index < max);}\n\t\tString next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}\n\t}",
"InputIterator",
"ArrayList<String> inputLine = new ArrayList<String>(1024);",
"inputLine",
"new ArrayList<String>(1024)",
"int index = 0;",
"index",
"0",
"int max;",
"max",
"String read;",
"read",
"InputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}",
"InputIterator",
"{\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"try{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}",
"catch(IOException e){}",
"IOException e",
"{}",
"{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}",
"while((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}",
"(read = br.readLine()) != null",
"(read = br.readLine())",
"read",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}",
"inputLine.add(read)",
"inputLine.add",
"inputLine",
"read",
"max = inputLine.size()",
"max",
"inputLine.size()",
"inputLine.size",
"inputLine",
"boolean hasNext(){return (index < max);}",
"hasNext",
"{return (index < max);}",
"return (index < max);",
"(index < max)",
"index",
"max",
"String next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}",
"next",
"{\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}",
"if(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}",
"hasNext()",
"hasNext",
"{\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}",
"return inputLine.get(index++);",
"inputLine.get(index++)",
"inputLine.get",
"inputLine",
"index++",
"index",
"{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}",
"throw new IndexOutOfBoundsException(\"There is no more input\");",
"new IndexOutOfBoundsException(\"There is no more input\")",
"public class Main{\n\tstatic void solve(){//Here is the main function\n\t\tint N = nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tArrayList<Integer> tmp = nextIntArray();\n\t\t\tif(tmp.get(0) == tmp.get(1)){\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\tmyout(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tmyout(\"No\");\n\n\t}\n\t//Method addition frame start\n\n\n\n\t//Method addition frame end\n\n\t//Don't have to see. start------------------------------------------\n\tstatic class InputIterator{\n\t\tArrayList<String> inputLine = new ArrayList<String>(1024);\n\t\tint index = 0; int max; String read;\n\t\tInputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}\n\t\tboolean hasNext(){return (index < max);}\n\t\tString next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}\n\t}\n\tstatic HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();\n\tstatic InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic void flush(){out.flush();}\n\tstatic void myout(Object t){out.println(t);}\n\tstatic void myerr(Object t){System.err.print(\"debug:\");System.err.println(t);}\n\tstatic String next(){return ii.next();}\n\tstatic boolean hasNext(){return ii.hasNext();}\n\tstatic int nextInt(){return Integer.parseInt(next());}\n\tstatic long nextLong(){return Long.parseLong(next());}\n\tstatic double nextDouble(){return Double.parseDouble(next());}\n\tstatic ArrayList<String> nextStrArray(){return myconv(next(), 8);}\n\tstatic ArrayList<String> nextCharArray(){return myconv(next(), 0);}\n\tstatic ArrayList<Integer> nextIntArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic ArrayList<Long> nextLongArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\t@SuppressWarnings(\"unchecked\")\n\tstatic String myconv(Object list, int no){//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}\n\tstatic ArrayList<String> myconv(String str, int no){//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}\n\tpublic static void main(String[] args){\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}\n\t//Don't have to see. end------------------------------------------\n}",
"public class Main{\n\tstatic void solve(){//Here is the main function\n\t\tint N = nextInt();\n\t\tint count = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tArrayList<Integer> tmp = nextIntArray();\n\t\t\tif(tmp.get(0) == tmp.get(1)){\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\tmyout(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tmyout(\"No\");\n\n\t}\n\t//Method addition frame start\n\n\n\n\t//Method addition frame end\n\n\t//Don't have to see. start------------------------------------------\n\tstatic class InputIterator{\n\t\tArrayList<String> inputLine = new ArrayList<String>(1024);\n\t\tint index = 0; int max; String read;\n\t\tInputIterator(){\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\ttry{\n\t\t\t\twhile((read = br.readLine()) != null){\n\t\t\t\t\tinputLine.add(read);\n\t\t\t\t}\n\t\t\t}catch(IOException e){}\n\t\t\tmax = inputLine.size();\n\t\t}\n\t\tboolean hasNext(){return (index < max);}\n\t\tString next(){\n\t\t\tif(hasNext()){\n\t\t\t\treturn inputLine.get(index++);\n\t\t\t}else{\n\t\t\t\tthrow new IndexOutOfBoundsException(\"There is no more input\");\n\t\t\t}\n\t\t}\n\t}\n\tstatic HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();\n\tstatic InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.\n\tstatic PrintWriter out = new PrintWriter(System.out);\n\tstatic void flush(){out.flush();}\n\tstatic void myout(Object t){out.println(t);}\n\tstatic void myerr(Object t){System.err.print(\"debug:\");System.err.println(t);}\n\tstatic String next(){return ii.next();}\n\tstatic boolean hasNext(){return ii.hasNext();}\n\tstatic int nextInt(){return Integer.parseInt(next());}\n\tstatic long nextLong(){return Long.parseLong(next());}\n\tstatic double nextDouble(){return Double.parseDouble(next());}\n\tstatic ArrayList<String> nextStrArray(){return myconv(next(), 8);}\n\tstatic ArrayList<String> nextCharArray(){return myconv(next(), 0);}\n\tstatic ArrayList<Integer> nextIntArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Integer.parseInt(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\tstatic ArrayList<Long> nextLongArray(){\n\t\tArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());\n\t\tfor(int i = 0; i < input.size(); i++){\n\t\t\tret.add(Long.parseLong(input.get(i)));\n\t\t}\n\t\treturn ret;\n\t}\n\t@SuppressWarnings(\"unchecked\")\n\tstatic String myconv(Object list, int no){//only join\n\t\tString joinString = CONVSTR.get(no);\n\t\tif(list instanceof String[]){\n\t\t\treturn String.join(joinString, (String[])list);\n\t\t}else if(list instanceof ArrayList){\n\t\t\treturn String.join(joinString, (ArrayList)list);\n\t\t}else{\n\t\t\tthrow new ClassCastException(\"Don't join\");\n\t\t}\n\t}\n\tstatic ArrayList<String> myconv(String str, int no){//only split\n\t\tString splitString = CONVSTR.get(no);\n\t\treturn new ArrayList<String>(Arrays.asList(str.split(splitString)));\n\t}\n\tpublic static void main(String[] args){\n\t\tCONVSTR.put(8, \" \"); CONVSTR.put(9, \"\\n\"); CONVSTR.put(0, \"\");\n\t\tsolve();flush();\n\t}\n\t//Don't have to see. end------------------------------------------\n}",
"Main"
]
| import java.util.*; import java.io.*; import java.math.*;
public class Main{
static void solve(){//Here is the main function
int N = nextInt();
int count = 0;
for(int i = 0; i < N; i++){
ArrayList<Integer> tmp = nextIntArray();
if(tmp.get(0) == tmp.get(1)){
count++;
}else{
count = 0;
}
if(count == 3){
myout("Yes");
return;
}
}
myout("No");
}
//Method addition frame start
//Method addition frame end
//Don't have to see. start------------------------------------------
static class InputIterator{
ArrayList<String> inputLine = new ArrayList<String>(1024);
int index = 0; int max; String read;
InputIterator(){
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
try{
while((read = br.readLine()) != null){
inputLine.add(read);
}
}catch(IOException e){}
max = inputLine.size();
}
boolean hasNext(){return (index < max);}
String next(){
if(hasNext()){
return inputLine.get(index++);
}else{
throw new IndexOutOfBoundsException("There is no more input");
}
}
}
static HashMap<Integer, String> CONVSTR = new HashMap<Integer, String>();
static InputIterator ii = new InputIterator();//This class cannot be used in reactive problem.
static PrintWriter out = new PrintWriter(System.out);
static void flush(){out.flush();}
static void myout(Object t){out.println(t);}
static void myerr(Object t){System.err.print("debug:");System.err.println(t);}
static String next(){return ii.next();}
static boolean hasNext(){return ii.hasNext();}
static int nextInt(){return Integer.parseInt(next());}
static long nextLong(){return Long.parseLong(next());}
static double nextDouble(){return Double.parseDouble(next());}
static ArrayList<String> nextStrArray(){return myconv(next(), 8);}
static ArrayList<String> nextCharArray(){return myconv(next(), 0);}
static ArrayList<Integer> nextIntArray(){
ArrayList<String> input = nextStrArray(); ArrayList<Integer> ret = new ArrayList<Integer>(input.size());
for(int i = 0; i < input.size(); i++){
ret.add(Integer.parseInt(input.get(i)));
}
return ret;
}
static ArrayList<Long> nextLongArray(){
ArrayList<String> input = nextStrArray(); ArrayList<Long> ret = new ArrayList<Long>(input.size());
for(int i = 0; i < input.size(); i++){
ret.add(Long.parseLong(input.get(i)));
}
return ret;
}
@SuppressWarnings("unchecked")
static String myconv(Object list, int no){//only join
String joinString = CONVSTR.get(no);
if(list instanceof String[]){
return String.join(joinString, (String[])list);
}else if(list instanceof ArrayList){
return String.join(joinString, (ArrayList)list);
}else{
throw new ClassCastException("Don't join");
}
}
static ArrayList<String> myconv(String str, int no){//only split
String splitString = CONVSTR.get(no);
return new ArrayList<String>(Arrays.asList(str.split(splitString)));
}
public static void main(String[] args){
CONVSTR.put(8, " "); CONVSTR.put(9, "\n"); CONVSTR.put(0, "");
solve();flush();
}
//Don't have to see. end------------------------------------------
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
41,
13,
20,
12,
13,
30,
41,
13,
17,
42,
2,
40,
13,
17,
4,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
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,
30,
40,
13,
0,
13,
4,
18,
13,
13,
13,
30,
0,
13,
17,
14,
2,
13,
17,
4,
18,
13,
17,
4,
18,
13,
17,
12,
13,
30,
41,
13,
20,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
18,
13,
13,
14,
4,
18,
13,
13,
30,
4,
18,
13,
13,
2,
4,
18,
13,
13,
17,
30,
4,
18,
13,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
17,
42,
2,
2,
13,
17,
17,
30,
0,
13,
2,
13,
17,
40,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
0,
13,
2,
13,
17,
30,
30,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
13,
13,
40,
13,
14,
2,
13,
17,
40,
13,
29,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
2,
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,
14,
2,
13,
17,
29,
17,
14,
2,
2,
13,
17,
2,
13,
17,
29,
17,
14,
2,
2,
2,
13,
17,
17,
2,
2,
13,
17,
17,
29,
17,
41,
13,
2,
4,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
17,
30,
30,
14,
2,
2,
2,
13,
2,
13,
17,
17,
2,
2,
2,
13,
13,
17,
17,
29,
17,
29,
17,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
2,
13,
17,
30,
30,
0,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
0,
13,
2,
13,
17,
30,
30,
14,
2,
18,
13,
13,
17,
30,
11,
1,
41,
13,
2,
13,
13,
2,
13,
13,
1,
0,
13,
2,
13,
13,
30,
30,
0,
18,
13,
13,
17,
0,
18,
13,
17,
17,
0,
18,
13,
17,
0,
18,
13,
17,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
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,
23,
13,
12,
13,
30,
14,
2,
4,
18,
13,
17,
30,
4,
18,
13,
13,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
13,
41,
13,
2,
4,
18,
13,
17,
13,
4,
18,
13,
2,
13,
17,
4,
13,
13,
2,
13,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
41,
13,
2,
13,
2,
2,
13,
13,
17,
14,
2,
18,
13,
13,
13,
29,
13,
14,
2,
18,
13,
13,
13,
29,
4,
13,
13,
13,
2,
13,
17,
13,
29,
4,
13,
13,
2,
13,
17,
13,
13,
29,
40,
17,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
41,
13,
2,
13,
2,
2,
13,
13,
17,
14,
2,
2,
2,
13,
17,
2,
13,
18,
13,
2,
13,
17,
2,
18,
13,
13,
13,
29,
13,
14,
2,
13,
18,
13,
13,
29,
4,
13,
13,
2,
13,
17,
13,
13,
13,
29,
4,
13,
13,
13,
2,
13,
17,
13,
13,
29,
40,
17,
23,
13,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
41,
13,
2,
13,
2,
2,
13,
13,
17,
14,
2,
2,
2,
13,
2,
13,
17,
2,
13,
18,
13,
2,
13,
17,
2,
18,
13,
13,
13,
29,
13,
14,
2,
13,
18,
13,
13,
29,
4,
13,
13,
13,
2,
13,
17,
13,
13,
29,
4,
13,
13,
2,
13,
17,
13,
13,
13,
29,
40,
17,
23,
13,
23,
13,
23,
13,
23,
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,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
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,
4,
18,
13,
29,
13,
23,
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,
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,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
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,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
0,
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,
14,
2,
13,
17,
29,
4,
18,
13,
13,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
4,
13,
6,
13,
12,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
18,
36,
13,
20,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
18,
13,
13,
23,
13,
12,
13,
30,
4,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
1207,
8
],
[
1207,
9
],
[
9,
10
],
[
9,
11
],
[
1207,
12
],
[
12,
13
],
[
12,
14
],
[
1207,
15
],
[
15,
16
],
[
15,
17
],
[
1207,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
25,
28
],
[
24,
29
],
[
29,
30
],
[
20,
31
],
[
31,
32
],
[
32,
33
],
[
18,
34
],
[
34,
35
],
[
1207,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
38,
44
],
[
44,
45
],
[
44,
46
],
[
38,
47
],
[
47,
48
],
[
47,
49
],
[
38,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
50,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
75,
79
],
[
66,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
38,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
1207,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
109,
111
],
[
102,
112
],
[
112,
113
],
[
113,
114
],
[
102,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
116,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
122,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
128,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
133,
136
],
[
132,
137
],
[
122,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
139,
142
],
[
139,
143
],
[
98,
144
],
[
144,
145
],
[
96,
146
],
[
146,
147
],
[
1207,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
154,
160
],
[
160,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
163,
165
],
[
160,
166
],
[
166,
167
],
[
150,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
168,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
175,
178
],
[
168,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
182,
184
],
[
168,
185
],
[
186,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
188,
192
],
[
187,
193
],
[
193,
194
],
[
194,
195
],
[
194,
196
],
[
196,
197
],
[
196,
198
],
[
193,
199
],
[
199,
200
],
[
150,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
201,
205
],
[
205,
206
],
[
150,
207
],
[
207,
208
],
[
148,
209
],
[
209,
210
],
[
1207,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
214,
218
],
[
218,
219
],
[
213,
220
],
[
220,
221
],
[
211,
222
],
[
222,
223
],
[
211,
224
],
[
224,
225
],
[
1207,
226
],
[
226,
227
],
[
226,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
229,
233
],
[
233,
234
],
[
228,
235
],
[
235,
236
],
[
226,
237
],
[
237,
238
],
[
226,
239
],
[
239,
240
],
[
1207,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
244,
248
],
[
248,
249
],
[
243,
250
],
[
250,
251
],
[
251,
252
],
[
251,
253
],
[
253,
254
],
[
253,
255
],
[
251,
256
],
[
241,
257
],
[
257,
258
],
[
241,
259
],
[
259,
260
],
[
1207,
261
],
[
261,
262
],
[
261,
263
],
[
263,
264
],
[
264,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
265,
269
],
[
269,
270
],
[
269,
271
],
[
269,
272
],
[
261,
273
],
[
273,
274
],
[
261,
275
],
[
275,
276
],
[
1207,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
280,
284
],
[
284,
285
],
[
279,
286
],
[
286,
287
],
[
287,
288
],
[
288,
289
],
[
288,
290
],
[
287,
291
],
[
291,
292
],
[
291,
293
],
[
286,
294
],
[
294,
295
],
[
279,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
299,
300
],
[
299,
301
],
[
298,
302
],
[
297,
303
],
[
303,
304
],
[
304,
305
],
[
304,
306
],
[
303,
307
],
[
296,
308
],
[
308,
309
],
[
279,
310
],
[
310,
311
],
[
310,
312
],
[
312,
313
],
[
313,
314
],
[
314,
315
],
[
313,
316
],
[
312,
317
],
[
279,
318
],
[
318,
319
],
[
319,
320
],
[
320,
321
],
[
320,
322
],
[
318,
323
],
[
323,
324
],
[
323,
325
],
[
318,
326
],
[
326,
327
],
[
327,
328
],
[
327,
329
],
[
318,
330
],
[
331,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
334,
335
],
[
335,
336
],
[
335,
337
],
[
337,
338
],
[
337,
339
],
[
334,
340
],
[
333,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
342,
346
],
[
341,
347
],
[
332,
348
],
[
348,
349
],
[
279,
350
],
[
350,
351
],
[
277,
352
],
[
352,
353
],
[
1207,
354
],
[
354,
355
],
[
354,
356
],
[
356,
357
],
[
357,
358
],
[
357,
359
],
[
359,
360
],
[
359,
361
],
[
356,
362
],
[
362,
363
],
[
363,
364
],
[
364,
365
],
[
364,
366
],
[
362,
367
],
[
367,
368
],
[
367,
369
],
[
362,
370
],
[
370,
371
],
[
371,
372
],
[
371,
373
],
[
373,
374
],
[
373,
375
],
[
362,
376
],
[
377,
377
],
[
377,
378
],
[
378,
379
],
[
379,
380
],
[
379,
381
],
[
378,
382
],
[
356,
383
],
[
383,
384
],
[
384,
385
],
[
385,
386
],
[
385,
387
],
[
383,
388
],
[
388,
389
],
[
388,
390
],
[
383,
391
],
[
391,
392
],
[
392,
393
],
[
392,
394
],
[
394,
395
],
[
394,
396
],
[
383,
397
],
[
398,
398
],
[
398,
399
],
[
399,
400
],
[
400,
401
],
[
401,
402
],
[
401,
403
],
[
400,
404
],
[
399,
405
],
[
405,
406
],
[
406,
407
],
[
407,
408
],
[
408,
409
],
[
408,
410
],
[
410,
411
],
[
410,
412
],
[
406,
413
],
[
413,
414
],
[
413,
415
],
[
406,
416
],
[
416,
417
],
[
417,
418
],
[
417,
419
],
[
419,
420
],
[
419,
421
],
[
406,
422
],
[
423,
423
],
[
423,
424
],
[
424,
425
],
[
425,
426
],
[
425,
427
],
[
424,
428
],
[
356,
429
],
[
429,
430
],
[
430,
431
],
[
430,
432
],
[
429,
433
],
[
356,
434
],
[
434,
435
],
[
435,
436
],
[
435,
437
],
[
434,
438
],
[
438,
439
],
[
439,
440
],
[
439,
441
],
[
438,
442
],
[
356,
443
],
[
443,
444
],
[
354,
445
],
[
445,
446
],
[
1207,
447
],
[
447,
448
],
[
447,
449
],
[
449,
450
],
[
450,
451
],
[
450,
452
],
[
449,
453
],
[
453,
454
],
[
453,
455
],
[
453,
456
],
[
457,
457
],
[
457,
458
],
[
458,
459
],
[
459,
460
],
[
458,
461
],
[
449,
462
],
[
462,
463
],
[
463,
464
],
[
462,
465
],
[
449,
466
],
[
466,
467
],
[
467,
468
],
[
468,
469
],
[
468,
470
],
[
466,
471
],
[
471,
472
],
[
471,
473
],
[
473,
474
],
[
473,
475
],
[
466,
476
],
[
476,
477
],
[
477,
478
],
[
466,
479
],
[
480,
480
],
[
480,
481
],
[
481,
482
],
[
482,
483
],
[
482,
484
],
[
481,
485
],
[
485,
486
],
[
486,
487
],
[
485,
488
],
[
447,
489
],
[
489,
490
],
[
1207,
491
],
[
491,
492
],
[
491,
493
],
[
493,
494
],
[
494,
495
],
[
495,
496
],
[
496,
497
],
[
497,
498
],
[
495,
499
],
[
494,
500
],
[
500,
501
],
[
501,
502
],
[
502,
503
],
[
501,
504
],
[
493,
505
],
[
505,
506
],
[
506,
507
],
[
507,
508
],
[
507,
509
],
[
505,
510
],
[
510,
511
],
[
510,
512
],
[
512,
513
],
[
513,
514
],
[
505,
515
],
[
515,
516
],
[
516,
517
],
[
505,
518
],
[
519,
519
],
[
519,
520
],
[
520,
521
],
[
520,
522
],
[
522,
523
],
[
523,
524
],
[
522,
525
],
[
519,
526
],
[
526,
527
],
[
526,
528
],
[
528,
529
],
[
529,
530
],
[
530,
531
],
[
529,
532
],
[
529,
533
],
[
528,
534
],
[
534,
535
],
[
535,
536
],
[
534,
537
],
[
537,
538
],
[
537,
539
],
[
519,
540
],
[
540,
541
],
[
540,
542
],
[
540,
543
],
[
543,
544
],
[
543,
545
],
[
540,
546
],
[
493,
547
],
[
547,
548
],
[
491,
549
],
[
549,
550
],
[
491,
551
],
[
551,
552
],
[
491,
553
],
[
553,
554
],
[
1207,
555
],
[
555,
556
],
[
555,
557
],
[
557,
558
],
[
558,
559
],
[
559,
560
],
[
559,
561
],
[
558,
562
],
[
562,
563
],
[
563,
564
],
[
563,
565
],
[
565,
566
],
[
565,
567
],
[
567,
568
],
[
568,
569
],
[
568,
570
],
[
567,
571
],
[
562,
572
],
[
572,
573
],
[
573,
574
],
[
574,
575
],
[
574,
576
],
[
573,
577
],
[
572,
578
],
[
578,
579
],
[
562,
580
],
[
580,
581
],
[
581,
582
],
[
582,
583
],
[
582,
584
],
[
581,
585
],
[
580,
586
],
[
586,
587
],
[
587,
588
],
[
587,
589
],
[
587,
590
],
[
587,
591
],
[
591,
592
],
[
591,
593
],
[
587,
594
],
[
562,
595
],
[
595,
596
],
[
596,
597
],
[
596,
598
],
[
596,
599
],
[
599,
600
],
[
599,
601
],
[
596,
602
],
[
596,
603
],
[
557,
604
],
[
604,
605
],
[
605,
606
],
[
555,
607
],
[
607,
608
],
[
555,
609
],
[
609,
610
],
[
555,
611
],
[
611,
612
],
[
555,
613
],
[
613,
614
],
[
1207,
615
],
[
615,
616
],
[
615,
617
],
[
617,
618
],
[
618,
619
],
[
619,
620
],
[
619,
621
],
[
618,
622
],
[
622,
623
],
[
623,
624
],
[
623,
625
],
[
625,
626
],
[
625,
627
],
[
627,
628
],
[
628,
629
],
[
628,
630
],
[
627,
631
],
[
622,
632
],
[
632,
633
],
[
633,
634
],
[
634,
635
],
[
635,
636
],
[
635,
637
],
[
634,
638
],
[
638,
639
],
[
638,
640
],
[
640,
641
],
[
640,
642
],
[
642,
643
],
[
642,
644
],
[
633,
645
],
[
645,
646
],
[
646,
647
],
[
646,
648
],
[
645,
649
],
[
632,
650
],
[
650,
651
],
[
632,
652
],
[
652,
653
],
[
653,
654
],
[
653,
655
],
[
655,
656
],
[
655,
657
],
[
652,
658
],
[
658,
659
],
[
659,
660
],
[
659,
661
],
[
659,
662
],
[
662,
663
],
[
662,
664
],
[
659,
665
],
[
659,
666
],
[
659,
667
],
[
652,
668
],
[
668,
669
],
[
669,
670
],
[
669,
671
],
[
669,
672
],
[
669,
673
],
[
673,
674
],
[
673,
675
],
[
669,
676
],
[
669,
677
],
[
617,
678
],
[
678,
679
],
[
679,
680
],
[
615,
681
],
[
681,
682
],
[
615,
683
],
[
683,
684
],
[
615,
685
],
[
685,
686
],
[
615,
687
],
[
687,
688
],
[
615,
689
],
[
689,
690
],
[
1207,
691
],
[
691,
692
],
[
691,
693
],
[
693,
694
],
[
694,
695
],
[
695,
696
],
[
695,
697
],
[
694,
698
],
[
698,
699
],
[
699,
700
],
[
699,
701
],
[
701,
702
],
[
701,
703
],
[
703,
704
],
[
704,
705
],
[
704,
706
],
[
703,
707
],
[
698,
708
],
[
708,
709
],
[
709,
710
],
[
710,
711
],
[
711,
712
],
[
711,
713
],
[
713,
714
],
[
713,
715
],
[
710,
716
],
[
716,
717
],
[
716,
718
],
[
718,
719
],
[
718,
720
],
[
720,
721
],
[
720,
722
],
[
709,
723
],
[
723,
724
],
[
724,
725
],
[
724,
726
],
[
723,
727
],
[
708,
728
],
[
728,
729
],
[
708,
730
],
[
730,
731
],
[
731,
732
],
[
731,
733
],
[
733,
734
],
[
733,
735
],
[
730,
736
],
[
736,
737
],
[
737,
738
],
[
737,
739
],
[
737,
740
],
[
737,
741
],
[
741,
742
],
[
741,
743
],
[
737,
744
],
[
737,
745
],
[
730,
746
],
[
746,
747
],
[
747,
748
],
[
747,
749
],
[
747,
750
],
[
750,
751
],
[
750,
752
],
[
747,
753
],
[
747,
754
],
[
747,
755
],
[
693,
756
],
[
756,
757
],
[
757,
758
],
[
691,
759
],
[
759,
760
],
[
691,
761
],
[
761,
762
],
[
691,
763
],
[
763,
764
],
[
691,
765
],
[
765,
766
],
[
691,
767
],
[
767,
768
],
[
1207,
769
],
[
769,
770
],
[
769,
771
],
[
771,
772
],
[
772,
773
],
[
772,
774
],
[
774,
775
],
[
774,
776
],
[
771,
777
],
[
777,
778
],
[
778,
779
],
[
779,
780
],
[
779,
781
],
[
777,
782
],
[
782,
783
],
[
782,
784
],
[
777,
785
],
[
785,
786
],
[
786,
787
],
[
777,
788
],
[
789,
789
],
[
789,
790
],
[
790,
791
],
[
790,
792
],
[
792,
793
],
[
793,
794
],
[
792,
795
],
[
789,
796
],
[
796,
797
],
[
796,
798
],
[
798,
799
],
[
798,
800
],
[
789,
801
],
[
801,
802
],
[
802,
803
],
[
802,
804
],
[
801,
805
],
[
805,
806
],
[
805,
807
],
[
789,
808
],
[
808,
809
],
[
809,
810
],
[
809,
811
],
[
808,
812
],
[
771,
813
],
[
813,
814
],
[
814,
815
],
[
813,
816
],
[
769,
817
],
[
817,
818
],
[
1207,
819
],
[
819,
820
],
[
819,
821
],
[
821,
822
],
[
819,
823
],
[
823,
824
],
[
823,
825
],
[
819,
827
],
[
827,
828
],
[
819,
829
],
[
829,
830
],
[
819,
831
],
[
831,
832
],
[
819,
833
],
[
833,
834
],
[
833,
835
],
[
835,
836
],
[
836,
837
],
[
837,
838
],
[
837,
839
],
[
836,
840
],
[
833,
841
],
[
841,
842
],
[
819,
843
],
[
843,
844
],
[
843,
845
],
[
845,
846
],
[
846,
847
],
[
846,
848
],
[
845,
850
],
[
850,
851
],
[
851,
852
],
[
852,
853
],
[
852,
854
],
[
850,
855
],
[
855,
856
],
[
855,
857
],
[
850,
858
],
[
858,
859
],
[
859,
860
],
[
850,
861
],
[
862,
862
],
[
862,
863
],
[
863,
864
],
[
864,
865
],
[
864,
866
],
[
863,
867
],
[
867,
868
],
[
868,
869
],
[
845,
870
],
[
870,
871
],
[
843,
872
],
[
872,
873
],
[
819,
874
],
[
874,
875
],
[
874,
876
],
[
876,
877
],
[
877,
878
],
[
878,
879
],
[
878,
880
],
[
880,
881
],
[
877,
882
],
[
882,
883
],
[
876,
884
],
[
884,
885
],
[
885,
886
],
[
885,
887
],
[
884,
888
],
[
888,
889
],
[
889,
890
],
[
889,
891
],
[
888,
892
],
[
892,
893
],
[
893,
894
],
[
893,
895
],
[
895,
896
],
[
896,
897
],
[
892,
898
],
[
898,
899
],
[
899,
900
],
[
899,
901
],
[
901,
902
],
[
902,
903
],
[
901,
904
],
[
888,
905
],
[
905,
906
],
[
906,
907
],
[
906,
908
],
[
905,
909
],
[
909,
910
],
[
910,
911
],
[
876,
912
],
[
912,
913
],
[
913,
914
],
[
913,
915
],
[
915,
916
],
[
819,
917
],
[
917,
918
],
[
917,
919
],
[
919,
920
],
[
920,
921
],
[
920,
922
],
[
922,
923
],
[
919,
924
],
[
924,
925
],
[
925,
926
],
[
925,
927
],
[
924,
928
],
[
928,
929
],
[
928,
930
],
[
930,
931
],
[
919,
932
],
[
932,
933
],
[
932,
934
],
[
919,
935
],
[
935,
936
],
[
936,
937
],
[
936,
938
],
[
935,
939
],
[
939,
940
],
[
940,
941
],
[
940,
942
],
[
942,
943
],
[
939,
944
],
[
944,
945
],
[
944,
946
],
[
946,
947
],
[
919,
948
],
[
948,
949
],
[
948,
950
],
[
919,
951
],
[
951,
952
],
[
952,
953
],
[
953,
954
],
[
953,
955
],
[
951,
956
],
[
956,
957
],
[
957,
958
],
[
958,
959
],
[
959,
960
],
[
959,
961
],
[
958,
962
],
[
962,
963
],
[
962,
964
],
[
957,
965
],
[
965,
966
],
[
956,
967
],
[
967,
968
],
[
967,
969
],
[
956,
970
],
[
970,
971
],
[
970,
972
],
[
972,
973
],
[
972,
974
],
[
956,
975
],
[
975,
976
],
[
975,
977
],
[
977,
978
],
[
919,
979
],
[
979,
980
],
[
980,
981
],
[
980,
982
],
[
819,
983
],
[
983,
984
],
[
983,
985
],
[
985,
986
],
[
986,
987
],
[
986,
988
],
[
988,
989
],
[
985,
990
],
[
990,
991
],
[
991,
992
],
[
991,
993
],
[
990,
994
],
[
994,
995
],
[
994,
996
],
[
996,
997
],
[
985,
998
],
[
998,
999
],
[
998,
1000
],
[
985,
1001
],
[
1001,
1002
],
[
1002,
1003
],
[
1002,
1004
],
[
1001,
1005
],
[
1005,
1006
],
[
1006,
1007
],
[
1006,
1008
],
[
1008,
1009
],
[
1005,
1010
],
[
1010,
1011
],
[
1010,
1012
],
[
1012,
1013
],
[
985,
1014
],
[
1014,
1015
],
[
1014,
1016
],
[
985,
1017
],
[
1017,
1018
],
[
1018,
1019
],
[
1019,
1020
],
[
1019,
1021
],
[
1017,
1022
],
[
1022,
1023
],
[
1023,
1024
],
[
1024,
1025
],
[
1025,
1026
],
[
1025,
1027
],
[
1024,
1028
],
[
1028,
1029
],
[
1028,
1030
],
[
1023,
1031
],
[
1031,
1032
],
[
1022,
1033
],
[
1033,
1034
],
[
1033,
1035
],
[
1022,
1036
],
[
1036,
1037
],
[
1036,
1038
],
[
1038,
1039
],
[
1038,
1040
],
[
1022,
1041
],
[
1041,
1042
],
[
1041,
1043
],
[
1043,
1044
],
[
985,
1045
],
[
1045,
1046
],
[
1046,
1047
],
[
1046,
1048
],
[
819,
1049
],
[
1049,
1050
],
[
1049,
1051
],
[
1051,
1052
],
[
1052,
1053
],
[
1052,
1054
],
[
1054,
1055
],
[
1051,
1056
],
[
1056,
1057
],
[
1057,
1058
],
[
1057,
1059
],
[
1056,
1060
],
[
1060,
1061
],
[
1060,
1062
],
[
1062,
1063
],
[
1051,
1064
],
[
1064,
1065
],
[
1064,
1066
],
[
1051,
1067
],
[
1067,
1068
],
[
1068,
1069
],
[
1069,
1070
],
[
1069,
1071
],
[
1067,
1072
],
[
1072,
1073
],
[
1073,
1074
],
[
1074,
1075
],
[
1073,
1076
],
[
1072,
1077
],
[
1077,
1078
],
[
1077,
1079
],
[
1079,
1080
],
[
1051,
1081
],
[
1081,
1082
],
[
1082,
1083
],
[
1083,
1084
],
[
819,
1085
],
[
1085,
1086
],
[
1085,
1087
],
[
1087,
1088
],
[
1088,
1089
],
[
1089,
1090
],
[
1089,
1091
],
[
1088,
1092
],
[
1092,
1093
],
[
1093,
1094
],
[
1094,
1095
],
[
1093,
1096
],
[
1087,
1097
],
[
1097,
1098
],
[
1101,
1099
],
[
1111,
1100
],
[
1108,
1101
],
[
1101,
1102
],
[
1102,
1103
],
[
1102,
1104
],
[
1101,
1105
],
[
1105,
1106
],
[
1105,
1107
],
[
1108,
1108
],
[
1108,
1109
],
[
1108,
1110
],
[
1111,
1111
],
[
1111,
1112
],
[
1111,
1113
],
[
1101,
1114
],
[
1114,
1115
],
[
1114,
1116
],
[
1116,
1117
],
[
1085,
1118
],
[
1118,
1119
],
[
819,
1120
],
[
1120,
1121
],
[
1120,
1122
],
[
1122,
1123
],
[
1123,
1124
],
[
1124,
1125
],
[
819,
1126
],
[
1126,
1127
],
[
1126,
1128
],
[
1128,
1129
],
[
1128,
1130
],
[
1130,
1131
],
[
1207,
1132
],
[
1132,
1133
],
[
1132,
1134
],
[
1134,
1135
],
[
1132,
1136
],
[
1136,
1137
],
[
1136,
1138
],
[
1138,
1139
],
[
1139,
1140
],
[
1139,
1141
],
[
1136,
1142
],
[
1142,
1143
],
[
1132,
1144
],
[
1144,
1145
],
[
1144,
1146
],
[
1146,
1147
],
[
1147,
1148
],
[
1148,
1149
],
[
1148,
1150
],
[
1147,
1151
],
[
1144,
1152
],
[
1152,
1153
],
[
1132,
1154
],
[
1154,
1155
],
[
1154,
1156
],
[
1156,
1157
],
[
1157,
1158
],
[
1158,
1159
],
[
1159,
1160
],
[
1159,
1161
],
[
1157,
1162
],
[
1162,
1163
],
[
1162,
1164
],
[
1164,
1165
],
[
1164,
1166
],
[
1157,
1167
],
[
1167,
1168
],
[
1168,
1169
],
[
1157,
1170
],
[
1171,
1171
],
[
1171,
1172
],
[
1172,
1173
],
[
1173,
1174
],
[
1173,
1175
],
[
1172,
1176
],
[
1176,
1177
],
[
1177,
1178
],
[
1178,
1179
],
[
1177,
1180
],
[
1171,
1181
],
[
1181,
1182
],
[
1182,
1183
],
[
1181,
1184
],
[
1184,
1185
],
[
1184,
1186
],
[
1154,
1187
],
[
1187,
1188
],
[
1132,
1189
],
[
1189,
1190
],
[
1189,
1191
],
[
1191,
1192
],
[
1192,
1193
],
[
1192,
1194
],
[
1191,
1195
],
[
1195,
1196
],
[
1196,
1197
],
[
1189,
1198
],
[
1198,
1199
],
[
1132,
1200
],
[
1200,
1201
],
[
1200,
1202
],
[
1202,
1203
],
[
1203,
1204
],
[
1204,
1205
],
[
0,
1206
],
[
1206,
1207
],
[
1206,
1208
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main {\n\tstatic InputReader scn = new InputReader(System.in);\n\tstatic OutputWriter out = new OutputWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint t = 1;\n\t\twhile (t-- > 0)\n\t\t\tsolve();\n\t\tout.close();\n\t}\n\n\tpublic static void solve() {\n\t\tint n = scn.nextInt();\n\t\tint max = 0;\n\t\tint val = 0;\n\t\twhile (n-- > 0) {\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tval++;\n\t\t\t\tmax = Math.max(max, val);\n\t\t\t} else {\n\t\t\t\tval = 0;\n\t\t\t}\n\t\t}\n\t\tif (max >= 3)\n\t\t\tout.println(\"Yes\");\n\t\telse\n\t\t\tout.println(\"No\");\n\t}\n\n\tpublic static HashMap<Integer, Integer> CountFrequencies(int[] arr) {\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tint a = arr[i];\n\t\t\tif (map.containsKey(a)) {\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}\n\n\tpublic static int countPrimeFactors(int n) {\n\t\tint count = 0;\n\t\twhile (n % 2 == 0) {\n\t\t\tn = n / 2;\n\t\t\tcount++;\n\t\t}\n\t\tfor (int i = 3; i <= Math.sqrt(n); i = i + 2) {\n\t\t\twhile (n % i == 0) {\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif (n > 2)\n\t\t\tcount++;\n\t\treturn (count);\n\t}\n\n\tpublic static int max(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}\n\n\tpublic static int min(int a, int b) {\n\t\tif (a <= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n\n\tpublic static long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n\n\tpublic static boolean isPrime(long n) {\n\t\tif (n < 2)\n\t\t\treturn false;\n\t\tif (n == 2 || n == 3)\n\t\t\treturn true;\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n\t\tlong sqrtN = (long) Math.sqrt(n) + 1;\n\t\tfor (long i = 6L; i <= sqrtN; i += 6) {\n\t\t\tif (n % (i - 1) == 0 || n % (i) + 1 == 0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static int[] SieveOfEratosthenes(int[] arr) {\n\t\tint n = arr.length;\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tarr[(int) i] = 1;\n\t\t}\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tif (arr[(int) i] == 1) {\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tarr[2] = 1;\n\t\tarr[0] = arr[1] = 0;\n\t\treturn arr;\n\t}\n\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor (int i : a) {\n\t\t\tl.add(i);\n\t\t}\n\t\tCollections.sort(l);\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\ta[i] = l.get(i);\n\t\t}\n\t}\n\n\tpublic static ArrayList<String> printPermutn(String str, String ans, ArrayList<String> list) {\n\t\tif (str.length() == 0) {\n\t\t\tlist.add(ans);\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tString ros = str.substring(0, i) + str.substring(i + 1);\n\t\t\tprintPermutn(ros, ans + ch, list);\n\t\t}\n\t\treturn list;\n\t}\n\n\tpublic static int binarySearch(int arr[], int l, int r, int x) {\n\t\tif (r >= l) {\n\t\t\tint mid = l + (r - l) / 2;\n\t\t\tif (arr[mid] == x)\n\t\t\t\treturn mid;\n\t\t\tif (arr[mid] > x)\n\t\t\t\treturn binarySearch(arr, l, mid - 1, x);\n\t\t\treturn binarySearch(arr, mid + 1, r, x);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tpublic static int firstOccurence(int array1[], int low, int high, int x, int n) {\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == 0 || x > array1[mid - 1]) && array1[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x > array1[mid])\n\t\t\t\treturn firstOccurence(array1, (mid + 1), high, x, n);\n\t\t\telse\n\t\t\t\treturn firstOccurence(array1, low, (mid - 1), x, n);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tpublic static int lastOccurence(int array2[], int low, int high, int x, int n) {\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x < array2[mid])\n\t\t\t\treturn lastOccurence(array2, low, (mid - 1), x, n);\n\t\t\telse\n\t\t\t\treturn lastOccurence(array2, (mid + 1), high, x, n);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tstatic final Random random = new Random();\n\n\tstatic void ruffleSort(int[] a) {\n\t\tint n = a.length;// shuffle, then sort\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint oi = random.nextInt(n), temp = a[oi];\n\t\t\ta[oi] = a[i];\n\t\t\ta[i] = temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\n\tstatic class InputReader {\n\t\tprivate InputStream stream;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\t\tprivate SpaceCharFilter filter;\n\n\t\tpublic InputReader(InputStream stream) {\n\t\t\tthis.stream = stream;\n\t\t}\n\n\t\tpublic int[] readArrays(int n) {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = scn.nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\tif (filter != null)\n\t\t\t\treturn filter.isSpaceChar(c);\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic String next() {\n\t\t\treturn nextLine();\n\t\t}\n\n\t\tpublic interface SpaceCharFilter {\n\t\t\tpublic boolean isSpaceChar(int ch);\n\t\t}\n\t}\n\n\tstatic class OutputWriter {\n\t\tprivate final PrintWriter writer;\n\n\t\tpublic OutputWriter(OutputStream outputStream) {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}\n\n\t\tpublic OutputWriter(Writer writer) {\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}\n\n\t\tpublic void print(Object... objects) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}\n\n\t\tpublic void println(Object... objects) {\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}\n\n\t\tpublic void close() {\n\t\t\twriter.close();\n\t\t}\n\t}\n\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic InputReader scn = new InputReader(System.in);\n\tstatic OutputWriter out = new OutputWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint t = 1;\n\t\twhile (t-- > 0)\n\t\t\tsolve();\n\t\tout.close();\n\t}\n\n\tpublic static void solve() {\n\t\tint n = scn.nextInt();\n\t\tint max = 0;\n\t\tint val = 0;\n\t\twhile (n-- > 0) {\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tval++;\n\t\t\t\tmax = Math.max(max, val);\n\t\t\t} else {\n\t\t\t\tval = 0;\n\t\t\t}\n\t\t}\n\t\tif (max >= 3)\n\t\t\tout.println(\"Yes\");\n\t\telse\n\t\t\tout.println(\"No\");\n\t}\n\n\tpublic static HashMap<Integer, Integer> CountFrequencies(int[] arr) {\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tint a = arr[i];\n\t\t\tif (map.containsKey(a)) {\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}\n\n\tpublic static int countPrimeFactors(int n) {\n\t\tint count = 0;\n\t\twhile (n % 2 == 0) {\n\t\t\tn = n / 2;\n\t\t\tcount++;\n\t\t}\n\t\tfor (int i = 3; i <= Math.sqrt(n); i = i + 2) {\n\t\t\twhile (n % i == 0) {\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif (n > 2)\n\t\t\tcount++;\n\t\treturn (count);\n\t}\n\n\tpublic static int max(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}\n\n\tpublic static int min(int a, int b) {\n\t\tif (a <= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n\n\tpublic static long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n\n\tpublic static boolean isPrime(long n) {\n\t\tif (n < 2)\n\t\t\treturn false;\n\t\tif (n == 2 || n == 3)\n\t\t\treturn true;\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n\t\tlong sqrtN = (long) Math.sqrt(n) + 1;\n\t\tfor (long i = 6L; i <= sqrtN; i += 6) {\n\t\t\tif (n % (i - 1) == 0 || n % (i) + 1 == 0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static int[] SieveOfEratosthenes(int[] arr) {\n\t\tint n = arr.length;\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tarr[(int) i] = 1;\n\t\t}\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tif (arr[(int) i] == 1) {\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tarr[2] = 1;\n\t\tarr[0] = arr[1] = 0;\n\t\treturn arr;\n\t}\n\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor (int i : a) {\n\t\t\tl.add(i);\n\t\t}\n\t\tCollections.sort(l);\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\ta[i] = l.get(i);\n\t\t}\n\t}\n\n\tpublic static ArrayList<String> printPermutn(String str, String ans, ArrayList<String> list) {\n\t\tif (str.length() == 0) {\n\t\t\tlist.add(ans);\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tString ros = str.substring(0, i) + str.substring(i + 1);\n\t\t\tprintPermutn(ros, ans + ch, list);\n\t\t}\n\t\treturn list;\n\t}\n\n\tpublic static int binarySearch(int arr[], int l, int r, int x) {\n\t\tif (r >= l) {\n\t\t\tint mid = l + (r - l) / 2;\n\t\t\tif (arr[mid] == x)\n\t\t\t\treturn mid;\n\t\t\tif (arr[mid] > x)\n\t\t\t\treturn binarySearch(arr, l, mid - 1, x);\n\t\t\treturn binarySearch(arr, mid + 1, r, x);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tpublic static int firstOccurence(int array1[], int low, int high, int x, int n) {\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == 0 || x > array1[mid - 1]) && array1[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x > array1[mid])\n\t\t\t\treturn firstOccurence(array1, (mid + 1), high, x, n);\n\t\t\telse\n\t\t\t\treturn firstOccurence(array1, low, (mid - 1), x, n);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tpublic static int lastOccurence(int array2[], int low, int high, int x, int n) {\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x < array2[mid])\n\t\t\t\treturn lastOccurence(array2, low, (mid - 1), x, n);\n\t\t\telse\n\t\t\t\treturn lastOccurence(array2, (mid + 1), high, x, n);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tstatic final Random random = new Random();\n\n\tstatic void ruffleSort(int[] a) {\n\t\tint n = a.length;// shuffle, then sort\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint oi = random.nextInt(n), temp = a[oi];\n\t\t\ta[oi] = a[i];\n\t\t\ta[i] = temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\n\tstatic class InputReader {\n\t\tprivate InputStream stream;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\t\tprivate SpaceCharFilter filter;\n\n\t\tpublic InputReader(InputStream stream) {\n\t\t\tthis.stream = stream;\n\t\t}\n\n\t\tpublic int[] readArrays(int n) {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = scn.nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\tif (filter != null)\n\t\t\t\treturn filter.isSpaceChar(c);\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic String next() {\n\t\t\treturn nextLine();\n\t\t}\n\n\t\tpublic interface SpaceCharFilter {\n\t\t\tpublic boolean isSpaceChar(int ch);\n\t\t}\n\t}\n\n\tstatic class OutputWriter {\n\t\tprivate final PrintWriter writer;\n\n\t\tpublic OutputWriter(OutputStream outputStream) {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}\n\n\t\tpublic OutputWriter(Writer writer) {\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}\n\n\t\tpublic void print(Object... objects) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}\n\n\t\tpublic void println(Object... objects) {\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}\n\n\t\tpublic void close() {\n\t\t\twriter.close();\n\t\t}\n\t}\n\n}",
"Main",
"static InputReader scn = new InputReader(System.in);",
"scn",
"new InputReader(System.in)",
"static OutputWriter out = new OutputWriter(System.out);",
"out",
"new OutputWriter(System.out)",
"static final Random random = new Random();",
"random",
"new Random()",
"public static void main(String[] args) {\n\t\tint t = 1;\n\t\twhile (t-- > 0)\n\t\t\tsolve();\n\t\tout.close();\n\t}",
"main",
"{\n\t\tint t = 1;\n\t\twhile (t-- > 0)\n\t\t\tsolve();\n\t\tout.close();\n\t}",
"int t = 1;",
"t",
"1",
"while (t-- > 0)\n\t\t\tsolve();",
"t-- > 0",
"t--",
"t",
"0",
"solve()",
"solve",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"public static void solve() {\n\t\tint n = scn.nextInt();\n\t\tint max = 0;\n\t\tint val = 0;\n\t\twhile (n-- > 0) {\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tval++;\n\t\t\t\tmax = Math.max(max, val);\n\t\t\t} else {\n\t\t\t\tval = 0;\n\t\t\t}\n\t\t}\n\t\tif (max >= 3)\n\t\t\tout.println(\"Yes\");\n\t\telse\n\t\t\tout.println(\"No\");\n\t}",
"solve",
"{\n\t\tint n = scn.nextInt();\n\t\tint max = 0;\n\t\tint val = 0;\n\t\twhile (n-- > 0) {\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tval++;\n\t\t\t\tmax = Math.max(max, val);\n\t\t\t} else {\n\t\t\t\tval = 0;\n\t\t\t}\n\t\t}\n\t\tif (max >= 3)\n\t\t\tout.println(\"Yes\");\n\t\telse\n\t\t\tout.println(\"No\");\n\t}",
"int n = scn.nextInt();",
"n",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int max = 0;",
"max",
"0",
"int val = 0;",
"val",
"0",
"while (n-- > 0) {\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tval++;\n\t\t\t\tmax = Math.max(max, val);\n\t\t\t} else {\n\t\t\t\tval = 0;\n\t\t\t}\n\t\t}",
"n-- > 0",
"n--",
"n",
"0",
"{\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tval++;\n\t\t\t\tmax = Math.max(max, val);\n\t\t\t} else {\n\t\t\t\tval = 0;\n\t\t\t}\n\t\t}",
"int a = scn.nextInt();",
"a",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int b = scn.nextInt();",
"b",
"scn.nextInt()",
"scn.nextInt",
"scn",
"if (a == b) {\n\t\t\t\tval++;\n\t\t\t\tmax = Math.max(max, val);\n\t\t\t} else {\n\t\t\t\tval = 0;\n\t\t\t}",
"a == b",
"a",
"b",
"{\n\t\t\t\tval++;\n\t\t\t\tmax = Math.max(max, val);\n\t\t\t}",
"val++",
"val",
"max = Math.max(max, val)",
"max",
"Math.max(max, val)",
"Math.max",
"Math",
"max",
"val",
"{\n\t\t\t\tval = 0;\n\t\t\t}",
"val = 0",
"val",
"0",
"if (max >= 3)\n\t\t\tout.println(\"Yes\");\n\t\telse\n\t\t\tout.println(\"No\");",
"max >= 3",
"max",
"3",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"public static HashMap<Integer, Integer> CountFrequencies(int[] arr) {\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tint a = arr[i];\n\t\t\tif (map.containsKey(a)) {\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}",
"CountFrequencies",
"{\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tint a = arr[i];\n\t\t\tif (map.containsKey(a)) {\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}",
"HashMap<Integer, Integer> map = new HashMap<>();",
"map",
"new HashMap<>()",
"for (int i = 0; i < arr.length; i++) {\n\t\t\tint a = arr[i];\n\t\t\tif (map.containsKey(a)) {\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\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\tint a = arr[i];\n\t\t\tif (map.containsKey(a)) {\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}",
"{\n\t\t\tint a = arr[i];\n\t\t\tif (map.containsKey(a)) {\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}",
"int a = arr[i];",
"a",
"arr[i]",
"arr",
"i",
"if (map.containsKey(a)) {\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}",
"map.containsKey(a)",
"map.containsKey",
"map",
"a",
"{\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t}",
"map.put(a, map.get(a) + 1)",
"map.put",
"map",
"a",
"map.get(a) + 1",
"map.get(a)",
"map.get",
"map",
"a",
"1",
"{\n\t\t\t\tmap.put(a, 1);\n\t\t\t}",
"map.put(a, 1)",
"map.put",
"map",
"a",
"1",
"return map;",
"map",
"int[] arr",
"arr",
"public static int countPrimeFactors(int n) {\n\t\tint count = 0;\n\t\twhile (n % 2 == 0) {\n\t\t\tn = n / 2;\n\t\t\tcount++;\n\t\t}\n\t\tfor (int i = 3; i <= Math.sqrt(n); i = i + 2) {\n\t\t\twhile (n % i == 0) {\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif (n > 2)\n\t\t\tcount++;\n\t\treturn (count);\n\t}",
"countPrimeFactors",
"{\n\t\tint count = 0;\n\t\twhile (n % 2 == 0) {\n\t\t\tn = n / 2;\n\t\t\tcount++;\n\t\t}\n\t\tfor (int i = 3; i <= Math.sqrt(n); i = i + 2) {\n\t\t\twhile (n % i == 0) {\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif (n > 2)\n\t\t\tcount++;\n\t\treturn (count);\n\t}",
"int count = 0;",
"count",
"0",
"while (n % 2 == 0) {\n\t\t\tn = n / 2;\n\t\t\tcount++;\n\t\t}",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"{\n\t\t\tn = n / 2;\n\t\t\tcount++;\n\t\t}",
"n = n / 2",
"n",
"n / 2",
"n",
"2",
"count++",
"count",
"for (int i = 3; i <= Math.sqrt(n); i = i + 2) {\n\t\t\twhile (n % i == 0) {\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(n)",
"i",
"Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"i = i + 2",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"{\n\t\t\twhile (n % i == 0) {\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"{\n\t\t\twhile (n % i == 0) {\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}",
"while (n % i == 0) {\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"{\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}",
"n = n / i",
"n",
"n / i",
"n",
"i",
"count++",
"count",
"if (n > 2)\n\t\t\tcount++;",
"n > 2",
"n",
"2",
"count++",
"count",
"return (count);",
"(count)",
"int n",
"n",
"public static int max(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}",
"max",
"{\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}",
"if (a >= b)\n\t\t\treturn a;",
"a >= b",
"a",
"b",
"return a;",
"a",
"return b;",
"b",
"int a",
"a",
"int b",
"b",
"public static int min(int a, int b) {\n\t\tif (a <= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}",
"min",
"{\n\t\tif (a <= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}",
"if (a <= b)\n\t\t\treturn a;",
"a <= b",
"a",
"b",
"return a;",
"a",
"return b;",
"b",
"int a",
"a",
"int b",
"b",
"public static long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}",
"gcd",
"{\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}",
"if (a == 0)\n\t\t\treturn b;",
"a == 0",
"a",
"0",
"return b;",
"b",
"return gcd(b % a, a);",
"gcd(b % a, a)",
"gcd",
"b % a",
"b",
"a",
"a",
"long a",
"a",
"long b",
"b",
"public 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",
"public static boolean isPrime(long n) {\n\t\tif (n < 2)\n\t\t\treturn false;\n\t\tif (n == 2 || n == 3)\n\t\t\treturn true;\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n\t\tlong sqrtN = (long) Math.sqrt(n) + 1;\n\t\tfor (long i = 6L; i <= sqrtN; i += 6) {\n\t\t\tif (n % (i - 1) == 0 || n % (i) + 1 == 0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"isPrime",
"{\n\t\tif (n < 2)\n\t\t\treturn false;\n\t\tif (n == 2 || n == 3)\n\t\t\treturn true;\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n\t\tlong sqrtN = (long) Math.sqrt(n) + 1;\n\t\tfor (long i = 6L; i <= sqrtN; i += 6) {\n\t\t\tif (n % (i - 1) == 0 || n % (i) + 1 == 0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"if (n < 2)\n\t\t\treturn false;",
"n < 2",
"n",
"2",
"return false;",
"false",
"if (n == 2 || n == 3)\n\t\t\treturn true;",
"n == 2 || n == 3",
"n == 2",
"n",
"2",
"n == 3",
"n",
"3",
"return true;",
"true",
"if (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;",
"n % 2 == 0 || n % 3 == 0",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"n % 3 == 0",
"n % 3",
"n",
"3",
"0",
"return false;",
"false",
"long sqrtN = (long) Math.sqrt(n) + 1;",
"sqrtN",
"(long) Math.sqrt(n) + 1",
"(long) Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"1",
"for (long i = 6L; i <= sqrtN; i += 6) {\n\t\t\tif (n % (i - 1) == 0 || n % (i) + 1 == 0)\n\t\t\t\treturn false;\n\t\t}",
"long i = 6L;",
"long i = 6L;",
"i",
"6L",
"i <= sqrtN",
"i",
"sqrtN",
"i += 6",
"i += 6",
"i",
"6",
"{\n\t\t\tif (n % (i - 1) == 0 || n % (i) + 1 == 0)\n\t\t\t\treturn false;\n\t\t}",
"{\n\t\t\tif (n % (i - 1) == 0 || n % (i) + 1 == 0)\n\t\t\t\treturn false;\n\t\t}",
"if (n % (i - 1) == 0 || n % (i) + 1 == 0)\n\t\t\t\treturn false;",
"n % (i - 1) == 0 || n % (i) + 1 == 0",
"n % (i - 1) == 0",
"n % (i - 1)",
"n",
"(i - 1)",
"i",
"1",
"0",
"n % (i) + 1 == 0",
"n % (i) + 1",
"n % (i)",
"n",
"(i)",
"1",
"0",
"return false;",
"false",
"return true;",
"true",
"long n",
"n",
"public static int[] SieveOfEratosthenes(int[] arr) {\n\t\tint n = arr.length;\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tarr[(int) i] = 1;\n\t\t}\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tif (arr[(int) i] == 1) {\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tarr[2] = 1;\n\t\tarr[0] = arr[1] = 0;\n\t\treturn arr;\n\t}",
"SieveOfEratosthenes",
"{\n\t\tint n = arr.length;\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tarr[(int) i] = 1;\n\t\t}\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tif (arr[(int) i] == 1) {\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tarr[2] = 1;\n\t\tarr[0] = arr[1] = 0;\n\t\treturn arr;\n\t}",
"int n = arr.length;",
"n",
"arr.length",
"arr",
"arr.length",
"for (long i = 3; i < n; i = i + 2) {\n\t\t\tarr[(int) i] = 1;\n\t\t}",
"long i = 3;",
"long i = 3;",
"i",
"3",
"i < n",
"i",
"n",
"i = i + 2",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"{\n\t\t\tarr[(int) i] = 1;\n\t\t}",
"{\n\t\t\tarr[(int) i] = 1;\n\t\t}",
"arr[(int) i] = 1",
"arr[(int) i]",
"arr",
"(int) i",
"1",
"for (long i = 3; i < n; i = i + 2) {\n\t\t\tif (arr[(int) i] == 1) {\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"long i = 3;",
"long i = 3;",
"i",
"3",
"i < n",
"i",
"n",
"i = i + 2",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"{\n\t\t\tif (arr[(int) i] == 1) {\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"{\n\t\t\tif (arr[(int) i] == 1) {\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"if (arr[(int) i] == 1) {\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}",
"arr[(int) i] == 1",
"arr[(int) i]",
"arr",
"(int) i",
"1",
"{\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}",
"for (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}",
"long j = (long) i * i;",
"long j = (long) i * i;",
"j",
"(long) i * i",
"(long) i",
"i",
"j < n",
"j",
"n",
"j = j + i",
"j = j + i",
"j",
"j + i",
"j",
"i",
"{\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}",
"{\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}",
"arr[(int) j] = 0",
"arr[(int) j]",
"arr",
"(int) j",
"0",
"arr[2] = 1",
"arr[2]",
"arr",
"2",
"1",
"arr[0] = arr[1] = 0",
"arr[0]",
"arr",
"0",
"arr[1] = 0",
"arr[1]",
"arr",
"1",
"0",
"return arr;",
"arr",
"int[] arr",
"arr",
"static void sort(int[] a) {\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor (int i : a) {\n\t\t\tl.add(i);\n\t\t}\n\t\tCollections.sort(l);\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\ta[i] = l.get(i);\n\t\t}\n\t}",
"sort",
"{\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor (int i : a) {\n\t\t\tl.add(i);\n\t\t}\n\t\tCollections.sort(l);\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\ta[i] = l.get(i);\n\t\t}\n\t}",
"ArrayList<Integer> l = new ArrayList<>();",
"l",
"new ArrayList<>()",
"for (int i : a) {\n\t\t\tl.add(i);\n\t\t}",
"int i",
"a",
"{\n\t\t\tl.add(i);\n\t\t}",
"{\n\t\t\tl.add(i);\n\t\t}",
"l.add(i)",
"l.add",
"l",
"i",
"Collections.sort(l)",
"Collections.sort",
"Collections",
"l",
"for (int i = 0; i < a.length; i++) {\n\t\t\ta[i] = l.get(i);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a.length",
"i",
"a.length",
"a",
"a.length",
"i++",
"i++",
"i",
"{\n\t\t\ta[i] = l.get(i);\n\t\t}",
"{\n\t\t\ta[i] = l.get(i);\n\t\t}",
"a[i] = l.get(i)",
"a[i]",
"a",
"i",
"l.get(i)",
"l.get",
"l",
"i",
"int[] a",
"a",
"public static ArrayList<String> printPermutn(String str, String ans, ArrayList<String> list) {\n\t\tif (str.length() == 0) {\n\t\t\tlist.add(ans);\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tString ros = str.substring(0, i) + str.substring(i + 1);\n\t\t\tprintPermutn(ros, ans + ch, list);\n\t\t}\n\t\treturn list;\n\t}",
"printPermutn",
"{\n\t\tif (str.length() == 0) {\n\t\t\tlist.add(ans);\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tString ros = str.substring(0, i) + str.substring(i + 1);\n\t\t\tprintPermutn(ros, ans + ch, list);\n\t\t}\n\t\treturn list;\n\t}",
"if (str.length() == 0) {\n\t\t\tlist.add(ans);\n\t\t}",
"str.length() == 0",
"str.length()",
"str.length",
"str",
"0",
"{\n\t\t\tlist.add(ans);\n\t\t}",
"list.add(ans)",
"list.add",
"list",
"ans",
"for (int i = 0; i < str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tString ros = str.substring(0, i) + str.substring(i + 1);\n\t\t\tprintPermutn(ros, ans + ch, list);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < str.length()",
"i",
"str.length()",
"str.length",
"str",
"i++",
"i++",
"i",
"{\n\t\t\tchar ch = str.charAt(i);\n\t\t\tString ros = str.substring(0, i) + str.substring(i + 1);\n\t\t\tprintPermutn(ros, ans + ch, list);\n\t\t}",
"{\n\t\t\tchar ch = str.charAt(i);\n\t\t\tString ros = str.substring(0, i) + str.substring(i + 1);\n\t\t\tprintPermutn(ros, ans + ch, list);\n\t\t}",
"char ch = str.charAt(i);",
"ch",
"str.charAt(i)",
"str.charAt",
"str",
"i",
"String ros = str.substring(0, i) + str.substring(i + 1);",
"ros",
"str.substring(0, i) + str.substring(i + 1)",
"str.substring(0, i)",
"str.substring",
"str",
"0",
"i",
"str.substring(i + 1)",
"str.substring",
"str",
"i + 1",
"i",
"1",
"printPermutn(ros, ans + ch, list)",
"printPermutn",
"ros",
"ans + ch",
"ans",
"ch",
"list",
"return list;",
"list",
"String str",
"str",
"String ans",
"ans",
"ArrayList<String> list",
"list",
"public static int binarySearch(int arr[], int l, int r, int x) {\n\t\tif (r >= l) {\n\t\t\tint mid = l + (r - l) / 2;\n\t\t\tif (arr[mid] == x)\n\t\t\t\treturn mid;\n\t\t\tif (arr[mid] > x)\n\t\t\t\treturn binarySearch(arr, l, mid - 1, x);\n\t\t\treturn binarySearch(arr, mid + 1, r, x);\n\t\t}\n\t\treturn -1;\n\t}",
"binarySearch",
"{\n\t\tif (r >= l) {\n\t\t\tint mid = l + (r - l) / 2;\n\t\t\tif (arr[mid] == x)\n\t\t\t\treturn mid;\n\t\t\tif (arr[mid] > x)\n\t\t\t\treturn binarySearch(arr, l, mid - 1, x);\n\t\t\treturn binarySearch(arr, mid + 1, r, x);\n\t\t}\n\t\treturn -1;\n\t}",
"if (r >= l) {\n\t\t\tint mid = l + (r - l) / 2;\n\t\t\tif (arr[mid] == x)\n\t\t\t\treturn mid;\n\t\t\tif (arr[mid] > x)\n\t\t\t\treturn binarySearch(arr, l, mid - 1, x);\n\t\t\treturn binarySearch(arr, mid + 1, r, x);\n\t\t}",
"r >= l",
"r",
"l",
"{\n\t\t\tint mid = l + (r - l) / 2;\n\t\t\tif (arr[mid] == x)\n\t\t\t\treturn mid;\n\t\t\tif (arr[mid] > x)\n\t\t\t\treturn binarySearch(arr, l, mid - 1, x);\n\t\t\treturn binarySearch(arr, mid + 1, r, x);\n\t\t}",
"int mid = l + (r - l) / 2;",
"mid",
"l + (r - l) / 2",
"l",
"(r - l) / 2",
"(r - l)",
"r",
"l",
"2",
"if (arr[mid] == x)\n\t\t\t\treturn mid;",
"arr[mid] == x",
"arr[mid]",
"arr",
"mid",
"x",
"return mid;",
"mid",
"if (arr[mid] > x)\n\t\t\t\treturn binarySearch(arr, l, mid - 1, x);",
"arr[mid] > x",
"arr[mid]",
"arr",
"mid",
"x",
"return binarySearch(arr, l, mid - 1, x);",
"binarySearch(arr, l, mid - 1, x)",
"binarySearch",
"arr",
"l",
"mid - 1",
"mid",
"1",
"x",
"return binarySearch(arr, mid + 1, r, x);",
"binarySearch(arr, mid + 1, r, x)",
"binarySearch",
"arr",
"mid + 1",
"mid",
"1",
"r",
"x",
"return -1;",
"-1",
"1",
"int arr[]",
"arr",
"int l",
"l",
"int r",
"r",
"int x",
"x",
"public static int firstOccurence(int array1[], int low, int high, int x, int n) {\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == 0 || x > array1[mid - 1]) && array1[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x > array1[mid])\n\t\t\t\treturn firstOccurence(array1, (mid + 1), high, x, n);\n\t\t\telse\n\t\t\t\treturn firstOccurence(array1, low, (mid - 1), x, n);\n\t\t}\n\t\treturn -1;\n\t}",
"firstOccurence",
"{\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == 0 || x > array1[mid - 1]) && array1[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x > array1[mid])\n\t\t\t\treturn firstOccurence(array1, (mid + 1), high, x, n);\n\t\t\telse\n\t\t\t\treturn firstOccurence(array1, low, (mid - 1), x, n);\n\t\t}\n\t\treturn -1;\n\t}",
"if (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == 0 || x > array1[mid - 1]) && array1[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x > array1[mid])\n\t\t\t\treturn firstOccurence(array1, (mid + 1), high, x, n);\n\t\t\telse\n\t\t\t\treturn firstOccurence(array1, low, (mid - 1), x, n);\n\t\t}",
"low <= high",
"low",
"high",
"{\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == 0 || x > array1[mid - 1]) && array1[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x > array1[mid])\n\t\t\t\treturn firstOccurence(array1, (mid + 1), high, x, n);\n\t\t\telse\n\t\t\t\treturn firstOccurence(array1, low, (mid - 1), x, n);\n\t\t}",
"int mid = low + (high - low) / 2;",
"mid",
"low + (high - low) / 2",
"low",
"(high - low) / 2",
"(high - low)",
"high",
"low",
"2",
"if ((mid == 0 || x > array1[mid - 1]) && array1[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x > array1[mid])\n\t\t\t\treturn firstOccurence(array1, (mid + 1), high, x, n);\n\t\t\telse\n\t\t\t\treturn firstOccurence(array1, low, (mid - 1), x, n);",
"(mid == 0 || x > array1[mid - 1]) && array1[mid] == x",
"(mid == 0 || x > array1[mid - 1])",
"mid == 0",
"mid",
"0",
"x > array1[mid - 1]",
"x",
"array1[mid - 1]",
"array1",
"mid - 1",
"mid",
"1",
"array1[mid] == x",
"array1[mid]",
"array1",
"mid",
"x",
"return mid;",
"mid",
"if (x > array1[mid])\n\t\t\t\treturn firstOccurence(array1, (mid + 1), high, x, n);\n\t\t\telse\n\t\t\t\treturn firstOccurence(array1, low, (mid - 1), x, n);",
"x > array1[mid]",
"x",
"array1[mid]",
"array1",
"mid",
"return firstOccurence(array1, (mid + 1), high, x, n);",
"firstOccurence(array1, (mid + 1), high, x, n)",
"firstOccurence",
"array1",
"(mid + 1)",
"mid",
"1",
"high",
"x",
"n",
"return firstOccurence(array1, low, (mid - 1), x, n);",
"firstOccurence(array1, low, (mid - 1), x, n)",
"firstOccurence",
"array1",
"low",
"(mid - 1)",
"mid",
"1",
"x",
"n",
"return -1;",
"-1",
"1",
"int array1[]",
"array1",
"int low",
"low",
"int high",
"high",
"int x",
"x",
"int n",
"n",
"public static int lastOccurence(int array2[], int low, int high, int x, int n) {\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x < array2[mid])\n\t\t\t\treturn lastOccurence(array2, low, (mid - 1), x, n);\n\t\t\telse\n\t\t\t\treturn lastOccurence(array2, (mid + 1), high, x, n);\n\t\t}\n\t\treturn -1;\n\t}",
"lastOccurence",
"{\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x < array2[mid])\n\t\t\t\treturn lastOccurence(array2, low, (mid - 1), x, n);\n\t\t\telse\n\t\t\t\treturn lastOccurence(array2, (mid + 1), high, x, n);\n\t\t}\n\t\treturn -1;\n\t}",
"if (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x < array2[mid])\n\t\t\t\treturn lastOccurence(array2, low, (mid - 1), x, n);\n\t\t\telse\n\t\t\t\treturn lastOccurence(array2, (mid + 1), high, x, n);\n\t\t}",
"low <= high",
"low",
"high",
"{\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x < array2[mid])\n\t\t\t\treturn lastOccurence(array2, low, (mid - 1), x, n);\n\t\t\telse\n\t\t\t\treturn lastOccurence(array2, (mid + 1), high, x, n);\n\t\t}",
"int mid = low + (high - low) / 2;",
"mid",
"low + (high - low) / 2",
"low",
"(high - low) / 2",
"(high - low)",
"high",
"low",
"2",
"if ((mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x < array2[mid])\n\t\t\t\treturn lastOccurence(array2, low, (mid - 1), x, n);\n\t\t\telse\n\t\t\t\treturn lastOccurence(array2, (mid + 1), high, x, n);",
"(mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x",
"(mid == n - 1 || x < array2[mid + 1])",
"mid == n - 1",
"mid",
"n - 1",
"n",
"1",
"x < array2[mid + 1]",
"x",
"array2[mid + 1]",
"array2",
"mid + 1",
"mid",
"1",
"array2[mid] == x",
"array2[mid]",
"array2",
"mid",
"x",
"return mid;",
"mid",
"if (x < array2[mid])\n\t\t\t\treturn lastOccurence(array2, low, (mid - 1), x, n);\n\t\t\telse\n\t\t\t\treturn lastOccurence(array2, (mid + 1), high, x, n);",
"x < array2[mid]",
"x",
"array2[mid]",
"array2",
"mid",
"return lastOccurence(array2, low, (mid - 1), x, n);",
"lastOccurence(array2, low, (mid - 1), x, n)",
"lastOccurence",
"array2",
"low",
"(mid - 1)",
"mid",
"1",
"x",
"n",
"return lastOccurence(array2, (mid + 1), high, x, n);",
"lastOccurence(array2, (mid + 1), high, x, n)",
"lastOccurence",
"array2",
"(mid + 1)",
"mid",
"1",
"high",
"x",
"n",
"return -1;",
"-1",
"1",
"int array2[]",
"array2",
"int low",
"low",
"int high",
"high",
"int x",
"x",
"int n",
"n",
"static void ruffleSort(int[] a) {\n\t\tint n = a.length;// shuffle, then sort\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint oi = random.nextInt(n), temp = a[oi];\n\t\t\ta[oi] = a[i];\n\t\t\ta[i] = temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}",
"ruffleSort",
"{\n\t\tint n = a.length;// shuffle, then sort\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint oi = random.nextInt(n), temp = a[oi];\n\t\t\ta[oi] = a[i];\n\t\t\ta[i] = temp;\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 oi = random.nextInt(n), temp = a[oi];\n\t\t\ta[oi] = a[i];\n\t\t\ta[i] = temp;\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\tint oi = random.nextInt(n), temp = a[oi];\n\t\t\ta[oi] = a[i];\n\t\t\ta[i] = temp;\n\t\t}",
"{\n\t\t\tint oi = random.nextInt(n), temp = a[oi];\n\t\t\ta[oi] = a[i];\n\t\t\ta[i] = temp;\n\t\t}",
"int oi = random.nextInt(n)",
"oi",
"random.nextInt(n)",
"random.nextInt",
"random",
"n",
"temp = a[oi];",
"temp",
"a[oi]",
"a",
"oi",
"a[oi] = a[i]",
"a[oi]",
"a",
"oi",
"a[i]",
"a",
"i",
"a[i] = temp",
"a[i]",
"a",
"i",
"temp",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int[] a",
"a",
"static class InputReader {\n\t\tprivate InputStream stream;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\t\tprivate SpaceCharFilter filter;\n\n\t\tpublic InputReader(InputStream stream) {\n\t\t\tthis.stream = stream;\n\t\t}\n\n\t\tpublic int[] readArrays(int n) {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = scn.nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\tif (filter != null)\n\t\t\t\treturn filter.isSpaceChar(c);\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic String next() {\n\t\t\treturn nextLine();\n\t\t}\n\n\t\tpublic interface SpaceCharFilter {\n\t\t\tpublic boolean isSpaceChar(int ch);\n\t\t}\n\t}",
"InputReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n\t\t\tthis.stream = stream;\n\t\t}",
"InputReader",
"{\n\t\t\tthis.stream = stream;\n\t\t}",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int[] readArrays(int n) {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = scn.nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}",
"readArrays",
"{\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = scn.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] = scn.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] = scn.nextInt();\n\t\t\t}",
"{\n\t\t\t\tarr[i] = scn.nextInt();\n\t\t\t}",
"arr[i] = scn.nextInt()",
"arr[i]",
"arr",
"i",
"scn.nextInt()",
"scn.nextInt",
"scn",
"return arr;",
"arr",
"int n",
"n",
"public int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}",
"read",
"{\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}",
"if (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();",
"numChars == -1",
"numChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}",
"curChar >= numChars",
"curChar",
"numChars",
"{\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}",
"curChar = 0",
"curChar",
"0",
"try {\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}",
"catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}",
"IOException e",
"{\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t}",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0)\n\t\t\t\t\treturn -1;",
"numChars <= 0",
"numChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"nextInt",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"c == '-'",
"c",
"'-'",
"{\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"int res = 0;",
"res",
"0",
"do {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t}",
"if (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"nextLong",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"c == '-'",
"c",
"'-'",
"{\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"long res = 0;",
"res",
"0",
"do {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t}",
"if (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}",
"nextLine",
"{\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c))\n\t\t\t\tc = read();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = read()",
"c",
"read()",
"read",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t}",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = read()",
"c",
"read()",
"read",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public boolean isSpaceChar(int c) {\n\t\t\tif (filter != null)\n\t\t\t\treturn filter.isSpaceChar(c);\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}",
"isSpaceChar",
"{\n\t\t\tif (filter != null)\n\t\t\t\treturn filter.isSpaceChar(c);\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}",
"if (filter != null)\n\t\t\t\treturn filter.isSpaceChar(c);",
"filter != null",
"filter",
"null",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public String next() {\n\t\t\treturn nextLine();\n\t\t}",
"next",
"{\n\t\t\treturn nextLine();\n\t\t}",
"return nextLine();",
"nextLine()",
"nextLine",
"public interface SpaceCharFilter {\n\t\t\tpublic boolean isSpaceChar(int ch);\n\t\t}",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"static class OutputWriter {\n\t\tprivate final PrintWriter writer;\n\n\t\tpublic OutputWriter(OutputStream outputStream) {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}\n\n\t\tpublic OutputWriter(Writer writer) {\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}\n\n\t\tpublic void print(Object... objects) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}\n\n\t\tpublic void println(Object... objects) {\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}\n\n\t\tpublic void close() {\n\t\t\twriter.close();\n\t\t}\n\t}",
"OutputWriter",
"private final PrintWriter writer;",
"writer",
"public OutputWriter(OutputStream outputStream) {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}",
"OutputWriter",
"{\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}",
"writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"writer",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"OutputStream outputStream",
"outputStream",
"public OutputWriter(Writer writer) {\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}",
"OutputWriter",
"{\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}",
"this.writer = new PrintWriter(writer)",
"this.writer",
"this",
"this.writer",
"new PrintWriter(writer)",
"Writer writer",
"writer",
"public void print(Object... objects) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}",
"print",
"{\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}",
"for (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < objects.length",
"i",
"objects.length",
"objects",
"objects.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tif (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}",
"{\n\t\t\t\tif (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}",
"if (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}",
"i != 0",
"i",
"0",
"{\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}",
"writer.print(' ')",
"writer.print",
"writer",
"' '",
"writer.print(objects[i])",
"writer.print",
"writer",
"objects[i]",
"objects",
"i",
"Object... objects",
"objects",
"public void println(Object... objects) {\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}",
"println",
"{\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}",
"print(objects)",
"print",
"objects",
"writer.println()",
"writer.println",
"writer",
"Object... objects",
"objects",
"public void close() {\n\t\t\twriter.close();\n\t\t}",
"close",
"{\n\t\t\twriter.close();\n\t\t}",
"writer.close()",
"writer.close",
"writer",
"public class Main {\n\tstatic InputReader scn = new InputReader(System.in);\n\tstatic OutputWriter out = new OutputWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint t = 1;\n\t\twhile (t-- > 0)\n\t\t\tsolve();\n\t\tout.close();\n\t}\n\n\tpublic static void solve() {\n\t\tint n = scn.nextInt();\n\t\tint max = 0;\n\t\tint val = 0;\n\t\twhile (n-- > 0) {\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tval++;\n\t\t\t\tmax = Math.max(max, val);\n\t\t\t} else {\n\t\t\t\tval = 0;\n\t\t\t}\n\t\t}\n\t\tif (max >= 3)\n\t\t\tout.println(\"Yes\");\n\t\telse\n\t\t\tout.println(\"No\");\n\t}\n\n\tpublic static HashMap<Integer, Integer> CountFrequencies(int[] arr) {\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tint a = arr[i];\n\t\t\tif (map.containsKey(a)) {\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}\n\n\tpublic static int countPrimeFactors(int n) {\n\t\tint count = 0;\n\t\twhile (n % 2 == 0) {\n\t\t\tn = n / 2;\n\t\t\tcount++;\n\t\t}\n\t\tfor (int i = 3; i <= Math.sqrt(n); i = i + 2) {\n\t\t\twhile (n % i == 0) {\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif (n > 2)\n\t\t\tcount++;\n\t\treturn (count);\n\t}\n\n\tpublic static int max(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}\n\n\tpublic static int min(int a, int b) {\n\t\tif (a <= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n\n\tpublic static long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n\n\tpublic static boolean isPrime(long n) {\n\t\tif (n < 2)\n\t\t\treturn false;\n\t\tif (n == 2 || n == 3)\n\t\t\treturn true;\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n\t\tlong sqrtN = (long) Math.sqrt(n) + 1;\n\t\tfor (long i = 6L; i <= sqrtN; i += 6) {\n\t\t\tif (n % (i - 1) == 0 || n % (i) + 1 == 0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static int[] SieveOfEratosthenes(int[] arr) {\n\t\tint n = arr.length;\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tarr[(int) i] = 1;\n\t\t}\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tif (arr[(int) i] == 1) {\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tarr[2] = 1;\n\t\tarr[0] = arr[1] = 0;\n\t\treturn arr;\n\t}\n\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor (int i : a) {\n\t\t\tl.add(i);\n\t\t}\n\t\tCollections.sort(l);\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\ta[i] = l.get(i);\n\t\t}\n\t}\n\n\tpublic static ArrayList<String> printPermutn(String str, String ans, ArrayList<String> list) {\n\t\tif (str.length() == 0) {\n\t\t\tlist.add(ans);\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tString ros = str.substring(0, i) + str.substring(i + 1);\n\t\t\tprintPermutn(ros, ans + ch, list);\n\t\t}\n\t\treturn list;\n\t}\n\n\tpublic static int binarySearch(int arr[], int l, int r, int x) {\n\t\tif (r >= l) {\n\t\t\tint mid = l + (r - l) / 2;\n\t\t\tif (arr[mid] == x)\n\t\t\t\treturn mid;\n\t\t\tif (arr[mid] > x)\n\t\t\t\treturn binarySearch(arr, l, mid - 1, x);\n\t\t\treturn binarySearch(arr, mid + 1, r, x);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tpublic static int firstOccurence(int array1[], int low, int high, int x, int n) {\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == 0 || x > array1[mid - 1]) && array1[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x > array1[mid])\n\t\t\t\treturn firstOccurence(array1, (mid + 1), high, x, n);\n\t\t\telse\n\t\t\t\treturn firstOccurence(array1, low, (mid - 1), x, n);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tpublic static int lastOccurence(int array2[], int low, int high, int x, int n) {\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x < array2[mid])\n\t\t\t\treturn lastOccurence(array2, low, (mid - 1), x, n);\n\t\t\telse\n\t\t\t\treturn lastOccurence(array2, (mid + 1), high, x, n);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tstatic final Random random = new Random();\n\n\tstatic void ruffleSort(int[] a) {\n\t\tint n = a.length;// shuffle, then sort\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint oi = random.nextInt(n), temp = a[oi];\n\t\t\ta[oi] = a[i];\n\t\t\ta[i] = temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\n\tstatic class InputReader {\n\t\tprivate InputStream stream;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\t\tprivate SpaceCharFilter filter;\n\n\t\tpublic InputReader(InputStream stream) {\n\t\t\tthis.stream = stream;\n\t\t}\n\n\t\tpublic int[] readArrays(int n) {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = scn.nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\tif (filter != null)\n\t\t\t\treturn filter.isSpaceChar(c);\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic String next() {\n\t\t\treturn nextLine();\n\t\t}\n\n\t\tpublic interface SpaceCharFilter {\n\t\t\tpublic boolean isSpaceChar(int ch);\n\t\t}\n\t}\n\n\tstatic class OutputWriter {\n\t\tprivate final PrintWriter writer;\n\n\t\tpublic OutputWriter(OutputStream outputStream) {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}\n\n\t\tpublic OutputWriter(Writer writer) {\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}\n\n\t\tpublic void print(Object... objects) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}\n\n\t\tpublic void println(Object... objects) {\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}\n\n\t\tpublic void close() {\n\t\t\twriter.close();\n\t\t}\n\t}\n\n}",
"public class Main {\n\tstatic InputReader scn = new InputReader(System.in);\n\tstatic OutputWriter out = new OutputWriter(System.out);\n\n\tpublic static void main(String[] args) {\n\t\tint t = 1;\n\t\twhile (t-- > 0)\n\t\t\tsolve();\n\t\tout.close();\n\t}\n\n\tpublic static void solve() {\n\t\tint n = scn.nextInt();\n\t\tint max = 0;\n\t\tint val = 0;\n\t\twhile (n-- > 0) {\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tif (a == b) {\n\t\t\t\tval++;\n\t\t\t\tmax = Math.max(max, val);\n\t\t\t} else {\n\t\t\t\tval = 0;\n\t\t\t}\n\t\t}\n\t\tif (max >= 3)\n\t\t\tout.println(\"Yes\");\n\t\telse\n\t\t\tout.println(\"No\");\n\t}\n\n\tpublic static HashMap<Integer, Integer> CountFrequencies(int[] arr) {\n\t\tHashMap<Integer, Integer> map = new HashMap<>();\n\t\tfor (int i = 0; i < arr.length; i++) {\n\t\t\tint a = arr[i];\n\t\t\tif (map.containsKey(a)) {\n\t\t\t\tmap.put(a, map.get(a) + 1);\n\t\t\t} else {\n\t\t\t\tmap.put(a, 1);\n\t\t\t}\n\t\t}\n\t\treturn map;\n\t}\n\n\tpublic static int countPrimeFactors(int n) {\n\t\tint count = 0;\n\t\twhile (n % 2 == 0) {\n\t\t\tn = n / 2;\n\t\t\tcount++;\n\t\t}\n\t\tfor (int i = 3; i <= Math.sqrt(n); i = i + 2) {\n\t\t\twhile (n % i == 0) {\n\t\t\t\tn = n / i;\n\t\t\t\tcount++;\n\t\t\t}\n\t\t}\n\t\tif (n > 2)\n\t\t\tcount++;\n\t\treturn (count);\n\t}\n\n\tpublic static int max(int a, int b) {\n\t\tif (a >= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}\n\n\tpublic static int min(int a, int b) {\n\t\tif (a <= b)\n\t\t\treturn a;\n\t\treturn b;\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\tif (a == 0)\n\t\t\treturn b;\n\t\treturn gcd(b % a, a);\n\t}\n\n\tpublic static long lcm(long a, long b) {\n\t\treturn (a * b) / gcd(a, b);\n\t}\n\n\tpublic static boolean isPrime(long n) {\n\t\tif (n < 2)\n\t\t\treturn false;\n\t\tif (n == 2 || n == 3)\n\t\t\treturn true;\n\t\tif (n % 2 == 0 || n % 3 == 0)\n\t\t\treturn false;\n\t\tlong sqrtN = (long) Math.sqrt(n) + 1;\n\t\tfor (long i = 6L; i <= sqrtN; i += 6) {\n\t\t\tif (n % (i - 1) == 0 || n % (i) + 1 == 0)\n\t\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic static int[] SieveOfEratosthenes(int[] arr) {\n\t\tint n = arr.length;\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tarr[(int) i] = 1;\n\t\t}\n\t\tfor (long i = 3; i < n; i = i + 2) {\n\t\t\tif (arr[(int) i] == 1) {\n\t\t\t\tfor (long j = (long) i * i; j < n; j = j + i) {\n\t\t\t\t\tarr[(int) j] = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tarr[2] = 1;\n\t\tarr[0] = arr[1] = 0;\n\t\treturn arr;\n\t}\n\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor (int i : a) {\n\t\t\tl.add(i);\n\t\t}\n\t\tCollections.sort(l);\n\t\tfor (int i = 0; i < a.length; i++) {\n\t\t\ta[i] = l.get(i);\n\t\t}\n\t}\n\n\tpublic static ArrayList<String> printPermutn(String str, String ans, ArrayList<String> list) {\n\t\tif (str.length() == 0) {\n\t\t\tlist.add(ans);\n\t\t}\n\t\tfor (int i = 0; i < str.length(); i++) {\n\t\t\tchar ch = str.charAt(i);\n\t\t\tString ros = str.substring(0, i) + str.substring(i + 1);\n\t\t\tprintPermutn(ros, ans + ch, list);\n\t\t}\n\t\treturn list;\n\t}\n\n\tpublic static int binarySearch(int arr[], int l, int r, int x) {\n\t\tif (r >= l) {\n\t\t\tint mid = l + (r - l) / 2;\n\t\t\tif (arr[mid] == x)\n\t\t\t\treturn mid;\n\t\t\tif (arr[mid] > x)\n\t\t\t\treturn binarySearch(arr, l, mid - 1, x);\n\t\t\treturn binarySearch(arr, mid + 1, r, x);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tpublic static int firstOccurence(int array1[], int low, int high, int x, int n) {\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == 0 || x > array1[mid - 1]) && array1[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x > array1[mid])\n\t\t\t\treturn firstOccurence(array1, (mid + 1), high, x, n);\n\t\t\telse\n\t\t\t\treturn firstOccurence(array1, low, (mid - 1), x, n);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tpublic static int lastOccurence(int array2[], int low, int high, int x, int n) {\n\t\tif (low <= high) {\n\t\t\tint mid = low + (high - low) / 2;\n\t\t\tif ((mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x)\n\t\t\t\treturn mid;\n\t\t\telse if (x < array2[mid])\n\t\t\t\treturn lastOccurence(array2, low, (mid - 1), x, n);\n\t\t\telse\n\t\t\t\treturn lastOccurence(array2, (mid + 1), high, x, n);\n\t\t}\n\t\treturn -1;\n\t}\n\n\tstatic final Random random = new Random();\n\n\tstatic void ruffleSort(int[] a) {\n\t\tint n = a.length;// shuffle, then sort\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint oi = random.nextInt(n), temp = a[oi];\n\t\t\ta[oi] = a[i];\n\t\t\ta[i] = temp;\n\t\t}\n\t\tArrays.sort(a);\n\t}\n\n\tstatic class InputReader {\n\t\tprivate InputStream stream;\n\t\tprivate byte[] buf = new byte[1024];\n\t\tprivate int curChar;\n\t\tprivate int numChars;\n\t\tprivate SpaceCharFilter filter;\n\n\t\tpublic InputReader(InputStream stream) {\n\t\t\tthis.stream = stream;\n\t\t}\n\n\t\tpublic int[] readArrays(int n) {\n\t\t\tint[] arr = new int[n];\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tarr[i] = scn.nextInt();\n\t\t\t}\n\t\t\treturn arr;\n\t\t}\n\n\t\tpublic int read() {\n\t\t\tif (numChars == -1)\n\t\t\t\tthrow new InputMismatchException();\n\t\t\tif (curChar >= numChars) {\n\t\t\t\tcurChar = 0;\n\t\t\t\ttry {\n\t\t\t\t\tnumChars = stream.read(buf);\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\t}\n\t\t\t\tif (numChars <= 0)\n\t\t\t\t\treturn -1;\n\t\t\t}\n\t\t\treturn buf[curChar++];\n\t\t}\n\n\t\tpublic int nextInt() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tint res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic long nextLong() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tint sgn = 1;\n\t\t\tif (c == '-') {\n\t\t\t\tsgn = -1;\n\t\t\t\tc = read();\n\t\t\t}\n\t\t\tlong res = 0;\n\t\t\tdo {\n\t\t\t\tif (c < '0' || c > '9')\n\t\t\t\t\tthrow new InputMismatchException();\n\t\t\t\tres *= 10;\n\t\t\t\tres += c - '0';\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res * sgn;\n\t\t}\n\n\t\tpublic String nextLine() {\n\t\t\tint c = read();\n\t\t\twhile (isSpaceChar(c))\n\t\t\t\tc = read();\n\t\t\tStringBuilder res = new StringBuilder();\n\t\t\tdo {\n\t\t\t\tres.appendCodePoint(c);\n\t\t\t\tc = read();\n\t\t\t} while (!isSpaceChar(c));\n\t\t\treturn res.toString();\n\t\t}\n\n\t\tpublic boolean isSpaceChar(int c) {\n\t\t\tif (filter != null)\n\t\t\t\treturn filter.isSpaceChar(c);\n\t\t\treturn c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n\t\t}\n\n\t\tpublic String next() {\n\t\t\treturn nextLine();\n\t\t}\n\n\t\tpublic interface SpaceCharFilter {\n\t\t\tpublic boolean isSpaceChar(int ch);\n\t\t}\n\t}\n\n\tstatic class OutputWriter {\n\t\tprivate final PrintWriter writer;\n\n\t\tpublic OutputWriter(OutputStream outputStream) {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}\n\n\t\tpublic OutputWriter(Writer writer) {\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}\n\n\t\tpublic void print(Object... objects) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0) {\n\t\t\t\t\twriter.print(' ');\n\t\t\t\t\t// writer.print(1);\n\t\t\t\t}\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}\n\n\t\tpublic void println(Object... objects) {\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}\n\n\t\tpublic void close() {\n\t\t\twriter.close();\n\t\t}\n\t}\n\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main {
static InputReader scn = new InputReader(System.in);
static OutputWriter out = new OutputWriter(System.out);
public static void main(String[] args) {
int t = 1;
while (t-- > 0)
solve();
out.close();
}
public static void solve() {
int n = scn.nextInt();
int max = 0;
int val = 0;
while (n-- > 0) {
int a = scn.nextInt();
int b = scn.nextInt();
if (a == b) {
val++;
max = Math.max(max, val);
} else {
val = 0;
}
}
if (max >= 3)
out.println("Yes");
else
out.println("No");
}
public static HashMap<Integer, Integer> CountFrequencies(int[] arr) {
HashMap<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < arr.length; i++) {
int a = arr[i];
if (map.containsKey(a)) {
map.put(a, map.get(a) + 1);
} else {
map.put(a, 1);
}
}
return map;
}
public static int countPrimeFactors(int n) {
int count = 0;
while (n % 2 == 0) {
n = n / 2;
count++;
}
for (int i = 3; i <= Math.sqrt(n); i = i + 2) {
while (n % i == 0) {
n = n / i;
count++;
}
}
if (n > 2)
count++;
return (count);
}
public static int max(int a, int b) {
if (a >= b)
return a;
return b;
}
public static int min(int a, int b) {
if (a <= b)
return a;
return b;
}
public static long gcd(long a, long b) {
if (a == 0)
return b;
return gcd(b % a, a);
}
public static long lcm(long a, long b) {
return (a * b) / gcd(a, b);
}
public static boolean isPrime(long n) {
if (n < 2)
return false;
if (n == 2 || n == 3)
return true;
if (n % 2 == 0 || n % 3 == 0)
return false;
long sqrtN = (long) Math.sqrt(n) + 1;
for (long i = 6L; i <= sqrtN; i += 6) {
if (n % (i - 1) == 0 || n % (i) + 1 == 0)
return false;
}
return true;
}
public static int[] SieveOfEratosthenes(int[] arr) {
int n = arr.length;
for (long i = 3; i < n; i = i + 2) {
arr[(int) i] = 1;
}
for (long i = 3; i < n; i = i + 2) {
if (arr[(int) i] == 1) {
for (long j = (long) i * i; j < n; j = j + i) {
arr[(int) j] = 0;
}
}
}
arr[2] = 1;
arr[0] = arr[1] = 0;
return arr;
}
static void sort(int[] a) {
ArrayList<Integer> l = new ArrayList<>();
for (int i : a) {
l.add(i);
}
Collections.sort(l);
for (int i = 0; i < a.length; i++) {
a[i] = l.get(i);
}
}
public static ArrayList<String> printPermutn(String str, String ans, ArrayList<String> list) {
if (str.length() == 0) {
list.add(ans);
}
for (int i = 0; i < str.length(); i++) {
char ch = str.charAt(i);
String ros = str.substring(0, i) + str.substring(i + 1);
printPermutn(ros, ans + ch, list);
}
return list;
}
public static int binarySearch(int arr[], int l, int r, int x) {
if (r >= l) {
int mid = l + (r - l) / 2;
if (arr[mid] == x)
return mid;
if (arr[mid] > x)
return binarySearch(arr, l, mid - 1, x);
return binarySearch(arr, mid + 1, r, x);
}
return -1;
}
public static int firstOccurence(int array1[], int low, int high, int x, int n) {
if (low <= high) {
int mid = low + (high - low) / 2;
if ((mid == 0 || x > array1[mid - 1]) && array1[mid] == x)
return mid;
else if (x > array1[mid])
return firstOccurence(array1, (mid + 1), high, x, n);
else
return firstOccurence(array1, low, (mid - 1), x, n);
}
return -1;
}
public static int lastOccurence(int array2[], int low, int high, int x, int n) {
if (low <= high) {
int mid = low + (high - low) / 2;
if ((mid == n - 1 || x < array2[mid + 1]) && array2[mid] == x)
return mid;
else if (x < array2[mid])
return lastOccurence(array2, low, (mid - 1), x, n);
else
return lastOccurence(array2, (mid + 1), high, x, n);
}
return -1;
}
static final Random random = new Random();
static void ruffleSort(int[] a) {
int n = a.length;// shuffle, then sort
for (int i = 0; i < n; i++) {
int oi = random.nextInt(n), temp = a[oi];
a[oi] = a[i];
a[i] = temp;
}
Arrays.sort(a);
}
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int[] readArrays(int n) {
int[] arr = new int[n];
for (int i = 0; i < n; i++) {
arr[i] = scn.nextInt();
}
return arr;
}
public int read() {
if (numChars == -1)
throw new InputMismatchException();
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0)
return -1;
}
return buf[curChar++];
}
public int nextInt() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public long nextLong() {
int c = read();
while (isSpaceChar(c))
c = read();
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public String nextLine() {
int c = read();
while (isSpaceChar(c))
c = read();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = read();
} while (!isSpaceChar(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
if (filter != null)
return filter.isSpaceChar(c);
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public String next() {
return nextLine();
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
static class OutputWriter {
private final PrintWriter writer;
public OutputWriter(OutputStream outputStream) {
writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
}
public OutputWriter(Writer writer) {
this.writer = new PrintWriter(writer);
}
public void print(Object... objects) {
for (int i = 0; i < objects.length; i++) {
if (i != 0) {
writer.print(' ');
// writer.print(1);
}
writer.print(objects[i]);
}
}
public void println(Object... objects) {
print(objects);
writer.println();
}
public void close() {
writer.close();
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
41,
13,
41,
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,
13,
17,
2,
13,
13,
30,
0,
13,
17,
9,
14,
2,
13,
13,
30,
0,
13,
17,
30,
40,
13,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
13,
0,
13,
0,
13,
17,
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,
20,
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,
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
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
11,
13
],
[
7,
14
],
[
14,
15
],
[
7,
16
],
[
16,
17
],
[
7,
18
],
[
18,
19
],
[
7,
20
],
[
20,
21
],
[
7,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
24,
33
],
[
33,
34
],
[
33,
35
],
[
24,
36
],
[
36,
37
],
[
36,
38
],
[
24,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
44,
45
],
[
44,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
39,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
51,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
51,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
62,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
62,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
24,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
22,
92
],
[
92,
93
],
[
7,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
98,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
94,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
113,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
113,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
131,
133
],
[
113,
134
],
[
134,
135
],
[
134,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
113,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
142,
147
],
[
141,
148
],
[
148,
149
],
[
148,
150
],
[
140,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
154,
160
],
[
113,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
113,
166
],
[
166,
167
],
[
94,
168
],
[
168,
169
],
[
168,
170
],
[
170,
171
],
[
171,
172
],
[
171,
173
],
[
170,
175
],
[
175,
176
],
[
175,
177
],
[
170,
178
],
[
178,
179
],
[
170,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
181,
186
],
[
186,
187
],
[
180,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
189,
193
],
[
188,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
197,
198
],
[
194,
199
],
[
170,
200
],
[
200,
201
],
[
94,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
205,
206
],
[
205,
207
],
[
207,
208
],
[
208,
209
],
[
207,
210
],
[
207,
211
],
[
211,
212
],
[
211,
213
],
[
207,
214
],
[
204,
215
],
[
215,
216
],
[
216,
217
],
[
216,
218
],
[
218,
219
],
[
215,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
220,
224
],
[
224,
225
],
[
94,
226
],
[
226,
227
],
[
226,
228
],
[
228,
229
],
[
229,
230
],
[
230,
231
],
[
230,
232
],
[
229,
233
],
[
233,
234
],
[
228,
235
],
[
235,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
94,
240
],
[
240,
241
],
[
240,
242
],
[
242,
243
],
[
243,
244
],
[
244,
245
],
[
244,
246
],
[
243,
247
],
[
242,
248
],
[
248,
249
],
[
249,
250
]
]
| [
"import java.io.DataInputStream;\nimport java.io.IOException;\n\nclass Main {\n\n final private static int BUFFER_SIZE = 1 << 16;\n private static DataInputStream din;\n private static byte[] buffer;\n private static int bufferPointer, bytesRead;\n\n public static void main(String[] args) throws IOException {\n Reader reader = new Reader();\n int n = reader.nextInt();\n int counter = 0;\n String ans = \"No\";\n\n for (int i = 0; i < n; i++) {\n int a = reader.nextInt();\n int b = reader.nextInt();\n\n if (counter >= 2 && (a == b)) {\n ans = \"Yes\";\n continue;\n } else if (a != b) {\n counter = 0;\n } else {\n counter++;\n }\n }\n\n System.out.println(ans);\n }\n\n static class Reader {\n\n public Reader() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public String readLine() throws IOException {\n byte[] buf = new byte[1000]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n }\n}",
"import java.io.DataInputStream;",
"DataInputStream",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"class Main {\n\n final private static int BUFFER_SIZE = 1 << 16;\n private static DataInputStream din;\n private static byte[] buffer;\n private static int bufferPointer, bytesRead;\n\n public static void main(String[] args) throws IOException {\n Reader reader = new Reader();\n int n = reader.nextInt();\n int counter = 0;\n String ans = \"No\";\n\n for (int i = 0; i < n; i++) {\n int a = reader.nextInt();\n int b = reader.nextInt();\n\n if (counter >= 2 && (a == b)) {\n ans = \"Yes\";\n continue;\n } else if (a != b) {\n counter = 0;\n } else {\n counter++;\n }\n }\n\n System.out.println(ans);\n }\n\n static class Reader {\n\n public Reader() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public String readLine() throws IOException {\n byte[] buf = new byte[1000]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n }\n}",
"Main",
"final private static int BUFFER_SIZE = 1 << 16;",
"BUFFER_SIZE",
"1 << 16",
"1",
"16",
"private static DataInputStream din;",
"din",
"private static byte[] buffer;",
"buffer",
"private static int bufferPointer",
"bufferPointer",
"bytesRead;",
"bytesRead",
"public static void main(String[] args) throws IOException {\n Reader reader = new Reader();\n int n = reader.nextInt();\n int counter = 0;\n String ans = \"No\";\n\n for (int i = 0; i < n; i++) {\n int a = reader.nextInt();\n int b = reader.nextInt();\n\n if (counter >= 2 && (a == b)) {\n ans = \"Yes\";\n continue;\n } else if (a != b) {\n counter = 0;\n } else {\n counter++;\n }\n }\n\n System.out.println(ans);\n }",
"main",
"{\n Reader reader = new Reader();\n int n = reader.nextInt();\n int counter = 0;\n String ans = \"No\";\n\n for (int i = 0; i < n; i++) {\n int a = reader.nextInt();\n int b = reader.nextInt();\n\n if (counter >= 2 && (a == b)) {\n ans = \"Yes\";\n continue;\n } else if (a != b) {\n counter = 0;\n } else {\n counter++;\n }\n }\n\n System.out.println(ans);\n }",
"Reader reader = new Reader();",
"reader",
"new Reader()",
"int n = reader.nextInt();",
"n",
"reader.nextInt()",
"reader.nextInt",
"reader",
"int counter = 0;",
"counter",
"0",
"String ans = \"No\";",
"ans",
"\"No\"",
"for (int i = 0; i < n; i++) {\n int a = reader.nextInt();\n int b = reader.nextInt();\n\n if (counter >= 2 && (a == b)) {\n ans = \"Yes\";\n continue;\n } else if (a != b) {\n counter = 0;\n } else {\n counter++;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int a = reader.nextInt();\n int b = reader.nextInt();\n\n if (counter >= 2 && (a == b)) {\n ans = \"Yes\";\n continue;\n } else if (a != b) {\n counter = 0;\n } else {\n counter++;\n }\n }",
"{\n int a = reader.nextInt();\n int b = reader.nextInt();\n\n if (counter >= 2 && (a == b)) {\n ans = \"Yes\";\n continue;\n } else if (a != b) {\n counter = 0;\n } else {\n counter++;\n }\n }",
"int a = reader.nextInt();",
"a",
"reader.nextInt()",
"reader.nextInt",
"reader",
"int b = reader.nextInt();",
"b",
"reader.nextInt()",
"reader.nextInt",
"reader",
"if (counter >= 2 && (a == b)) {\n ans = \"Yes\";\n continue;\n } else if (a != b) {\n counter = 0;\n } else {\n counter++;\n }",
"counter >= 2 && (a == b)",
"counter >= 2",
"counter",
"2",
"(a == b)",
"a",
"b",
"{\n ans = \"Yes\";\n continue;\n }",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"continue;",
"if (a != b) {\n counter = 0;\n } else {\n counter++;\n }",
"a != b",
"a",
"b",
"{\n counter = 0;\n }",
"counter = 0",
"counter",
"0",
"{\n counter++;\n }",
"counter++",
"counter",
"System.out.println(ans)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans",
"String[] args",
"args",
"static class Reader {\n\n public Reader() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }\n\n public int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }\n\n public String readLine() throws IOException {\n byte[] buf = new byte[1000]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }\n\n private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }\n\n private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }\n\n public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }\n\n }",
"Reader",
"public Reader() {\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }",
"Reader",
"{\n din = new DataInputStream(System.in);\n buffer = new byte[BUFFER_SIZE];\n bufferPointer = bytesRead = 0;\n }",
"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 int nextInt() throws IOException {\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }",
"nextInt",
"{\n int ret = 0;\n byte c = read();\n while (c <= ' ')\n c = read();\n boolean neg = (c == '-');\n if (neg)\n c = read();\n do {\n ret = ret * 10 + c - '0';\n } while ((c = read()) >= '0' && c <= '9');\n\n if (neg)\n return -ret;\n return ret;\n }",
"int ret = 0;",
"ret",
"0",
"byte c = read();",
"c",
"read()",
"read",
"while (c <= ' ')\n c = read();",
"c <= ' '",
"c",
"' '",
"c = read()",
"c",
"read()",
"read",
"boolean neg = (c == '-');",
"neg",
"(c == '-')",
"c",
"'-'",
"if (neg)\n c = read();",
"neg",
"c = read()",
"c",
"read()",
"read",
"do {\n ret = ret * 10 + c - '0';\n } 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 ret = ret * 10 + c - '0';\n }",
"ret = ret * 10 + c - '0'",
"ret",
"ret * 10 + c - '0'",
"ret * 10 + c",
"ret * 10",
"ret",
"10",
"c",
"'0'",
"if (neg)\n return -ret;",
"neg",
"return -ret;",
"-ret",
"ret",
"return ret;",
"ret",
"public String readLine() throws IOException {\n byte[] buf = new byte[1000]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }",
"readLine",
"{\n byte[] buf = new byte[1000]; // line length\n int cnt = 0, c;\n while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }\n return new String(buf, 0, cnt);\n }",
"byte[] buf = new byte[1000];",
"buf",
"new byte[1000]",
"1000",
"int cnt = 0",
"cnt",
"0",
"c;",
"c",
"while ((c = read()) != -1) {\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }",
"(c = read()) != -1",
"(c = read())",
"c",
"read()",
"read",
"-1",
"1",
"{\n if (c == '\\n')\n break;\n buf[cnt++] = (byte) c;\n }",
"if (c == '\\n')\n break;",
"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)",
"private void fillBuffer() throws IOException {\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }",
"fillBuffer",
"{\n bytesRead = din.read(buffer, bufferPointer = 0, BUFFER_SIZE);\n if (bytesRead == -1)\n buffer[0] = -1;\n }",
"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 buffer[0] = -1;",
"bytesRead == -1",
"bytesRead",
"-1",
"1",
"buffer[0] = -1",
"buffer[0]",
"buffer",
"0",
"-1",
"1",
"private byte read() throws IOException {\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }",
"read",
"{\n if (bufferPointer == bytesRead)\n fillBuffer();\n return buffer[bufferPointer++];\n }",
"if (bufferPointer == bytesRead)\n fillBuffer();",
"bufferPointer == bytesRead",
"bufferPointer",
"bytesRead",
"fillBuffer()",
"fillBuffer",
"return buffer[bufferPointer++];",
"buffer[bufferPointer++]",
"buffer",
"bufferPointer++",
"bufferPointer",
"public void close() throws IOException {\n if (din == null)\n return;\n din.close();\n }",
"close",
"{\n if (din == null)\n return;\n din.close();\n }",
"if (din == null)\n return;",
"din == null",
"din",
"null",
"return;",
"din.close()",
"din.close",
"din"
]
| import java.io.DataInputStream;
import java.io.IOException;
class Main {
final private static int BUFFER_SIZE = 1 << 16;
private static DataInputStream din;
private static byte[] buffer;
private static int bufferPointer, bytesRead;
public static void main(String[] args) throws IOException {
Reader reader = new Reader();
int n = reader.nextInt();
int counter = 0;
String ans = "No";
for (int i = 0; i < n; i++) {
int a = reader.nextInt();
int b = reader.nextInt();
if (counter >= 2 && (a == b)) {
ans = "Yes";
continue;
} else if (a != b) {
counter = 0;
} else {
counter++;
}
}
System.out.println(ans);
}
static class Reader {
public Reader() {
din = new DataInputStream(System.in);
buffer = new byte[BUFFER_SIZE];
bufferPointer = bytesRead = 0;
}
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 String readLine() throws IOException {
byte[] buf = new byte[1000]; // line length
int cnt = 0, c;
while ((c = read()) != -1) {
if (c == '\n')
break;
buf[cnt++] = (byte) c;
}
return new String(buf, 0, cnt);
}
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();
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
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,
14,
2,
4,
18,
13,
4,
18,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
13,
30,
0,
13,
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
],
[
82,
5
],
[
82,
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,
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
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
37,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
10,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
61,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"\nimport java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint max = 0;\n\t\t\tint cnt = 0;\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (max >= 3) {\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\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint max = 0;\n\t\t\tint cnt = 0;\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (max >= 3) {\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\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint max = 0;\n\t\t\tint cnt = 0;\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (max >= 3) {\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\t\t}\n\t}",
"main",
"{\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint max = 0;\n\t\t\tint cnt = 0;\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (max >= 3) {\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\t\t}\n\t}",
"try (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint max = 0;\n\t\t\tint cnt = 0;\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (max >= 3) {\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\t\t}",
"{\n\t\t\tint n = sc.nextInt();\n\t\t\tint max = 0;\n\t\t\tint cnt = 0;\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (max >= 3) {\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\t\t}",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int max = 0;",
"max",
"0",
"int cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\t\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\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\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}\n\t\t\t}",
"if (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}",
"sc.nextInt() == sc.nextInt()",
"sc.nextInt()",
"sc.nextInt",
"sc",
"sc.nextInt()",
"sc.nextInt",
"sc",
"{\n\t\t\t\t\tcnt++;\n\t\t\t\t}",
"cnt++",
"cnt",
"{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}",
"cnt = 0",
"cnt",
"0",
"if (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}",
"max < cnt",
"max",
"cnt",
"{\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}",
"max = cnt",
"max",
"cnt",
"if (max >= 3) {\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}",
"max >= 3",
"max",
"3",
"{\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\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint max = 0;\n\t\t\tint cnt = 0;\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (max >= 3) {\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\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tint max = 0;\n\t\t\tint cnt = 0;\n\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tif (sc.nextInt() == sc.nextInt()) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (max < cnt) {\n\t\t\t\t\tmax = cnt;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (max >= 3) {\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\t\t}\n\t}\n}",
"Main"
]
|
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int n = sc.nextInt();
int max = 0;
int cnt = 0;
for (int i = 0; i < n; i++) {
if (sc.nextInt() == sc.nextInt()) {
cnt++;
} else {
cnt = 0;
}
if (max < cnt) {
max = cnt;
}
}
if (max >= 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,
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,
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
],
[
82,
5
],
[
82,
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
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
43,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
8,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
61,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
6,
79
],
[
79,
80
],
[
0,
81
],
[
81,
82
],
[
81,
83
]
]
| [
"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 int counts = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b) {\n counts += 1;\n if (counts == 3) {\n break;\n }\n } else {\n counts = 0;\n }\n }\n if (counts == 3) {\n System.out.println(\"Yes\");\n } else {\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 sc = new Scanner(System.in);\n int N = sc.nextInt();\n int counts = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b) {\n counts += 1;\n if (counts == 3) {\n break;\n }\n } else {\n counts = 0;\n }\n }\n if (counts == 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 sc = new Scanner(System.in);\n int N = sc.nextInt();\n int counts = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b) {\n counts += 1;\n if (counts == 3) {\n break;\n }\n } else {\n counts = 0;\n }\n }\n if (counts == 3) {\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 counts = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b) {\n counts += 1;\n if (counts == 3) {\n break;\n }\n } else {\n counts = 0;\n }\n }\n if (counts == 3) {\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 counts = 0;",
"counts",
"0",
"for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b) {\n counts += 1;\n if (counts == 3) {\n break;\n }\n } else {\n counts = 0;\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 counts += 1;\n if (counts == 3) {\n break;\n }\n } else {\n counts = 0;\n }\n }",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b) {\n counts += 1;\n if (counts == 3) {\n break;\n }\n } else {\n counts = 0;\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 counts += 1;\n if (counts == 3) {\n break;\n }\n } else {\n counts = 0;\n }",
"a == b",
"a",
"b",
"{\n counts += 1;\n if (counts == 3) {\n break;\n }\n }",
"counts += 1",
"counts",
"1",
"if (counts == 3) {\n break;\n }",
"counts == 3",
"counts",
"3",
"{\n break;\n }",
"break;",
"{\n counts = 0;\n }",
"counts = 0",
"counts",
"0",
"if (counts == 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"counts == 3",
"counts",
"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 sc = new Scanner(System.in);\n int N = sc.nextInt();\n int counts = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b) {\n counts += 1;\n if (counts == 3) {\n break;\n }\n } else {\n counts = 0;\n }\n }\n if (counts == 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 sc = new Scanner(System.in);\n int N = sc.nextInt();\n int counts = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n if (a == b) {\n counts += 1;\n if (counts == 3) {\n break;\n }\n } else {\n counts = 0;\n }\n }\n if (counts == 3) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\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 counts = 0;
for (int i = 0; i < N; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
if (a == b) {
counts += 1;
if (counts == 3) {
break;
}
} else {
counts = 0;
}
}
if (counts == 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,
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,
4,
18,
18,
13,
13,
8,
13,
17,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
119,
5
],
[
119,
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
],
[
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
],
[
103,
105
],
[
102,
106
],
[
8,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
112,
113
],
[
112,
114
],
[
112,
115
],
[
6,
116
],
[
116,
117
],
[
0,
118
],
[
118,
119
],
[
118,
120
]
]
| [
"import java.util.*;\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[] D1 = new int[N];\n int[] D2 = new int[N];\n for (int i = 0; i < N; i++) {\n D1[i] = sc.nextInt();\n D2[i] = sc.nextInt();\n }\n\n boolean ok = false;\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 ok = true;\n break;\n }\n }\n System.out.println(ok ? \"Yes\" : \"No\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"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[] D1 = new int[N];\n int[] D2 = new int[N];\n for (int i = 0; i < N; i++) {\n D1[i] = sc.nextInt();\n D2[i] = sc.nextInt();\n }\n\n boolean ok = false;\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 ok = true;\n break;\n }\n }\n System.out.println(ok ? \"Yes\" : \"No\");\n }\n}",
"Main",
"public static void main(String[] args) {\n\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 for (int i = 0; i < N; i++) {\n D1[i] = sc.nextInt();\n D2[i] = sc.nextInt();\n }\n\n boolean ok = false;\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 ok = true;\n break;\n }\n }\n System.out.println(ok ? \"Yes\" : \"No\");\n }",
"main",
"{\n\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 for (int i = 0; i < N; i++) {\n D1[i] = sc.nextInt();\n D2[i] = sc.nextInt();\n }\n\n boolean ok = false;\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 ok = true;\n break;\n }\n }\n System.out.println(ok ? \"Yes\" : \"No\");\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",
"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",
"boolean ok = false;",
"ok",
"false",
"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 ok = true;\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 (D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]) {\n ok = true;\n break;\n }\n }",
"{\n if (D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]) {\n ok = true;\n break;\n }\n }",
"if (D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]) {\n ok = 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 ok = true;\n break;\n }",
"ok = true",
"ok",
"true",
"break;",
"System.out.println(ok ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"ok ? \"Yes\" : \"No\"",
"ok",
"\"Yes\"",
"\"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[] D1 = new int[N];\n int[] D2 = new int[N];\n for (int i = 0; i < N; i++) {\n D1[i] = sc.nextInt();\n D2[i] = sc.nextInt();\n }\n\n boolean ok = false;\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 ok = true;\n break;\n }\n }\n System.out.println(ok ? \"Yes\" : \"No\");\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[] D1 = new int[N];\n int[] D2 = new int[N];\n for (int i = 0; i < N; i++) {\n D1[i] = sc.nextInt();\n D2[i] = sc.nextInt();\n }\n\n boolean ok = false;\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 ok = true;\n break;\n }\n }\n System.out.println(ok ? \"Yes\" : \"No\");\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[] D1 = new int[N];
int[] D2 = new int[N];
for (int i = 0; i < N; i++) {
D1[i] = sc.nextInt();
D2[i] = sc.nextInt();
}
boolean ok = false;
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]) {
ok = true;
break;
}
}
System.out.println(ok ? "Yes" : "No");
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
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,
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,
29,
4,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
116,
5
],
[
116,
6
],
[
6,
7
],
[
6,
8
],
[
116,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
17,
19
],
[
11,
21
],
[
21,
22
],
[
21,
23
],
[
11,
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
],
[
11,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
52,
62
],
[
62,
63
],
[
63,
64
],
[
52,
65
],
[
66,
66
],
[
66,
67
],
[
67,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
77,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
69,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
88,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
67,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
99,
106
],
[
11,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
107,
112
],
[
9,
113
],
[
113,
114
],
[
0,
115
],
[
115,
116
],
[
115,
117
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n static Scanner stdIn = new Scanner(System.in);\n public static void main(String[] args){\n int n = stdIn.nextInt();\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for(int i=0; i<n; i++){\n d1[i] = stdIn.nextInt();\n d2[i] = stdIn.nextInt();\n }\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 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 static Scanner stdIn = new Scanner(System.in);\n public static void main(String[] args){\n int n = stdIn.nextInt();\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for(int i=0; i<n; i++){\n d1[i] = stdIn.nextInt();\n d2[i] = stdIn.nextInt();\n }\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 System.out.println(\"Yes\");\n return;\n }\n }\n\n System.out.println(\"No\");\n }\n}",
"Main",
"static Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"public static void main(String[] args){\n int n = stdIn.nextInt();\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for(int i=0; i<n; i++){\n d1[i] = stdIn.nextInt();\n d2[i] = stdIn.nextInt();\n }\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 System.out.println(\"Yes\");\n return;\n }\n }\n\n System.out.println(\"No\");\n }",
"main",
"{\n int n = stdIn.nextInt();\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for(int i=0; i<n; i++){\n d1[i] = stdIn.nextInt();\n d2[i] = stdIn.nextInt();\n }\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 System.out.println(\"Yes\");\n return;\n }\n }\n\n System.out.println(\"No\");\n }",
"int n = stdIn.nextInt();",
"n",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"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] = stdIn.nextInt();\n d2[i] = stdIn.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n d1[i] = stdIn.nextInt();\n d2[i] = stdIn.nextInt();\n }",
"{\n d1[i] = stdIn.nextInt();\n d2[i] = stdIn.nextInt();\n }",
"d1[i] = stdIn.nextInt()",
"d1[i]",
"d1",
"i",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"d2[i] = stdIn.nextInt()",
"d2[i]",
"d2",
"i",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"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 System.out.println(\"Yes\");\n return;\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 System.out.println(\"Yes\");\n return;\n }\n }",
"{\n if((d1[i] == d2[i]) && (d1[i+1] == d2[i+1]) && (d1[i+2] == d2[i+2])){\n System.out.println(\"Yes\");\n return;\n }\n }",
"if((d1[i] == d2[i]) && (d1[i+1] == d2[i+1]) && (d1[i+2] == d2[i+2])){\n System.out.println(\"Yes\");\n return;\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 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 static Scanner stdIn = new Scanner(System.in);\n public static void main(String[] args){\n int n = stdIn.nextInt();\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for(int i=0; i<n; i++){\n d1[i] = stdIn.nextInt();\n d2[i] = stdIn.nextInt();\n }\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 System.out.println(\"Yes\");\n return;\n }\n }\n\n System.out.println(\"No\");\n }\n}",
"public class Main {\n static Scanner stdIn = new Scanner(System.in);\n public static void main(String[] args){\n int n = stdIn.nextInt();\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for(int i=0; i<n; i++){\n d1[i] = stdIn.nextInt();\n d2[i] = stdIn.nextInt();\n }\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 System.out.println(\"Yes\");\n return;\n }\n }\n\n System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
static Scanner stdIn = new Scanner(System.in);
public static void main(String[] args){
int n = stdIn.nextInt();
int[] d1 = new int[n];
int[] d2 = new int[n];
for(int i=0; i<n; i++){
d1[i] = stdIn.nextInt();
d2[i] = stdIn.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])){
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,
12,
13,
30,
41,
13,
20,
41,
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,
30,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
14,
2,
13,
13,
30,
0,
13,
17,
14,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
17,
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,
0,
18,
13,
13,
4,
18,
13,
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,
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
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
214,
20
],
[
214,
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,
35
],
[
35,
36
],
[
35,
37
],
[
23,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
38,
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
],
[
59,
60
],
[
43,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
43,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
23,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
77,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
21,
91
],
[
91,
92
],
[
214,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
99,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
95,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
95,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
111,
121
],
[
121,
122
],
[
122,
123
],
[
111,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
130,
131
],
[
129,
132
],
[
93,
133
],
[
133,
134
],
[
214,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
135,
140
],
[
140,
141
],
[
140,
142
],
[
135,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
146,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
151,
158
],
[
158,
159
],
[
159,
160
],
[
159,
161
],
[
145,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
135,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
170,
173
],
[
173,
174
],
[
135,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
177,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
182,
187
],
[
187,
188
],
[
187,
189
],
[
182,
190
],
[
190,
191
],
[
191,
192
],
[
182,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
194,
198
],
[
198,
199
],
[
177,
200
],
[
200,
201
],
[
175,
202
],
[
202,
203
],
[
135,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
208,
211
],
[
211,
212
],
[
0,
213
],
[
213,
214
],
[
213,
215
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\nimport java.util.*;\nimport java.util.Map.Entry;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner fs = new FastScanner();\n\t int n =fs.nextInt();\n\t int count=0;\n\t boolean present=false;\n\t while(n-->0) {\n\t \t int si=fs.nextInt();\n\t \t int ei =fs.nextInt();\n\t \t if(si==ei) {\n\t \t\t count++;\n\t \t }\n\t \t if(count==3) {\n\t \t\t present=true;\n\t \t }\n\t \t if(si!=ei) {\n\t \t\t count=0;\n\t \t }\n\t }\n\t if(present)System.out.println(\"Yes\");\n\t else System.out.println(\"No\");\n\t}\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor(int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor(int i=0;i<l.size();i++) a[i]=l.get(i);\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() {\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}\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",
"import java.util.Map.Entry;",
"Entry",
"java.util.Map",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner fs = new FastScanner();\n\t int n =fs.nextInt();\n\t int count=0;\n\t boolean present=false;\n\t while(n-->0) {\n\t \t int si=fs.nextInt();\n\t \t int ei =fs.nextInt();\n\t \t if(si==ei) {\n\t \t\t count++;\n\t \t }\n\t \t if(count==3) {\n\t \t\t present=true;\n\t \t }\n\t \t if(si!=ei) {\n\t \t\t count=0;\n\t \t }\n\t }\n\t if(present)System.out.println(\"Yes\");\n\t else System.out.println(\"No\");\n\t}\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor(int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor(int i=0;i<l.size();i++) a[i]=l.get(i);\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() {\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}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tFastScanner fs = new FastScanner();\n\t int n =fs.nextInt();\n\t int count=0;\n\t boolean present=false;\n\t while(n-->0) {\n\t \t int si=fs.nextInt();\n\t \t int ei =fs.nextInt();\n\t \t if(si==ei) {\n\t \t\t count++;\n\t \t }\n\t \t if(count==3) {\n\t \t\t present=true;\n\t \t }\n\t \t if(si!=ei) {\n\t \t\t count=0;\n\t \t }\n\t }\n\t if(present)System.out.println(\"Yes\");\n\t else System.out.println(\"No\");\n\t}",
"main",
"{\n\t\tFastScanner fs = new FastScanner();\n\t int n =fs.nextInt();\n\t int count=0;\n\t boolean present=false;\n\t while(n-->0) {\n\t \t int si=fs.nextInt();\n\t \t int ei =fs.nextInt();\n\t \t if(si==ei) {\n\t \t\t count++;\n\t \t }\n\t \t if(count==3) {\n\t \t\t present=true;\n\t \t }\n\t \t if(si!=ei) {\n\t \t\t count=0;\n\t \t }\n\t }\n\t if(present)System.out.println(\"Yes\");\n\t else System.out.println(\"No\");\n\t}",
"FastScanner fs = new FastScanner();",
"fs",
"new FastScanner()",
"int n =fs.nextInt();",
"n",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int count=0;",
"count",
"0",
"boolean present=false;",
"present",
"false",
"while(n-->0) {\n\t \t int si=fs.nextInt();\n\t \t int ei =fs.nextInt();\n\t \t if(si==ei) {\n\t \t\t count++;\n\t \t }\n\t \t if(count==3) {\n\t \t\t present=true;\n\t \t }\n\t \t if(si!=ei) {\n\t \t\t count=0;\n\t \t }\n\t }",
"n-->0",
"n--",
"n",
"0",
"{\n\t \t int si=fs.nextInt();\n\t \t int ei =fs.nextInt();\n\t \t if(si==ei) {\n\t \t\t count++;\n\t \t }\n\t \t if(count==3) {\n\t \t\t present=true;\n\t \t }\n\t \t if(si!=ei) {\n\t \t\t count=0;\n\t \t }\n\t }",
"int si=fs.nextInt();",
"si",
"fs.nextInt()",
"fs.nextInt",
"fs",
"int ei =fs.nextInt();",
"ei",
"fs.nextInt()",
"fs.nextInt",
"fs",
"if(si==ei) {\n\t \t\t count++;\n\t \t }",
"si==ei",
"si",
"ei",
"{\n\t \t\t count++;\n\t \t }",
"count++",
"count",
"if(count==3) {\n\t \t\t present=true;\n\t \t }",
"count==3",
"count",
"3",
"{\n\t \t\t present=true;\n\t \t }",
"present=true",
"present",
"true",
"if(si!=ei) {\n\t \t\t count=0;\n\t \t }",
"si!=ei",
"si",
"ei",
"{\n\t \t\t count=0;\n\t \t }",
"count=0",
"count",
"0",
"if(present)System.out.println(\"Yes\");\n\t else System.out.println(\"No\");",
"present",
"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 void sort(int[] a) {\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor(int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor(int i=0;i<l.size();i++) a[i]=l.get(i);\n\t}",
"sort",
"{\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor(int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor(int i=0;i<l.size();i++) a[i]=l.get(i);\n\t}",
"ArrayList<Integer> l = new ArrayList<>();",
"l",
"new ArrayList<>()",
"for(int i:a) l.add(i);",
"int i",
"a",
"l.add(i);",
"l.add(i)",
"l.add",
"l",
"i",
"Collections.sort(l)",
"Collections.sort",
"Collections",
"l",
"for(int i=0;i<l.size();i++) a[i]=l.get(i);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<l.size()",
"i",
"l.size()",
"l.size",
"l",
"i++",
"i++",
"i",
"a[i]=l.get(i);",
"a[i]=l.get(i)",
"a[i]",
"a",
"i",
"l.get(i)",
"l.get",
"l",
"i",
"int[] 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.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() {\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}",
"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[] 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",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner fs = new FastScanner();\n\t int n =fs.nextInt();\n\t int count=0;\n\t boolean present=false;\n\t while(n-->0) {\n\t \t int si=fs.nextInt();\n\t \t int ei =fs.nextInt();\n\t \t if(si==ei) {\n\t \t\t count++;\n\t \t }\n\t \t if(count==3) {\n\t \t\t present=true;\n\t \t }\n\t \t if(si!=ei) {\n\t \t\t count=0;\n\t \t }\n\t }\n\t if(present)System.out.println(\"Yes\");\n\t else System.out.println(\"No\");\n\t}\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor(int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor(int i=0;i<l.size();i++) a[i]=l.get(i);\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() {\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}\n\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tFastScanner fs = new FastScanner();\n\t int n =fs.nextInt();\n\t int count=0;\n\t boolean present=false;\n\t while(n-->0) {\n\t \t int si=fs.nextInt();\n\t \t int ei =fs.nextInt();\n\t \t if(si==ei) {\n\t \t\t count++;\n\t \t }\n\t \t if(count==3) {\n\t \t\t present=true;\n\t \t }\n\t \t if(si!=ei) {\n\t \t\t count=0;\n\t \t }\n\t }\n\t if(present)System.out.println(\"Yes\");\n\t else System.out.println(\"No\");\n\t}\n\tstatic void sort(int[] a) {\n\t\tArrayList<Integer> l = new ArrayList<>();\n\t\tfor(int i:a) l.add(i);\n\t\tCollections.sort(l);\n\t\tfor(int i=0;i<l.size();i++) a[i]=l.get(i);\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() {\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}\n\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.*;
import java.util.Map.Entry;
public class Main {
public static void main(String[] args) {
FastScanner fs = new FastScanner();
int n =fs.nextInt();
int count=0;
boolean present=false;
while(n-->0) {
int si=fs.nextInt();
int ei =fs.nextInt();
if(si==ei) {
count++;
}
if(count==3) {
present=true;
}
if(si!=ei) {
count=0;
}
}
if(present)System.out.println("Yes");
else System.out.println("No");
}
static void sort(int[] a) {
ArrayList<Integer> l = new ArrayList<>();
for(int i:a) l.add(i);
Collections.sort(l);
for(int i=0;i<l.size();i++) a[i]=l.get(i);
}
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[] 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());
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
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,
8,
13,
17,
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
],
[
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
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
48,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
37,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
10,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
72,
75
],
[
6,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tboolean bl = false;\n\t\t\tint cnt = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint a = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(bl ? \"Yes\" : \"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\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tboolean bl = false;\n\t\t\tint cnt = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint a = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(bl ? \"Yes\" : \"No\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tboolean bl = false;\n\t\t\tint cnt = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint a = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(bl ? \"Yes\" : \"No\");\n\t\t}\n\t}",
"main",
"{\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tboolean bl = false;\n\t\t\tint cnt = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint a = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(bl ? \"Yes\" : \"No\");\n\t\t}\n\t}",
"try (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tboolean bl = false;\n\t\t\tint cnt = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint a = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(bl ? \"Yes\" : \"No\");\n\t\t}",
"{\n\t\t\tint n = sc.nextInt();\n\t\t\tboolean bl = false;\n\t\t\tint cnt = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint a = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(bl ? \"Yes\" : \"No\");\n\t\t}",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"boolean bl = false;",
"bl",
"false",
"int cnt = 0;",
"cnt",
"0",
"for (int i = 0; i < n; i++) {\n\t\t\t\tint a = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\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 = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tint a = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}\n\t\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\t\tcnt++;\n\t\t\t\t} else {\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}",
"cnt++",
"cnt",
"{\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}",
"cnt = 0",
"cnt",
"0",
"if (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}",
"cnt >= 3",
"cnt",
"3",
"{\n\t\t\t\t\tbl = true;\n\t\t\t\t}",
"bl = true",
"bl",
"true",
"System.out.println(bl ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"bl ? \"Yes\" : \"No\"",
"bl",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tboolean bl = false;\n\t\t\tint cnt = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint a = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(bl ? \"Yes\" : \"No\");\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\tint n = sc.nextInt();\n\t\t\tboolean bl = false;\n\t\t\tint cnt = 0;\n\t\t\tfor (int i = 0; i < n; i++) {\n\t\t\t\tint a = sc.nextInt();\n\t\t\t\tint b = sc.nextInt();\n\t\t\t\tif (a == b) {\n\t\t\t\t\tcnt++;\n\t\t\t\t} else {\n\t\t\t\t\tcnt = 0;\n\t\t\t\t}\n\t\t\t\tif (cnt >= 3) {\n\t\t\t\t\tbl = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(bl ? \"Yes\" : \"No\");\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner sc = new Scanner(System.in)) {
int n = sc.nextInt();
boolean bl = false;
int cnt = 0;
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) {
bl = true;
}
}
System.out.println(bl ? "Yes" : "No");
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
40,
13,
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,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
0,
13,
17,
30,
0,
13,
17,
14,
40,
13,
4,
18,
18,
13,
13,
17,
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
],
[
14,
17
],
[
17,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
23,
25
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
34,
36
],
[
26,
37
],
[
37,
38
],
[
38,
39
],
[
26,
40
],
[
41,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
44,
49
],
[
41,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
55,
57
],
[
41,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
63,
65
],
[
41,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
77,
84
],
[
84,
85
],
[
84,
86
],
[
66,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
8,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
94,
99
],
[
6,
100
],
[
100,
101
],
[
0,
102
],
[
102,
103
],
[
102,
104
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n\n int N = Integer.parseInt(in.nextLine());\n int countDoublets = 0;\n boolean threeConsecutive = false;\n for (int i = 0 ; !threeConsecutive && i < N; i++) {\n String[] read = in.nextLine().split(\" \");\n int d1 = Integer.parseInt(read[0]), d2 = Integer.parseInt(read[1]);\n if (d1 == d2) {\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n } else {\n countDoublets = 0;\n }\n }\n\n if (!threeConsecutive)\n System.out.println(\"No\");\n\n }\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n\n int N = Integer.parseInt(in.nextLine());\n int countDoublets = 0;\n boolean threeConsecutive = false;\n for (int i = 0 ; !threeConsecutive && i < N; i++) {\n String[] read = in.nextLine().split(\" \");\n int d1 = Integer.parseInt(read[0]), d2 = Integer.parseInt(read[1]);\n if (d1 == d2) {\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n } else {\n countDoublets = 0;\n }\n }\n\n if (!threeConsecutive)\n System.out.println(\"No\");\n\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n\n int N = Integer.parseInt(in.nextLine());\n int countDoublets = 0;\n boolean threeConsecutive = false;\n for (int i = 0 ; !threeConsecutive && i < N; i++) {\n String[] read = in.nextLine().split(\" \");\n int d1 = Integer.parseInt(read[0]), d2 = Integer.parseInt(read[1]);\n if (d1 == d2) {\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n } else {\n countDoublets = 0;\n }\n }\n\n if (!threeConsecutive)\n System.out.println(\"No\");\n\n }",
"main",
"{\n Scanner in = new Scanner(System.in);\n\n int N = Integer.parseInt(in.nextLine());\n int countDoublets = 0;\n boolean threeConsecutive = false;\n for (int i = 0 ; !threeConsecutive && i < N; i++) {\n String[] read = in.nextLine().split(\" \");\n int d1 = Integer.parseInt(read[0]), d2 = Integer.parseInt(read[1]);\n if (d1 == d2) {\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n } else {\n countDoublets = 0;\n }\n }\n\n if (!threeConsecutive)\n System.out.println(\"No\");\n\n }",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"int N = Integer.parseInt(in.nextLine());",
"N",
"Integer.parseInt(in.nextLine())",
"Integer.parseInt",
"Integer",
"in.nextLine()",
"in.nextLine",
"in",
"int countDoublets = 0;",
"countDoublets",
"0",
"boolean threeConsecutive = false;",
"threeConsecutive",
"false",
"for (int i = 0 ; !threeConsecutive && i < N; i++) {\n String[] read = in.nextLine().split(\" \");\n int d1 = Integer.parseInt(read[0]), d2 = Integer.parseInt(read[1]);\n if (d1 == d2) {\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n } else {\n countDoublets = 0;\n }\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"!threeConsecutive && i < N",
"!threeConsecutive",
"threeConsecutive",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n String[] read = in.nextLine().split(\" \");\n int d1 = Integer.parseInt(read[0]), d2 = Integer.parseInt(read[1]);\n if (d1 == d2) {\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n } else {\n countDoublets = 0;\n }\n }",
"{\n String[] read = in.nextLine().split(\" \");\n int d1 = Integer.parseInt(read[0]), d2 = Integer.parseInt(read[1]);\n if (d1 == d2) {\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n } else {\n countDoublets = 0;\n }\n }",
"String[] read = in.nextLine().split(\" \");",
"read",
"in.nextLine().split(\" \")",
"in.nextLine().split",
"in.nextLine()",
"in.nextLine",
"in",
"\" \"",
"int d1 = Integer.parseInt(read[0])",
"d1",
"Integer.parseInt(read[0])",
"Integer.parseInt",
"Integer",
"read[0]",
"read",
"0",
"d2 = Integer.parseInt(read[1]);",
"d2",
"Integer.parseInt(read[1])",
"Integer.parseInt",
"Integer",
"read[1]",
"read",
"1",
"if (d1 == d2) {\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n } else {\n countDoublets = 0;\n }",
"d1 == d2",
"d1",
"d2",
"{\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n }",
"countDoublets++",
"countDoublets",
"if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }",
"countDoublets == 3",
"countDoublets",
"3",
"{\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"threeConsecutive = true",
"threeConsecutive",
"true",
"{\n countDoublets = 0;\n }",
"countDoublets = 0",
"countDoublets",
"0",
"if (!threeConsecutive)\n System.out.println(\"No\");",
"!threeConsecutive",
"threeConsecutive",
"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 in = new Scanner(System.in);\n\n int N = Integer.parseInt(in.nextLine());\n int countDoublets = 0;\n boolean threeConsecutive = false;\n for (int i = 0 ; !threeConsecutive && i < N; i++) {\n String[] read = in.nextLine().split(\" \");\n int d1 = Integer.parseInt(read[0]), d2 = Integer.parseInt(read[1]);\n if (d1 == d2) {\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n } else {\n countDoublets = 0;\n }\n }\n\n if (!threeConsecutive)\n System.out.println(\"No\");\n\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner in = new Scanner(System.in);\n\n int N = Integer.parseInt(in.nextLine());\n int countDoublets = 0;\n boolean threeConsecutive = false;\n for (int i = 0 ; !threeConsecutive && i < N; i++) {\n String[] read = in.nextLine().split(\" \");\n int d1 = Integer.parseInt(read[0]), d2 = Integer.parseInt(read[1]);\n if (d1 == d2) {\n countDoublets++;\n if (countDoublets == 3) {\n System.out.println(\"Yes\");\n threeConsecutive = true;\n }\n } else {\n countDoublets = 0;\n }\n }\n\n if (!threeConsecutive)\n System.out.println(\"No\");\n\n }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int N = Integer.parseInt(in.nextLine());
int countDoublets = 0;
boolean threeConsecutive = false;
for (int i = 0 ; !threeConsecutive && i < N; i++) {
String[] read = in.nextLine().split(" ");
int d1 = Integer.parseInt(read[0]), d2 = Integer.parseInt(read[1]);
if (d1 == d2) {
countDoublets++;
if (countDoublets == 3) {
System.out.println("Yes");
threeConsecutive = true;
}
} else {
countDoublets = 0;
}
}
if (!threeConsecutive)
System.out.println("No");
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
2,
13,
13,
13,
23,
13,
23,
13,
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,
0,
13,
2,
2,
13,
13,
13,
0,
13,
2,
13,
17,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
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,
30,
0,
13,
17,
3,
14,
13,
30,
4,
18,
13,
17,
4,
18,
13,
17,
4,
18,
13,
4,
18,
13,
23,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
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,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
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,
4,
13,
42,
4,
13,
13,
30,
0,
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,
4,
13,
42,
4,
13,
13,
0,
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,
14,
2,
13,
17,
29,
4,
18,
13,
13,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
12,
13,
30,
29,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
6,
13,
12,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
18,
36,
13,
20,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
4,
18,
13,
17,
4,
18,
13,
18,
13,
13,
23,
13,
12,
13,
30,
4,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
12,
13,
30,
4,
18,
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
],
[
11,
13
],
[
7,
14
],
[
14,
15
],
[
14,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
16,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
14,
30
],
[
30,
31
],
[
14,
32
],
[
32,
33
],
[
7,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
45,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
44,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
44,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
36,
71
],
[
71,
72
],
[
34,
73
],
[
73,
74
],
[
34,
75
],
[
75,
76
],
[
7,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
83,
84
],
[
83,
85
],
[
79,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
79,
91
],
[
91,
92
],
[
91,
93
],
[
79,
94
],
[
94,
95
],
[
94,
96
],
[
79,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
98,
101
],
[
97,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
102,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
111,
112
],
[
102,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
113,
117
],
[
117,
118
],
[
113,
119
],
[
119,
120
],
[
119,
121
],
[
102,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
79,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
131,
138
],
[
138,
139
],
[
139,
140
],
[
138,
141
],
[
79,
142
],
[
142,
143
],
[
143,
144
],
[
79,
145
],
[
145,
146
],
[
146,
147
],
[
77,
148
],
[
148,
149
],
[
7,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
150,
154
],
[
154,
155
],
[
154,
156
],
[
150,
158
],
[
158,
159
],
[
150,
160
],
[
160,
161
],
[
150,
162
],
[
162,
163
],
[
150,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
164,
172
],
[
172,
173
],
[
150,
174
],
[
174,
175
],
[
174,
176
],
[
176,
177
],
[
177,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
177,
182
],
[
182,
183
],
[
176,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
184,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
188,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
192,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
201,
204
],
[
188,
205
],
[
205,
206
],
[
206,
207
],
[
206,
208
],
[
205,
209
],
[
209,
210
],
[
210,
211
],
[
176,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
215,
216
],
[
150,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
219,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
224,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
231,
232
],
[
219,
233
],
[
233,
234
],
[
233,
235
],
[
219,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
236,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
240,
245
],
[
245,
246
],
[
245,
247
],
[
247,
248
],
[
219,
249
],
[
249,
250
],
[
249,
251
],
[
219,
252
],
[
252,
253
],
[
253,
254
],
[
254,
255
],
[
254,
256
],
[
252,
257
],
[
257,
258
],
[
258,
259
],
[
259,
260
],
[
260,
261
],
[
260,
262
],
[
259,
263
],
[
263,
264
],
[
263,
265
],
[
258,
266
],
[
266,
267
],
[
257,
268
],
[
268,
269
],
[
268,
270
],
[
257,
271
],
[
271,
272
],
[
271,
273
],
[
273,
274
],
[
273,
275
],
[
257,
276
],
[
276,
277
],
[
276,
278
],
[
278,
279
],
[
219,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
150,
284
],
[
284,
285
],
[
284,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
289,
290
],
[
286,
291
],
[
291,
292
],
[
292,
293
],
[
292,
294
],
[
291,
295
],
[
295,
296
],
[
296,
297
],
[
296,
298
],
[
298,
299
],
[
286,
300
],
[
300,
301
],
[
300,
302
],
[
286,
303
],
[
303,
304
],
[
304,
305
],
[
304,
306
],
[
303,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
310,
311
],
[
307,
312
],
[
312,
313
],
[
312,
314
],
[
314,
315
],
[
286,
316
],
[
316,
317
],
[
316,
318
],
[
286,
319
],
[
319,
320
],
[
320,
321
],
[
321,
322
],
[
321,
323
],
[
319,
324
],
[
324,
325
],
[
325,
326
],
[
326,
327
],
[
327,
328
],
[
327,
329
],
[
326,
330
],
[
330,
331
],
[
330,
332
],
[
325,
333
],
[
333,
334
],
[
324,
335
],
[
335,
336
],
[
335,
337
],
[
324,
338
],
[
338,
339
],
[
338,
340
],
[
340,
341
],
[
340,
342
],
[
324,
343
],
[
343,
344
],
[
343,
345
],
[
345,
346
],
[
286,
347
],
[
347,
348
],
[
348,
349
],
[
348,
350
],
[
150,
351
],
[
351,
352
],
[
351,
353
],
[
353,
354
],
[
354,
355
],
[
354,
356
],
[
353,
358
],
[
358,
359
],
[
359,
360
],
[
360,
361
],
[
360,
362
],
[
358,
363
],
[
363,
364
],
[
363,
365
],
[
358,
366
],
[
366,
367
],
[
367,
368
],
[
358,
369
],
[
370,
370
],
[
370,
371
],
[
371,
372
],
[
372,
373
],
[
372,
374
],
[
371,
375
],
[
375,
376
],
[
353,
377
],
[
377,
378
],
[
351,
379
],
[
379,
380
],
[
150,
381
],
[
381,
382
],
[
381,
383
],
[
383,
384
],
[
384,
385
],
[
384,
386
],
[
386,
387
],
[
383,
388
],
[
388,
389
],
[
389,
390
],
[
389,
391
],
[
388,
392
],
[
392,
393
],
[
393,
394
],
[
393,
395
],
[
395,
396
],
[
383,
397
],
[
397,
398
],
[
397,
399
],
[
383,
400
],
[
400,
401
],
[
401,
402
],
[
402,
403
],
[
402,
404
],
[
400,
405
],
[
405,
406
],
[
406,
407
],
[
407,
408
],
[
406,
409
],
[
405,
410
],
[
410,
411
],
[
410,
412
],
[
412,
413
],
[
383,
414
],
[
414,
415
],
[
415,
416
],
[
416,
417
],
[
150,
418
],
[
418,
419
],
[
418,
420
],
[
420,
421
],
[
421,
422
],
[
421,
423
],
[
423,
424
],
[
420,
425
],
[
425,
426
],
[
426,
427
],
[
426,
428
],
[
425,
429
],
[
429,
430
],
[
429,
431
],
[
431,
432
],
[
420,
433
],
[
433,
434
],
[
433,
435
],
[
420,
436
],
[
436,
437
],
[
437,
438
],
[
438,
439
],
[
438,
440
],
[
436,
441
],
[
441,
442
],
[
442,
443
],
[
443,
444
],
[
442,
445
],
[
441,
446
],
[
446,
447
],
[
446,
448
],
[
448,
449
],
[
420,
450
],
[
450,
451
],
[
451,
452
],
[
452,
453
],
[
150,
454
],
[
454,
455
],
[
454,
456
],
[
456,
457
],
[
457,
458
],
[
458,
459
],
[
458,
460
],
[
457,
461
],
[
461,
462
],
[
462,
463
],
[
463,
464
],
[
462,
465
],
[
456,
466
],
[
466,
467
],
[
470,
468
],
[
480,
469
],
[
477,
470
],
[
470,
471
],
[
471,
472
],
[
471,
473
],
[
470,
474
],
[
474,
475
],
[
474,
476
],
[
477,
477
],
[
477,
478
],
[
477,
479
],
[
480,
480
],
[
480,
481
],
[
480,
482
],
[
470,
483
],
[
483,
484
],
[
483,
485
],
[
485,
486
],
[
454,
487
],
[
487,
488
],
[
150,
489
],
[
489,
490
],
[
489,
491
],
[
491,
492
],
[
492,
493
],
[
494,
494
],
[
494,
495
],
[
495,
496
],
[
495,
497
],
[
494,
498
],
[
498,
499
],
[
498,
500
],
[
494,
501
],
[
501,
502
],
[
501,
503
],
[
503,
504
],
[
489,
505
],
[
505,
506
],
[
150,
507
],
[
507,
508
],
[
507,
509
],
[
509,
510
],
[
509,
511
],
[
511,
512
],
[
7,
513
],
[
513,
514
],
[
513,
515
],
[
515,
516
],
[
513,
517
],
[
517,
518
],
[
517,
519
],
[
519,
520
],
[
520,
521
],
[
520,
522
],
[
517,
523
],
[
523,
524
],
[
513,
525
],
[
525,
526
],
[
525,
527
],
[
527,
528
],
[
528,
529
],
[
529,
530
],
[
529,
531
],
[
528,
532
],
[
525,
533
],
[
533,
534
],
[
513,
535
],
[
535,
536
],
[
535,
537
],
[
537,
538
],
[
538,
539
],
[
539,
540
],
[
540,
541
],
[
540,
542
],
[
538,
543
],
[
543,
544
],
[
543,
545
],
[
545,
546
],
[
545,
547
],
[
538,
548
],
[
548,
549
],
[
549,
550
],
[
538,
551
],
[
552,
552
],
[
552,
553
],
[
553,
554
],
[
554,
555
],
[
554,
556
],
[
553,
557
],
[
557,
558
],
[
558,
559
],
[
557,
560
],
[
552,
561
],
[
561,
562
],
[
562,
563
],
[
561,
564
],
[
564,
565
],
[
564,
566
],
[
535,
567
],
[
567,
568
],
[
513,
569
],
[
569,
570
],
[
569,
571
],
[
571,
572
],
[
572,
573
],
[
572,
574
],
[
571,
575
],
[
575,
576
],
[
576,
577
],
[
569,
578
],
[
578,
579
],
[
513,
580
],
[
580,
581
],
[
580,
582
],
[
582,
583
],
[
583,
584
],
[
584,
585
],
[
513,
586
],
[
586,
587
],
[
586,
588
],
[
588,
589
],
[
589,
590
],
[
590,
591
]
]
| [
"import java.util.*;\nimport java.io.*;\nclass Main{\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\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 }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c))\n c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n\n }\n static class OutputWriter {\n\t\tprivate final PrintWriter writer;\n \n\t\tpublic OutputWriter(OutputStream outputStream) {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}\n \n\t\tpublic OutputWriter(Writer writer) {\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}\n \n\t\tpublic void print(Object...objects) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0)\n\t\t\t\t\twriter.print(' ');\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}\n \n\t\tpublic void printLine(Object...objects) {\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}\n \n\t\tpublic void close() {\n\t\t\twriter.close();\n\t\t}\n \n\t\tpublic void flush() {\n\t\t\twriter.flush();\n\t\t}\n \n\t\t}\n static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n static int mod = (int)(1e9+7);\n public static long pow(long a,long b)\n {\n long ans = 1;\n while(b> 0)\n {\n if((b & 1)==1){\n ans = (ans*a) % mod; \n }\n a = (a*a) % mod;\n b = b>>1;\n }\n return ans;\n }\n\n public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n OutputWriter out = new OutputWriter(System.out);\n int n = in.nextInt();\n boolean flag = false;\n int count = 0;\n while(n-- >0)\n {\n int u = in.nextInt(),v = in.nextInt();\n if(u==v)\n count++;\n else\n count = 0;\n if(count>=3)\n {\n flag = true;\n break;\n }\n }\n if(flag)\n {\n out.printLine(\"Yes\");\n }\n else\n out.printLine(\"No\");\n out.flush();\n out.close();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main{\n static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\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 }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c))\n c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n\n }\n static class OutputWriter {\n\t\tprivate final PrintWriter writer;\n \n\t\tpublic OutputWriter(OutputStream outputStream) {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}\n \n\t\tpublic OutputWriter(Writer writer) {\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}\n \n\t\tpublic void print(Object...objects) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0)\n\t\t\t\t\twriter.print(' ');\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}\n \n\t\tpublic void printLine(Object...objects) {\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}\n \n\t\tpublic void close() {\n\t\t\twriter.close();\n\t\t}\n \n\t\tpublic void flush() {\n\t\t\twriter.flush();\n\t\t}\n \n\t\t}\n static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n } \n static int mod = (int)(1e9+7);\n public static long pow(long a,long b)\n {\n long ans = 1;\n while(b> 0)\n {\n if((b & 1)==1){\n ans = (ans*a) % mod; \n }\n a = (a*a) % mod;\n b = b>>1;\n }\n return ans;\n }\n\n public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n OutputWriter out = new OutputWriter(System.out);\n int n = in.nextInt();\n boolean flag = false;\n int count = 0;\n while(n-- >0)\n {\n int u = in.nextInt(),v = in.nextInt();\n if(u==v)\n count++;\n else\n count = 0;\n if(count>=3)\n {\n flag = true;\n break;\n }\n }\n if(flag)\n {\n out.printLine(\"Yes\");\n }\n else\n out.printLine(\"No\");\n out.flush();\n out.close();\n }\n}",
"Main",
"static int mod = (int)(1e9+7);",
"mod",
"(int)(1e9+7)",
"1e9",
"7",
"static int gcd(int a, int b) \n { \n if (a == 0) \n return b; \n return gcd(b % a, a); \n }",
"gcd",
"{ \n if (a == 0) \n return b; \n return gcd(b % a, a); \n }",
"if (a == 0) \n return b;",
"a == 0",
"a",
"0",
"return b;",
"b",
"return gcd(b % a, a);",
"gcd(b % a, a)",
"gcd",
"b % a",
"b",
"a",
"a",
"int a",
"a",
"int b",
"b",
"public static long pow(long a,long b)\n {\n long ans = 1;\n while(b> 0)\n {\n if((b & 1)==1){\n ans = (ans*a) % mod; \n }\n a = (a*a) % mod;\n b = b>>1;\n }\n return ans;\n }",
"pow",
"{\n long ans = 1;\n while(b> 0)\n {\n if((b & 1)==1){\n ans = (ans*a) % mod; \n }\n a = (a*a) % mod;\n b = b>>1;\n }\n return ans;\n }",
"long ans = 1;",
"ans",
"1",
"while(b> 0)\n {\n if((b & 1)==1){\n ans = (ans*a) % mod; \n }\n a = (a*a) % mod;\n b = b>>1;\n }",
"b> 0",
"b",
"0",
"{\n if((b & 1)==1){\n ans = (ans*a) % mod; \n }\n a = (a*a) % mod;\n b = b>>1;\n }",
"if((b & 1)==1){\n ans = (ans*a) % mod; \n }",
"(b & 1)==1",
"(b & 1)",
"b",
"1",
"1",
"{\n ans = (ans*a) % mod; \n }",
"ans = (ans*a) % mod",
"ans",
"(ans*a) % mod",
"(ans*a)",
"ans",
"a",
"mod",
"a = (a*a) % mod",
"a",
"(a*a) % mod",
"(a*a)",
"a",
"a",
"mod",
"b = b>>1",
"b",
"b>>1",
"b",
"1",
"return ans;",
"ans",
"long a",
"a",
"long b",
"b",
"public static void main(String[] args) {\n InputReader in = new InputReader(System.in);\n OutputWriter out = new OutputWriter(System.out);\n int n = in.nextInt();\n boolean flag = false;\n int count = 0;\n while(n-- >0)\n {\n int u = in.nextInt(),v = in.nextInt();\n if(u==v)\n count++;\n else\n count = 0;\n if(count>=3)\n {\n flag = true;\n break;\n }\n }\n if(flag)\n {\n out.printLine(\"Yes\");\n }\n else\n out.printLine(\"No\");\n out.flush();\n out.close();\n }",
"main",
"{\n InputReader in = new InputReader(System.in);\n OutputWriter out = new OutputWriter(System.out);\n int n = in.nextInt();\n boolean flag = false;\n int count = 0;\n while(n-- >0)\n {\n int u = in.nextInt(),v = in.nextInt();\n if(u==v)\n count++;\n else\n count = 0;\n if(count>=3)\n {\n flag = true;\n break;\n }\n }\n if(flag)\n {\n out.printLine(\"Yes\");\n }\n else\n out.printLine(\"No\");\n out.flush();\n out.close();\n }",
"InputReader in = new InputReader(System.in);",
"in",
"new InputReader(System.in)",
"OutputWriter out = new OutputWriter(System.out);",
"out",
"new OutputWriter(System.out)",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"boolean flag = false;",
"flag",
"false",
"int count = 0;",
"count",
"0",
"while(n-- >0)\n {\n int u = in.nextInt(),v = in.nextInt();\n if(u==v)\n count++;\n else\n count = 0;\n if(count>=3)\n {\n flag = true;\n break;\n }\n }",
"n-- >0",
"n--",
"n",
"0",
"{\n int u = in.nextInt(),v = in.nextInt();\n if(u==v)\n count++;\n else\n count = 0;\n if(count>=3)\n {\n flag = true;\n break;\n }\n }",
"int u = in.nextInt()",
"u",
"in.nextInt()",
"in.nextInt",
"in",
"v = in.nextInt();",
"v",
"in.nextInt()",
"in.nextInt",
"in",
"if(u==v)\n count++;\n else\n count = 0;",
"u==v",
"u",
"v",
"count++",
"count",
"count = 0",
"count",
"0",
"if(count>=3)\n {\n flag = true;\n break;\n }",
"count>=3",
"count",
"3",
"{\n flag = true;\n break;\n }",
"flag = true",
"flag",
"true",
"break;",
"if(flag)\n {\n out.printLine(\"Yes\");\n }\n else\n out.printLine(\"No\");",
"flag",
"{\n out.printLine(\"Yes\");\n }",
"out.printLine(\"Yes\")",
"out.printLine",
"out",
"\"Yes\"",
"out.printLine(\"No\")",
"out.printLine",
"out",
"\"No\"",
"out.flush()",
"out.flush",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class InputReader {\n\n private final InputStream stream;\n private final byte[] buf = new byte[8192];\n private int curChar, snumChars;\n private SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int snext() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\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 }\n return a;\n }\n\n public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }\n\n public String nextLine() {\n int c = snext();\n while (isSpaceChar(c))\n c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }\n\n }",
"InputReader",
"private final InputStream stream;",
"stream",
"private final byte[] buf = new byte[8192];",
"buf",
"new byte[8192]",
"8192",
"private int curChar",
"curChar",
"snumChars;",
"snumChars",
"private SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int snext() {\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"snext",
"{\n if (snumChars == -1)\n throw new InputMismatchException();\n if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }\n return buf[curChar++];\n }",
"if (snumChars == -1)\n throw new InputMismatchException();",
"snumChars == -1",
"snumChars",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= snumChars) {\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }",
"curChar >= snumChars",
"curChar",
"snumChars",
"{\n curChar = 0;\n try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (snumChars <= 0)\n return -1;\n }",
"curChar = 0",
"curChar",
"0",
"try {\n snumChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n snumChars = stream.read(buf);\n }",
"snumChars = stream.read(buf)",
"snumChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (snumChars <= 0)\n return -1;",
"snumChars <= 0",
"snumChars",
"0",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int nextInt() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextInt",
"{\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c)) {\n c = snext();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = snext();\n }",
"c = snext()",
"c",
"snext()",
"snext",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = snext();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = snext();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = snext()",
"c",
"snext()",
"snext",
"int res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n }",
"if (c < '0' || c > '9')\n throw new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = snext()",
"c",
"snext()",
"snext",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public long nextLong() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextLong",
"{\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = snext();\n }\n long res = 0;\n do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c)) {\n c = snext();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = snext();\n }",
"c = snext()",
"c",
"snext()",
"snext",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = snext();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = snext();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = snext()",
"c",
"snext()",
"snext",
"long res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9')\n throw new InputMismatchException();\n res *= 10;\n res += c - '0';\n c = snext();\n }",
"if (c < '0' || c > '9')\n throw new InputMismatchException();",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = snext()",
"c",
"snext()",
"snext",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public int[] nextIntArray(int n) {\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\n return a;\n }",
"nextIntArray",
"{\n int a[] = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = nextInt();\n }\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();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = nextInt();\n }",
"{\n a[i] = nextInt();\n }",
"a[i] = nextInt()",
"a[i]",
"a",
"i",
"nextInt()",
"nextInt",
"return a;",
"a",
"int n",
"n",
"public String readString() {\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"readString",
"{\n int c = snext();\n while (isSpaceChar(c)) {\n c = snext();\n }\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));\n return res.toString();\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c)) {\n c = snext();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = snext();\n }",
"c = snext()",
"c",
"snext()",
"snext",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n res.appendCodePoint(c);\n c = snext();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = snext()",
"c",
"snext()",
"snext",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public String nextLine() {\n int c = snext();\n while (isSpaceChar(c))\n c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }",
"nextLine",
"{\n int c = snext();\n while (isSpaceChar(c))\n c = snext();\n StringBuilder res = new StringBuilder();\n do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));\n return res.toString();\n }",
"int c = snext();",
"c",
"snext()",
"snext",
"while (isSpaceChar(c))\n c = snext();",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"c = snext()",
"c",
"snext()",
"snext",
"StringBuilder res = new StringBuilder();",
"res",
"new StringBuilder()",
"do {\n res.appendCodePoint(c);\n c = snext();\n } while (!isEndOfLine(c));",
"!isEndOfLine(c)",
"isEndOfLine(c)",
"isEndOfLine",
"c",
"{\n res.appendCodePoint(c);\n c = snext();\n }",
"res.appendCodePoint(c)",
"res.appendCodePoint",
"res",
"c",
"c = snext()",
"c",
"snext()",
"snext",
"return res.toString();",
"res.toString()",
"res.toString",
"res",
"public boolean isSpaceChar(int c) {\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isSpaceChar",
"{\n if (filter != null)\n return filter.isSpaceChar(c);\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"if (filter != null)\n return filter.isSpaceChar(c);",
"filter != null",
"filter",
"null",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"private boolean isEndOfLine(int c) {\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"isEndOfLine",
"{\n return c == '\\n' || c == '\\r' || c == -1;\n }",
"return c == '\\n' || c == '\\r' || c == -1;",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n' || c == '\\r' || c == -1",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n }",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"static class OutputWriter {\n\t\tprivate final PrintWriter writer;\n \n\t\tpublic OutputWriter(OutputStream outputStream) {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}\n \n\t\tpublic OutputWriter(Writer writer) {\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}\n \n\t\tpublic void print(Object...objects) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0)\n\t\t\t\t\twriter.print(' ');\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}\n \n\t\tpublic void printLine(Object...objects) {\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}\n \n\t\tpublic void close() {\n\t\t\twriter.close();\n\t\t}\n \n\t\tpublic void flush() {\n\t\t\twriter.flush();\n\t\t}\n \n\t\t}",
"OutputWriter",
"private final PrintWriter writer;",
"writer",
"public OutputWriter(OutputStream outputStream) {\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}",
"OutputWriter",
"{\n\t\t\twriter = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n\t\t}",
"writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"writer",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"OutputStream outputStream",
"outputStream",
"public OutputWriter(Writer writer) {\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}",
"OutputWriter",
"{\n\t\t\tthis.writer = new PrintWriter(writer);\n\t\t}",
"this.writer = new PrintWriter(writer)",
"this.writer",
"this",
"this.writer",
"new PrintWriter(writer)",
"Writer writer",
"writer",
"public void print(Object...objects) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0)\n\t\t\t\t\twriter.print(' ');\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}",
"print",
"{\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0)\n\t\t\t\t\twriter.print(' ');\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}\n\t\t}",
"for (int i = 0; i < objects.length; i++) {\n\t\t\t\tif (i != 0)\n\t\t\t\t\twriter.print(' ');\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < objects.length",
"i",
"objects.length",
"objects",
"objects.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tif (i != 0)\n\t\t\t\t\twriter.print(' ');\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}",
"{\n\t\t\t\tif (i != 0)\n\t\t\t\t\twriter.print(' ');\n\t\t\t\twriter.print(objects[i]);\n\t\t\t}",
"if (i != 0)\n\t\t\t\t\twriter.print(' ');",
"i != 0",
"i",
"0",
"writer.print(' ')",
"writer.print",
"writer",
"' '",
"writer.print(objects[i])",
"writer.print",
"writer",
"objects[i]",
"objects",
"i",
"Object...objects",
"objects",
"public void printLine(Object...objects) {\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}",
"printLine",
"{\n\t\t\tprint(objects);\n\t\t\twriter.println();\n\t\t}",
"print(objects)",
"print",
"objects",
"writer.println()",
"writer.println",
"writer",
"Object...objects",
"objects",
"public void close() {\n\t\t\twriter.close();\n\t\t}",
"close",
"{\n\t\t\twriter.close();\n\t\t}",
"writer.close()",
"writer.close",
"writer",
"public void flush() {\n\t\t\twriter.flush();\n\t\t}",
"flush",
"{\n\t\t\twriter.flush();\n\t\t}",
"writer.flush()",
"writer.flush",
"writer"
]
| import java.util.*;
import java.io.*;
class Main{
static class InputReader {
private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
private SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int snext() {
if (snumChars == -1)
throw new InputMismatchException();
if (curChar >= snumChars) {
curChar = 0;
try {
snumChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (snumChars <= 0)
return -1;
}
return buf[curChar++];
}
public int nextInt() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = snext();
}
int res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = snext();
} while (!isSpaceChar(c));
return res * sgn;
}
public long nextLong() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = snext();
}
long res = 0;
do {
if (c < '0' || c > '9')
throw new InputMismatchException();
res *= 10;
res += c - '0';
c = snext();
} while (!isSpaceChar(c));
return res * sgn;
}
public int[] nextIntArray(int n) {
int a[] = new int[n];
for (int i = 0; i < n; i++) {
a[i] = nextInt();
}
return a;
}
public String readString() {
int c = snext();
while (isSpaceChar(c)) {
c = snext();
}
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = snext();
} while (!isSpaceChar(c));
return res.toString();
}
public String nextLine() {
int c = snext();
while (isSpaceChar(c))
c = snext();
StringBuilder res = new StringBuilder();
do {
res.appendCodePoint(c);
c = snext();
} while (!isEndOfLine(c));
return res.toString();
}
public boolean isSpaceChar(int c) {
if (filter != null)
return filter.isSpaceChar(c);
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
private boolean isEndOfLine(int c) {
return c == '\n' || c == '\r' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
static class OutputWriter {
private final PrintWriter writer;
public OutputWriter(OutputStream outputStream) {
writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
}
public OutputWriter(Writer writer) {
this.writer = new PrintWriter(writer);
}
public void print(Object...objects) {
for (int i = 0; i < objects.length; i++) {
if (i != 0)
writer.print(' ');
writer.print(objects[i]);
}
}
public void printLine(Object...objects) {
print(objects);
writer.println();
}
public void close() {
writer.close();
}
public void flush() {
writer.flush();
}
}
static int gcd(int a, int b)
{
if (a == 0)
return b;
return gcd(b % a, a);
}
static int mod = (int)(1e9+7);
public static long pow(long a,long b)
{
long ans = 1;
while(b> 0)
{
if((b & 1)==1){
ans = (ans*a) % mod;
}
a = (a*a) % mod;
b = b>>1;
}
return ans;
}
public static void main(String[] args) {
InputReader in = new InputReader(System.in);
OutputWriter out = new OutputWriter(System.out);
int n = in.nextInt();
boolean flag = false;
int count = 0;
while(n-- >0)
{
int u = in.nextInt(),v = in.nextInt();
if(u==v)
count++;
else
count = 0;
if(count>=3)
{
flag = true;
break;
}
}
if(flag)
{
out.printLine("Yes");
}
else
out.printLine("No");
out.flush();
out.close();
}
} |
[
7,
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,
14,
2,
4,
18,
13,
4,
18,
13,
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,
4,
18,
18,
13,
13,
17,
29,
4,
18,
18,
13,
13,
17,
12,
13,
30,
4,
18,
20,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
101,
5
],
[
101,
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
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
21,
26
],
[
26,
27
],
[
26,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
21,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
47,
57
],
[
57,
58
],
[
58,
59
],
[
47,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
64,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
62,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
78,
85
],
[
8,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
86,
91
],
[
101,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
92,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
]
| [
"import java.util.*;\n\npublic class Main{\n void solve(){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n boolean[] isZoro = new boolean[n];\n for(int i = 0; i < n; i++){\n if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;\n }\n for(int i = 0; i < n - 2; i++){\n if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n\n public static void main(String[] args){\n new Main().solve();\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n void solve(){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n boolean[] isZoro = new boolean[n];\n for(int i = 0; i < n; i++){\n if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;\n }\n for(int i = 0; i < n - 2; i++){\n if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n\n public static void main(String[] args){\n new Main().solve();\n }\n}",
"Main",
"void solve(){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n boolean[] isZoro = new boolean[n];\n for(int i = 0; i < n; i++){\n if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;\n }\n for(int i = 0; i < n - 2; i++){\n if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }",
"solve",
"{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n boolean[] isZoro = new boolean[n];\n for(int i = 0; i < n; i++){\n if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;\n }\n for(int i = 0; i < n - 2; i++){\n if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"boolean[] isZoro = new boolean[n];",
"isZoro",
"new boolean[n]",
"n",
"for(int i = 0; i < n; i++){\n if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;\n }",
"{\n if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;\n }",
"if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;",
"scan.nextInt() == scan.nextInt()",
"scan.nextInt()",
"scan.nextInt",
"scan",
"scan.nextInt()",
"scan.nextInt",
"scan",
"isZoro[i] = true",
"isZoro[i]",
"isZoro",
"i",
"true",
"for(int i = 0; i < n - 2; i++){\n if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){\n System.out.println(\"Yes\");\n return;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n - 2",
"i",
"n - 2",
"n",
"2",
"i++",
"i++",
"i",
"{\n if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){\n System.out.println(\"Yes\");\n return;\n }\n }",
"{\n if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){\n System.out.println(\"Yes\");\n return;\n }\n }",
"if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){\n System.out.println(\"Yes\");\n return;\n }",
"isZoro[i] && isZoro[i + 1] && isZoro[i + 2]",
"isZoro[i] && isZoro[i + 1] && isZoro[i + 2]",
"isZoro[i]",
"isZoro",
"i",
"isZoro[i + 1]",
"isZoro",
"i + 1",
"i",
"1",
"isZoro[i + 2]",
"isZoro",
"i + 2",
"i",
"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\"",
"public static void main(String[] args){\n new Main().solve();\n }",
"main",
"{\n new Main().solve();\n }",
"new Main().solve()",
"new Main().solve",
"new Main()",
"String[] args",
"args",
"public class Main{\n void solve(){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n boolean[] isZoro = new boolean[n];\n for(int i = 0; i < n; i++){\n if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;\n }\n for(int i = 0; i < n - 2; i++){\n if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n\n public static void main(String[] args){\n new Main().solve();\n }\n}",
"public class Main{\n void solve(){\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n boolean[] isZoro = new boolean[n];\n for(int i = 0; i < n; i++){\n if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;\n }\n for(int i = 0; i < n - 2; i++){\n if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n\n public static void main(String[] args){\n new Main().solve();\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
void solve(){
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
boolean[] isZoro = new boolean[n];
for(int i = 0; i < n; i++){
if(scan.nextInt() == scan.nextInt()) isZoro[i] = true;
}
for(int i = 0; i < n - 2; i++){
if(isZoro[i] && isZoro[i + 1] && isZoro[i + 2]){
System.out.println("Yes");
return;
}
}
System.out.println("No");
}
public static void main(String[] args){
new Main().solve();
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
20,
17,
17,
11,
1,
41,
13,
17,
4,
18,
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,
14,
2,
13,
17,
30,
0,
13,
17,
30,
0,
13,
17,
14,
13,
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
],
[
122,
5
],
[
122,
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
],
[
28,
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
],
[
88,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
76,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
8,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
103,
112
],
[
112,
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 public static void main(String[] args){\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[][] a = new int[110][5];\n \n for(int i = 0 ; sc.hasNext() ; i++){\n for(int j = 0 ; j < 2 ; j++){\n a[i][j] = sc.nextInt();\n }\n }\n \n int count = 0;\n boolean ans = false;\n \n for(int i = 0 ; i < N ; i++){\n \n\n if((a[i][0] == a[i][1])){\n count++;\n if(count >= 3){\n ans = true;\n }\n }else{\n count = 0;\n }\n }\n \n if(ans){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n public static void main(String[] args){\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[][] a = new int[110][5];\n \n for(int i = 0 ; sc.hasNext() ; i++){\n for(int j = 0 ; j < 2 ; j++){\n a[i][j] = sc.nextInt();\n }\n }\n \n int count = 0;\n boolean ans = false;\n \n for(int i = 0 ; i < N ; i++){\n \n\n if((a[i][0] == a[i][1])){\n count++;\n if(count >= 3){\n ans = true;\n }\n }else{\n count = 0;\n }\n }\n \n if(ans){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args){\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[][] a = new int[110][5];\n \n for(int i = 0 ; sc.hasNext() ; i++){\n for(int j = 0 ; j < 2 ; j++){\n a[i][j] = sc.nextInt();\n }\n }\n \n int count = 0;\n boolean ans = false;\n \n for(int i = 0 ; i < N ; i++){\n \n\n if((a[i][0] == a[i][1])){\n count++;\n if(count >= 3){\n ans = true;\n }\n }else{\n count = 0;\n }\n }\n \n if(ans){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }",
"main",
"{\n // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[][] a = new int[110][5];\n \n for(int i = 0 ; sc.hasNext() ; i++){\n for(int j = 0 ; j < 2 ; j++){\n a[i][j] = sc.nextInt();\n }\n }\n \n int count = 0;\n boolean ans = false;\n \n for(int i = 0 ; i < N ; i++){\n \n\n if((a[i][0] == a[i][1])){\n count++;\n if(count >= 3){\n ans = true;\n }\n }else{\n count = 0;\n }\n }\n \n if(ans){\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[][] a = new int[110][5];",
"a",
"new int[110][5]",
"110",
"5",
"for(int i = 0 ; sc.hasNext() ; i++){\n for(int j = 0 ; j < 2 ; j++){\n a[i][j] = sc.nextInt();\n }\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"sc.hasNext()",
"sc.hasNext",
"sc",
"i++",
"i++",
"i",
"{\n for(int j = 0 ; j < 2 ; j++){\n a[i][j] = sc.nextInt();\n }\n }",
"{\n for(int j = 0 ; j < 2 ; j++){\n a[i][j] = sc.nextInt();\n }\n }",
"for(int j = 0 ; j < 2 ; j++){\n a[i][j] = sc.nextInt();\n }",
"int j = 0 ;",
"int j = 0 ;",
"j",
"0",
"j < 2",
"j",
"2",
"j++",
"j++",
"j",
"{\n a[i][j] = sc.nextInt();\n }",
"{\n a[i][j] = sc.nextInt();\n }",
"a[i][j] = sc.nextInt()",
"a[i][j]",
"a[i]",
"a",
"i",
"j",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int count = 0;",
"count",
"0",
"boolean ans = false;",
"ans",
"false",
"for(int i = 0 ; i < N ; i++){\n \n\n if((a[i][0] == a[i][1])){\n count++;\n if(count >= 3){\n ans = true;\n }\n }else{\n count = 0;\n }\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n \n\n if((a[i][0] == a[i][1])){\n count++;\n if(count >= 3){\n ans = true;\n }\n }else{\n count = 0;\n }\n }",
"{\n \n\n if((a[i][0] == a[i][1])){\n count++;\n if(count >= 3){\n ans = true;\n }\n }else{\n count = 0;\n }\n }",
"if((a[i][0] == a[i][1])){\n count++;\n if(count >= 3){\n ans = true;\n }\n }else{\n count = 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 count++;\n if(count >= 3){\n ans = true;\n }\n }",
"count++",
"count",
"if(count >= 3){\n ans = true;\n }",
"count >= 3",
"count",
"3",
"{\n ans = true;\n }",
"ans = true",
"ans",
"true",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"if(ans){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"ans",
"{\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 // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[][] a = new int[110][5];\n \n for(int i = 0 ; sc.hasNext() ; i++){\n for(int j = 0 ; j < 2 ; j++){\n a[i][j] = sc.nextInt();\n }\n }\n \n int count = 0;\n boolean ans = false;\n \n for(int i = 0 ; i < N ; i++){\n \n\n if((a[i][0] == a[i][1])){\n count++;\n if(count >= 3){\n ans = true;\n }\n }else{\n count = 0;\n }\n }\n \n if(ans){\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 // Your code here!\n Scanner sc = new Scanner(System.in);\n int N = sc.nextInt();\n int[][] a = new int[110][5];\n \n for(int i = 0 ; sc.hasNext() ; i++){\n for(int j = 0 ; j < 2 ; j++){\n a[i][j] = sc.nextInt();\n }\n }\n \n int count = 0;\n boolean ans = false;\n \n for(int i = 0 ; i < N ; i++){\n \n\n if((a[i][0] == a[i][1])){\n count++;\n if(count >= 3){\n ans = true;\n }\n }else{\n count = 0;\n }\n }\n \n if(ans){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args){
// Your code here!
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int[][] a = new int[110][5];
for(int i = 0 ; sc.hasNext() ; i++){
for(int j = 0 ; j < 2 ; j++){
a[i][j] = sc.nextInt();
}
}
int count = 0;
boolean ans = false;
for(int i = 0 ; i < N ; i++){
if((a[i][0] == a[i][1])){
count++;
if(count >= 3){
ans = true;
}
}else{
count = 0;
}
}
if(ans){
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,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
17,
41,
13,
17,
41,
13,
4,
18,
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,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
4,
18,
13,
8,
13,
17,
17,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
28,
13,
13,
30,
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,
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,
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,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
17,
13,
13,
17,
0,
18,
13,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
14,
2,
18,
13,
13,
17,
0,
13,
18,
13,
17,
41,
13,
17,
42,
2,
18,
13,
17,
17,
30,
14,
2,
2,
18,
13,
17,
17,
17,
0,
13,
2,
2,
13,
18,
13,
17,
13,
0,
18,
13,
17,
17,
0,
18,
13,
17,
2,
2,
18,
13,
17,
18,
13,
17,
13,
29,
13,
23,
13,
12,
13,
30,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
2,
13,
17,
23,
13,
12,
13,
30,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
2,
13,
17,
4,
18,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
17,
28,
13,
13,
30,
30,
41,
13,
17,
14,
4,
18,
4,
18,
13,
30,
41,
13,
4,
18,
4,
18,
4,
18,
13,
35,
13,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
17,
30,
30,
41,
13,
13,
4,
13,
2,
2,
13,
17,
4,
18,
13,
13,
3,
34,
30,
30,
4,
13,
2,
13,
17,
3,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
2,
4,
18,
13,
18,
13,
30,
4,
13,
2,
2,
13,
17,
13,
0,
13,
17,
14,
40,
13,
30,
4,
13,
2,
2,
13,
17,
13,
40,
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
],
[
752,
20
],
[
752,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
23,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
33,
35
],
[
23,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
23,
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
],
[
79,
81
],
[
23,
82
],
[
82,
83
],
[
83,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
85,
88
],
[
23,
89
],
[
89,
90
],
[
90,
91
],
[
21,
92
],
[
92,
93
],
[
752,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
100,
102
],
[
100,
103
],
[
104,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
96,
109
],
[
109,
110
],
[
110,
111
],
[
109,
112
],
[
96,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
118,
120
],
[
120,
121
],
[
121,
122
],
[
113,
123
],
[
123,
124
],
[
124,
125
],
[
113,
126
],
[
127,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
128,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
96,
136
],
[
136,
137
],
[
94,
138
],
[
138,
139
],
[
752,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
140,
145
],
[
145,
146
],
[
145,
147
],
[
140,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
151,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
156,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
150,
167
],
[
167,
168
],
[
168,
169
],
[
169,
170
],
[
140,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
175,
178
],
[
178,
179
],
[
140,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
184,
187
],
[
187,
188
],
[
140,
189
],
[
189,
190
],
[
189,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
193,
196
],
[
196,
197
],
[
140,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
201,
202
],
[
201,
203
],
[
200,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
205,
210
],
[
210,
211
],
[
210,
212
],
[
205,
213
],
[
213,
214
],
[
214,
215
],
[
205,
216
],
[
217,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
219,
221
],
[
218,
222
],
[
222,
223
],
[
200,
224
],
[
224,
225
],
[
198,
226
],
[
226,
227
],
[
140,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
231,
233
],
[
230,
235
],
[
235,
236
],
[
236,
237
],
[
237,
238
],
[
237,
239
],
[
235,
240
],
[
240,
241
],
[
240,
242
],
[
235,
243
],
[
243,
244
],
[
244,
245
],
[
235,
246
],
[
247,
247
],
[
247,
248
],
[
248,
249
],
[
249,
250
],
[
249,
251
],
[
248,
252
],
[
252,
253
],
[
230,
254
],
[
254,
255
],
[
228,
256
],
[
256,
257
],
[
140,
258
],
[
258,
259
],
[
258,
260
],
[
260,
261
],
[
261,
262
],
[
261,
263
],
[
260,
265
],
[
265,
266
],
[
266,
267
],
[
267,
268
],
[
267,
269
],
[
265,
270
],
[
270,
271
],
[
270,
272
],
[
265,
273
],
[
273,
274
],
[
274,
275
],
[
265,
276
],
[
277,
277
],
[
277,
278
],
[
278,
279
],
[
279,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
280,
284
],
[
279,
285
],
[
278,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
286,
290
],
[
260,
291
],
[
291,
292
],
[
258,
293
],
[
293,
294
],
[
140,
295
],
[
295,
296
],
[
295,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
300,
301
],
[
300,
302
],
[
297,
303
],
[
303,
304
],
[
304,
305
],
[
305,
306
],
[
305,
307
],
[
304,
308
],
[
303,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
311,
313
],
[
297,
314
],
[
314,
315
],
[
314,
316
],
[
297,
317
],
[
317,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
318,
322
],
[
317,
323
],
[
323,
324
],
[
324,
325
],
[
325,
326
],
[
326,
327
],
[
327,
328
],
[
327,
329
],
[
326,
330
],
[
325,
331
],
[
324,
332
],
[
332,
333
],
[
332,
334
],
[
334,
335
],
[
335,
336
],
[
335,
337
],
[
337,
338
],
[
337,
339
],
[
334,
340
],
[
323,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
341,
345
],
[
323,
346
],
[
346,
347
],
[
347,
348
],
[
347,
349
],
[
346,
350
],
[
350,
351
],
[
351,
352
],
[
352,
353
],
[
352,
354
],
[
351,
355
],
[
355,
356
],
[
355,
357
],
[
350,
358
],
[
297,
359
],
[
359,
360
],
[
295,
361
],
[
361,
362
],
[
140,
363
],
[
363,
364
],
[
363,
365
],
[
365,
366
],
[
366,
367
],
[
366,
368
],
[
366,
369
],
[
370,
370
],
[
370,
371
],
[
371,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
371,
376
],
[
376,
377
],
[
376,
378
],
[
363,
379
],
[
379,
380
],
[
140,
381
],
[
381,
382
],
[
381,
383
],
[
383,
384
],
[
384,
385
],
[
384,
386
],
[
384,
387
],
[
388,
388
],
[
388,
389
],
[
389,
390
],
[
390,
391
],
[
391,
392
],
[
391,
393
],
[
389,
394
],
[
394,
395
],
[
394,
396
],
[
383,
397
],
[
397,
398
],
[
398,
399
],
[
399,
400
],
[
399,
401
],
[
381,
402
],
[
402,
403
],
[
140,
404
],
[
404,
405
],
[
404,
406
],
[
406,
407
],
[
407,
408
],
[
407,
409
],
[
406,
410
],
[
410,
411
],
[
410,
412
],
[
410,
413
],
[
414,
414
],
[
414,
415
],
[
415,
416
],
[
415,
417
],
[
414,
418
],
[
418,
419
],
[
419,
420
],
[
420,
421
],
[
421,
422
],
[
422,
423
],
[
418,
424
],
[
424,
425
],
[
425,
426
],
[
425,
427
],
[
427,
428
],
[
428,
429
],
[
429,
430
],
[
430,
431
],
[
431,
432
],
[
432,
433
],
[
424,
434
],
[
434,
435
],
[
434,
436
],
[
436,
437
],
[
436,
438
],
[
438,
439
],
[
439,
440
],
[
440,
441
],
[
440,
442
],
[
439,
443
],
[
443,
444
],
[
443,
445
],
[
446,
446
],
[
446,
447
],
[
446,
448
],
[
446,
449
],
[
449,
450
],
[
450,
451
],
[
449,
452
],
[
439,
453
],
[
434,
454
],
[
454,
455
],
[
454,
456
],
[
456,
457
],
[
457,
458
],
[
458,
459
],
[
458,
460
],
[
457,
461
],
[
461,
462
],
[
461,
463
],
[
464,
464
],
[
464,
465
],
[
464,
466
],
[
464,
467
],
[
467,
468
],
[
468,
469
],
[
467,
470
],
[
457,
471
],
[
434,
472
],
[
472,
473
],
[
472,
474
],
[
474,
475
],
[
475,
476
],
[
476,
477
],
[
476,
478
],
[
475,
479
],
[
479,
480
],
[
479,
481
],
[
482,
482
],
[
482,
483
],
[
482,
484
],
[
482,
485
],
[
485,
486
],
[
486,
487
],
[
485,
488
],
[
475,
489
],
[
434,
490
],
[
490,
491
],
[
490,
492
],
[
492,
493
],
[
493,
494
],
[
494,
495
],
[
494,
496
],
[
493,
497
],
[
497,
498
],
[
497,
499
],
[
500,
500
],
[
500,
501
],
[
500,
502
],
[
500,
503
],
[
503,
504
],
[
504,
505
],
[
503,
506
],
[
493,
507
],
[
434,
508
],
[
508,
509
],
[
508,
510
],
[
510,
511
],
[
511,
512
],
[
512,
513
],
[
512,
514
],
[
511,
515
],
[
515,
516
],
[
515,
517
],
[
518,
518
],
[
518,
519
],
[
518,
520
],
[
518,
521
],
[
521,
522
],
[
522,
523
],
[
521,
524
],
[
511,
525
],
[
434,
526
],
[
526,
527
],
[
526,
528
],
[
528,
529
],
[
529,
530
],
[
530,
531
],
[
530,
532
],
[
529,
533
],
[
533,
534
],
[
533,
535
],
[
536,
536
],
[
536,
537
],
[
536,
538
],
[
536,
539
],
[
539,
540
],
[
540,
541
],
[
539,
542
],
[
529,
543
],
[
434,
544
],
[
544,
545
],
[
544,
546
],
[
546,
547
],
[
547,
548
],
[
548,
549
],
[
548,
550
],
[
547,
551
],
[
551,
552
],
[
551,
553
],
[
554,
554
],
[
554,
555
],
[
554,
556
],
[
554,
557
],
[
557,
558
],
[
558,
559
],
[
557,
560
],
[
547,
561
],
[
434,
562
],
[
562,
563
],
[
562,
564
],
[
564,
565
],
[
565,
566
],
[
566,
567
],
[
566,
568
],
[
565,
569
],
[
569,
570
],
[
569,
571
],
[
572,
572
],
[
572,
573
],
[
572,
574
],
[
572,
575
],
[
575,
576
],
[
576,
577
],
[
575,
578
],
[
565,
579
],
[
434,
580
],
[
580,
581
],
[
580,
582
],
[
582,
583
],
[
583,
584
],
[
584,
585
],
[
584,
586
],
[
583,
587
],
[
587,
588
],
[
587,
589
],
[
590,
590
],
[
590,
591
],
[
590,
592
],
[
590,
593
],
[
593,
594
],
[
594,
595
],
[
593,
596
],
[
583,
597
],
[
434,
598
],
[
598,
599
],
[
598,
600
],
[
600,
601
],
[
601,
602
],
[
602,
603
],
[
602,
604
],
[
601,
605
],
[
605,
606
],
[
605,
607
],
[
608,
608
],
[
608,
609
],
[
608,
610
],
[
608,
611
],
[
611,
612
],
[
612,
613
],
[
611,
614
],
[
601,
615
],
[
434,
616
],
[
616,
617
],
[
617,
618
],
[
618,
619
],
[
619,
620
],
[
619,
621
],
[
621,
622
],
[
621,
623
],
[
618,
624
],
[
424,
625
],
[
625,
626
],
[
625,
627
],
[
414,
628
],
[
628,
629
],
[
629,
630
],
[
630,
631
],
[
631,
632
],
[
629,
633
],
[
633,
634
],
[
628,
635
],
[
635,
636
],
[
636,
637
],
[
636,
638
],
[
639,
639
],
[
639,
640
],
[
639,
641
],
[
639,
642
],
[
635,
643
],
[
643,
644
],
[
643,
645
],
[
414,
646
],
[
646,
647
],
[
647,
648
],
[
648,
649
],
[
649,
650
],
[
647,
651
],
[
651,
652
],
[
646,
653
],
[
653,
654
],
[
654,
655
],
[
654,
656
],
[
657,
657
],
[
657,
658
],
[
657,
659
],
[
657,
660
],
[
653,
661
],
[
661,
662
],
[
661,
663
],
[
414,
664
],
[
664,
665
],
[
665,
666
],
[
666,
667
],
[
667,
668
],
[
665,
669
],
[
669,
670
],
[
664,
671
],
[
671,
672
],
[
672,
673
],
[
672,
674
],
[
675,
675
],
[
675,
676
],
[
675,
677
],
[
675,
678
],
[
671,
679
],
[
679,
680
],
[
679,
681
],
[
414,
682
],
[
682,
683
],
[
683,
684
],
[
684,
685
],
[
685,
686
],
[
683,
687
],
[
687,
688
],
[
682,
689
],
[
689,
690
],
[
690,
691
],
[
690,
692
],
[
693,
693
],
[
693,
694
],
[
693,
695
],
[
693,
696
],
[
689,
697
],
[
697,
698
],
[
697,
699
],
[
414,
700
],
[
700,
701
],
[
701,
702
],
[
702,
703
],
[
703,
704
],
[
701,
705
],
[
705,
706
],
[
700,
707
],
[
707,
708
],
[
708,
709
],
[
708,
710
],
[
711,
711
],
[
711,
712
],
[
711,
713
],
[
711,
714
],
[
707,
715
],
[
715,
716
],
[
715,
717
],
[
414,
718
],
[
718,
719
],
[
719,
720
],
[
720,
721
],
[
721,
722
],
[
719,
723
],
[
723,
724
],
[
718,
725
],
[
725,
726
],
[
726,
727
],
[
726,
728
],
[
729,
729
],
[
729,
730
],
[
729,
731
],
[
729,
732
],
[
725,
733
],
[
733,
734
],
[
733,
735
],
[
414,
736
],
[
736,
737
],
[
737,
738
],
[
736,
739
],
[
739,
740
],
[
740,
741
],
[
740,
742
],
[
743,
743
],
[
743,
744
],
[
743,
745
],
[
743,
746
],
[
414,
747
],
[
747,
748
],
[
404,
749
],
[
749,
750
],
[
0,
751
],
[
751,
752
],
[
751,
753
]
]
| [
"import java.io.*;\nimport java.math.BigInteger;\nimport java.util.*;\nimport static java.lang.Math.PI;\nimport static java.lang.System.in;\nimport static java.lang.System.out;\n\npublic class Main\n{\n public static void main(String[] args) throws Exception\n { \n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n int count = 0;\n boolean poss = false;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++)\n {\n int u = sc.nextInt(), v = sc.nextInt();\n if(u==v)\n {\n count++;\n }\n else\n {\n count = 0;\n }\n if(count>=3) poss = true;\n }\n p.println(poss ? \"Yes\" : \"No\");\n p.close();\n }\n/*\n*/ \n/*\n1. Check overflow in pow function or in general\n2. Check indices of read array function\n3. Think of an easier solution because the problems you solve are always easy\n4. Check iterator of loop\n5. If still doesn't work, then jump from the 729th floor 'coz \"beta tumse na ho paayega\"\n\n Move to top!!\n*/\n\n static int[] sort(int[] a)\n {\n ArrayList<Integer> arr = new ArrayList<>();\n for(int i : a)\n {\n arr.add(i);\n }\n Collections.sort(arr);\n for(int i = 0 ; i < arr.size(); i++)\n {\n a[i] = arr.get(i);\n }\n return a;\n }\n \n static class Foster \n {\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n StringTokenizer st = new StringTokenizer(\"\");\n String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n int nextInt() \n {\n return Integer.parseInt(next());\n }\n long nextLong() \n {\n return Long.parseLong(next());\n }\n double nextDouble() \n {\n return Double.parseDouble(next());\n }\n int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }\n long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }\n int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }\n static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }\n void print(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n }\n void println(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n System.err.println();\n }\n void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"import static java.lang.Math.PI;",
"import static java.lang.Math.PI;",
"import static java.lang.Math.PI;",
"import static java.lang.System.in;",
"import static java.lang.System.in;",
"import static java.lang.System.in;",
"import static java.lang.System.out;",
"import static java.lang.System.out;",
"import static java.lang.System.out;",
"public class Main\n{\n public static void main(String[] args) throws Exception\n { \n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n int count = 0;\n boolean poss = false;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++)\n {\n int u = sc.nextInt(), v = sc.nextInt();\n if(u==v)\n {\n count++;\n }\n else\n {\n count = 0;\n }\n if(count>=3) poss = true;\n }\n p.println(poss ? \"Yes\" : \"No\");\n p.close();\n }\n/*\n*/ \n/*\n1. Check overflow in pow function or in general\n2. Check indices of read array function\n3. Think of an easier solution because the problems you solve are always easy\n4. Check iterator of loop\n5. If still doesn't work, then jump from the 729th floor 'coz \"beta tumse na ho paayega\"\n\n Move to top!!\n*/\n\n static int[] sort(int[] a)\n {\n ArrayList<Integer> arr = new ArrayList<>();\n for(int i : a)\n {\n arr.add(i);\n }\n Collections.sort(arr);\n for(int i = 0 ; i < arr.size(); i++)\n {\n a[i] = arr.get(i);\n }\n return a;\n }\n \n static class Foster \n {\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n StringTokenizer st = new StringTokenizer(\"\");\n String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n int nextInt() \n {\n return Integer.parseInt(next());\n }\n long nextLong() \n {\n return Long.parseLong(next());\n }\n double nextDouble() \n {\n return Double.parseDouble(next());\n }\n int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }\n long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }\n int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }\n static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }\n void print(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n }\n void println(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n System.err.println();\n }\n void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }\n }\n}",
"Main",
"public static void main(String[] args) throws Exception\n { \n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n int count = 0;\n boolean poss = false;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++)\n {\n int u = sc.nextInt(), v = sc.nextInt();\n if(u==v)\n {\n count++;\n }\n else\n {\n count = 0;\n }\n if(count>=3) poss = true;\n }\n p.println(poss ? \"Yes\" : \"No\");\n p.close();\n }",
"main",
"{ \n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n int count = 0;\n boolean poss = false;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++)\n {\n int u = sc.nextInt(), v = sc.nextInt();\n if(u==v)\n {\n count++;\n }\n else\n {\n count = 0;\n }\n if(count>=3) poss = true;\n }\n p.println(poss ? \"Yes\" : \"No\");\n p.close();\n }",
"Foster sc = new Foster();",
"sc",
"new Foster()",
"PrintWriter p = new PrintWriter(out);",
"p",
"new PrintWriter(out)",
"int count = 0;",
"count",
"0",
"boolean poss = false;",
"poss",
"false",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i = 0; i < n; i++)\n {\n int u = sc.nextInt(), v = sc.nextInt();\n if(u==v)\n {\n count++;\n }\n else\n {\n count = 0;\n }\n if(count>=3) poss = true;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int u = sc.nextInt(), v = sc.nextInt();\n if(u==v)\n {\n count++;\n }\n else\n {\n count = 0;\n }\n if(count>=3) poss = true;\n }",
"{\n int u = sc.nextInt(), v = sc.nextInt();\n if(u==v)\n {\n count++;\n }\n else\n {\n count = 0;\n }\n if(count>=3) poss = true;\n }",
"int u = sc.nextInt()",
"u",
"sc.nextInt()",
"sc.nextInt",
"sc",
"v = sc.nextInt();",
"v",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(u==v)\n {\n count++;\n }\n else\n {\n count = 0;\n }",
"u==v",
"u",
"v",
"{\n count++;\n }",
"count++",
"count",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"if(count>=3) poss = true;",
"count>=3",
"count",
"3",
"poss = true",
"poss",
"true",
"p.println(poss ? \"Yes\" : \"No\")",
"p.println",
"p",
"poss ? \"Yes\" : \"No\"",
"poss",
"\"Yes\"",
"\"No\"",
"p.close()",
"p.close",
"p",
"String[] args",
"args",
"static int[] sort(int[] a)\n {\n ArrayList<Integer> arr = new ArrayList<>();\n for(int i : a)\n {\n arr.add(i);\n }\n Collections.sort(arr);\n for(int i = 0 ; i < arr.size(); i++)\n {\n a[i] = arr.get(i);\n }\n return a;\n }",
"sort",
"{\n ArrayList<Integer> arr = new ArrayList<>();\n for(int i : a)\n {\n arr.add(i);\n }\n Collections.sort(arr);\n for(int i = 0 ; i < arr.size(); i++)\n {\n a[i] = arr.get(i);\n }\n return a;\n }",
"ArrayList<Integer> arr = new ArrayList<>();",
"arr",
"new ArrayList<>()",
"for(int i : a)\n {\n arr.add(i);\n }",
"int i",
"a",
"{\n arr.add(i);\n }",
"{\n arr.add(i);\n }",
"arr.add(i)",
"arr.add",
"arr",
"i",
"Collections.sort(arr)",
"Collections.sort",
"Collections",
"arr",
"for(int i = 0 ; i < arr.size(); i++)\n {\n a[i] = arr.get(i);\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < arr.size()",
"i",
"arr.size()",
"arr.size",
"arr",
"i++",
"i++",
"i",
"{\n a[i] = arr.get(i);\n }",
"{\n a[i] = arr.get(i);\n }",
"a[i] = arr.get(i)",
"a[i]",
"a",
"i",
"arr.get(i)",
"arr.get",
"arr",
"i",
"return a;",
"a",
"int[] a",
"a",
"static class Foster \n {\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n StringTokenizer st = new StringTokenizer(\"\");\n String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n int nextInt() \n {\n return Integer.parseInt(next());\n }\n long nextLong() \n {\n return Long.parseLong(next());\n }\n double nextDouble() \n {\n return Double.parseDouble(next());\n }\n int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }\n long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }\n int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }\n static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }\n void print(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n }\n void println(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n System.err.println();\n }\n void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }\n }",
"Foster",
"BufferedReader br = new BufferedReader(new InputStreamReader(in));",
"br",
"new BufferedReader(new InputStreamReader(in))",
"StringTokenizer st = new StringTokenizer(\"\");",
"st",
"new StringTokenizer(\"\")",
"String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"next",
"{\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }",
"while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }",
"!st.hasMoreTokens()",
"st.hasMoreTokens()",
"st.hasMoreTokens",
"st",
"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",
"int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }",
"intArray",
"{\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }",
"int arr[] = new int[n];",
"arr",
"new int[n]",
"n",
"for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = nextInt();\n }",
"{\n arr[i] = nextInt();\n }",
"arr[i] = nextInt()",
"arr[i]",
"arr",
"i",
"nextInt()",
"nextInt",
"return arr;",
"arr",
"int n",
"n",
"long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }",
"longArray",
"{\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }",
"long arr[] = new long[n];",
"arr",
"new long[n]",
"n",
"for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i] = nextLong();\n }",
"{\n arr[i] = nextLong();\n }",
"arr[i] = nextLong()",
"arr[i]",
"arr",
"i",
"nextLong()",
"nextLong",
"return arr;",
"arr",
"int n",
"n",
"int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }",
"getBits",
"{\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }",
"int a[] = new int[31];",
"a",
"new int[31]",
"31",
"for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 31",
"i",
"31",
"i++",
"i++",
"i",
"{\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }",
"{\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }",
"if(((1<<i) & n) != 0)\n a[i] = 1;",
"((1<<i) & n) != 0",
"((1<<i) & n)",
"(1<<i)",
"1",
"i",
"n",
"0",
"a[i] = 1",
"a[i]",
"a",
"i",
"1",
"return a;",
"a",
"int n",
"n",
"static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }",
"pow",
"{\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }",
"long mod = Long.MAX_VALUE;",
"mod",
"Long.MAX_VALUE",
"Long",
"Long.MAX_VALUE",
"if(a.length == 3) mod = a[2];",
"a.length == 3",
"a.length",
"a",
"a.length",
"3",
"mod = a[2]",
"mod",
"a[2]",
"a",
"2",
"long res = 1;",
"res",
"1",
"while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }",
"a[1] > 0",
"a[1]",
"a",
"1",
"0",
"{\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }",
"if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;",
"(a[1] & 1) == 1",
"(a[1] & 1)",
"a[1]",
"a",
"1",
"1",
"1",
"res = (res * a[0]) % mod",
"res",
"(res * a[0]) % mod",
"(res * a[0])",
"res",
"a[0]",
"a",
"0",
"mod",
"a[1] /= 2",
"a[1]",
"a",
"1",
"2",
"a[0] = (a[0] * a[0]) % mod",
"a[0]",
"a",
"0",
"(a[0] * a[0]) % mod",
"(a[0] * a[0])",
"a[0]",
"a",
"0",
"a[0]",
"a",
"0",
"mod",
"return res;",
"res",
"long... a",
"a",
"void print(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n }",
"print",
"{\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n }",
"for(Object next : o)\n {\n System.err.print(next + \" \");\n }",
"Object next",
"o",
"{\n System.err.print(next + \" \");\n }",
"{\n System.err.print(next + \" \");\n }",
"System.err.print(next + \" \")",
"System.err.print",
"System.err",
"System",
"System.err",
"next + \" \"",
"next",
"\" \"",
"Object... o",
"o",
"void println(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n System.err.println();\n }",
"println",
"{\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n System.err.println();\n }",
"for(Object next : o)\n {\n System.err.print(next + \" \");\n }",
"Object next",
"o",
"{\n System.err.print(next + \" \");\n }",
"{\n System.err.print(next + \" \");\n }",
"System.err.print(next + \" \")",
"System.err.print",
"System.err",
"System",
"System.err",
"next + \" \"",
"next",
"\" \"",
"System.err.println()",
"System.err.println",
"System.err",
"System",
"System.err",
"Object... o",
"o",
"void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }",
"watch",
"{\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }",
"int i = 1;",
"i",
"1",
"for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }",
"Object o",
"a",
"{\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }",
"{\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }",
"boolean found = false;",
"found",
"false",
"if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }",
"o.getClass().isArray()",
"o.getClass().isArray",
"o.getClass()",
"o.getClass",
"o",
"{\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }",
"String type = o.getClass().getName().toString();",
"type",
"o.getClass().getName().toString()",
"o.getClass().getName().toString",
"o.getClass().getName()",
"o.getClass().getName",
"o.getClass()",
"o.getClass",
"o",
"switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }",
"type",
"case \"[I\":",
"\"[I\"",
"case \"[I\":",
"{\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }",
"int[] test = (int[]) o;",
"test",
"(int[]) o",
"println(i + \" : \" + Arrays.toString(test))",
"println",
"i + \" : \" + Arrays.toString(test)",
"i + \" : \" + Arrays.toString(test)",
"i",
"\" : \"",
"Arrays.toString(test)",
"Arrays.toString",
"Arrays",
"test",
"break;",
"case \"[[I\":",
"\"[[I\"",
"case \"[[I\":",
"{\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }",
"int[][] obj = (int[][]) o;",
"obj",
"(int[][]) o",
"println(i + \" : \" + Arrays.deepToString(obj))",
"println",
"i + \" : \" + Arrays.deepToString(obj)",
"i + \" : \" + Arrays.deepToString(obj)",
"i",
"\" : \"",
"Arrays.deepToString(obj)",
"Arrays.deepToString",
"Arrays",
"obj",
"break;",
"case \"[J\":",
"\"[J\"",
"case \"[J\":",
"{\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }",
"long[] obj = (long[]) o;",
"obj",
"(long[]) o",
"println(i + \" : \" + Arrays.toString(obj))",
"println",
"i + \" : \" + Arrays.toString(obj)",
"i + \" : \" + Arrays.toString(obj)",
"i",
"\" : \"",
"Arrays.toString(obj)",
"Arrays.toString",
"Arrays",
"obj",
"break;",
"case \"[[J\":",
"\"[[J\"",
"case \"[[J\":",
"{\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }",
"long[][] obj = (long[][]) o;",
"obj",
"(long[][]) o",
"println(i + \" : \" + Arrays.deepToString(obj))",
"println",
"i + \" : \" + Arrays.deepToString(obj)",
"i + \" : \" + Arrays.deepToString(obj)",
"i",
"\" : \"",
"Arrays.deepToString(obj)",
"Arrays.deepToString",
"Arrays",
"obj",
"break;",
"case \"[D\":",
"\"[D\"",
"case \"[D\":",
"{\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }",
"double[] obj = (double[]) o;",
"obj",
"(double[]) o",
"println(i + \" : \" + Arrays.toString(obj))",
"println",
"i + \" : \" + Arrays.toString(obj)",
"i + \" : \" + Arrays.toString(obj)",
"i",
"\" : \"",
"Arrays.toString(obj)",
"Arrays.toString",
"Arrays",
"obj",
"break;",
"case \"[[D\":",
"\"[[D\"",
"case \"[[D\":",
"{\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }",
"double[][] obj = (double[][]) o;",
"obj",
"(double[][]) o",
"println(i + \" : \" + Arrays.deepToString(obj))",
"println",
"i + \" : \" + Arrays.deepToString(obj)",
"i + \" : \" + Arrays.deepToString(obj)",
"i",
"\" : \"",
"Arrays.deepToString(obj)",
"Arrays.deepToString",
"Arrays",
"obj",
"break;",
"case \"[Ljava.lang.String\":",
"\"[Ljava.lang.String\"",
"case \"[Ljava.lang.String\":",
"{\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }",
"String[] obj = (String[]) o;",
"obj",
"(String[]) o",
"println(i + \" : \" + Arrays.toString(obj))",
"println",
"i + \" : \" + Arrays.toString(obj)",
"i + \" : \" + Arrays.toString(obj)",
"i",
"\" : \"",
"Arrays.toString(obj)",
"Arrays.toString",
"Arrays",
"obj",
"break;",
"case \"[[Ljava.lang.String\":",
"\"[[Ljava.lang.String\"",
"case \"[[Ljava.lang.String\":",
"{\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }",
"String[][] obj = (String[][]) o;",
"obj",
"(String[][]) o",
"println(i + \" : \" + Arrays.deepToString(obj))",
"println",
"i + \" : \" + Arrays.deepToString(obj)",
"i + \" : \" + Arrays.deepToString(obj)",
"i",
"\" : \"",
"Arrays.deepToString(obj)",
"Arrays.deepToString",
"Arrays",
"obj",
"break;",
"case \"[C\":",
"\"[C\"",
"case \"[C\":",
"{\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }",
"char[] obj = (char[]) o;",
"obj",
"(char[]) o",
"println(i + \" : \" + Arrays.toString(obj))",
"println",
"i + \" : \" + Arrays.toString(obj)",
"i + \" : \" + Arrays.toString(obj)",
"i",
"\" : \"",
"Arrays.toString(obj)",
"Arrays.toString",
"Arrays",
"obj",
"break;",
"case \"[[C\":",
"\"[[C\"",
"case \"[[C\":",
"{\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }",
"char[][] obj = (char[][]) o;",
"obj",
"(char[][]) o",
"println(i + \" : \" + Arrays.deepToString(obj))",
"println",
"i + \" : \" + Arrays.deepToString(obj)",
"i + \" : \" + Arrays.deepToString(obj)",
"i",
"\" : \"",
"Arrays.deepToString(obj)",
"Arrays.deepToString",
"Arrays",
"obj",
"break;",
"default:",
"default:",
"{\n println(i + \" : type not identified\");\n break;\n }",
"println(i + \" : type not identified\")",
"println",
"i + \" : type not identified\"",
"i",
"\" : type not identified\"",
"break;",
"found = true",
"found",
"true",
"if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }",
"o.getClass() == ArrayList.class",
"o.getClass()",
"o.getClass",
"o",
"ArrayList.class",
"ArrayList.class",
"{\n println(i + \" : LIST = \" + o);\n found = true;\n }",
"println(i + \" : LIST = \" + o)",
"println",
"i + \" : LIST = \" + o",
"i + \" : LIST = \" + o",
"i",
"\" : LIST = \"",
"o",
"found = true",
"found",
"true",
"if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }",
"o.getClass() == TreeSet.class",
"o.getClass()",
"o.getClass",
"o",
"TreeSet.class",
"TreeSet.class",
"{\n println(i + \" : SET = \" + o);\n found = true;\n }",
"println(i + \" : SET = \" + o)",
"println",
"i + \" : SET = \" + o",
"i + \" : SET = \" + o",
"i",
"\" : SET = \"",
"o",
"found = true",
"found",
"true",
"if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }",
"o.getClass() == TreeMap.class",
"o.getClass()",
"o.getClass",
"o",
"TreeMap.class",
"TreeMap.class",
"{\n println(i + \" : MAP = \" + o);\n found = true;\n }",
"println(i + \" : MAP = \" + o)",
"println",
"i + \" : MAP = \" + o",
"i + \" : MAP = \" + o",
"i",
"\" : MAP = \"",
"o",
"found = true",
"found",
"true",
"if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }",
"o.getClass() == HashMap.class",
"o.getClass()",
"o.getClass",
"o",
"HashMap.class",
"HashMap.class",
"{\n println(i + \" : MAP = \" + o);\n found = true;\n }",
"println(i + \" : MAP = \" + o)",
"println",
"i + \" : MAP = \" + o",
"i + \" : MAP = \" + o",
"i",
"\" : MAP = \"",
"o",
"found = true",
"found",
"true",
"if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }",
"o.getClass() == LinkedList.class",
"o.getClass()",
"o.getClass",
"o",
"LinkedList.class",
"LinkedList.class",
"{\n println(i + \" : LIST = \" + o);\n found = true;\n }",
"println(i + \" : LIST = \" + o)",
"println",
"i + \" : LIST = \" + o",
"i + \" : LIST = \" + o",
"i",
"\" : LIST = \"",
"o",
"found = true",
"found",
"true",
"if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }",
"o.getClass() == PriorityQueue.class",
"o.getClass()",
"o.getClass",
"o",
"PriorityQueue.class",
"PriorityQueue.class",
"{\n println(i + \" : PQ = \" + o);\n found = true;\n }",
"println(i + \" : PQ = \" + o)",
"println",
"i + \" : PQ = \" + o",
"i + \" : PQ = \" + o",
"i",
"\" : PQ = \"",
"o",
"found = true",
"found",
"true",
"if (!found) \n {\n println(i + \" = \" + o);\n }",
"!found",
"found",
"{\n println(i + \" = \" + o);\n }",
"println(i + \" = \" + o)",
"println",
"i + \" = \" + o",
"i + \" = \" + o",
"i",
"\" = \"",
"o",
"i++",
"i",
"Object...a",
"a",
"public class Main\n{\n public static void main(String[] args) throws Exception\n { \n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n int count = 0;\n boolean poss = false;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++)\n {\n int u = sc.nextInt(), v = sc.nextInt();\n if(u==v)\n {\n count++;\n }\n else\n {\n count = 0;\n }\n if(count>=3) poss = true;\n }\n p.println(poss ? \"Yes\" : \"No\");\n p.close();\n }\n/*\n*/ \n/*\n1. Check overflow in pow function or in general\n2. Check indices of read array function\n3. Think of an easier solution because the problems you solve are always easy\n4. Check iterator of loop\n5. If still doesn't work, then jump from the 729th floor 'coz \"beta tumse na ho paayega\"\n\n Move to top!!\n*/\n\n static int[] sort(int[] a)\n {\n ArrayList<Integer> arr = new ArrayList<>();\n for(int i : a)\n {\n arr.add(i);\n }\n Collections.sort(arr);\n for(int i = 0 ; i < arr.size(); i++)\n {\n a[i] = arr.get(i);\n }\n return a;\n }\n \n static class Foster \n {\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n StringTokenizer st = new StringTokenizer(\"\");\n String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n int nextInt() \n {\n return Integer.parseInt(next());\n }\n long nextLong() \n {\n return Long.parseLong(next());\n }\n double nextDouble() \n {\n return Double.parseDouble(next());\n }\n int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }\n long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }\n int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }\n static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }\n void print(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n }\n void println(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n System.err.println();\n }\n void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }\n }\n}",
"public class Main\n{\n public static void main(String[] args) throws Exception\n { \n Foster sc = new Foster();\n PrintWriter p = new PrintWriter(out);\n int count = 0;\n boolean poss = false;\n int n = sc.nextInt();\n for(int i = 0; i < n; i++)\n {\n int u = sc.nextInt(), v = sc.nextInt();\n if(u==v)\n {\n count++;\n }\n else\n {\n count = 0;\n }\n if(count>=3) poss = true;\n }\n p.println(poss ? \"Yes\" : \"No\");\n p.close();\n }\n/*\n*/ \n/*\n1. Check overflow in pow function or in general\n2. Check indices of read array function\n3. Think of an easier solution because the problems you solve are always easy\n4. Check iterator of loop\n5. If still doesn't work, then jump from the 729th floor 'coz \"beta tumse na ho paayega\"\n\n Move to top!!\n*/\n\n static int[] sort(int[] a)\n {\n ArrayList<Integer> arr = new ArrayList<>();\n for(int i : a)\n {\n arr.add(i);\n }\n Collections.sort(arr);\n for(int i = 0 ; i < arr.size(); i++)\n {\n a[i] = arr.get(i);\n }\n return a;\n }\n \n static class Foster \n {\n BufferedReader br = new BufferedReader(new InputStreamReader(in));\n StringTokenizer st = new StringTokenizer(\"\");\n String next() \n {\n while (!st.hasMoreTokens())\n try \n {\n st = new StringTokenizer(br.readLine());\n } \n catch (IOException e) \n {\n e.printStackTrace();\n }\n return st.nextToken();\n }\n int nextInt() \n {\n return Integer.parseInt(next());\n }\n long nextLong() \n {\n return Long.parseLong(next());\n }\n double nextDouble() \n {\n return Double.parseDouble(next());\n }\n int[] intArray(int n) // Check indices\n {\n int arr[] = new int[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextInt();\n }\n return arr;\n }\n long[] longArray(int n) // Check indices\n {\n long arr[] = new long[n];\n for(int i = 0; i < n; i++)\n {\n arr[i] = nextLong();\n }\n return arr;\n }\n int[] getBits(int n) //in Reverse Order\n {\n int a[] = new int[31];\n for(int i = 0; i < 31; i++)\n {\n if(((1<<i) & n) != 0)\n a[i] = 1;\n }\n return a;\n }\n static long pow(long... a)\n {\n long mod = Long.MAX_VALUE;\n if(a.length == 3) mod = a[2];\n long res = 1;\n while(a[1] > 0)\n {\n if((a[1] & 1) == 1)\n res = (res * a[0]) % mod;\n a[1] /= 2;\n a[0] = (a[0] * a[0]) % mod;\n }\n return res;\n }\n void print(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n }\n void println(Object... o) \n {\n for(Object next : o)\n {\n System.err.print(next + \" \");\n }\n System.err.println();\n }\n void watch(Object...a) throws Exception \n {\n int i = 1;\n for (Object o: a) \n {\n boolean found = false;\n if (o.getClass().isArray()) \n {\n String type = o.getClass().getName().toString();\n switch (type) \n {\n case \"[I\":\n {\n int[] test = (int[]) o;\n println(i + \" : \" + Arrays.toString(test));\n break;\n }\n case \"[[I\":\n {\n int[][] obj = (int[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[J\":\n {\n long[] obj = (long[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[J\":\n {\n long[][] obj = (long[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[D\":\n {\n double[] obj = (double[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[D\":\n {\n double[][] obj = (double[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[Ljava.lang.String\":\n {\n String[] obj = (String[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[Ljava.lang.String\":\n {\n String[][] obj = (String[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n case \"[C\":\n {\n char[] obj = (char[]) o;\n println(i + \" : \" + Arrays.toString(obj));\n break;\n }\n case \"[[C\":\n {\n char[][] obj = (char[][]) o;\n println(i + \" : \" + Arrays.deepToString(obj));\n break;\n }\n default:\n {\n println(i + \" : type not identified\");\n break;\n }\n }\n found = true;\n }\n if (o.getClass() == ArrayList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == TreeSet.class) \n {\n println(i + \" : SET = \" + o);\n found = true;\n }\n if (o.getClass() == TreeMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == HashMap.class) \n {\n println(i + \" : MAP = \" + o);\n found = true;\n }\n if (o.getClass() == LinkedList.class) \n {\n println(i + \" : LIST = \" + o);\n found = true;\n }\n if (o.getClass() == PriorityQueue.class) \n {\n println(i + \" : PQ = \" + o);\n found = true;\n }\n if (!found) \n {\n println(i + \" = \" + o);\n }\n i++;\n }\n }\n }\n}",
"Main"
]
| import java.io.*;
import java.math.BigInteger;
import java.util.*;
import static java.lang.Math.PI;
import static java.lang.System.in;
import static java.lang.System.out;
public class Main
{
public static void main(String[] args) throws Exception
{
Foster sc = new Foster();
PrintWriter p = new PrintWriter(out);
int count = 0;
boolean poss = false;
int n = sc.nextInt();
for(int i = 0; i < n; i++)
{
int u = sc.nextInt(), v = sc.nextInt();
if(u==v)
{
count++;
}
else
{
count = 0;
}
if(count>=3) poss = true;
}
p.println(poss ? "Yes" : "No");
p.close();
}
/*
*/
/*
1. Check overflow in pow function or in general
2. Check indices of read array function
3. Think of an easier solution because the problems you solve are always easy
4. Check iterator of loop
5. If still doesn't work, then jump from the 729th floor 'coz "beta tumse na ho paayega"
Move to top!!
*/
static int[] sort(int[] a)
{
ArrayList<Integer> arr = new ArrayList<>();
for(int i : a)
{
arr.add(i);
}
Collections.sort(arr);
for(int i = 0 ; i < arr.size(); i++)
{
a[i] = arr.get(i);
}
return a;
}
static class Foster
{
BufferedReader br = new BufferedReader(new InputStreamReader(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());
}
int[] intArray(int n) // Check indices
{
int arr[] = new int[n];
for(int i = 0; i < n; i++)
{
arr[i] = nextInt();
}
return arr;
}
long[] longArray(int n) // Check indices
{
long arr[] = new long[n];
for(int i = 0; i < n; i++)
{
arr[i] = nextLong();
}
return arr;
}
int[] getBits(int n) //in Reverse Order
{
int a[] = new int[31];
for(int i = 0; i < 31; i++)
{
if(((1<<i) & n) != 0)
a[i] = 1;
}
return a;
}
static long pow(long... a)
{
long mod = Long.MAX_VALUE;
if(a.length == 3) mod = a[2];
long res = 1;
while(a[1] > 0)
{
if((a[1] & 1) == 1)
res = (res * a[0]) % mod;
a[1] /= 2;
a[0] = (a[0] * a[0]) % mod;
}
return res;
}
void print(Object... o)
{
for(Object next : o)
{
System.err.print(next + " ");
}
}
void println(Object... o)
{
for(Object next : o)
{
System.err.print(next + " ");
}
System.err.println();
}
void watch(Object...a) throws Exception
{
int i = 1;
for (Object o: a)
{
boolean found = false;
if (o.getClass().isArray())
{
String type = o.getClass().getName().toString();
switch (type)
{
case "[I":
{
int[] test = (int[]) o;
println(i + " : " + Arrays.toString(test));
break;
}
case "[[I":
{
int[][] obj = (int[][]) o;
println(i + " : " + Arrays.deepToString(obj));
break;
}
case "[J":
{
long[] obj = (long[]) o;
println(i + " : " + Arrays.toString(obj));
break;
}
case "[[J":
{
long[][] obj = (long[][]) o;
println(i + " : " + Arrays.deepToString(obj));
break;
}
case "[D":
{
double[] obj = (double[]) o;
println(i + " : " + Arrays.toString(obj));
break;
}
case "[[D":
{
double[][] obj = (double[][]) o;
println(i + " : " + Arrays.deepToString(obj));
break;
}
case "[Ljava.lang.String":
{
String[] obj = (String[]) o;
println(i + " : " + Arrays.toString(obj));
break;
}
case "[[Ljava.lang.String":
{
String[][] obj = (String[][]) o;
println(i + " : " + Arrays.deepToString(obj));
break;
}
case "[C":
{
char[] obj = (char[]) o;
println(i + " : " + Arrays.toString(obj));
break;
}
case "[[C":
{
char[][] obj = (char[][]) o;
println(i + " : " + Arrays.deepToString(obj));
break;
}
default:
{
println(i + " : type not identified");
break;
}
}
found = true;
}
if (o.getClass() == ArrayList.class)
{
println(i + " : LIST = " + o);
found = true;
}
if (o.getClass() == TreeSet.class)
{
println(i + " : SET = " + o);
found = true;
}
if (o.getClass() == TreeMap.class)
{
println(i + " : MAP = " + o);
found = true;
}
if (o.getClass() == HashMap.class)
{
println(i + " : MAP = " + o);
found = true;
}
if (o.getClass() == LinkedList.class)
{
println(i + " : LIST = " + o);
found = true;
}
if (o.getClass() == PriorityQueue.class)
{
println(i + " : PQ = " + o);
found = true;
}
if (!found)
{
println(i + " = " + o);
}
i++;
}
}
}
} |
[
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,
40,
13,
0,
13,
17,
14,
2,
13,
17,
0,
13,
17,
4,
18,
13,
4,
13,
8,
13,
17,
17,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
85,
5
],
[
85,
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
],
[
46,
52
],
[
52,
53
],
[
52,
54
],
[
35,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
8,
62
],
[
62,
63
],
[
63,
64
],
[
8,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
67,
70
],
[
6,
71
],
[
71,
72
],
[
85,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
73,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean ret = false;\n\t\tint zorome = 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) zorome++;\n\t\t\telse zorome = 0;\n\t\t\tif(zorome >= 3) ret = true;\n\t\t}\n\t\tsc.close();\n\t\tprtln(ret ? \"Yes\" : \"No\");\n\t}\n\n\tpublic static <T> void prtln(T t) { System.out.println(t); }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean ret = false;\n\t\tint zorome = 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) zorome++;\n\t\t\telse zorome = 0;\n\t\t\tif(zorome >= 3) ret = true;\n\t\t}\n\t\tsc.close();\n\t\tprtln(ret ? \"Yes\" : \"No\");\n\t}\n\n\tpublic static <T> void prtln(T t) { System.out.println(t); }\n}",
"Main",
"public static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean ret = false;\n\t\tint zorome = 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) zorome++;\n\t\t\telse zorome = 0;\n\t\t\tif(zorome >= 3) ret = true;\n\t\t}\n\t\tsc.close();\n\t\tprtln(ret ? \"Yes\" : \"No\");\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean ret = false;\n\t\tint zorome = 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) zorome++;\n\t\t\telse zorome = 0;\n\t\t\tif(zorome >= 3) ret = true;\n\t\t}\n\t\tsc.close();\n\t\tprtln(ret ? \"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",
"boolean ret = false;",
"ret",
"false",
"int zorome = 0;",
"zorome",
"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) zorome++;\n\t\t\telse zorome = 0;\n\t\t\tif(zorome >= 3) ret = true;\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) zorome++;\n\t\t\telse zorome = 0;\n\t\t\tif(zorome >= 3) ret = true;\n\t\t}",
"{\n\t\t\tint d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif(d1 == d2) zorome++;\n\t\t\telse zorome = 0;\n\t\t\tif(zorome >= 3) ret = true;\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) zorome++;\n\t\t\telse zorome = 0;",
"d1 == d2",
"d1",
"d2",
"zorome++",
"zorome",
"zorome = 0",
"zorome",
"0",
"if(zorome >= 3) ret = true;",
"zorome >= 3",
"zorome",
"3",
"ret = true",
"ret",
"true",
"sc.close()",
"sc.close",
"sc",
"prtln(ret ? \"Yes\" : \"No\")",
"prtln",
"ret ? \"Yes\" : \"No\"",
"ret",
"\"Yes\"",
"\"No\"",
"final String[] args",
"args",
"public static <T> void prtln(T t) { System.out.println(t); }",
"prtln",
"{ System.out.println(t); }",
"System.out.println(t)",
"System.out.println",
"System.out",
"System",
"System.out",
"t",
"T t",
"t",
"public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean ret = false;\n\t\tint zorome = 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) zorome++;\n\t\t\telse zorome = 0;\n\t\t\tif(zorome >= 3) ret = true;\n\t\t}\n\t\tsc.close();\n\t\tprtln(ret ? \"Yes\" : \"No\");\n\t}\n\n\tpublic static <T> void prtln(T t) { System.out.println(t); }\n}",
"public class Main {\n\n\tpublic static void main(final String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tboolean ret = false;\n\t\tint zorome = 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) zorome++;\n\t\t\telse zorome = 0;\n\t\t\tif(zorome >= 3) ret = true;\n\t\t}\n\t\tsc.close();\n\t\tprtln(ret ? \"Yes\" : \"No\");\n\t}\n\n\tpublic static <T> void prtln(T t) { System.out.println(t); }\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(final String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
boolean ret = false;
int zorome = 0;
for (int i = 0; i < n; i++) {
int d1 = sc.nextInt();
int d2 = sc.nextInt();
if(d1 == d2) zorome++;
else zorome = 0;
if(zorome >= 3) ret = true;
}
sc.close();
prtln(ret ? "Yes" : "No");
}
public static <T> void prtln(T t) { System.out.println(t); }
}
|
[
7,
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,
14,
4,
18,
18,
13,
17,
18,
13,
17,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
3,
14,
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
],
[
89,
5
],
[
89,
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,
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
],
[
40,
41
],
[
41,
42
],
[
38,
43
],
[
35,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
45,
50
],
[
50,
51
],
[
50,
52
],
[
44,
53
],
[
53,
54
],
[
54,
55
],
[
44,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
35,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
64,
71
],
[
8,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
8,
83
],
[
83,
84
],
[
84,
85
],
[
6,
86
],
[
86,
87
],
[
0,
88
],
[
88,
89
],
[
88,
90
]
]
| [
"import java.util.Scanner;\n\npublic class Main\n{\n\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint amountToRoll = Integer.parseInt(scan.nextLine());\n\t\t\n\t\tint streak = 0;\n\t\t\n\t\tfor (int i = 0; i < amountToRoll; i++)\n\t\t{\n\t\t\tString[] array = scan.nextLine().split(\"\\\\s\");\n\t\t\t\n\t\t\tif(array[0].equals(array[1])) \n\t\t\t{\n\t\t\t\tstreak++;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(streak == 3) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif(streak != 3) \n\t\t{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main\n{\n\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint amountToRoll = Integer.parseInt(scan.nextLine());\n\t\t\n\t\tint streak = 0;\n\t\t\n\t\tfor (int i = 0; i < amountToRoll; i++)\n\t\t{\n\t\t\tString[] array = scan.nextLine().split(\"\\\\s\");\n\t\t\t\n\t\t\tif(array[0].equals(array[1])) \n\t\t\t{\n\t\t\t\tstreak++;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(streak == 3) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif(streak != 3) \n\t\t{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\n\t}\n\n}",
"Main",
"public static void main(String[] args)\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint amountToRoll = Integer.parseInt(scan.nextLine());\n\t\t\n\t\tint streak = 0;\n\t\t\n\t\tfor (int i = 0; i < amountToRoll; i++)\n\t\t{\n\t\t\tString[] array = scan.nextLine().split(\"\\\\s\");\n\t\t\t\n\t\t\tif(array[0].equals(array[1])) \n\t\t\t{\n\t\t\t\tstreak++;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(streak == 3) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif(streak != 3) \n\t\t{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint amountToRoll = Integer.parseInt(scan.nextLine());\n\t\t\n\t\tint streak = 0;\n\t\t\n\t\tfor (int i = 0; i < amountToRoll; i++)\n\t\t{\n\t\t\tString[] array = scan.nextLine().split(\"\\\\s\");\n\t\t\t\n\t\t\tif(array[0].equals(array[1])) \n\t\t\t{\n\t\t\t\tstreak++;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(streak == 3) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif(streak != 3) \n\t\t{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int amountToRoll = Integer.parseInt(scan.nextLine());",
"amountToRoll",
"Integer.parseInt(scan.nextLine())",
"Integer.parseInt",
"Integer",
"scan.nextLine()",
"scan.nextLine",
"scan",
"int streak = 0;",
"streak",
"0",
"for (int i = 0; i < amountToRoll; i++)\n\t\t{\n\t\t\tString[] array = scan.nextLine().split(\"\\\\s\");\n\t\t\t\n\t\t\tif(array[0].equals(array[1])) \n\t\t\t{\n\t\t\t\tstreak++;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(streak == 3) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < amountToRoll",
"i",
"amountToRoll",
"i++",
"i++",
"i",
"{\n\t\t\tString[] array = scan.nextLine().split(\"\\\\s\");\n\t\t\t\n\t\t\tif(array[0].equals(array[1])) \n\t\t\t{\n\t\t\t\tstreak++;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(streak == 3) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}",
"{\n\t\t\tString[] array = scan.nextLine().split(\"\\\\s\");\n\t\t\t\n\t\t\tif(array[0].equals(array[1])) \n\t\t\t{\n\t\t\t\tstreak++;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(streak == 3) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}",
"String[] array = scan.nextLine().split(\"\\\\s\");",
"array",
"scan.nextLine().split(\"\\\\s\")",
"scan.nextLine().split",
"scan.nextLine()",
"scan.nextLine",
"scan",
"\"\\\\s\"",
"if(array[0].equals(array[1])) \n\t\t\t{\n\t\t\t\tstreak++;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tstreak = 0;\n\t\t\t}",
"array[0].equals(array[1])",
"array[0].equals",
"array[0]",
"array",
"0",
"array[1]",
"array",
"1",
"{\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{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}",
"streak == 3",
"streak",
"3",
"{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"break;",
"if(streak != 3) \n\t\t{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"streak != 3",
"streak",
"3",
"{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public class Main\n{\n\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint amountToRoll = Integer.parseInt(scan.nextLine());\n\t\t\n\t\tint streak = 0;\n\t\t\n\t\tfor (int i = 0; i < amountToRoll; i++)\n\t\t{\n\t\t\tString[] array = scan.nextLine().split(\"\\\\s\");\n\t\t\t\n\t\t\tif(array[0].equals(array[1])) \n\t\t\t{\n\t\t\t\tstreak++;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(streak == 3) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif(streak != 3) \n\t\t{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\n\t}\n\n}",
"public class Main\n{\n\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint amountToRoll = Integer.parseInt(scan.nextLine());\n\t\t\n\t\tint streak = 0;\n\t\t\n\t\tfor (int i = 0; i < amountToRoll; i++)\n\t\t{\n\t\t\tString[] array = scan.nextLine().split(\"\\\\s\");\n\t\t\t\n\t\t\tif(array[0].equals(array[1])) \n\t\t\t{\n\t\t\t\tstreak++;\n\t\t\t}\n\t\t\t\n\t\t\telse \n\t\t\t{\n\t\t\t\tstreak = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif(streak == 3) \n\t\t\t{\n\t\t\t\tSystem.out.println(\"Yes\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tif(streak != 3) \n\t\t{\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t\t\n\t\tscan.close();\n\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 amountToRoll = Integer.parseInt(scan.nextLine());
int streak = 0;
for (int i = 0; i < amountToRoll; i++)
{
String[] array = scan.nextLine().split("\\s");
if(array[0].equals(array[1]))
{
streak++;
}
else
{
streak = 0;
}
if(streak == 3)
{
System.out.println("Yes");
break;
}
}
if(streak != 3)
{
System.out.println("No");
}
scan.close();
}
}
|
[
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,
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
],
[
130,
5
],
[
130,
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
],
[
103,
105
],
[
8,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
106,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
8,
124
],
[
124,
125
],
[
125,
126
],
[
6,
127
],
[
127,
128
],
[
0,
129
],
[
129,
130
],
[
129,
131
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint D1[] = new int[N];\n\t\tint D2[] = new int[N];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tD1[i] = stdIn.nextInt();\n\t\t\tD2[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N - 2; i++){\n\t\t\tif(D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]){\n\t\t\t\tans = 1;\n\t\t\t}\n\t\t}\n\t\tif(ans == 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\tstdIn.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint D1[] = new int[N];\n\t\tint D2[] = new int[N];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tD1[i] = stdIn.nextInt();\n\t\t\tD2[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N - 2; i++){\n\t\t\tif(D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]){\n\t\t\t\tans = 1;\n\t\t\t}\n\t\t}\n\t\tif(ans == 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\tstdIn.close();\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint D1[] = new int[N];\n\t\tint D2[] = new int[N];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tD1[i] = stdIn.nextInt();\n\t\t\tD2[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N - 2; i++){\n\t\t\tif(D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]){\n\t\t\t\tans = 1;\n\t\t\t}\n\t\t}\n\t\tif(ans == 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\tstdIn.close();\n\t}",
"main",
"{\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint D1[] = new int[N];\n\t\tint D2[] = new int[N];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tD1[i] = stdIn.nextInt();\n\t\t\tD2[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N - 2; i++){\n\t\t\tif(D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]){\n\t\t\t\tans = 1;\n\t\t\t}\n\t\t}\n\t\tif(ans == 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\tstdIn.close();\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int N = stdIn.nextInt();",
"N",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int D1[] = new int[N];",
"D1",
"new int[N]",
"N",
"int D2[] = new int[N];",
"D2",
"new int[N]",
"N",
"int ans = 0;",
"ans",
"0",
"for(int i = 0; i < N; i++){\n\t\t\tD1[i] = stdIn.nextInt();\n\t\t\tD2[i] = stdIn.nextInt();\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\tD1[i] = stdIn.nextInt();\n\t\t\tD2[i] = stdIn.nextInt();\n\t\t}",
"{\n\t\t\tD1[i] = stdIn.nextInt();\n\t\t\tD2[i] = stdIn.nextInt();\n\t\t}",
"D1[i] = stdIn.nextInt()",
"D1[i]",
"D1",
"i",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"D2[i] = stdIn.nextInt()",
"D2[i]",
"D2",
"i",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"for(int i = 0; i < N - 2; i++){\n\t\t\tif(D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]){\n\t\t\t\tans = 1;\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(D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]){\n\t\t\t\tans = 1;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]){\n\t\t\t\tans = 1;\n\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\tans = 1;\n\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\tans = 1;\n\t\t\t}",
"ans = 1",
"ans",
"1",
"if(ans == 1){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"ans == 1",
"ans",
"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\"",
"stdIn.close()",
"stdIn.close",
"stdIn",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint D1[] = new int[N];\n\t\tint D2[] = new int[N];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tD1[i] = stdIn.nextInt();\n\t\t\tD2[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N - 2; i++){\n\t\t\tif(D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]){\n\t\t\t\tans = 1;\n\t\t\t}\n\t\t}\n\t\tif(ans == 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\tstdIn.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tint D1[] = new int[N];\n\t\tint D2[] = new int[N];\n\t\tint ans = 0;\n\t\tfor(int i = 0; i < N; i++){\n\t\t\tD1[i] = stdIn.nextInt();\n\t\t\tD2[i] = stdIn.nextInt();\n\t\t}\n\t\tfor(int i = 0; i < N - 2; i++){\n\t\t\tif(D1[i] == D2[i] && D1[i+1] == D2[i+1] && D1[i+2] == D2[i+2]){\n\t\t\t\tans = 1;\n\t\t\t}\n\t\t}\n\t\tif(ans == 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\tstdIn.close();\n\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner stdIn = new Scanner(System.in);
int N = stdIn.nextInt();
int D1[] = new int[N];
int D2[] = new int[N];
int ans = 0;
for(int i = 0; i < N; i++){
D1[i] = stdIn.nextInt();
D2[i] = stdIn.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]){
ans = 1;
}
}
if(ans == 1){
System.out.println("Yes");
}
else{
System.out.println("No");
}
stdIn.close();
}
} |
[
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,
3,
30,
0,
13,
17,
14,
13,
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
],
[
88,
5
],
[
88,
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
],
[
60,
64
],
[
49,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
8,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
69,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
6,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import 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\n\t\tint count = 0;\n\t\tboolean flag = false;\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\t\n\t\t\tif(a==b){\n\t\t\t\tcount++;\n\t\t\t\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag){\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\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n\t\tboolean flag = false;\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\t\n\t\t\tif(a==b){\n\t\t\t\tcount++;\n\t\t\t\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag){\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\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n\t\tboolean flag = false;\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\t\n\t\t\tif(a==b){\n\t\t\t\tcount++;\n\t\t\t\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag){\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\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n\t\tboolean flag = false;\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\t\n\t\t\tif(a==b){\n\t\t\t\tcount++;\n\t\t\t\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag){\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 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\tsc.nextLine();\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\tcount++;\n\t\t\t\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 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\t\n\t\t\tif(a==b){\n\t\t\t\tcount++;\n\t\t\t\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 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\t\n\t\t\tif(a==b){\n\t\t\t\tcount++;\n\t\t\t\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 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\tcount++;\n\t\t\t\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\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\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"count++",
"count",
"if(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"count >= 3",
"count",
"3",
"{\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"flag = true",
"flag",
"true",
"break;",
"{\n\t\t\t\tcount = 0;\n\t\t\t}",
"count = 0",
"count",
"0",
"if(flag){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"flag",
"{\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\n\t\tint count = 0;\n\t\tboolean flag = false;\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\t\n\t\t\tif(a==b){\n\t\t\t\tcount++;\n\t\t\t\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag){\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\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\n\t\tint count = 0;\n\t\tboolean flag = false;\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\t\n\t\t\tif(a==b){\n\t\t\t\tcount++;\n\t\t\t\tif(count >= 3){\n\t\t\t\t\tflag = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(flag){\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 n = sc.nextInt();
int count = 0;
boolean flag = false;
for(int i=0;i<n;i++){
sc.nextLine();
int a = sc.nextInt();
int b = sc.nextInt();
if(a==b){
count++;
if(count >= 3){
flag = true;
break;
}
}else{
count = 0;
}
}
if(flag){
System.out.println("Yes");
}else{
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
30,
41,
13,
20,
41,
13,
4,
18,
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,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
13,
13,
30,
0,
13,
17,
14,
2,
2,
13,
17,
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
],
[
101,
5
],
[
101,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
13,
22
],
[
22,
23
],
[
22,
24
],
[
13,
25
],
[
25,
26
],
[
25,
27
],
[
13,
28
],
[
28,
29
],
[
28,
30
],
[
13,
31
],
[
31,
32
],
[
31,
33
],
[
13,
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
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
57,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
57,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
69,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
46,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
13,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
6,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
]
| [
"import java.util.Scanner;\n\npublic class Main {\n\n\t\tpublic static void main(String[] args) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\t\tint N = sc.nextInt();\n\t\t\t\tint a = 0;\n\t\t\t\tint b = 0;\n\t\t\t\tint count = 0;\n\t\t\t\tString ans = \"No\";\n\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(ans);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\t\tpublic static void main(String[] args) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\t\tint N = sc.nextInt();\n\t\t\t\tint a = 0;\n\t\t\t\tint b = 0;\n\t\t\t\tint count = 0;\n\t\t\t\tString ans = \"No\";\n\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(ans);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\t\tint N = sc.nextInt();\n\t\t\t\tint a = 0;\n\t\t\t\tint b = 0;\n\t\t\t\tint count = 0;\n\t\t\t\tString ans = \"No\";\n\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(ans);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}",
"main",
"{\n\t\t\t// TODO Auto-generated method stub\n\t\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\t\tint N = sc.nextInt();\n\t\t\t\tint a = 0;\n\t\t\t\tint b = 0;\n\t\t\t\tint count = 0;\n\t\t\t\tString ans = \"No\";\n\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(ans);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}",
"try (Scanner sc = new Scanner(System.in)) {\n\t\t\t\tint N = sc.nextInt();\n\t\t\t\tint a = 0;\n\t\t\t\tint b = 0;\n\t\t\t\tint count = 0;\n\t\t\t\tString ans = \"No\";\n\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(ans);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}",
"catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}",
"Exception e",
"{\n\t\t\t\t// TODO: handle exception\n\t\t\t}",
"{\n\t\t\t\tint N = sc.nextInt();\n\t\t\t\tint a = 0;\n\t\t\t\tint b = 0;\n\t\t\t\tint count = 0;\n\t\t\t\tString ans = \"No\";\n\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(ans);\n\t\t\t}",
"Scanner sc = new Scanner(System.in)",
"Scanner sc = new Scanner(System.in)",
"new Scanner(System.in)",
"int N = sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int a = 0;",
"a",
"0",
"int b = 0;",
"b",
"0",
"int count = 0;",
"count",
"0",
"String ans = \"No\";",
"ans",
"\"No\"",
"for (int i = 0; i < N; i++) {\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}",
"{\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}",
"count == 0 && a == b",
"count == 0",
"count",
"0",
"a == b",
"a",
"b",
"{\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t}",
"count = 1",
"count",
"1",
"if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}",
"count > 0 && a == b",
"count > 0",
"count",
"0",
"a == b",
"a",
"b",
"{\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t}",
"count++",
"count",
"{\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}",
"count = 0",
"count",
"0",
"if (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t}",
"count > 2",
"count",
"2",
"{\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\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\n\t\tpublic static void main(String[] args) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\t\tint N = sc.nextInt();\n\t\t\t\tint a = 0;\n\t\t\t\tint b = 0;\n\t\t\t\tint count = 0;\n\t\t\t\tString ans = \"No\";\n\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(ans);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}\n}",
"public class Main {\n\n\t\tpublic static void main(String[] args) {\n\t\t\t// TODO Auto-generated method stub\n\t\t\ttry (Scanner sc = new Scanner(System.in)) {\n\t\t\t\tint N = sc.nextInt();\n\t\t\t\tint a = 0;\n\t\t\t\tint b = 0;\n\t\t\t\tint count = 0;\n\t\t\t\tString ans = \"No\";\n\t\t\t\tfor (int i = 0; i < N; i++) {\n\t\t\t\t\ta = sc.nextInt();\n\t\t\t\t\tb = sc.nextInt();\n\n\t\t\t\t\tif (count == 0 && a == b) {\n\t\t\t\t\t\tcount = 1;\n\t\t\t\t\t} else if (count > 0 && a == b) {\n\t\t\t\t\t\tcount++;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcount = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (count > 2) {\n\t\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t\tSystem.out.println(ans);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO: handle exception\n\t\t\t}\n\t\t}\n}",
"Main"
]
| import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
try (Scanner sc = new Scanner(System.in)) {
int N = sc.nextInt();
int a = 0;
int b = 0;
int count = 0;
String ans = "No";
for (int i = 0; i < N; i++) {
a = sc.nextInt();
b = sc.nextInt();
if (count == 0 && a == b) {
count = 1;
} else if (count > 0 && a == b) {
count++;
} else {
count = 0;
}
if (count > 2) {
ans = "Yes";
}
}
System.out.println(ans);
} catch (Exception e) {
// TODO: handle exception
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
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,
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,
4,
18,
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,
30,
29,
18,
13,
40,
13,
30,
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,
12,
13,
30,
38,
5,
13,
30,
30,
4,
18,
13,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
7,
12
],
[
12,
13
],
[
12,
14
],
[
7,
15
],
[
15,
16
],
[
15,
17
],
[
7,
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,
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
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
70,
77
],
[
20,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
20,
84
],
[
84,
85
],
[
85,
86
],
[
18,
87
],
[
87,
88
],
[
0,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
89,
96
],
[
96,
97
],
[
96,
98
],
[
89,
100
],
[
100,
101
],
[
100,
102
],
[
89,
103
],
[
103,
104
],
[
103,
105
],
[
89,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
113,
114
],
[
114,
115
],
[
109,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
120,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
130,
133
],
[
116,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
138,
139
],
[
139,
140
],
[
108,
141
],
[
141,
142
],
[
89,
143
],
[
143,
144
],
[
143,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
146,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
146,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
89,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
163,
167
],
[
167,
168
],
[
167,
169
],
[
159,
170
],
[
170,
171
],
[
89,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
176,
179
],
[
179,
180
],
[
180,
181
],
[
180,
182
],
[
182,
183
],
[
182,
184
],
[
175,
185
],
[
185,
186
],
[
174,
187
],
[
187,
188
],
[
188,
189
],
[
89,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
193,
197
],
[
197,
198
],
[
192,
199
],
[
199,
200
],
[
199,
201
],
[
192,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
192,
206
],
[
206,
207
],
[
207,
208
],
[
207,
209
],
[
206,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
211,
214
],
[
210,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
192,
219
],
[
219,
220
],
[
220,
221
],
[
221,
222
],
[
89,
223
],
[
223,
224
],
[
223,
225
],
[
225,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
226,
230
],
[
230,
231
],
[
225,
232
],
[
232,
233
],
[
232,
234
],
[
225,
235
],
[
235,
236
],
[
235,
237
],
[
225,
238
],
[
238,
239
],
[
238,
240
],
[
240,
241
],
[
225,
242
],
[
242,
243
],
[
243,
244
],
[
243,
245
],
[
242,
246
],
[
246,
247
],
[
247,
248
],
[
247,
249
],
[
246,
250
],
[
250,
251
],
[
250,
252
],
[
252,
253
],
[
225,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
255,
259
],
[
259,
260
],
[
259,
261
],
[
254,
262
],
[
262,
263
],
[
263,
264
],
[
225,
265
],
[
265,
266
],
[
265,
267
],
[
267,
268
],
[
268,
269
],
[
269,
270
],
[
270,
271
],
[
270,
272
],
[
269,
273
],
[
273,
274
],
[
273,
275
],
[
268,
276
],
[
276,
277
],
[
277,
278
],
[
277,
279
],
[
276,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
282,
284
],
[
268,
285
],
[
285,
286
],
[
286,
287
],
[
287,
288
],
[
287,
289
],
[
289,
290
],
[
286,
291
],
[
291,
292
],
[
292,
293
],
[
292,
294
],
[
285,
295
],
[
295,
296
],
[
296,
297
],
[
297,
298
],
[
297,
299
],
[
299,
300
],
[
297,
301
],
[
285,
302
],
[
302,
303
],
[
303,
304
],
[
267,
305
],
[
305,
306
],
[
305,
307
],
[
307,
308
],
[
89,
309
],
[
309,
310
],
[
309,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
314,
315
],
[
311,
316
],
[
316,
317
],
[
317,
318
],
[
318,
319
],
[
318,
320
],
[
320,
321
],
[
320,
322
],
[
317,
323
],
[
323,
324
],
[
323,
325
],
[
325,
326
],
[
325,
327
],
[
316,
328
],
[
328,
329
],
[
311,
330
],
[
330,
331
],
[
89,
332
],
[
332,
333
],
[
332,
334
],
[
334,
335
],
[
335,
336
],
[
336,
337
],
[
337,
338
],
[
336,
339
],
[
339,
340
],
[
89,
341
],
[
341,
342
],
[
341,
343
],
[
343,
344
],
[
344,
345
],
[
345,
346
],
[
345,
347
],
[
344,
348
],
[
348,
349
],
[
349,
350
],
[
350,
351
],
[
89,
352
]
]
| [
"import java.io.*;\nimport java.util.*;\nclass Main{\n\tstatic final long MOD = 1_000_000_007; // 10^9+7\n\tstatic final int MAX = 2_147_483_646; // intMax \n\tstatic final int INF = 1_000_000_000; // 10^9 \n\tpublic static void main(String[] args) throws Exception{\n\t\thayami saori = new hayami();\n\t\tint n= saori.saori_hayami();\n\t\tint count = 0;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tint a = saori.saori_hayami();\n\t\t\tint b = saori.saori_hayami();\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\tsaori.close();\n\t}\n}\n\nclass hayami implements Closeable {\n\tprivate final InputStream in = System.in;\n\tprivate final byte[] hayami = new byte[1024];\n\tprivate int Hayami = 0;\n\tprivate int saori = 0;\n\tprivate boolean HayamiSaori() {\n\t\tif (Hayami < saori) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tHayami = 0;\n\t\t\ttry {\n\t\t\t\tsaori = in.read(hayami);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (saori <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tprivate int SaoriHayami() { \n\t\tif (HayamiSaori()) {\n return hayami[Hayami++];\n }else{\n return -1;\n }\n\t}\n\tprivate static boolean hayami_saori(int hayami) { \n\t\treturn 33 <= hayami && hayami <= 126;\n\t}\n\tpublic boolean hayamisaori() { \n\t\twhile(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();\n\t}\n\tpublic String nextHayami() {\n\t\tif (!hayamisaori()) throw new NoSuchElementException();\n\t\tStringBuilder hayamin = new StringBuilder();\n\t\tint saori = SaoriHayami();\n\t\twhile(hayami_saori(saori)) {\n\t\t\thayamin.appendCodePoint(saori);\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t\treturn hayamin.toString();\n\t}\n\tpublic long saorihayami() {//nextLong\n\t\tif (!hayamisaori()) throw new NoSuchElementException();\n\t\tlong hayami = 0;\n\t\tboolean misao = false;\n\t\tint saori = SaoriHayami();\n\t\tif (saori == '-') {\n\t\t\tmisao = true;\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t\tif (saori < '0' || '9' < saori) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile(true){\n\t\t\tif ('0' <= saori && saori <= '9') {\n\t\t\t\thayami *= 10;\n\t\t\t\thayami += saori - '0';\n\t\t\t}else if(saori == -1 || !hayami_saori(saori)){\n\t\t\t\treturn misao ? -hayami : hayami;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t}\n\tpublic int saori_hayami() {//nextInt\n\t\tlong hayami = saorihayami();\n\t\tif (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) hayami;\n\t}\n\tpublic double Hayamin() { //nextDouble\n\t\treturn Double.parseDouble(nextHayami());\n\t}\n\tpublic void close() {\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t}\n }\n \n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main{\n\tstatic final long MOD = 1_000_000_007; // 10^9+7\n\tstatic final int MAX = 2_147_483_646; // intMax \n\tstatic final int INF = 1_000_000_000; // 10^9 \n\tpublic static void main(String[] args) throws Exception{\n\t\thayami saori = new hayami();\n\t\tint n= saori.saori_hayami();\n\t\tint count = 0;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tint a = saori.saori_hayami();\n\t\t\tint b = saori.saori_hayami();\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\tsaori.close();\n\t}\n}",
"Main",
"static final long MOD = 1_000_000_007; // 10^9+7",
"MOD",
"1_000_000_007",
"static final int MAX = 2_147_483_646; // intMax ",
"MAX",
"2_147_483_646",
"static final int INF = 1_000_000_000; // 10^9 ",
"INF",
"1_000_000_000",
"public static void main(String[] args) throws Exception{\n\t\thayami saori = new hayami();\n\t\tint n= saori.saori_hayami();\n\t\tint count = 0;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tint a = saori.saori_hayami();\n\t\t\tint b = saori.saori_hayami();\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\tsaori.close();\n\t}",
"main",
"{\n\t\thayami saori = new hayami();\n\t\tint n= saori.saori_hayami();\n\t\tint count = 0;\n\t\tfor(int i = 0;i < n;i++){\n\t\t\tint a = saori.saori_hayami();\n\t\t\tint b = saori.saori_hayami();\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\tsaori.close();\n\t}",
"hayami saori = new hayami();",
"saori",
"new hayami()",
"int n= saori.saori_hayami();",
"n",
"saori.saori_hayami()",
"saori.saori_hayami",
"saori",
"int count = 0;",
"count",
"0",
"for(int i = 0;i < n;i++){\n\t\t\tint a = saori.saori_hayami();\n\t\t\tint b = saori.saori_hayami();\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\tint a = saori.saori_hayami();\n\t\t\tint b = saori.saori_hayami();\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\tint a = saori.saori_hayami();\n\t\t\tint b = saori.saori_hayami();\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 a = saori.saori_hayami();",
"a",
"saori.saori_hayami()",
"saori.saori_hayami",
"saori",
"int b = saori.saori_hayami();",
"b",
"saori.saori_hayami()",
"saori.saori_hayami",
"saori",
"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\"",
"saori.close()",
"saori.close",
"saori",
"String[] args",
"args",
"class hayami implements Closeable {\n\tprivate final InputStream in = System.in;\n\tprivate final byte[] hayami = new byte[1024];\n\tprivate int Hayami = 0;\n\tprivate int saori = 0;\n\tprivate boolean HayamiSaori() {\n\t\tif (Hayami < saori) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tHayami = 0;\n\t\t\ttry {\n\t\t\t\tsaori = in.read(hayami);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (saori <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\tprivate int SaoriHayami() { \n\t\tif (HayamiSaori()) {\n return hayami[Hayami++];\n }else{\n return -1;\n }\n\t}\n\tprivate static boolean hayami_saori(int hayami) { \n\t\treturn 33 <= hayami && hayami <= 126;\n\t}\n\tpublic boolean hayamisaori() { \n\t\twhile(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();\n\t}\n\tpublic String nextHayami() {\n\t\tif (!hayamisaori()) throw new NoSuchElementException();\n\t\tStringBuilder hayamin = new StringBuilder();\n\t\tint saori = SaoriHayami();\n\t\twhile(hayami_saori(saori)) {\n\t\t\thayamin.appendCodePoint(saori);\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t\treturn hayamin.toString();\n\t}\n\tpublic long saorihayami() {//nextLong\n\t\tif (!hayamisaori()) throw new NoSuchElementException();\n\t\tlong hayami = 0;\n\t\tboolean misao = false;\n\t\tint saori = SaoriHayami();\n\t\tif (saori == '-') {\n\t\t\tmisao = true;\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t\tif (saori < '0' || '9' < saori) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile(true){\n\t\t\tif ('0' <= saori && saori <= '9') {\n\t\t\t\thayami *= 10;\n\t\t\t\thayami += saori - '0';\n\t\t\t}else if(saori == -1 || !hayami_saori(saori)){\n\t\t\t\treturn misao ? -hayami : hayami;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t}\n\tpublic int saori_hayami() {//nextInt\n\t\tlong hayami = saorihayami();\n\t\tif (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) hayami;\n\t}\n\tpublic double Hayamin() { //nextDouble\n\t\treturn Double.parseDouble(nextHayami());\n\t}\n\tpublic void close() {\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t}\n }\n \n}",
"hayami",
"private final InputStream in = System.in;",
"in",
"System.in",
"System",
"System.in",
"private final byte[] hayami = new byte[1024];",
"hayami",
"new byte[1024]",
"1024",
"private int Hayami = 0;",
"Hayami",
"0",
"private int saori = 0;",
"saori",
"0",
"private boolean HayamiSaori() {\n\t\tif (Hayami < saori) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tHayami = 0;\n\t\t\ttry {\n\t\t\t\tsaori = in.read(hayami);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (saori <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"HayamiSaori",
"{\n\t\tif (Hayami < saori) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tHayami = 0;\n\t\t\ttry {\n\t\t\t\tsaori = in.read(hayami);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (saori <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"if (Hayami < saori) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\tHayami = 0;\n\t\t\ttry {\n\t\t\t\tsaori = in.read(hayami);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (saori <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"Hayami < saori",
"Hayami",
"saori",
"{\n\t\t\treturn true;\n\t\t}",
"return true;",
"true",
"{\n\t\t\tHayami = 0;\n\t\t\ttry {\n\t\t\t\tsaori = in.read(hayami);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (saori <= 0) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"Hayami = 0",
"Hayami",
"0",
"try {\n\t\t\t\tsaori = in.read(hayami);\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\tsaori = in.read(hayami);\n\t\t\t}",
"saori = in.read(hayami)",
"saori",
"in.read(hayami)",
"in.read",
"in",
"hayami",
"if (saori <= 0) {\n\t\t\t\treturn false;\n\t\t\t}",
"saori <= 0",
"saori",
"0",
"{\n\t\t\t\treturn false;\n\t\t\t}",
"return false;",
"false",
"return true;",
"true",
"private int SaoriHayami() { \n\t\tif (HayamiSaori()) {\n return hayami[Hayami++];\n }else{\n return -1;\n }\n\t}",
"SaoriHayami",
"{ \n\t\tif (HayamiSaori()) {\n return hayami[Hayami++];\n }else{\n return -1;\n }\n\t}",
"if (HayamiSaori()) {\n return hayami[Hayami++];\n }else{\n return -1;\n }",
"HayamiSaori()",
"HayamiSaori",
"{\n return hayami[Hayami++];\n }",
"return hayami[Hayami++];",
"hayami[Hayami++]",
"hayami",
"Hayami++",
"Hayami",
"{\n return -1;\n }",
"return -1;",
"-1",
"1",
"private static boolean hayami_saori(int hayami) { \n\t\treturn 33 <= hayami && hayami <= 126;\n\t}",
"hayami_saori",
"{ \n\t\treturn 33 <= hayami && hayami <= 126;\n\t}",
"return 33 <= hayami && hayami <= 126;",
"33 <= hayami && hayami <= 126",
"33 <= hayami",
"33",
"hayami",
"hayami <= 126",
"hayami",
"126",
"int hayami",
"hayami",
"public boolean hayamisaori() { \n\t\twhile(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();\n\t}",
"hayamisaori",
"{ \n\t\twhile(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();\n\t}",
"while(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++;",
"HayamiSaori() && !hayami_saori(hayami[Hayami])",
"HayamiSaori()",
"HayamiSaori",
"!hayami_saori(hayami[Hayami])",
"hayami_saori(hayami[Hayami])",
"hayami_saori",
"hayami[Hayami]",
"hayami",
"Hayami",
"Hayami++",
"Hayami",
"return HayamiSaori();",
"HayamiSaori()",
"HayamiSaori",
"public String nextHayami() {\n\t\tif (!hayamisaori()) throw new NoSuchElementException();\n\t\tStringBuilder hayamin = new StringBuilder();\n\t\tint saori = SaoriHayami();\n\t\twhile(hayami_saori(saori)) {\n\t\t\thayamin.appendCodePoint(saori);\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t\treturn hayamin.toString();\n\t}",
"nextHayami",
"{\n\t\tif (!hayamisaori()) throw new NoSuchElementException();\n\t\tStringBuilder hayamin = new StringBuilder();\n\t\tint saori = SaoriHayami();\n\t\twhile(hayami_saori(saori)) {\n\t\t\thayamin.appendCodePoint(saori);\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t\treturn hayamin.toString();\n\t}",
"if (!hayamisaori()) throw new NoSuchElementException();",
"!hayamisaori()",
"hayamisaori()",
"hayamisaori",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"StringBuilder hayamin = new StringBuilder();",
"hayamin",
"new StringBuilder()",
"int saori = SaoriHayami();",
"saori",
"SaoriHayami()",
"SaoriHayami",
"while(hayami_saori(saori)) {\n\t\t\thayamin.appendCodePoint(saori);\n\t\t\tsaori = SaoriHayami();\n\t\t}",
"hayami_saori(saori)",
"hayami_saori",
"saori",
"{\n\t\t\thayamin.appendCodePoint(saori);\n\t\t\tsaori = SaoriHayami();\n\t\t}",
"hayamin.appendCodePoint(saori)",
"hayamin.appendCodePoint",
"hayamin",
"saori",
"saori = SaoriHayami()",
"saori",
"SaoriHayami()",
"SaoriHayami",
"return hayamin.toString();",
"hayamin.toString()",
"hayamin.toString",
"hayamin",
"public long saorihayami() {//nextLong\n\t\tif (!hayamisaori()) throw new NoSuchElementException();\n\t\tlong hayami = 0;\n\t\tboolean misao = false;\n\t\tint saori = SaoriHayami();\n\t\tif (saori == '-') {\n\t\t\tmisao = true;\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t\tif (saori < '0' || '9' < saori) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile(true){\n\t\t\tif ('0' <= saori && saori <= '9') {\n\t\t\t\thayami *= 10;\n\t\t\t\thayami += saori - '0';\n\t\t\t}else if(saori == -1 || !hayami_saori(saori)){\n\t\t\t\treturn misao ? -hayami : hayami;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t}",
"saorihayami",
"{//nextLong\n\t\tif (!hayamisaori()) throw new NoSuchElementException();\n\t\tlong hayami = 0;\n\t\tboolean misao = false;\n\t\tint saori = SaoriHayami();\n\t\tif (saori == '-') {\n\t\t\tmisao = true;\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t\tif (saori < '0' || '9' < saori) {\n\t\t\tthrow new NumberFormatException();\n\t\t}\n\t\twhile(true){\n\t\t\tif ('0' <= saori && saori <= '9') {\n\t\t\t\thayami *= 10;\n\t\t\t\thayami += saori - '0';\n\t\t\t}else if(saori == -1 || !hayami_saori(saori)){\n\t\t\t\treturn misao ? -hayami : hayami;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tsaori = SaoriHayami();\n\t\t}\n\t}",
"if (!hayamisaori()) throw new NoSuchElementException();",
"!hayamisaori()",
"hayamisaori()",
"hayamisaori",
"throw new NoSuchElementException();",
"new NoSuchElementException()",
"long hayami = 0;",
"hayami",
"0",
"boolean misao = false;",
"misao",
"false",
"int saori = SaoriHayami();",
"saori",
"SaoriHayami()",
"SaoriHayami",
"if (saori == '-') {\n\t\t\tmisao = true;\n\t\t\tsaori = SaoriHayami();\n\t\t}",
"saori == '-'",
"saori",
"'-'",
"{\n\t\t\tmisao = true;\n\t\t\tsaori = SaoriHayami();\n\t\t}",
"misao = true",
"misao",
"true",
"saori = SaoriHayami()",
"saori",
"SaoriHayami()",
"SaoriHayami",
"if (saori < '0' || '9' < saori) {\n\t\t\tthrow new NumberFormatException();\n\t\t}",
"saori < '0' || '9' < saori",
"saori < '0'",
"saori",
"'0'",
"'9' < saori",
"'9'",
"saori",
"{\n\t\t\tthrow new NumberFormatException();\n\t\t}",
"throw new NumberFormatException();",
"new NumberFormatException()",
"while(true){\n\t\t\tif ('0' <= saori && saori <= '9') {\n\t\t\t\thayami *= 10;\n\t\t\t\thayami += saori - '0';\n\t\t\t}else if(saori == -1 || !hayami_saori(saori)){\n\t\t\t\treturn misao ? -hayami : hayami;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tsaori = SaoriHayami();\n\t\t}",
"true",
"{\n\t\t\tif ('0' <= saori && saori <= '9') {\n\t\t\t\thayami *= 10;\n\t\t\t\thayami += saori - '0';\n\t\t\t}else if(saori == -1 || !hayami_saori(saori)){\n\t\t\t\treturn misao ? -hayami : hayami;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}\n\t\t\tsaori = SaoriHayami();\n\t\t}",
"if ('0' <= saori && saori <= '9') {\n\t\t\t\thayami *= 10;\n\t\t\t\thayami += saori - '0';\n\t\t\t}else if(saori == -1 || !hayami_saori(saori)){\n\t\t\t\treturn misao ? -hayami : hayami;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"'0' <= saori && saori <= '9'",
"'0' <= saori",
"'0'",
"saori",
"saori <= '9'",
"saori",
"'9'",
"{\n\t\t\t\thayami *= 10;\n\t\t\t\thayami += saori - '0';\n\t\t\t}",
"hayami *= 10",
"hayami",
"10",
"hayami += saori - '0'",
"hayami",
"saori - '0'",
"saori",
"'0'",
"if(saori == -1 || !hayami_saori(saori)){\n\t\t\t\treturn misao ? -hayami : hayami;\n\t\t\t}else{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"saori == -1 || !hayami_saori(saori)",
"saori == -1",
"saori",
"-1",
"1",
"!hayami_saori(saori)",
"hayami_saori(saori)",
"hayami_saori",
"saori",
"{\n\t\t\t\treturn misao ? -hayami : hayami;\n\t\t\t}",
"return misao ? -hayami : hayami;",
"misao ? -hayami : hayami",
"misao",
"-hayami",
"hayami",
"hayami",
"{\n\t\t\t\tthrow new NumberFormatException();\n\t\t\t}",
"throw new NumberFormatException();",
"new NumberFormatException()",
"saori = SaoriHayami()",
"saori",
"SaoriHayami()",
"SaoriHayami",
"public int saori_hayami() {//nextInt\n\t\tlong hayami = saorihayami();\n\t\tif (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) hayami;\n\t}",
"saori_hayami",
"{//nextInt\n\t\tlong hayami = saorihayami();\n\t\tif (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();\n\t\treturn (int) hayami;\n\t}",
"long hayami = saorihayami();",
"hayami",
"saorihayami()",
"saorihayami",
"if (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();",
"hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE",
"hayami < Integer.MIN_VALUE",
"hayami",
"Integer.MIN_VALUE",
"Integer",
"Integer.MIN_VALUE",
"hayami > Integer.MAX_VALUE",
"hayami",
"Integer.MAX_VALUE",
"Integer",
"Integer.MAX_VALUE",
"throw new NumberFormatException();",
"new NumberFormatException()",
"return (int) hayami;",
"(int) hayami",
"public double Hayamin() { //nextDouble\n\t\treturn Double.parseDouble(nextHayami());\n\t}",
"Hayamin",
"{ //nextDouble\n\t\treturn Double.parseDouble(nextHayami());\n\t}",
"return Double.parseDouble(nextHayami());",
"Double.parseDouble(nextHayami())",
"Double.parseDouble",
"Double",
"nextHayami()",
"nextHayami",
"public void close() {\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t}\n }",
"close",
"{\n\t\ttry {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t}\n }",
"try {\n\t\t\tin.close();\n\t\t} catch (IOException e) {\n\t\t}",
"catch (IOException e) {\n\t\t}",
"IOException e",
"{\n\t\t}",
"{\n\t\t\tin.close();\n\t\t}",
"in.close()",
"in.close",
"in",
"Closeable"
]
| import java.io.*;
import java.util.*;
class Main{
static final long MOD = 1_000_000_007; // 10^9+7
static final int MAX = 2_147_483_646; // intMax
static final int INF = 1_000_000_000; // 10^9
public static void main(String[] args) throws Exception{
hayami saori = new hayami();
int n= saori.saori_hayami();
int count = 0;
for(int i = 0;i < n;i++){
int a = saori.saori_hayami();
int b = saori.saori_hayami();
if(a == b){
count ++;
} else {
count = 0;
}
if(count >= 3){
System.out.println("Yes");
return;
}
}
System.out.println("No");
saori.close();
}
}
class hayami implements Closeable {
private final InputStream in = System.in;
private final byte[] hayami = new byte[1024];
private int Hayami = 0;
private int saori = 0;
private boolean HayamiSaori() {
if (Hayami < saori) {
return true;
}else{
Hayami = 0;
try {
saori = in.read(hayami);
} catch (IOException e) {
e.printStackTrace();
}
if (saori <= 0) {
return false;
}
}
return true;
}
private int SaoriHayami() {
if (HayamiSaori()) {
return hayami[Hayami++];
}else{
return -1;
}
}
private static boolean hayami_saori(int hayami) {
return 33 <= hayami && hayami <= 126;
}
public boolean hayamisaori() {
while(HayamiSaori() && !hayami_saori(hayami[Hayami])) Hayami++; return HayamiSaori();
}
public String nextHayami() {
if (!hayamisaori()) throw new NoSuchElementException();
StringBuilder hayamin = new StringBuilder();
int saori = SaoriHayami();
while(hayami_saori(saori)) {
hayamin.appendCodePoint(saori);
saori = SaoriHayami();
}
return hayamin.toString();
}
public long saorihayami() {//nextLong
if (!hayamisaori()) throw new NoSuchElementException();
long hayami = 0;
boolean misao = false;
int saori = SaoriHayami();
if (saori == '-') {
misao = true;
saori = SaoriHayami();
}
if (saori < '0' || '9' < saori) {
throw new NumberFormatException();
}
while(true){
if ('0' <= saori && saori <= '9') {
hayami *= 10;
hayami += saori - '0';
}else if(saori == -1 || !hayami_saori(saori)){
return misao ? -hayami : hayami;
}else{
throw new NumberFormatException();
}
saori = SaoriHayami();
}
}
public int saori_hayami() {//nextInt
long hayami = saorihayami();
if (hayami < Integer.MIN_VALUE || hayami > Integer.MAX_VALUE) throw new NumberFormatException();
return (int) hayami;
}
public double Hayamin() { //nextDouble
return Double.parseDouble(nextHayami());
}
public void close() {
try {
in.close();
} catch (IOException e) {
}
}
}
|
[
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,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
41,
13,
17,
11,
1,
41,
13,
13,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
30,
0,
13,
17,
3,
14,
13,
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
],
[
122,
5
],
[
122,
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
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
53,
63
],
[
63,
64
],
[
64,
65
],
[
53,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
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
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
86,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
67,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
108,
110
],
[
106,
111
],
[
105,
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.*;\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 arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n arr[i][0]=sc.nextInt();\n arr[i][1]=sc.nextInt();\n }\n for(int i=0;i<=n-3;i++)\n {\n boolean yes=true;\n for(int j=i;j<i+3;j++)\n {\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }\n if(yes)\n {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"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 arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n arr[i][0]=sc.nextInt();\n arr[i][1]=sc.nextInt();\n }\n for(int i=0;i<=n-3;i++)\n {\n boolean yes=true;\n for(int j=i;j<i+3;j++)\n {\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }\n if(yes)\n {\n System.out.println(\"Yes\");\n return;\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 int arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n arr[i][0]=sc.nextInt();\n arr[i][1]=sc.nextInt();\n }\n for(int i=0;i<=n-3;i++)\n {\n boolean yes=true;\n for(int j=i;j<i+3;j++)\n {\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }\n if(yes)\n {\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 arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n arr[i][0]=sc.nextInt();\n arr[i][1]=sc.nextInt();\n }\n for(int i=0;i<=n-3;i++)\n {\n boolean yes=true;\n for(int j=i;j<i+3;j++)\n {\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }\n if(yes)\n {\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 arr[][]=new int[n][2];",
"arr",
"new int[n][2]",
"n",
"2",
"for(int i=0;i<n;i++)\n {\n arr[i][0]=sc.nextInt();\n arr[i][1]=sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n arr[i][0]=sc.nextInt();\n arr[i][1]=sc.nextInt();\n }",
"{\n arr[i][0]=sc.nextInt();\n arr[i][1]=sc.nextInt();\n }",
"arr[i][0]=sc.nextInt()",
"arr[i][0]",
"arr[i]",
"arr",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"arr[i][1]=sc.nextInt()",
"arr[i][1]",
"arr[i]",
"arr",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<=n-3;i++)\n {\n boolean yes=true;\n for(int j=i;j<i+3;j++)\n {\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }\n if(yes)\n {\n System.out.println(\"Yes\");\n return;\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=n-3",
"i",
"n-3",
"n",
"3",
"i++",
"i++",
"i",
"{\n boolean yes=true;\n for(int j=i;j<i+3;j++)\n {\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }\n if(yes)\n {\n System.out.println(\"Yes\");\n return;\n }\n }",
"{\n boolean yes=true;\n for(int j=i;j<i+3;j++)\n {\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }\n if(yes)\n {\n System.out.println(\"Yes\");\n return;\n }\n }",
"boolean yes=true;",
"yes",
"true",
"for(int j=i;j<i+3;j++)\n {\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }",
"int j=i;",
"int j=i;",
"j",
"i",
"j<i+3",
"j",
"i+3",
"i",
"3",
"j++",
"j++",
"j",
"{\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }",
"{\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }",
"if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }",
"arr[j][0]!=arr[j][1]",
"arr[j][0]",
"arr[j]",
"arr",
"j",
"0",
"arr[j][1]",
"arr[j]",
"arr",
"j",
"1",
"{\n yes=false;\n break;\n }",
"yes=false",
"yes",
"false",
"break;",
"if(yes)\n {\n System.out.println(\"Yes\");\n return;\n }",
"yes",
"{\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{\n public static void main(String args[])\n {\n Scanner sc=new Scanner(System.in);\n int n=sc.nextInt();\n int arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n arr[i][0]=sc.nextInt();\n arr[i][1]=sc.nextInt();\n }\n for(int i=0;i<=n-3;i++)\n {\n boolean yes=true;\n for(int j=i;j<i+3;j++)\n {\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }\n if(yes)\n {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\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 arr[][]=new int[n][2];\n for(int i=0;i<n;i++)\n {\n arr[i][0]=sc.nextInt();\n arr[i][1]=sc.nextInt();\n }\n for(int i=0;i<=n-3;i++)\n {\n boolean yes=true;\n for(int j=i;j<i+3;j++)\n {\n if(arr[j][0]!=arr[j][1])\n {\n yes=false;\n break;\n }\n }\n if(yes)\n {\n System.out.println(\"Yes\");\n return;\n }\n }\n 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 n=sc.nextInt();
int arr[][]=new int[n][2];
for(int i=0;i<n;i++)
{
arr[i][0]=sc.nextInt();
arr[i][1]=sc.nextInt();
}
for(int i=0;i<=n-3;i++)
{
boolean yes=true;
for(int j=i;j<i+3;j++)
{
if(arr[j][0]!=arr[j][1])
{
yes=false;
break;
}
}
if(yes)
{
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,
0,
13,
17,
9,
40,
13,
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
],
[
48,
50
],
[
47,
51
],
[
32,
52
],
[
52,
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.*;\npublic class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt(), b = sc.nextInt();\n if (a != b) {\n count = 0;\n continue;\n }\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt(), b = sc.nextInt();\n if (a != b) {\n count = 0;\n continue;\n }\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\t}\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt(), b = sc.nextInt();\n if (a != b) {\n count = 0;\n continue;\n }\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\t}",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt(), b = sc.nextInt();\n if (a != b) {\n count = 0;\n continue;\n }\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n 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",
"count = 0;",
"count",
"0",
"for (int i = 0; i < n; i++) {\n int a = sc.nextInt(), b = sc.nextInt();\n if (a != b) {\n count = 0;\n continue;\n }\n count++;\n if (count == 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 a = sc.nextInt(), b = sc.nextInt();\n if (a != b) {\n count = 0;\n continue;\n }\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"{\n int a = sc.nextInt(), b = sc.nextInt();\n if (a != b) {\n count = 0;\n continue;\n }\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n }",
"int a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if (a != b) {\n count = 0;\n continue;\n }",
"a != b",
"a",
"b",
"{\n count = 0;\n continue;\n }",
"count = 0",
"count",
"0",
"continue;",
"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;",
"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 Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt(), b = sc.nextInt();\n if (a != b) {\n count = 0;\n continue;\n }\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt(), count = 0;\n for (int i = 0; i < n; i++) {\n int a = sc.nextInt(), b = sc.nextInt();\n if (a != b) {\n count = 0;\n continue;\n }\n count++;\n if (count == 3) {\n System.out.println(\"Yes\");\n return;\n }\n }\n 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(), count = 0;
for (int i = 0; i < n; i++) {
int a = sc.nextInt(), b = sc.nextInt();
if (a != b) {
count = 0;
continue;
}
count++;
if (count == 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,
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,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
18,
13,
13,
13,
0,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
2,
18,
13,
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,
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
],
[
133,
11
],
[
133,
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,
27
],
[
27,
28
],
[
27,
29
],
[
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
],
[
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
],
[
43,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
14,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
64,
76
],
[
76,
77
],
[
77,
78
],
[
64,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
83,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
88,
90
],
[
83,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
91,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
83,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
102,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
81,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
114,
119
],
[
113,
120
],
[
120,
121
],
[
121,
122
],
[
120,
123
],
[
14,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
12,
130
],
[
130,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
]
| [
"import java.util.Arrays;\nimport java.util.Scanner;\nimport java.util.Vector;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner ob=new Scanner(System.in);\n\t\tint n=ob.nextInt();\n\t\tint a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\tint x=ob.nextInt();\n\t\tint y=ob.nextInt();\n\t\ta[i]=x;b[i]=y;\n\t\t}\n\t\tfor(int i=0;i<=a.length-3;i++)\n\t\t{\n\t\tif(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\t\t}\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\n\tpublic static void main(String[] args) {\n\t\tScanner ob=new Scanner(System.in);\n\t\tint n=ob.nextInt();\n\t\tint a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\tint x=ob.nextInt();\n\t\tint y=ob.nextInt();\n\t\ta[i]=x;b[i]=y;\n\t\t}\n\t\tfor(int i=0;i<=a.length-3;i++)\n\t\t{\n\t\tif(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\t\t}\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\tint a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\tint x=ob.nextInt();\n\t\tint y=ob.nextInt();\n\t\ta[i]=x;b[i]=y;\n\t\t}\n\t\tfor(int i=0;i<=a.length-3;i++)\n\t\t{\n\t\tif(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\t\t}\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\tint a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\tint x=ob.nextInt();\n\t\tint y=ob.nextInt();\n\t\ta[i]=x;b[i]=y;\n\t\t}\n\t\tfor(int i=0;i<=a.length-3;i++)\n\t\t{\n\t\tif(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\t\t}\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",
"int a[]=new int[n];",
"a",
"new int[n]",
"n",
"int b[]=new int[n];",
"b",
"new int[n]",
"n",
"for(int i=0;i<n;i++)\n\t\t{\n\t\tint x=ob.nextInt();\n\t\tint y=ob.nextInt();\n\t\ta[i]=x;b[i]=y;\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\tint x=ob.nextInt();\n\t\tint y=ob.nextInt();\n\t\ta[i]=x;b[i]=y;\n\t\t}",
"{\n\t\tint x=ob.nextInt();\n\t\tint y=ob.nextInt();\n\t\ta[i]=x;b[i]=y;\n\t\t}",
"int x=ob.nextInt();",
"x",
"ob.nextInt()",
"ob.nextInt",
"ob",
"int y=ob.nextInt();",
"y",
"ob.nextInt()",
"ob.nextInt",
"ob",
"a[i]=x",
"a[i]",
"a",
"i",
"x",
"b[i]=y",
"b[i]",
"b",
"i",
"y",
"for(int i=0;i<=a.length-3;i++)\n\t\t{\n\t\tif(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<=a.length-3",
"i",
"a.length-3",
"a.length",
"a",
"a.length",
"3",
"i++",
"i++",
"i",
"{\n\t\tif(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t}",
"{\n\t\tif(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t}",
"if(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\t\t}",
"a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]",
"a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]",
"a[i]==b[i]",
"a[i]",
"a",
"i",
"b[i]",
"b",
"i",
"a[i+1]==b[i+1]",
"a[i+1]",
"a",
"i+1",
"i",
"1",
"b[i+1]",
"b",
"i+1",
"i",
"1",
"a[i+2]==b[i+2]",
"a[i+2]",
"a",
"i+2",
"i",
"2",
"b[i+2]",
"b",
"i+2",
"i",
"2",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\t\t}",
"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\n\tpublic static void main(String[] args) {\n\t\tScanner ob=new Scanner(System.in);\n\t\tint n=ob.nextInt();\n\t\tint a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\tint x=ob.nextInt();\n\t\tint y=ob.nextInt();\n\t\ta[i]=x;b[i]=y;\n\t\t}\n\t\tfor(int i=0;i<=a.length-3;i++)\n\t\t{\n\t\tif(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\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) {\n\t\tScanner ob=new Scanner(System.in);\n\t\tint n=ob.nextInt();\n\t\tint a[]=new int[n];\n\t\tint b[]=new int[n];\n\t\tfor(int i=0;i<n;i++)\n\t\t{\n\t\tint x=ob.nextInt();\n\t\tint y=ob.nextInt();\n\t\ta[i]=x;b[i]=y;\n\t\t}\n\t\tfor(int i=0;i<=a.length-3;i++)\n\t\t{\n\t\tif(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tSystem.exit(0);\n\t\t}\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();
int a[]=new int[n];
int b[]=new int[n];
for(int i=0;i<n;i++)
{
int x=ob.nextInt();
int y=ob.nextInt();
a[i]=x;b[i]=y;
}
for(int i=0;i<=a.length-3;i++)
{
if(a[i]==b[i]&&a[i+1]==b[i+1]&&a[i+2]==b[i+2]){
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,
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,
14,
13,
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
],
[
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
],
[
52,
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
],
[
103,
105
],
[
8,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
106,
115
],
[
115,
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\tpublic static void main(String[] args){\n\t\tScanner sc = new Scanner(System.in);\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; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++){\n\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]){\n\t\t\t\tflag=true;\n\t\t\t}\n\t\t}\n\t\tif(flag){System.out.println(\"Yes\");}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");}\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[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++){\n\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]){\n\t\t\t\tflag=true;\n\t\t\t}\n\t\t}\n\t\tif(flag){System.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[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++){\n\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]){\n\t\t\t\tflag=true;\n\t\t\t}\n\t\t}\n\t\tif(flag){System.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[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++){\n\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]){\n\t\t\t\tflag=true;\n\t\t\t}\n\t\t}\n\t\tif(flag){System.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[] 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\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",
"i",
"n",
"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",
"boolean flag = false;",
"flag",
"false",
"for(int i=0;i<n-2;i++){\n\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]){\n\t\t\t\tflag=true;\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(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]){\n\t\t\t\tflag=true;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]){\n\t\t\t\tflag=true;\n\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\tflag=true;\n\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\tflag=true;\n\t\t\t}",
"flag=true",
"flag",
"true",
"if(flag){System.out.println(\"Yes\");}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");}",
"flag",
"{System.out.println(\"Yes\");}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{\n\t\t\tSystem.out.println(\"No\");}",
"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[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++){\n\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]){\n\t\t\t\tflag=true;\n\t\t\t}\n\t\t}\n\t\tif(flag){System.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[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\t\tboolean flag = false;\n\t\tfor(int i=0;i<n-2;i++){\n\t\t\tif(d1[i]==d2[i]&&d1[i+1]==d2[i+1]&&d1[i+2]==d2[i+2]){\n\t\t\t\tflag=true;\n\t\t\t}\n\t\t}\n\t\tif(flag){System.out.println(\"Yes\");}\n\t\telse{\n\t\t\tSystem.out.println(\"No\");}\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[] d1 = new int[n];
int[] d2 = new int[n];
for (int i = 0; i < n; i++) {
d1[i] = sc.nextInt();
d2[i] = sc.nextInt();
}
boolean flag = false;
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]){
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,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
4,
18,
13,
4,
18,
13,
4,
18,
13,
0,
13,
17,
41,
13,
17,
42,
2,
2,
4,
18,
13,
17,
2,
13,
17,
30,
41,
13,
4,
18,
13,
14,
2,
4,
18,
13,
17,
4,
18,
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,
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
],
[
147,
20
],
[
147,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
23,
30
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
23,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
38,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
50,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
50,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
50,
69
],
[
69,
70
],
[
70,
71
],
[
69,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
72,
77
],
[
77,
78
],
[
78,
79
],
[
50,
80
],
[
80,
81
],
[
81,
82
],
[
23,
83
],
[
83,
84
],
[
83,
85
],
[
23,
86
],
[
86,
87
],
[
86,
88
],
[
23,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
91,
95
],
[
90,
96
],
[
96,
97
],
[
96,
98
],
[
89,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
99,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
106,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
105,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
105,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
23,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
123,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
135,
140
],
[
23,
141
],
[
141,
142
],
[
142,
143
],
[
21,
144
],
[
144,
145
],
[
0,
146
],
[
146,
147
],
[
146,
148
]
]
| [
"import java.util.ArrayDeque;\nimport java.util.ArrayList;\nimport java.util.Deque;\nimport java.util.List;\nimport java.util.Scanner;\nimport java.util.stream.Collectors;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<List<Integer>> D = new ArrayDeque<>();\n\t\tList<Integer> tmp = new ArrayList<Integer>();\n\n\t\tint N=sc.nextInt();\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\ttmp.add(a);\n\t\t\ttmp.add(b);\n\t\t\tD.add(tmp.stream().collect(Collectors.toList()));\n\t\t\ttmp.clear();\n\t\t}\n\t\ttmp=null;\n\n\t\tint cnt=0;\n\t\twhile(D.size()!=0 && cnt<3){\n\t\t\tList<Integer> d =D.poll();\n\t\t\tif(d.get(0)==d.get(1)) {\n\t\t\t\tcnt+=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcnt=0;\n\t\t\t}\n\t\t}\n\t\tif(cnt>=3) {\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\tsc.close();\n\t}\n}\n\n\n\n\n\n\n\n\n\n",
"import java.util.ArrayDeque;",
"ArrayDeque",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Deque;",
"Deque",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.stream.Collectors;",
"Collectors",
"java.util.stream",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<List<Integer>> D = new ArrayDeque<>();\n\t\tList<Integer> tmp = new ArrayList<Integer>();\n\n\t\tint N=sc.nextInt();\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\ttmp.add(a);\n\t\t\ttmp.add(b);\n\t\t\tD.add(tmp.stream().collect(Collectors.toList()));\n\t\t\ttmp.clear();\n\t\t}\n\t\ttmp=null;\n\n\t\tint cnt=0;\n\t\twhile(D.size()!=0 && cnt<3){\n\t\t\tList<Integer> d =D.poll();\n\t\t\tif(d.get(0)==d.get(1)) {\n\t\t\t\tcnt+=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcnt=0;\n\t\t\t}\n\t\t}\n\t\tif(cnt>=3) {\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\tsc.close();\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<List<Integer>> D = new ArrayDeque<>();\n\t\tList<Integer> tmp = new ArrayList<Integer>();\n\n\t\tint N=sc.nextInt();\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\ttmp.add(a);\n\t\t\ttmp.add(b);\n\t\t\tD.add(tmp.stream().collect(Collectors.toList()));\n\t\t\ttmp.clear();\n\t\t}\n\t\ttmp=null;\n\n\t\tint cnt=0;\n\t\twhile(D.size()!=0 && cnt<3){\n\t\t\tList<Integer> d =D.poll();\n\t\t\tif(d.get(0)==d.get(1)) {\n\t\t\t\tcnt+=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcnt=0;\n\t\t\t}\n\t\t}\n\t\tif(cnt>=3) {\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\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<List<Integer>> D = new ArrayDeque<>();\n\t\tList<Integer> tmp = new ArrayList<Integer>();\n\n\t\tint N=sc.nextInt();\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\ttmp.add(a);\n\t\t\ttmp.add(b);\n\t\t\tD.add(tmp.stream().collect(Collectors.toList()));\n\t\t\ttmp.clear();\n\t\t}\n\t\ttmp=null;\n\n\t\tint cnt=0;\n\t\twhile(D.size()!=0 && cnt<3){\n\t\t\tList<Integer> d =D.poll();\n\t\t\tif(d.get(0)==d.get(1)) {\n\t\t\t\tcnt+=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcnt=0;\n\t\t\t}\n\t\t}\n\t\tif(cnt>=3) {\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\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"Deque<List<Integer>> D = new ArrayDeque<>();",
"D",
"new ArrayDeque<>()",
"List<Integer> tmp = new ArrayList<Integer>();",
"tmp",
"new ArrayList<Integer>()",
"int N=sc.nextInt();",
"N",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for(int i=0;i<N;i++) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\ttmp.add(a);\n\t\t\ttmp.add(b);\n\t\t\tD.add(tmp.stream().collect(Collectors.toList()));\n\t\t\ttmp.clear();\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\ttmp.add(a);\n\t\t\ttmp.add(b);\n\t\t\tD.add(tmp.stream().collect(Collectors.toList()));\n\t\t\ttmp.clear();\n\t\t}",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\ttmp.add(a);\n\t\t\ttmp.add(b);\n\t\t\tD.add(tmp.stream().collect(Collectors.toList()));\n\t\t\ttmp.clear();\n\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"tmp.add(a)",
"tmp.add",
"tmp",
"a",
"tmp.add(b)",
"tmp.add",
"tmp",
"b",
"D.add(tmp.stream().collect(Collectors.toList()))",
"D.add",
"D",
"tmp.stream().collect(Collectors.toList())",
"tmp.stream().collect",
"tmp.stream()",
"tmp.stream",
"tmp",
"Collectors.toList()",
"Collectors.toList",
"Collectors",
"tmp.clear()",
"tmp.clear",
"tmp",
"tmp=null",
"tmp",
"null",
"int cnt=0;",
"cnt",
"0",
"while(D.size()!=0 && cnt<3){\n\t\t\tList<Integer> d =D.poll();\n\t\t\tif(d.get(0)==d.get(1)) {\n\t\t\t\tcnt+=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcnt=0;\n\t\t\t}\n\t\t}",
"D.size()!=0 && cnt<3",
"D.size()!=0",
"D.size()",
"D.size",
"D",
"0",
"cnt<3",
"cnt",
"3",
"{\n\t\t\tList<Integer> d =D.poll();\n\t\t\tif(d.get(0)==d.get(1)) {\n\t\t\t\tcnt+=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcnt=0;\n\t\t\t}\n\t\t}",
"List<Integer> d =D.poll();",
"d",
"D.poll()",
"D.poll",
"D",
"if(d.get(0)==d.get(1)) {\n\t\t\t\tcnt+=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcnt=0;\n\t\t\t}",
"d.get(0)==d.get(1)",
"d.get(0)",
"d.get",
"d",
"0",
"d.get(1)",
"d.get",
"d",
"1",
"{\n\t\t\t\tcnt+=1;\n\t\t\t}",
"cnt+=1",
"cnt",
"1",
"{\n\t\t\t\tcnt=0;\n\t\t\t}",
"cnt=0",
"cnt",
"0",
"if(cnt>=3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"cnt>=3",
"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\"",
"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\t\tDeque<List<Integer>> D = new ArrayDeque<>();\n\t\tList<Integer> tmp = new ArrayList<Integer>();\n\n\t\tint N=sc.nextInt();\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\ttmp.add(a);\n\t\t\ttmp.add(b);\n\t\t\tD.add(tmp.stream().collect(Collectors.toList()));\n\t\t\ttmp.clear();\n\t\t}\n\t\ttmp=null;\n\n\t\tint cnt=0;\n\t\twhile(D.size()!=0 && cnt<3){\n\t\t\tList<Integer> d =D.poll();\n\t\t\tif(d.get(0)==d.get(1)) {\n\t\t\t\tcnt+=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcnt=0;\n\t\t\t}\n\t\t}\n\t\tif(cnt>=3) {\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\tsc.close();\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tDeque<List<Integer>> D = new ArrayDeque<>();\n\t\tList<Integer> tmp = new ArrayList<Integer>();\n\n\t\tint N=sc.nextInt();\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\ttmp.add(a);\n\t\t\ttmp.add(b);\n\t\t\tD.add(tmp.stream().collect(Collectors.toList()));\n\t\t\ttmp.clear();\n\t\t}\n\t\ttmp=null;\n\n\t\tint cnt=0;\n\t\twhile(D.size()!=0 && cnt<3){\n\t\t\tList<Integer> d =D.poll();\n\t\t\tif(d.get(0)==d.get(1)) {\n\t\t\t\tcnt+=1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcnt=0;\n\t\t\t}\n\t\t}\n\t\tif(cnt>=3) {\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\tsc.close();\n\t}\n}",
"Main"
]
| import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.List;
import java.util.Scanner;
import java.util.stream.Collectors;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
Deque<List<Integer>> D = new ArrayDeque<>();
List<Integer> tmp = new ArrayList<Integer>();
int N=sc.nextInt();
for(int i=0;i<N;i++) {
int a = sc.nextInt();
int b = sc.nextInt();
tmp.add(a);
tmp.add(b);
D.add(tmp.stream().collect(Collectors.toList()));
tmp.clear();
}
tmp=null;
int cnt=0;
while(D.size()!=0 && cnt<3){
List<Integer> d =D.poll();
if(d.get(0)==d.get(1)) {
cnt+=1;
}
else {
cnt=0;
}
}
if(cnt>=3) {
System.out.println("Yes");
}
else {
System.out.println("No");
}
sc.close();
}
}
|
[
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,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
41,
13,
17,
42,
2,
13,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
40,
13,
14,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
4,
18,
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,
12,
13,
30,
29,
4,
18,
13,
4,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
9,
10
],
[
9,
11
],
[
7,
12
],
[
12,
13
],
[
12,
14
],
[
7,
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
],
[
29,
31
],
[
17,
32
],
[
32,
33
],
[
32,
34
],
[
17,
35
],
[
35,
36
],
[
35,
37
],
[
17,
38
],
[
38,
39
],
[
38,
40
],
[
17,
41
],
[
41,
42
],
[
41,
43
],
[
17,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
48,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
59,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
48,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
48,
78
],
[
78,
79
],
[
17,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
80,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
17,
92
],
[
92,
93
],
[
93,
94
],
[
15,
95
],
[
95,
96
],
[
7,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
97,
101
],
[
101,
102
],
[
97,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
109,
111
],
[
103,
112
],
[
112,
113
],
[
97,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
117,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
131,
132
],
[
127,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
116,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
97,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
145,
148
],
[
148,
149
],
[
97,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
157,
158
],
[
97,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
163,
166
],
[
166,
167
]
]
| [
"import java.io.*;\nimport java.util.StringTokenizer;\n\nclass Main {\n static class InputReader {\n BufferedReader reader;\n StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n String next() { // reads in the next string\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 } // reads in the next int\n\n public long nextLong() {\n return Long.parseLong(next());\n } // reads in the next long\n\n public double nextDouble() {\n return Double.parseDouble(next());\n } // reads in the next double\n }\n\n static InputReader r = new InputReader(System.in);\n static PrintWriter pw = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int number_of_rolls = r.nextInt();\n int num1 = 0, num2 = 0, plays = 0, inArow = 0, repeated = 0, notRepeating = 0;\n boolean good = false;\n while (plays < number_of_rolls) {\n num1 = r.nextInt();\n num2 = r.nextInt();\n if (num1 == num2) {\n repeated++;\n } else {\n repeated = 0;\n }\n if (repeated == 3) {\n good = true;\n }\n plays++;\n }\n if (good) {\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }\n\n pw.close(); // flushes the output once printing is done\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"class Main {\n static class InputReader {\n BufferedReader reader;\n StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n String next() { // reads in the next string\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 } // reads in the next int\n\n public long nextLong() {\n return Long.parseLong(next());\n } // reads in the next long\n\n public double nextDouble() {\n return Double.parseDouble(next());\n } // reads in the next double\n }\n\n static InputReader r = new InputReader(System.in);\n static PrintWriter pw = new PrintWriter(System.out);\n\n public static void main(String[] args) {\n int number_of_rolls = r.nextInt();\n int num1 = 0, num2 = 0, plays = 0, inArow = 0, repeated = 0, notRepeating = 0;\n boolean good = false;\n while (plays < number_of_rolls) {\n num1 = r.nextInt();\n num2 = r.nextInt();\n if (num1 == num2) {\n repeated++;\n } else {\n repeated = 0;\n }\n if (repeated == 3) {\n good = true;\n }\n plays++;\n }\n if (good) {\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }\n\n pw.close(); // flushes the output once printing is done\n }\n}",
"Main",
"static InputReader r = new InputReader(System.in);",
"r",
"new InputReader(System.in)",
"static PrintWriter pw = new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"public static void main(String[] args) {\n int number_of_rolls = r.nextInt();\n int num1 = 0, num2 = 0, plays = 0, inArow = 0, repeated = 0, notRepeating = 0;\n boolean good = false;\n while (plays < number_of_rolls) {\n num1 = r.nextInt();\n num2 = r.nextInt();\n if (num1 == num2) {\n repeated++;\n } else {\n repeated = 0;\n }\n if (repeated == 3) {\n good = true;\n }\n plays++;\n }\n if (good) {\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }\n\n pw.close(); // flushes the output once printing is done\n }",
"main",
"{\n int number_of_rolls = r.nextInt();\n int num1 = 0, num2 = 0, plays = 0, inArow = 0, repeated = 0, notRepeating = 0;\n boolean good = false;\n while (plays < number_of_rolls) {\n num1 = r.nextInt();\n num2 = r.nextInt();\n if (num1 == num2) {\n repeated++;\n } else {\n repeated = 0;\n }\n if (repeated == 3) {\n good = true;\n }\n plays++;\n }\n if (good) {\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }\n\n pw.close(); // flushes the output once printing is done\n }",
"int number_of_rolls = r.nextInt();",
"number_of_rolls",
"r.nextInt()",
"r.nextInt",
"r",
"int num1 = 0",
"num1",
"0",
"num2 = 0",
"num2",
"0",
"plays = 0",
"plays",
"0",
"inArow = 0",
"inArow",
"0",
"repeated = 0",
"repeated",
"0",
"notRepeating = 0;",
"notRepeating",
"0",
"boolean good = false;",
"good",
"false",
"while (plays < number_of_rolls) {\n num1 = r.nextInt();\n num2 = r.nextInt();\n if (num1 == num2) {\n repeated++;\n } else {\n repeated = 0;\n }\n if (repeated == 3) {\n good = true;\n }\n plays++;\n }",
"plays < number_of_rolls",
"plays",
"number_of_rolls",
"{\n num1 = r.nextInt();\n num2 = r.nextInt();\n if (num1 == num2) {\n repeated++;\n } else {\n repeated = 0;\n }\n if (repeated == 3) {\n good = true;\n }\n plays++;\n }",
"num1 = r.nextInt()",
"num1",
"r.nextInt()",
"r.nextInt",
"r",
"num2 = r.nextInt()",
"num2",
"r.nextInt()",
"r.nextInt",
"r",
"if (num1 == num2) {\n repeated++;\n } else {\n repeated = 0;\n }",
"num1 == num2",
"num1",
"num2",
"{\n repeated++;\n }",
"repeated++",
"repeated",
"{\n repeated = 0;\n }",
"repeated = 0",
"repeated",
"0",
"if (repeated == 3) {\n good = true;\n }",
"repeated == 3",
"repeated",
"3",
"{\n good = true;\n }",
"good = true",
"good",
"true",
"plays++",
"plays",
"if (good) {\n pw.println(\"Yes\");\n } else {\n pw.println(\"No\");\n }",
"good",
"{\n pw.println(\"Yes\");\n }",
"pw.println(\"Yes\")",
"pw.println",
"pw",
"\"Yes\"",
"{\n pw.println(\"No\");\n }",
"pw.println(\"No\")",
"pw.println",
"pw",
"\"No\"",
"pw.close()",
"pw.close",
"pw",
"String[] args",
"args",
"static class InputReader {\n BufferedReader reader;\n StringTokenizer tokenizer;\n\n public InputReader(InputStream stream) {\n reader = new BufferedReader(new InputStreamReader(stream), 32768);\n tokenizer = null;\n }\n\n String next() { // reads in the next string\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 } // reads in the next int\n\n public long nextLong() {\n return Long.parseLong(next());\n } // reads in the next long\n\n public double nextDouble() {\n return Double.parseDouble(next());\n } // reads in the next double\n }",
"InputReader",
"BufferedReader reader;",
"reader",
"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",
"String next() { // reads in the next string\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",
"{ // reads in the next string\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 } // reads in the next int",
"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 } // reads in the next long",
"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 } // reads in the next double",
"nextDouble",
"{\n return Double.parseDouble(next());\n }",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next"
]
| import java.io.*;
import java.util.StringTokenizer;
class Main {
static class InputReader {
BufferedReader reader;
StringTokenizer tokenizer;
public InputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream), 32768);
tokenizer = null;
}
String next() { // reads in the next string
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());
} // reads in the next int
public long nextLong() {
return Long.parseLong(next());
} // reads in the next long
public double nextDouble() {
return Double.parseDouble(next());
} // reads in the next double
}
static InputReader r = new InputReader(System.in);
static PrintWriter pw = new PrintWriter(System.out);
public static void main(String[] args) {
int number_of_rolls = r.nextInt();
int num1 = 0, num2 = 0, plays = 0, inArow = 0, repeated = 0, notRepeating = 0;
boolean good = false;
while (plays < number_of_rolls) {
num1 = r.nextInt();
num2 = r.nextInt();
if (num1 == num2) {
repeated++;
} else {
repeated = 0;
}
if (repeated == 3) {
good = true;
}
plays++;
}
if (good) {
pw.println("Yes");
} else {
pw.println("No");
}
pw.close(); // flushes the output once printing is done
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
20,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
4,
13,
41,
13,
17,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
17,
14,
2,
18,
13,
17,
18,
13,
17,
30,
40,
13,
14,
2,
13,
17,
0,
13,
17,
30,
0,
13,
17,
14,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
12,
13,
30,
0,
13,
8,
4,
18,
13,
18,
13,
13,
20,
0,
13,
20,
4,
13,
4,
18,
13,
23,
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,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
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,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
0,
18,
13,
13,
4,
13,
13,
29,
13,
23,
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,
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,
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,
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,
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
],
[
631,
20
],
[
631,
21
],
[
21,
22
],
[
631,
23
],
[
23,
24
],
[
631,
25
],
[
25,
26
],
[
25,
27
],
[
631,
28
],
[
28,
29
],
[
28,
30
],
[
631,
32
],
[
32,
33
],
[
32,
34
],
[
631,
35
],
[
35,
36
],
[
35,
37
],
[
631,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
40,
48
],
[
48,
49
],
[
48,
50
],
[
40,
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
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
74,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
84,
86
],
[
69,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
40,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
91,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
631,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
108,
112
],
[
112,
113
],
[
112,
114
],
[
108,
115
],
[
105,
116
],
[
116,
117
],
[
116,
118
],
[
105,
119
],
[
119,
120
],
[
105,
121
],
[
121,
122
],
[
122,
123
],
[
103,
124
],
[
124,
125
],
[
631,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
132,
133
],
[
129,
134
],
[
134,
135
],
[
128,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
136,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
144,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
154,
155
],
[
153,
156
],
[
140,
157
],
[
157,
158
],
[
158,
159
],
[
158,
160
],
[
157,
161
],
[
161,
162
],
[
162,
163
],
[
128,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
631,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
174,
178
],
[
178,
179
],
[
178,
180
],
[
169,
181
],
[
181,
182
],
[
631,
183
],
[
183,
184
],
[
183,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
188,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
190,
195
],
[
195,
196
],
[
189,
197
],
[
197,
198
],
[
197,
199
],
[
185,
200
],
[
200,
201
],
[
631,
202
],
[
202,
203
],
[
202,
204
],
[
204,
205
],
[
205,
206
],
[
206,
207
],
[
207,
208
],
[
206,
209
],
[
209,
210
],
[
631,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
631,
217
],
[
217,
218
],
[
217,
219
],
[
219,
220
],
[
220,
221
],
[
220,
222
],
[
222,
223
],
[
219,
224
],
[
224,
225
],
[
224,
226
],
[
219,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
229,
231
],
[
227,
232
],
[
232,
233
],
[
233,
234
],
[
234,
235
],
[
233,
236
],
[
232,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
219,
241
],
[
241,
242
],
[
242,
243
],
[
243,
244
],
[
631,
245
],
[
245,
246
],
[
245,
247
],
[
247,
248
],
[
248,
249
],
[
248,
250
],
[
247,
252
],
[
252,
253
],
[
252,
254
],
[
254,
255
],
[
247,
256
],
[
256,
257
],
[
256,
258
],
[
247,
259
],
[
259,
260
],
[
260,
261
],
[
261,
262
],
[
261,
263
],
[
260,
264
],
[
264,
265
],
[
265,
266
],
[
265,
267
],
[
259,
268
],
[
268,
269
],
[
269,
270
],
[
270,
271
],
[
270,
272
],
[
272,
273
],
[
269,
274
],
[
268,
275
],
[
275,
276
],
[
275,
277
],
[
277,
278
],
[
247,
279
],
[
279,
280
],
[
280,
281
],
[
281,
282
],
[
281,
283
],
[
280,
284
],
[
280,
285
],
[
285,
286
],
[
286,
287
],
[
285,
288
],
[
285,
289
],
[
245,
290
],
[
290,
291
],
[
631,
292
],
[
292,
293
],
[
292,
294
],
[
294,
295
],
[
295,
296
],
[
295,
297
],
[
294,
299
],
[
299,
300
],
[
300,
301
],
[
301,
302
],
[
301,
303
],
[
299,
304
],
[
304,
305
],
[
304,
306
],
[
299,
307
],
[
307,
308
],
[
308,
309
],
[
299,
310
],
[
310,
311
],
[
311,
312
],
[
312,
313
],
[
312,
314
],
[
311,
315
],
[
315,
316
],
[
315,
317
],
[
294,
318
],
[
318,
319
],
[
292,
320
],
[
320,
321
],
[
292,
322
],
[
322,
323
],
[
631,
324
],
[
324,
325
],
[
324,
326
],
[
326,
327
],
[
327,
328
],
[
327,
329
],
[
326,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
331,
336
],
[
336,
337
],
[
336,
338
],
[
331,
339
],
[
339,
340
],
[
340,
341
],
[
331,
342
],
[
342,
343
],
[
343,
344
],
[
344,
345
],
[
344,
346
],
[
343,
347
],
[
347,
348
],
[
326,
349
],
[
349,
350
],
[
324,
351
],
[
351,
352
],
[
631,
353
],
[
353,
354
],
[
353,
355
],
[
355,
356
],
[
356,
357
],
[
356,
358
],
[
355,
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
],
[
373,
374
],
[
373,
375
],
[
372,
376
],
[
376,
377
],
[
355,
378
],
[
378,
379
],
[
353,
380
],
[
380,
381
],
[
631,
382
],
[
382,
383
],
[
382,
384
],
[
384,
385
],
[
385,
386
],
[
385,
387
],
[
384,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
392,
394
],
[
390,
395
],
[
395,
396
],
[
395,
397
],
[
390,
398
],
[
398,
399
],
[
399,
400
],
[
390,
401
],
[
402,
402
],
[
402,
403
],
[
403,
404
],
[
404,
405
],
[
405,
406
],
[
405,
407
],
[
403,
408
],
[
408,
409
],
[
408,
410
],
[
403,
411
],
[
411,
412
],
[
412,
413
],
[
403,
414
],
[
415,
415
],
[
415,
416
],
[
416,
417
],
[
417,
418
],
[
418,
419
],
[
418,
420
],
[
417,
421
],
[
416,
422
],
[
422,
423
],
[
384,
424
],
[
424,
425
],
[
382,
426
],
[
426,
427
],
[
382,
428
],
[
428,
429
],
[
631,
430
],
[
430,
431
],
[
430,
432
],
[
432,
433
],
[
433,
434
],
[
433,
435
],
[
432,
438
],
[
438,
439
],
[
439,
440
],
[
440,
441
],
[
440,
442
],
[
438,
443
],
[
443,
444
],
[
443,
445
],
[
438,
446
],
[
446,
447
],
[
447,
448
],
[
438,
449
],
[
450,
450
],
[
450,
451
],
[
451,
452
],
[
452,
453
],
[
453,
454
],
[
453,
455
],
[
451,
456
],
[
456,
457
],
[
456,
458
],
[
451,
459
],
[
459,
460
],
[
460,
461
],
[
451,
462
],
[
463,
463
],
[
463,
464
],
[
464,
465
],
[
465,
466
],
[
466,
467
],
[
466,
468
],
[
465,
469
],
[
464,
470
],
[
470,
471
],
[
432,
472
],
[
472,
473
],
[
430,
474
],
[
474,
475
],
[
430,
476
],
[
476,
477
],
[
631,
478
],
[
478,
479
],
[
478,
480
],
[
480,
481
],
[
481,
482
],
[
481,
483
],
[
480,
484
],
[
484,
485
],
[
480,
486
],
[
486,
487
],
[
486,
488
],
[
480,
489
],
[
489,
490
],
[
490,
491
],
[
491,
492
],
[
492,
493
],
[
492,
494
],
[
494,
495
],
[
491,
496
],
[
496,
497
],
[
490,
498
],
[
498,
499
],
[
499,
500
],
[
500,
501
],
[
501,
502
],
[
501,
503
],
[
500,
504
],
[
504,
505
],
[
504,
506
],
[
499,
507
],
[
507,
508
],
[
507,
509
],
[
480,
510
],
[
510,
511
],
[
511,
512
],
[
511,
513
],
[
510,
514
],
[
514,
515
],
[
515,
516
],
[
515,
517
],
[
514,
518
],
[
518,
519
],
[
518,
520
],
[
520,
521
],
[
480,
522
],
[
522,
523
],
[
522,
524
],
[
524,
525
],
[
525,
526
],
[
526,
527
],
[
527,
528
],
[
527,
529
],
[
526,
530
],
[
530,
531
],
[
530,
532
],
[
525,
533
],
[
533,
534
],
[
534,
535
],
[
534,
536
],
[
536,
537
],
[
537,
538
],
[
537,
539
],
[
536,
540
],
[
540,
541
],
[
540,
542
],
[
525,
543
],
[
543,
544
],
[
544,
545
],
[
545,
546
],
[
545,
547
],
[
547,
548
],
[
545,
549
],
[
524,
550
],
[
550,
551
],
[
550,
552
],
[
552,
553
],
[
631,
554
],
[
554,
555
],
[
554,
556
],
[
556,
557
],
[
557,
558
],
[
557,
559
],
[
556,
560
],
[
560,
561
],
[
556,
562
],
[
562,
563
],
[
562,
564
],
[
556,
565
],
[
565,
566
],
[
566,
567
],
[
567,
568
],
[
568,
569
],
[
568,
570
],
[
570,
571
],
[
567,
572
],
[
572,
573
],
[
566,
574
],
[
574,
575
],
[
575,
576
],
[
576,
577
],
[
577,
578
],
[
577,
579
],
[
576,
580
],
[
580,
581
],
[
580,
582
],
[
575,
583
],
[
583,
584
],
[
583,
585
],
[
556,
586
],
[
586,
587
],
[
587,
588
],
[
587,
589
],
[
586,
590
],
[
590,
591
],
[
591,
592
],
[
591,
593
],
[
590,
594
],
[
594,
595
],
[
594,
596
],
[
596,
597
],
[
556,
598
],
[
598,
599
],
[
598,
600
],
[
600,
601
],
[
601,
602
],
[
602,
603
],
[
603,
604
],
[
603,
605
],
[
602,
606
],
[
606,
607
],
[
606,
608
],
[
601,
609
],
[
609,
610
],
[
610,
611
],
[
610,
612
],
[
612,
613
],
[
613,
614
],
[
613,
615
],
[
612,
616
],
[
616,
617
],
[
616,
618
],
[
601,
619
],
[
619,
620
],
[
620,
621
],
[
621,
622
],
[
621,
623
],
[
623,
624
],
[
621,
625
],
[
600,
626
],
[
626,
627
],
[
626,
628
],
[
628,
629
],
[
0,
630
],
[
630,
631
],
[
630,
632
]
]
| [
"import java.io.ByteArrayInputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.InputMismatchException;\n\npublic class Main {\n\tstatic void solve() {\n\t\tint n = ni();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a[] = na(2);\n\t\t\tif (a[0] == a[1]) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\t\n\t\tif (flg) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\n\t}\t\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t}\n\t//input\n\tstatic InputStream is;\n\tstatic PrintWriter out;\n\tstatic String INPUT = \"\";\n\tprivate static byte[] inbuf = new byte[1024];\n\tstatic int lenbuf = 0, ptrbuf = 0;\n\tprivate static int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\tprivate static boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\tprivate static int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static char nc() {\n\t\treturn (char) skip();\n\t}\n\tprivate static String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\tprivate static char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static long[] nla(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static int[][] nas(int n, int m){\n\t\tint[][] res = new int[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = ni();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static long[][] nlas(int n, int m){\n\t\tlong[][] res = new long[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = nl();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n}",
"import java.io.ByteArrayInputStream;",
"ByteArrayInputStream",
"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.util.Arrays;",
"Arrays",
"java.util",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"public class Main {\n\tstatic void solve() {\n\t\tint n = ni();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a[] = na(2);\n\t\t\tif (a[0] == a[1]) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\t\n\t\tif (flg) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\n\t}\t\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t}\n\t//input\n\tstatic InputStream is;\n\tstatic PrintWriter out;\n\tstatic String INPUT = \"\";\n\tprivate static byte[] inbuf = new byte[1024];\n\tstatic int lenbuf = 0, ptrbuf = 0;\n\tprivate static int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\tprivate static boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\tprivate static int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static char nc() {\n\t\treturn (char) skip();\n\t}\n\tprivate static String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\tprivate static char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static long[] nla(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static int[][] nas(int n, int m){\n\t\tint[][] res = new int[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = ni();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static long[][] nlas(int n, int m){\n\t\tlong[][] res = new long[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = nl();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n}",
"Main",
"//input\n\tstatic InputStream is;",
"is",
"static PrintWriter out;",
"out",
"static String INPUT = \"\";",
"INPUT",
"\"\"",
"private static byte[] inbuf = new byte[1024];",
"inbuf",
"new byte[1024]",
"1024",
"static int lenbuf = 0",
"lenbuf",
"0",
"ptrbuf = 0;",
"ptrbuf",
"0",
"static void solve() {\n\t\tint n = ni();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a[] = na(2);\n\t\t\tif (a[0] == a[1]) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\t\n\t\tif (flg) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\n\t}",
"solve",
"{\n\t\tint n = ni();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a[] = na(2);\n\t\t\tif (a[0] == a[1]) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\t\n\t\tif (flg) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\n\t}",
"int n = ni();",
"n",
"ni()",
"ni",
"int cnt = 0;",
"cnt",
"0",
"boolean flg = false;",
"flg",
"false",
"for (int i = 0; i < n; i++) {\n\t\t\tint a[] = na(2);\n\t\t\tif (a[0] == a[1]) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\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 a[] = na(2);\n\t\t\tif (a[0] == a[1]) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tint a[] = na(2);\n\t\t\tif (a[0] == a[1]) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}",
"int a[] = na(2);",
"a",
"na(2)",
"na",
"2",
"if (a[0] == a[1]) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}",
"a[0] == a[1]",
"a[0]",
"a",
"0",
"a[1]",
"a",
"1",
"{\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\n\t\t\t}",
"cnt++",
"cnt",
"if (cnt == 3) flg = true;",
"cnt == 3",
"cnt",
"3",
"flg = true",
"flg",
"true",
"{\n\t\t\t\tcnt = 0;\n\t\t\t}",
"cnt = 0",
"cnt",
"0",
"if (flg) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}",
"flg",
"{\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\"",
"public static void main(String[] args) throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t}",
"main",
"{\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t}",
"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)",
"solve()",
"solve",
"out.flush()",
"out.flush",
"out",
"String[] args",
"args",
"private static int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}",
"readByte",
"{\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}",
"if (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();",
"lenbuf == -1",
"lenbuf",
"-1",
"1",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}",
"ptrbuf >= lenbuf",
"ptrbuf",
"lenbuf",
"{\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}",
"ptrbuf = 0",
"ptrbuf",
"0",
"try {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}",
"catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}",
"IOException e",
"{\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t}",
"lenbuf = is.read(inbuf)",
"lenbuf",
"is.read(inbuf)",
"is.read",
"is",
"inbuf",
"if (lenbuf <= 0)\n\t\t\t\treturn -1;",
"lenbuf <= 0",
"lenbuf",
"0",
"return -1;",
"-1",
"1",
"return inbuf[ptrbuf++];",
"inbuf[ptrbuf++]",
"inbuf",
"ptrbuf++",
"ptrbuf",
"private static boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}",
"isSpaceChar",
"{\n\t\treturn !(c >= 33 && c <= 126);\n\t}",
"return !(c >= 33 && c <= 126);",
"!(c >= 33 && c <= 126)",
"(c >= 33 && c <= 126)",
"c >= 33",
"c",
"33",
"c <= 126",
"c",
"126",
"int c",
"c",
"private static int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}",
"skip",
"{\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}",
"int b;",
"b",
"while ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;",
"(b = readByte()) != -1 && isSpaceChar(b)",
"(b = readByte()) != -1",
"(b = readByte())",
"b",
"readByte()",
"readByte",
"-1",
"1",
"isSpaceChar(b)",
"isSpaceChar",
"b",
"return b;",
"b",
"@SuppressWarnings(\"unused\")\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}",
"nd",
"{\n\t\treturn Double.parseDouble(ns());\n\t}",
"return Double.parseDouble(ns());",
"Double.parseDouble(ns())",
"Double.parseDouble",
"Double",
"ns()",
"ns",
"@SuppressWarnings(\"unused\")\n\tprivate static char nc() {\n\t\treturn (char) skip();\n\t}",
"nc",
"{\n\t\treturn (char) skip();\n\t}",
"return (char) skip();",
"(char) skip()",
"skip",
"private static String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}",
"ns",
"{\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}",
"int b = skip();",
"b",
"skip()",
"skip",
"StringBuilder sb = new StringBuilder();",
"sb",
"new StringBuilder()",
"while (!(isSpaceChar(b))) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}",
"!(isSpaceChar(b))",
"(isSpaceChar(b))",
"isSpaceChar",
"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",
"private static char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}",
"ns",
"{\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}",
"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\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}",
"p < n && !(isSpaceChar(b))",
"p < n",
"p",
"n",
"!(isSpaceChar(b))",
"(isSpaceChar(b))",
"isSpaceChar",
"b",
"{\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}",
"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",
"@SuppressWarnings(\"unused\")\n\tprivate static char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}",
"nm",
"{\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}",
"char[][] map = new char[n][];",
"map",
"new char[n][]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"map[i] = ns(m);",
"map[i] = ns(m)",
"map[i]",
"map",
"i",
"ns(m)",
"ns",
"m",
"return map;",
"map",
"int n",
"n",
"int m",
"m",
"@SuppressWarnings(\"unused\")\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}",
"na",
"{\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\ta[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]",
"a",
"i",
"ni()",
"ni",
"return a;",
"a",
"int n",
"n",
"@SuppressWarnings(\"unused\")\n\tprivate static long[] nla(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}",
"nla",
"{\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}",
"long[] a = new long[n];",
"a",
"new long[n]",
"n",
"for (int i = 0; i < n; i++)\n\t\t\ta[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]",
"a",
"i",
"nl()",
"nl",
"return a;",
"a",
"int n",
"n",
"@SuppressWarnings(\"unused\")\n\tprivate static int[][] nas(int n, int m){\n\t\tint[][] res = new int[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = ni();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"nas",
"{\n\t\tint[][] res = new int[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = ni();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"int[][] res = new int[n][m];",
"res",
"new int[n][m]",
"n",
"m",
"for(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = ni();\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<m;j++) {\n\t\t\t\tres[i][j] = ni();\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = ni();\n\t\t\t}\n\t\t}",
"for(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = ni();\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<m",
"j",
"m",
"j++",
"j++",
"j",
"{\n\t\t\t\tres[i][j] = ni();\n\t\t\t}",
"{\n\t\t\t\tres[i][j] = ni();\n\t\t\t}",
"res[i][j] = ni()",
"res[i][j]",
"res[i]",
"res",
"i",
"j",
"ni()",
"ni",
"return res;",
"res",
"int n",
"n",
"int m",
"m",
"@SuppressWarnings(\"unused\")\n\tprivate static long[][] nlas(int n, int m){\n\t\tlong[][] res = new long[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = nl();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"nlas",
"{\n\t\tlong[][] res = new long[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = nl();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}",
"long[][] res = new long[n][m];",
"res",
"new long[n][m]",
"n",
"m",
"for(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = nl();\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<m;j++) {\n\t\t\t\tres[i][j] = nl();\n\t\t\t}\n\t\t}",
"{\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = nl();\n\t\t\t}\n\t\t}",
"for(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = nl();\n\t\t\t}",
"int j=0;",
"int j=0;",
"j",
"0",
"j<m",
"j",
"m",
"j++",
"j++",
"j",
"{\n\t\t\t\tres[i][j] = nl();\n\t\t\t}",
"{\n\t\t\t\tres[i][j] = nl();\n\t\t\t}",
"res[i][j] = nl()",
"res[i][j]",
"res[i]",
"res",
"i",
"j",
"nl()",
"nl",
"return res;",
"res",
"int n",
"n",
"int m",
"m",
"@SuppressWarnings(\"unused\")\n\tprivate static int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}",
"ni",
"{\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}",
"int num = 0",
"num",
"0",
"b;",
"b",
"boolean minus = false;",
"minus",
"false",
"while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;",
"(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\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",
"while (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}",
"true",
"{\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}",
"if (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}",
"b >= '0' && b <= '9'",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"{\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t}",
"num = num * 10 + (b - '0')",
"num",
"num * 10 + (b - '0')",
"num * 10",
"num",
"10",
"(b - '0')",
"b",
"'0'",
"{\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}",
"return minus ? -num : num;",
"minus ? -num : num",
"minus",
"-num",
"num",
"num",
"b = readByte()",
"b",
"readByte()",
"readByte",
"@SuppressWarnings(\"unused\")\n\tprivate static long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}",
"nl",
"{\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}",
"long num = 0;",
"num",
"0",
"int b;",
"b",
"boolean minus = false;",
"minus",
"false",
"while ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;",
"(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\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",
"while (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}",
"true",
"{\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}",
"if (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}",
"b >= '0' && b <= '9'",
"b >= '0'",
"b",
"'0'",
"b <= '9'",
"b",
"'9'",
"{\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t}",
"num = num * 10 + (b - '0')",
"num",
"num * 10 + (b - '0')",
"num * 10",
"num",
"10",
"(b - '0')",
"b",
"'0'",
"{\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}",
"return minus ? -num : num;",
"minus ? -num : num",
"minus",
"-num",
"num",
"num",
"b = readByte()",
"b",
"readByte()",
"readByte",
"public class Main {\n\tstatic void solve() {\n\t\tint n = ni();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a[] = na(2);\n\t\t\tif (a[0] == a[1]) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\t\n\t\tif (flg) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\n\t}\t\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t}\n\t//input\n\tstatic InputStream is;\n\tstatic PrintWriter out;\n\tstatic String INPUT = \"\";\n\tprivate static byte[] inbuf = new byte[1024];\n\tstatic int lenbuf = 0, ptrbuf = 0;\n\tprivate static int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\tprivate static boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\tprivate static int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static char nc() {\n\t\treturn (char) skip();\n\t}\n\tprivate static String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\tprivate static char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static long[] nla(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static int[][] nas(int n, int m){\n\t\tint[][] res = new int[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = ni();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static long[][] nlas(int n, int m){\n\t\tlong[][] res = new long[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = nl();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n}",
"public class Main {\n\tstatic void solve() {\n\t\tint n = ni();\n\t\tint cnt = 0;\n\t\tboolean flg = false;\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tint a[] = na(2);\n\t\t\tif (a[0] == a[1]) {\n\t\t\t\tcnt++;\n\t\t\t\tif (cnt == 3) flg = true;\n\t\t\t} else {\n\t\t\t\tcnt = 0;\n\t\t\t}\n\t\t}\t\n\t\tif (flg) {\n\t\t\tout.println(\"Yes\");\n\t\t} else {\n\t\t\tout.println(\"No\");\n\t\t}\n\n\t}\t\n\n\tpublic static void main(String[] args) throws Exception {\n\t\tis = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());\n\t\tout = new PrintWriter(System.out);\n\t\tsolve();\n\t\tout.flush();\n\t}\n\t//input\n\tstatic InputStream is;\n\tstatic PrintWriter out;\n\tstatic String INPUT = \"\";\n\tprivate static byte[] inbuf = new byte[1024];\n\tstatic int lenbuf = 0, ptrbuf = 0;\n\tprivate static int readByte() {\n\t\tif (lenbuf == -1)\n\t\t\tthrow new InputMismatchException();\n\t\tif (ptrbuf >= lenbuf) {\n\t\t\tptrbuf = 0;\n\t\t\ttry {\n\t\t\t\tlenbuf = is.read(inbuf);\n\t\t\t} catch (IOException e) {\n\t\t\t\tthrow new InputMismatchException();\n\t\t\t}\n\t\t\tif (lenbuf <= 0)\n\t\t\t\treturn -1;\n\t\t}\n\t\treturn inbuf[ptrbuf++];\n\t}\n\tprivate static boolean isSpaceChar(int c) {\n\t\treturn !(c >= 33 && c <= 126);\n\t}\n\tprivate static int skip() {\n\t\tint b;\n\t\twhile ((b = readByte()) != -1 && isSpaceChar(b))\n\t\t\t;\n\t\treturn b;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static double nd() {\n\t\treturn Double.parseDouble(ns());\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static char nc() {\n\t\treturn (char) skip();\n\t}\n\tprivate static String ns() {\n\t\tint b = skip();\n\t\tStringBuilder sb = new StringBuilder();\n\t\twhile (!(isSpaceChar(b))) {\n\t\t\tsb.appendCodePoint(b);\n\t\t\tb = readByte();\n\t\t}\n\t\treturn sb.toString();\n\t}\n\tprivate static char[] ns(int n) {\n\t\tchar[] buf = new char[n];\n\t\tint b = skip(), p = 0;\n\t\twhile (p < n && !(isSpaceChar(b))) {\n\t\t\tbuf[p++] = (char) b;\n\t\t\tb = readByte();\n\t\t}\n\t\treturn n == p ? buf : Arrays.copyOf(buf, p);\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static char[][] nm(int n, int m) {\n\t\tchar[][] map = new char[n][];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tmap[i] = ns(m);\n\t\treturn map;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static int[] na(int n) {\n\t\tint[] a = new int[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = ni();\n\t\treturn a;\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static long[] nla(int n) {\n\t\tlong[] a = new long[n];\n\t\tfor (int i = 0; i < n; i++)\n\t\t\ta[i] = nl();\n\t\treturn a;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static int[][] nas(int n, int m){\n\t\tint[][] res = new int[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = ni();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static long[][] nlas(int n, int m){\n\t\tlong[][] res = new long[n][m];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\tfor(int j=0;j<m;j++) {\n\t\t\t\tres[i][j] = nl();\n\t\t\t}\n\t\t}\n\t\treturn res;\n\t}\n\t\n\t@SuppressWarnings(\"unused\")\n\tprivate static int ni() {\n\t\tint num = 0, b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n\t@SuppressWarnings(\"unused\")\n\tprivate static long nl() {\n\t\tlong num = 0;\n\t\tint b;\n\t\tboolean minus = false;\n\t\twhile ((b = readByte()) != -1 && !((b >= '0' && b <= '9') || b == '-'))\n\t\t\t;\n\t\tif (b == '-') {\n\t\t\tminus = true;\n\t\t\tb = readByte();\n\t\t}\n\t\t\n\t\twhile (true) {\n\t\t\tif (b >= '0' && b <= '9') {\n\t\t\t\tnum = num * 10 + (b - '0');\n\t\t\t} else {\n\t\t\t\treturn minus ? -num : num;\n\t\t\t}\n\t\t\tb = readByte();\n\t\t}\n\t}\n}",
"Main"
]
| import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
public class Main {
static void solve() {
int n = ni();
int cnt = 0;
boolean flg = false;
for (int i = 0; i < n; i++) {
int a[] = na(2);
if (a[0] == a[1]) {
cnt++;
if (cnt == 3) flg = true;
} else {
cnt = 0;
}
}
if (flg) {
out.println("Yes");
} else {
out.println("No");
}
}
public static void main(String[] args) throws Exception {
is = INPUT.isEmpty() ? System.in : new ByteArrayInputStream(INPUT.getBytes());
out = new PrintWriter(System.out);
solve();
out.flush();
}
//input
static InputStream is;
static PrintWriter out;
static String INPUT = "";
private static byte[] inbuf = new byte[1024];
static int lenbuf = 0, ptrbuf = 0;
private static 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++];
}
private static boolean isSpaceChar(int c) {
return !(c >= 33 && c <= 126);
}
private static int skip() {
int b;
while ((b = readByte()) != -1 && isSpaceChar(b))
;
return b;
}
@SuppressWarnings("unused")
private static double nd() {
return Double.parseDouble(ns());
}
@SuppressWarnings("unused")
private static char nc() {
return (char) skip();
}
private static String ns() {
int b = skip();
StringBuilder sb = new StringBuilder();
while (!(isSpaceChar(b))) {
sb.appendCodePoint(b);
b = readByte();
}
return sb.toString();
}
private static 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);
}
@SuppressWarnings("unused")
private static char[][] nm(int n, int m) {
char[][] map = new char[n][];
for (int i = 0; i < n; i++)
map[i] = ns(m);
return map;
}
@SuppressWarnings("unused")
private static int[] na(int n) {
int[] a = new int[n];
for (int i = 0; i < n; i++)
a[i] = ni();
return a;
}
@SuppressWarnings("unused")
private static long[] nla(int n) {
long[] a = new long[n];
for (int i = 0; i < n; i++)
a[i] = nl();
return a;
}
@SuppressWarnings("unused")
private static int[][] nas(int n, int m){
int[][] res = new int[n][m];
for(int i=0;i<n;i++) {
for(int j=0;j<m;j++) {
res[i][j] = ni();
}
}
return res;
}
@SuppressWarnings("unused")
private static long[][] nlas(int n, int m){
long[][] res = new long[n][m];
for(int i=0;i<n;i++) {
for(int j=0;j<m;j++) {
res[i][j] = nl();
}
}
return res;
}
@SuppressWarnings("unused")
private static 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();
}
}
@SuppressWarnings("unused")
private static 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();
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
12,
13,
30,
41,
13,
20,
41,
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,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
14,
2,
2,
2,
13,
13,
2,
13,
17,
2,
13,
17,
30,
0,
13,
17,
14,
2,
2,
13,
13,
2,
13,
17,
30,
0,
13,
17,
14,
2,
13,
13,
30,
0,
13,
17,
14,
2,
13,
13,
30,
0,
13,
17,
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
],
[
120,
5
],
[
120,
6
],
[
6,
7
],
[
6,
8
],
[
120,
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
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
41,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
41,
52
],
[
52,
53
],
[
54,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
54,
61
],
[
61,
62
],
[
61,
63
],
[
52,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
52,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
73,
75
],
[
68,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
68,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
41,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
96,
98
],
[
11,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
104,
109
],
[
99,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
9,
117
],
[
117,
118
],
[
0,
119
],
[
119,
120
],
[
119,
121
]
]
| [
"\nimport java.util.Scanner;\n\npublic class Main {\n\n public Main() {\n }\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\nint N=scan.nextInt();\nint u1=0;\n int u2=0;\n int u3=0;\n\nfor(int i=0;i<N;i++) {\n int a = scan.nextInt();\n int b = scan.nextInt();\n if (a == b && u1 == 1 && u2 == 1) {\n u3 = 1; }\n else if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}\nif(a!=b){u1=0;\nu2=0;\n}\n}\nif(u3==1){System.out.println(\"Yes\");}\n\nelse{System.out.println(\"No\");}\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public Main() {\n }\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\nint N=scan.nextInt();\nint u1=0;\n int u2=0;\n int u3=0;\n\nfor(int i=0;i<N;i++) {\n int a = scan.nextInt();\n int b = scan.nextInt();\n if (a == b && u1 == 1 && u2 == 1) {\n u3 = 1; }\n else if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}\nif(a!=b){u1=0;\nu2=0;\n}\n}\nif(u3==1){System.out.println(\"Yes\");}\n\nelse{System.out.println(\"No\");}\n }\n}",
"Main",
"public Main() {\n }",
"Main",
"{\n }",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\nint N=scan.nextInt();\nint u1=0;\n int u2=0;\n int u3=0;\n\nfor(int i=0;i<N;i++) {\n int a = scan.nextInt();\n int b = scan.nextInt();\n if (a == b && u1 == 1 && u2 == 1) {\n u3 = 1; }\n else if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}\nif(a!=b){u1=0;\nu2=0;\n}\n}\nif(u3==1){System.out.println(\"Yes\");}\n\nelse{System.out.println(\"No\");}\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\nint N=scan.nextInt();\nint u1=0;\n int u2=0;\n int u3=0;\n\nfor(int i=0;i<N;i++) {\n int a = scan.nextInt();\n int b = scan.nextInt();\n if (a == b && u1 == 1 && u2 == 1) {\n u3 = 1; }\n else if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}\nif(a!=b){u1=0;\nu2=0;\n}\n}\nif(u3==1){System.out.println(\"Yes\");}\n\nelse{System.out.println(\"No\");}\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N=scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int u1=0;",
"u1",
"0",
"int u2=0;",
"u2",
"0",
"int u3=0;",
"u3",
"0",
"for(int i=0;i<N;i++) {\n int a = scan.nextInt();\n int b = scan.nextInt();\n if (a == b && u1 == 1 && u2 == 1) {\n u3 = 1; }\n else if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}\nif(a!=b){u1=0;\nu2=0;\n}\n}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int a = scan.nextInt();\n int b = scan.nextInt();\n if (a == b && u1 == 1 && u2 == 1) {\n u3 = 1; }\n else if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}\nif(a!=b){u1=0;\nu2=0;\n}\n}",
"{\n int a = scan.nextInt();\n int b = scan.nextInt();\n if (a == b && u1 == 1 && u2 == 1) {\n u3 = 1; }\n else if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}\nif(a!=b){u1=0;\nu2=0;\n}\n}",
"int a = scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b = scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if (a == b && u1 == 1 && u2 == 1) {\n u3 = 1; }\n else if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}",
"a == b && u1 == 1 && u2 == 1",
"a == b && u1 == 1 && u2 == 1",
"a == b",
"a",
"b",
"u1 == 1",
"u1",
"1",
"u2 == 1",
"u2",
"1",
"{\n u3 = 1; }",
"u3 = 1",
"u3",
"1",
"if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}",
"a == b && u1 == 1",
"a == b",
"a",
"b",
"u1 == 1",
"u1",
"1",
"{u2=1;\n }",
"u2=1",
"u2",
"1",
"if(a == b){u1=1;}",
"a == b",
"a",
"b",
"{u1=1;}",
"u1=1",
"u1",
"1",
"if(a!=b){u1=0;\nu2=0;\n}",
"a!=b",
"a",
"b",
"{u1=0;\nu2=0;\n}",
"u1=0",
"u1",
"0",
"u2=0",
"u2",
"0",
"if(u3==1){System.out.println(\"Yes\");}\n\nelse{System.out.println(\"No\");}",
"u3==1",
"u3",
"1",
"{System.out.println(\"Yes\");}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"{System.out.println(\"No\");}",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n public Main() {\n }\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\nint N=scan.nextInt();\nint u1=0;\n int u2=0;\n int u3=0;\n\nfor(int i=0;i<N;i++) {\n int a = scan.nextInt();\n int b = scan.nextInt();\n if (a == b && u1 == 1 && u2 == 1) {\n u3 = 1; }\n else if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}\nif(a!=b){u1=0;\nu2=0;\n}\n}\nif(u3==1){System.out.println(\"Yes\");}\n\nelse{System.out.println(\"No\");}\n }\n}",
"public class Main {\n\n public Main() {\n }\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\nint N=scan.nextInt();\nint u1=0;\n int u2=0;\n int u3=0;\n\nfor(int i=0;i<N;i++) {\n int a = scan.nextInt();\n int b = scan.nextInt();\n if (a == b && u1 == 1 && u2 == 1) {\n u3 = 1; }\n else if(a == b && u1 == 1) {u2=1;\n }\nelse if(a == b){u1=1;}\nif(a!=b){u1=0;\nu2=0;\n}\n}\nif(u3==1){System.out.println(\"Yes\");}\n\nelse{System.out.println(\"No\");}\n }\n}",
"Main"
]
|
import java.util.Scanner;
public class Main {
public Main() {
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int N=scan.nextInt();
int u1=0;
int u2=0;
int u3=0;
for(int i=0;i<N;i++) {
int a = scan.nextInt();
int b = scan.nextInt();
if (a == b && u1 == 1 && u2 == 1) {
u3 = 1; }
else if(a == b && u1 == 1) {u2=1;
}
else if(a == b){u1=1;}
if(a!=b){u1=0;
u2=0;
}
}
if(u3==1){System.out.println("Yes");}
else{System.out.println("No");}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
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,
6,
13,
12,
13,
30,
41,
13,
20,
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,
4,
18,
13,
20,
14,
2,
4,
18,
13,
17,
30,
41,
13,
17,
28,
13,
13,
30,
30,
14,
2,
18,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
0,
13,
17,
3,
4,
18,
13,
14,
13,
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
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
10,
14
],
[
14,
15
],
[
10,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
18,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
16,
29
],
[
29,
30
],
[
16,
31
],
[
31,
32
],
[
0,
33
],
[
136,
34
],
[
136,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
41,
43
],
[
37,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
37,
49
],
[
49,
50
],
[
49,
51
],
[
37,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
57,
59
],
[
52,
60
],
[
60,
61
],
[
61,
62
],
[
52,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
64,
75
],
[
75,
76
],
[
76,
77
],
[
75,
78
],
[
64,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
80,
84
],
[
79,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
89,
91
],
[
89,
92
],
[
93,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
94,
102
],
[
102,
103
],
[
103,
104
],
[
85,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
85,
114
],
[
114,
115
],
[
115,
116
],
[
37,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
117,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
127,
132
],
[
35,
133
],
[
133,
134
],
[
0,
135
],
[
135,
136
],
[
135,
137
]
]
| [
"import java.util.LinkedList;\nimport java.util.Queue;\nimport java.util.Scanner;\n\nclass Pair {\n public int first;\n public int second;\n\n public Pair(int first, int second) {\n this.first = first;\n this.second = second;\n }\n}\n\npublic class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n Queue<Pair> q = new LinkedList<Pair>();\n\n int n = scanner.nextInt();\n\n boolean doublet = false;\n\n for (int i = 0 ; i < n ; i++) {\n int d1 = scanner.nextInt();\n int d2 = scanner.nextInt();\n\n q.add(new Pair(d1,d2));\n if (q.size() >= 3) {\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }\n }\n\n if (doublet) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.LinkedList;",
"LinkedList",
"java.util",
"import java.util.Queue;",
"Queue",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Pair {\n public int first;\n public int second;\n\n public Pair(int first, int second) {\n this.first = first;\n this.second = second;\n }\n}",
"Pair",
"public int first;",
"first",
"public int second;",
"second",
"public Pair(int first, int second) {\n this.first = first;\n this.second = second;\n }",
"Pair",
"{\n this.first = first;\n this.second = second;\n }",
"this.first = first",
"this.first",
"this",
"this.first",
"first",
"this.second = second",
"this.second",
"this",
"this.second",
"second",
"int first",
"first",
"int second",
"second",
"public class Main {\n public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\n\n Queue<Pair> q = new LinkedList<Pair>();\n\n int n = scanner.nextInt();\n\n boolean doublet = false;\n\n for (int i = 0 ; i < n ; i++) {\n int d1 = scanner.nextInt();\n int d2 = scanner.nextInt();\n\n q.add(new Pair(d1,d2));\n if (q.size() >= 3) {\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }\n }\n\n if (doublet) {\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\n Queue<Pair> q = new LinkedList<Pair>();\n\n int n = scanner.nextInt();\n\n boolean doublet = false;\n\n for (int i = 0 ; i < n ; i++) {\n int d1 = scanner.nextInt();\n int d2 = scanner.nextInt();\n\n q.add(new Pair(d1,d2));\n if (q.size() >= 3) {\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }\n }\n\n if (doublet) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n Queue<Pair> q = new LinkedList<Pair>();\n\n int n = scanner.nextInt();\n\n boolean doublet = false;\n\n for (int i = 0 ; i < n ; i++) {\n int d1 = scanner.nextInt();\n int d2 = scanner.nextInt();\n\n q.add(new Pair(d1,d2));\n if (q.size() >= 3) {\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }\n }\n\n if (doublet) {\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)",
"Queue<Pair> q = new LinkedList<Pair>();",
"q",
"new LinkedList<Pair>()",
"int n = scanner.nextInt();",
"n",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"boolean doublet = false;",
"doublet",
"false",
"for (int i = 0 ; i < n ; i++) {\n int d1 = scanner.nextInt();\n int d2 = scanner.nextInt();\n\n q.add(new Pair(d1,d2));\n if (q.size() >= 3) {\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }\n }",
"int i = 0 ;",
"int i = 0 ;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int d1 = scanner.nextInt();\n int d2 = scanner.nextInt();\n\n q.add(new Pair(d1,d2));\n if (q.size() >= 3) {\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }\n }",
"{\n int d1 = scanner.nextInt();\n int d2 = scanner.nextInt();\n\n q.add(new Pair(d1,d2));\n if (q.size() >= 3) {\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }\n }",
"int d1 = scanner.nextInt();",
"d1",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int d2 = scanner.nextInt();",
"d2",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"q.add(new Pair(d1,d2))",
"q.add",
"q",
"new Pair(d1,d2)",
"if (q.size() >= 3) {\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }",
"q.size() >= 3",
"q.size()",
"q.size",
"q",
"3",
"{\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }",
"int countDoublet = 0;",
"countDoublet",
"0",
"for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }",
"Pair item",
"q",
"{\n if (item.first == item.second) {\n countDoublet++;\n }\n }",
"{\n if (item.first == item.second) {\n countDoublet++;\n }\n }",
"if (item.first == item.second) {\n countDoublet++;\n }",
"item.first == item.second",
"item.first",
"item",
"item.first",
"item.second",
"item",
"item.second",
"{\n countDoublet++;\n }",
"countDoublet++",
"countDoublet",
"if (countDoublet == 3) {\n doublet = true;\n break;\n }",
"countDoublet == 3",
"countDoublet",
"3",
"{\n doublet = true;\n break;\n }",
"doublet = true",
"doublet",
"true",
"break;",
"q.remove()",
"q.remove",
"q",
"if (doublet) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }",
"doublet",
"{\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\n Queue<Pair> q = new LinkedList<Pair>();\n\n int n = scanner.nextInt();\n\n boolean doublet = false;\n\n for (int i = 0 ; i < n ; i++) {\n int d1 = scanner.nextInt();\n int d2 = scanner.nextInt();\n\n q.add(new Pair(d1,d2));\n if (q.size() >= 3) {\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }\n }\n\n if (doublet) {\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\n Queue<Pair> q = new LinkedList<Pair>();\n\n int n = scanner.nextInt();\n\n boolean doublet = false;\n\n for (int i = 0 ; i < n ; i++) {\n int d1 = scanner.nextInt();\n int d2 = scanner.nextInt();\n\n q.add(new Pair(d1,d2));\n if (q.size() >= 3) {\n int countDoublet = 0;\n for (Pair item: q) {\n if (item.first == item.second) {\n countDoublet++;\n }\n }\n if (countDoublet == 3) {\n doublet = true;\n break;\n }\n q.remove();\n }\n }\n\n if (doublet) {\n System.out.println(\"Yes\");\n } else {\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.LinkedList;
import java.util.Queue;
import java.util.Scanner;
class Pair {
public int first;
public int second;
public Pair(int first, int second) {
this.first = first;
this.second = second;
}
}
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Queue<Pair> q = new LinkedList<Pair>();
int n = scanner.nextInt();
boolean doublet = false;
for (int i = 0 ; i < n ; i++) {
int d1 = scanner.nextInt();
int d2 = scanner.nextInt();
q.add(new Pair(d1,d2));
if (q.size() >= 3) {
int countDoublet = 0;
for (Pair item: q) {
if (item.first == item.second) {
countDoublet++;
}
}
if (countDoublet == 3) {
doublet = true;
break;
}
q.remove();
}
}
if (doublet) {
System.out.println("Yes");
} else {
System.out.println("No");
}
}
}
|
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
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,
13,
14,
2,
4,
18,
13,
17,
4,
18,
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
],
[
79,
5
],
[
79,
6
],
[
6,
7
],
[
6,
8
],
[
79,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
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
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
42,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
41,
51
],
[
51,
52
],
[
52,
53
],
[
41,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
35,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
62,
69
],
[
11,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
9,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
]
| [
"import java.util.*;\n\npublic class Main{\n static Scanner sc = new Scanner(System.in);\n \n public static void main(String[] args) {\n int n = Integer.parseInt(sc.nextLine());\n int count = 0;\n for(int i = 0;i<n;i++){\n String temp = sc.nextLine();\n if(temp.charAt(0) == temp.charAt(2)){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n static Scanner sc = new Scanner(System.in);\n \n public static void main(String[] args) {\n int n = Integer.parseInt(sc.nextLine());\n int count = 0;\n for(int i = 0;i<n;i++){\n String temp = sc.nextLine();\n if(temp.charAt(0) == temp.charAt(2)){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n int n = Integer.parseInt(sc.nextLine());\n int count = 0;\n for(int i = 0;i<n;i++){\n String temp = sc.nextLine();\n if(temp.charAt(0) == temp.charAt(2)){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }",
"main",
"{\n int n = Integer.parseInt(sc.nextLine());\n int count = 0;\n for(int i = 0;i<n;i++){\n String temp = sc.nextLine();\n if(temp.charAt(0) == temp.charAt(2)){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }",
"int n = Integer.parseInt(sc.nextLine());",
"n",
"Integer.parseInt(sc.nextLine())",
"Integer.parseInt",
"Integer",
"sc.nextLine()",
"sc.nextLine",
"sc",
"int count = 0;",
"count",
"0",
"for(int i = 0;i<n;i++){\n String temp = sc.nextLine();\n if(temp.charAt(0) == temp.charAt(2)){\n count++;\n }else{\n count = 0;\n }\n if(count == 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 String temp = sc.nextLine();\n if(temp.charAt(0) == temp.charAt(2)){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n System.out.println(\"Yes\");\n return;\n }\n }",
"{\n String temp = sc.nextLine();\n if(temp.charAt(0) == temp.charAt(2)){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n System.out.println(\"Yes\");\n return;\n }\n }",
"String temp = sc.nextLine();",
"temp",
"sc.nextLine()",
"sc.nextLine",
"sc",
"if(temp.charAt(0) == temp.charAt(2)){\n count++;\n }else{\n count = 0;\n }",
"temp.charAt(0) == temp.charAt(2)",
"temp.charAt(0)",
"temp.charAt",
"temp",
"0",
"temp.charAt(2)",
"temp.charAt",
"temp",
"2",
"{\n count++;\n }",
"count++",
"count",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"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;",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"public class Main{\n static Scanner sc = new Scanner(System.in);\n \n public static void main(String[] args) {\n int n = Integer.parseInt(sc.nextLine());\n int count = 0;\n for(int i = 0;i<n;i++){\n String temp = sc.nextLine();\n if(temp.charAt(0) == temp.charAt(2)){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n}",
"public class Main{\n static Scanner sc = new Scanner(System.in);\n \n public static void main(String[] args) {\n int n = Integer.parseInt(sc.nextLine());\n int count = 0;\n for(int i = 0;i<n;i++){\n String temp = sc.nextLine();\n if(temp.charAt(0) == temp.charAt(2)){\n count++;\n }else{\n count = 0;\n }\n if(count == 3){\n System.out.println(\"Yes\");\n return;\n }\n }\n System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.util.*;
public class Main{
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
int n = Integer.parseInt(sc.nextLine());
int count = 0;
for(int i = 0;i<n;i++){
String temp = sc.nextLine();
if(temp.charAt(0) == temp.charAt(2)){
count++;
}else{
count = 0;
}
if(count == 3){
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,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
30,
30,
41,
13,
20,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
2,
13,
17,
41,
13,
4,
18,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
0,
13,
2,
13,
17,
30,
30,
14,
2,
2,
2,
18,
13,
13,
18,
13,
2,
13,
17,
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,
13,
30,
4,
18,
13,
17,
30,
4,
18,
13,
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,
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,
20,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
4,
18,
13,
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,
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
],
[
268,
35
],
[
268,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
41,
45
],
[
45,
46
],
[
45,
47
],
[
41,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
41,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
41,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
41,
64
],
[
64,
65
],
[
64,
66
],
[
41,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
67,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
67,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
87,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
100,
101
],
[
100,
102
],
[
97,
103
],
[
103,
104
],
[
103,
105
],
[
105,
106
],
[
105,
107
],
[
87,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
85,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
41,
124
],
[
124,
125
],
[
124,
126
],
[
126,
127
],
[
127,
128
],
[
128,
129
],
[
127,
130
],
[
124,
131
],
[
131,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
36,
136
],
[
136,
137
],
[
0,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
138,
142
],
[
142,
143
],
[
138,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
144,
150
],
[
150,
151
],
[
138,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
156,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
155,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
165,
171
],
[
171,
172
],
[
172,
173
],
[
172,
174
],
[
154,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
138,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
183,
186
],
[
186,
187
],
[
138,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
192,
195
],
[
195,
196
],
[
138,
197
],
[
197,
198
],
[
197,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
202,
203
],
[
201,
204
],
[
204,
205
],
[
138,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
209,
210
],
[
209,
211
],
[
208,
212
],
[
212,
213
],
[
213,
214
],
[
214,
215
],
[
214,
216
],
[
212,
217
],
[
217,
218
],
[
217,
219
],
[
212,
220
],
[
220,
221
],
[
221,
222
],
[
212,
223
],
[
224,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
224,
229
],
[
229,
230
],
[
230,
231
],
[
229,
232
],
[
208,
233
],
[
233,
234
],
[
206,
235
],
[
235,
236
],
[
138,
237
],
[
237,
238
],
[
237,
239
],
[
239,
240
],
[
240,
241
],
[
240,
242
],
[
239,
244
],
[
244,
245
],
[
245,
246
],
[
246,
247
],
[
246,
248
],
[
244,
249
],
[
249,
250
],
[
249,
251
],
[
244,
252
],
[
252,
253
],
[
253,
254
],
[
244,
255
],
[
256,
256
],
[
256,
257
],
[
257,
258
],
[
258,
259
],
[
258,
260
],
[
257,
261
],
[
261,
262
],
[
239,
263
],
[
263,
264
],
[
237,
265
],
[
265,
266
],
[
0,
267
],
[
267,
268
],
[
267,
269
]
]
| [
"import java.util.*;\nimport java.io.*;\nimport java.util.Arrays; \nimport java.util.ArrayList; \nimport java.util.Collections; \nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.InputStream;\nimport java.util.StringTokenizer;\nimport java.math.BigInteger;\n\npublic class Main {\n\n public static void main(String[] args) {\n try (PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n FastScanner in = new FastScanner(System.in);\n int nRolls = in.nextInt();\n int nDices = nRolls*2;\n int[] dices = in.nextIntArray(nDices);\n\n boolean check = false;\n\n for(int i = 0; i < nDices - 4; i = i+2) {\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }\n if(check) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n\n\n } finally {\n //out.close();\n }\n \n \n }\n}\n\n\nclass FastScanner {\n private final BufferedReader br;\n private StringTokenizer st;\n \n FastScanner(InputStream InputStream) {\n br = new BufferedReader(new InputStreamReader(InputStream));\n }\n \n String next() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\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\n \n ArrayList<Integer> nextIntList(int count) {\n ArrayList<Integer> array = new ArrayList<>();\n for (int n = 0; n < count; n++) {\n int number = nextInt();\n array.add(number);\n }\n return array;\n }\n \n int[] nextIntArray(int count) {\n int[] array = new int[count];\n for (int n = 0; n < count; n++) {\n array[n] = nextInt();\n }\n return array;\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"public class Main {\n\n public static void main(String[] args) {\n try (PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n FastScanner in = new FastScanner(System.in);\n int nRolls = in.nextInt();\n int nDices = nRolls*2;\n int[] dices = in.nextIntArray(nDices);\n\n boolean check = false;\n\n for(int i = 0; i < nDices - 4; i = i+2) {\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }\n if(check) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n\n\n } finally {\n //out.close();\n }\n \n \n }\n}",
"Main",
"public static void main(String[] args) {\n try (PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n FastScanner in = new FastScanner(System.in);\n int nRolls = in.nextInt();\n int nDices = nRolls*2;\n int[] dices = in.nextIntArray(nDices);\n\n boolean check = false;\n\n for(int i = 0; i < nDices - 4; i = i+2) {\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }\n if(check) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n\n\n } finally {\n //out.close();\n }\n \n \n }",
"main",
"{\n try (PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n FastScanner in = new FastScanner(System.in);\n int nRolls = in.nextInt();\n int nDices = nRolls*2;\n int[] dices = in.nextIntArray(nDices);\n\n boolean check = false;\n\n for(int i = 0; i < nDices - 4; i = i+2) {\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }\n if(check) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n\n\n } finally {\n //out.close();\n }\n \n \n }",
"try (PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n FastScanner in = new FastScanner(System.in);\n int nRolls = in.nextInt();\n int nDices = nRolls*2;\n int[] dices = in.nextIntArray(nDices);\n\n boolean check = false;\n\n for(int i = 0; i < nDices - 4; i = i+2) {\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }\n if(check) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n\n\n } finally {\n //out.close();\n }",
"{\n //out.close();\n }",
"{\n FastScanner in = new FastScanner(System.in);\n int nRolls = in.nextInt();\n int nDices = nRolls*2;\n int[] dices = in.nextIntArray(nDices);\n\n boolean check = false;\n\n for(int i = 0; i < nDices - 4; i = i+2) {\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }\n if(check) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n\n\n }",
"PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))",
"PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))",
"new PrintWriter(new BufferedOutputStream(System.out))",
"FastScanner in = new FastScanner(System.in);",
"in",
"new FastScanner(System.in)",
"int nRolls = in.nextInt();",
"nRolls",
"in.nextInt()",
"in.nextInt",
"in",
"int nDices = nRolls*2;",
"nDices",
"nRolls*2",
"nRolls",
"2",
"int[] dices = in.nextIntArray(nDices);",
"dices",
"in.nextIntArray(nDices)",
"in.nextIntArray",
"in",
"nDices",
"boolean check = false;",
"check",
"false",
"for(int i = 0; i < nDices - 4; i = i+2) {\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < nDices - 4",
"i",
"nDices - 4",
"nDices",
"4",
"i = i+2",
"i = i+2",
"i",
"i+2",
"i",
"2",
"{\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }",
"{\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }",
"if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }",
"dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]",
"dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]",
"dices[i] == dices [i+1]",
"dices[i]",
"dices",
"i",
"dices [i+1]",
"dices",
"i+1",
"i",
"1",
"dices[i+2] == dices [i+3]",
"dices[i+2]",
"dices",
"i+2",
"i",
"2",
"dices [i+3]",
"dices",
"i+3",
"i",
"3",
"dices[i+4] == dices [i+5]",
"dices[i+4]",
"dices",
"i+4",
"i",
"4",
"dices [i+5]",
"dices",
"i+5",
"i",
"5",
"{\n check = true;\n break;\n }",
"check = true",
"check",
"true",
"break;",
"if(check) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }",
"check",
"{\n out.println(\"Yes\");\n }",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"{\n out.println(\"No\");\n }",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"String[] args",
"args",
"class FastScanner {\n private final BufferedReader br;\n private StringTokenizer st;\n \n FastScanner(InputStream InputStream) {\n br = new BufferedReader(new InputStreamReader(InputStream));\n }\n \n String next() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\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\n \n ArrayList<Integer> nextIntList(int count) {\n ArrayList<Integer> array = new ArrayList<>();\n for (int n = 0; n < count; n++) {\n int number = nextInt();\n array.add(number);\n }\n return array;\n }\n \n int[] nextIntArray(int count) {\n int[] array = new int[count];\n for (int n = 0; n < count; n++) {\n array[n] = nextInt();\n }\n return array;\n }\n}",
"FastScanner",
"private final BufferedReader br;",
"br",
"private StringTokenizer st;",
"st",
"FastScanner(InputStream InputStream) {\n br = new BufferedReader(new InputStreamReader(InputStream));\n }",
"FastScanner",
"{\n br = new BufferedReader(new InputStreamReader(InputStream));\n }",
"br = new BufferedReader(new InputStreamReader(InputStream))",
"br",
"new BufferedReader(new InputStreamReader(InputStream))",
"InputStream InputStream",
"InputStream",
"String next() {\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }",
"next",
"{\n while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }\n return st.nextToken();\n }",
"while (st == null || !st.hasMoreTokens()) {\n try {\n st = new StringTokenizer(br.readLine());\n } catch (IOException e) {\n throw new RuntimeException(e);\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 } catch (IOException e) {\n throw new RuntimeException(e);\n }\n }",
"try {\n st = new StringTokenizer(br.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 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",
"ArrayList<Integer> nextIntList(int count) {\n ArrayList<Integer> array = new ArrayList<>();\n for (int n = 0; n < count; n++) {\n int number = nextInt();\n array.add(number);\n }\n return array;\n }",
"nextIntList",
"{\n ArrayList<Integer> array = new ArrayList<>();\n for (int n = 0; n < count; n++) {\n int number = nextInt();\n array.add(number);\n }\n return array;\n }",
"ArrayList<Integer> array = new ArrayList<>();",
"array",
"new ArrayList<>()",
"for (int n = 0; n < count; n++) {\n int number = nextInt();\n array.add(number);\n }",
"int n = 0;",
"int n = 0;",
"n",
"0",
"n < count",
"n",
"count",
"n++",
"n++",
"n",
"{\n int number = nextInt();\n array.add(number);\n }",
"{\n int number = nextInt();\n array.add(number);\n }",
"int number = nextInt();",
"number",
"nextInt()",
"nextInt",
"array.add(number)",
"array.add",
"array",
"number",
"return array;",
"array",
"int count",
"count",
"int[] nextIntArray(int count) {\n int[] array = new int[count];\n for (int n = 0; n < count; n++) {\n array[n] = nextInt();\n }\n return array;\n }",
"nextIntArray",
"{\n int[] array = new int[count];\n for (int n = 0; n < count; n++) {\n array[n] = nextInt();\n }\n return array;\n }",
"int[] array = new int[count];",
"array",
"new int[count]",
"count",
"for (int n = 0; n < count; n++) {\n array[n] = nextInt();\n }",
"int n = 0;",
"int n = 0;",
"n",
"0",
"n < count",
"n",
"count",
"n++",
"n++",
"n",
"{\n array[n] = nextInt();\n }",
"{\n array[n] = nextInt();\n }",
"array[n] = nextInt()",
"array[n]",
"array",
"n",
"nextInt()",
"nextInt",
"return array;",
"array",
"int count",
"count",
"public class Main {\n\n public static void main(String[] args) {\n try (PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n FastScanner in = new FastScanner(System.in);\n int nRolls = in.nextInt();\n int nDices = nRolls*2;\n int[] dices = in.nextIntArray(nDices);\n\n boolean check = false;\n\n for(int i = 0; i < nDices - 4; i = i+2) {\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }\n if(check) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n\n\n } finally {\n //out.close();\n }\n \n \n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n try (PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {\n FastScanner in = new FastScanner(System.in);\n int nRolls = in.nextInt();\n int nDices = nRolls*2;\n int[] dices = in.nextIntArray(nDices);\n\n boolean check = false;\n\n for(int i = 0; i < nDices - 4; i = i+2) {\n if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {\n check = true;\n break;\n }\n }\n if(check) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n\n\n\n } finally {\n //out.close();\n }\n \n \n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.InputStream;
import java.util.StringTokenizer;
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
try (PrintWriter out = new PrintWriter(new BufferedOutputStream(System.out))) {
FastScanner in = new FastScanner(System.in);
int nRolls = in.nextInt();
int nDices = nRolls*2;
int[] dices = in.nextIntArray(nDices);
boolean check = false;
for(int i = 0; i < nDices - 4; i = i+2) {
if(dices[i] == dices [i+1] && dices[i+2] == dices [i+3] && dices[i+4] == dices [i+5]) {
check = true;
break;
}
}
if(check) {
out.println("Yes");
} else {
out.println("No");
}
} finally {
//out.close();
}
}
}
class FastScanner {
private final BufferedReader br;
private StringTokenizer st;
FastScanner(InputStream InputStream) {
br = new BufferedReader(new InputStreamReader(InputStream));
}
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());
}
ArrayList<Integer> nextIntList(int count) {
ArrayList<Integer> array = new ArrayList<>();
for (int n = 0; n < count; n++) {
int number = nextInt();
array.add(number);
}
return array;
}
int[] nextIntArray(int count) {
int[] array = new int[count];
for (int n = 0; n < count; n++) {
array[n] = nextInt();
}
return array;
}
} |
[
7,
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,
12,
13,
30,
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,
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,
13,
17,
29,
4,
18,
13,
17,
29,
23,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
170,
17
],
[
170,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
20,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
40,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
18,
49
],
[
49,
50
],
[
170,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
55,
64
],
[
64,
65
],
[
64,
66
],
[
55,
68
],
[
68,
69
],
[
68,
70
],
[
55,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
77,
78
],
[
77,
79
],
[
72,
80
],
[
80,
81
],
[
81,
82
],
[
72,
83
],
[
84,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
90,
91
],
[
89,
92
],
[
92,
93
],
[
93,
94
],
[
84,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
102,
103
],
[
103,
104
],
[
55,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
105,
115
],
[
115,
116
],
[
116,
117
],
[
105,
118
],
[
119,
119
],
[
119,
120
],
[
120,
121
],
[
122,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
123,
127
],
[
127,
128
],
[
127,
129
],
[
122,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
133,
134
],
[
133,
135
],
[
130,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
138,
140
],
[
122,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
144,
146
],
[
141,
147
],
[
147,
148
],
[
147,
149
],
[
149,
150
],
[
149,
151
],
[
120,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
153,
156
],
[
152,
157
],
[
55,
158
],
[
158,
159
],
[
159,
160
],
[
158,
161
],
[
55,
162
],
[
53,
163
],
[
163,
164
],
[
53,
165
],
[
165,
166
],
[
53,
167
],
[
167,
168
],
[
0,
169
],
[
169,
170
],
[
169,
171
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(in.next());\n d2[i] = Integer.parseInt(in.next());\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 out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n return;\n\n }\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.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(in.next());\n d2[i] = Integer.parseInt(in.next());\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 out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n return;\n\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\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",
"Scanner in = new Scanner(inputStream);",
"in",
"new Scanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"BGoToJail solver = new BGoToJail();",
"solver",
"new BGoToJail()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class BGoToJail {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(in.next());\n d2[i] = Integer.parseInt(in.next());\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 out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n return;\n\n }\n\n }",
"BGoToJail",
"public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(in.next());\n d2[i] = Integer.parseInt(in.next());\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 out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n return;\n\n }",
"solve",
"{\n // 入力\n int n = Integer.parseInt(in.next());\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(in.next());\n d2[i] = Integer.parseInt(in.next());\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 out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n return;\n\n }",
"int n = Integer.parseInt(in.next());",
"n",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"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 d1[i] = Integer.parseInt(in.next());\n d2[i] = Integer.parseInt(in.next());\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n d1[i] = Integer.parseInt(in.next());\n d2[i] = Integer.parseInt(in.next());\n }",
"{\n d1[i] = Integer.parseInt(in.next());\n d2[i] = Integer.parseInt(in.next());\n }",
"d1[i] = Integer.parseInt(in.next())",
"d1[i]",
"d1",
"i",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"in",
"d2[i] = Integer.parseInt(in.next())",
"d2[i]",
"d2",
"i",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"in",
"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 out.println(\"Yes\");\n return;\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 out.println(\"Yes\");\n return;\n }\n }",
"{\n if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {\n out.println(\"Yes\");\n return;\n }\n }",
"if (d1[i] == d2[i] && d1[i + 1] == d2[i + 1] && d1[i + 2] == d2[i + 2]) {\n out.println(\"Yes\");\n return;\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 out.println(\"Yes\");\n return;\n }",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"return;",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"return;",
"int testNumber",
"testNumber",
"Scanner in",
"in",
"PrintWriter out",
"out",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(in.next());\n d2[i] = Integer.parseInt(in.next());\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 out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n return;\n\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int[] d1 = new int[n];\n int[] d2 = new int[n];\n for (int i = 0; i < n; i++) {\n d1[i] = Integer.parseInt(in.next());\n d2[i] = Integer.parseInt(in.next());\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 out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n return;\n\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
BGoToJail solver = new BGoToJail();
solver.solve(1, in, out);
out.close();
}
static class BGoToJail {
public void solve(int testNumber, Scanner in, PrintWriter out) {
// 入力
int n = Integer.parseInt(in.next());
int[] d1 = new int[n];
int[] d2 = new int[n];
for (int i = 0; i < n; i++) {
d1[i] = Integer.parseInt(in.next());
d2[i] = Integer.parseInt(in.next());
}
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]) {
out.println("Yes");
return;
}
}
out.println("No");
return;
}
}
}
|
[
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,
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,
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,
18,
13,
13,
18,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
3,
30,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
23,
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,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
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
],
[
217,
29
],
[
217,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
32,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
32,
43
],
[
43,
44
],
[
43,
45
],
[
32,
46
],
[
46,
47
],
[
46,
48
],
[
32,
49
],
[
49,
50
],
[
49,
51
],
[
32,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
52,
56
],
[
52,
57
],
[
32,
58
],
[
58,
59
],
[
59,
60
],
[
30,
61
],
[
61,
62
],
[
217,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
73,
75
],
[
67,
77
],
[
77,
78
],
[
77,
79
],
[
67,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
86,
87
],
[
86,
88
],
[
81,
89
],
[
89,
90
],
[
90,
91
],
[
81,
92
],
[
93,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
99,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
106,
107
],
[
67,
108
],
[
108,
109
],
[
108,
110
],
[
67,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
111,
116
],
[
116,
117
],
[
116,
118
],
[
111,
119
],
[
119,
120
],
[
120,
121
],
[
111,
122
],
[
123,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
129,
131
],
[
124,
132
],
[
132,
133
],
[
133,
134
],
[
132,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
135,
139
],
[
139,
140
],
[
124,
141
],
[
141,
142
],
[
142,
143
],
[
142,
144
],
[
67,
145
],
[
145,
146
],
[
146,
147
],
[
146,
148
],
[
145,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
150,
153
],
[
145,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
155,
158
],
[
65,
159
],
[
159,
160
],
[
65,
161
],
[
161,
162
],
[
65,
163
],
[
163,
164
],
[
217,
165
],
[
165,
166
],
[
165,
167
],
[
167,
168
],
[
165,
169
],
[
169,
170
],
[
165,
171
],
[
171,
172
],
[
171,
173
],
[
173,
174
],
[
174,
175
],
[
174,
176
],
[
171,
177
],
[
177,
178
],
[
165,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
182,
191
],
[
191,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
192,
199
],
[
199,
200
],
[
200,
201
],
[
200,
202
],
[
181,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
165,
207
],
[
207,
208
],
[
207,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
211,
214
],
[
214,
215
],
[
0,
216
],
[
216,
217
],
[
216,
218
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.StringTokenizer;\nimport java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n *\n * @author Stirbul\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n\n int[] a = new int[n];\n int[] b = new int[n];\n\n\n for (int i = 0; i < n; ++i) {\n a[i] = in.nextInt();\n b[i] = in.nextInt();\n }\n\n int count = 0;\n for (int i = 0; i < n; ++i) {\n if (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\n }\n } else {\n count = 0;\n }\n }\n\n if (count == 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(InputStream inputStream) {\n br = new BufferedReader(new InputStreamReader(inputStream));\n }\n\n public 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 public int nextInt() {\n return Integer.parseInt(next());\n }\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.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 FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n\n int[] a = new int[n];\n int[] b = new int[n];\n\n\n for (int i = 0; i < n; ++i) {\n a[i] = in.nextInt();\n b[i] = in.nextInt();\n }\n\n int count = 0;\n for (int i = 0; i < n; ++i) {\n if (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\n }\n } else {\n count = 0;\n }\n }\n\n if (count == 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(InputStream inputStream) {\n br = new BufferedReader(new InputStreamReader(inputStream));\n }\n\n public 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 public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\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",
"FastReader in = new FastReader(inputStream);",
"in",
"new FastReader(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"BGoToJail solver = new BGoToJail();",
"solver",
"new BGoToJail()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class BGoToJail {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n\n int[] a = new int[n];\n int[] b = new int[n];\n\n\n for (int i = 0; i < n; ++i) {\n a[i] = in.nextInt();\n b[i] = in.nextInt();\n }\n\n int count = 0;\n for (int i = 0; i < n; ++i) {\n if (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\n }\n } else {\n count = 0;\n }\n }\n\n if (count == 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n\n }",
"BGoToJail",
"public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n\n int[] a = new int[n];\n int[] b = new int[n];\n\n\n for (int i = 0; i < n; ++i) {\n a[i] = in.nextInt();\n b[i] = in.nextInt();\n }\n\n int count = 0;\n for (int i = 0; i < n; ++i) {\n if (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\n }\n } else {\n count = 0;\n }\n }\n\n if (count == 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }",
"solve",
"{\n int n = in.nextInt();\n\n int[] a = new int[n];\n int[] b = new int[n];\n\n\n for (int i = 0; i < n; ++i) {\n a[i] = in.nextInt();\n b[i] = in.nextInt();\n }\n\n int count = 0;\n for (int i = 0; i < n; ++i) {\n if (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\n }\n } else {\n count = 0;\n }\n }\n\n if (count == 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"int[] b = new int[n];",
"b",
"new int[n]",
"n",
"for (int i = 0; i < n; ++i) {\n a[i] = in.nextInt();\n b[i] = in.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"++i",
"++i",
"i",
"{\n a[i] = in.nextInt();\n b[i] = in.nextInt();\n }",
"{\n a[i] = in.nextInt();\n b[i] = in.nextInt();\n }",
"a[i] = in.nextInt()",
"a[i]",
"a",
"i",
"in.nextInt()",
"in.nextInt",
"in",
"b[i] = in.nextInt()",
"b[i]",
"b",
"i",
"in.nextInt()",
"in.nextInt",
"in",
"int count = 0;",
"count",
"0",
"for (int i = 0; i < n; ++i) {\n if (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\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 (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\n }\n } else {\n count = 0;\n }\n }",
"{\n if (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\n }\n } else {\n count = 0;\n }\n }",
"if (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\n }\n } else {\n count = 0;\n }",
"a[i] == b[i]",
"a[i]",
"a",
"i",
"b[i]",
"b",
"i",
"{\n count++;\n if (count == 3) {\n break;\n }\n }",
"count++",
"count",
"if (count == 3) {\n break;\n }",
"count == 3",
"count",
"3",
"{\n break;\n }",
"break;",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"if (count == 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }",
"count == 3",
"count",
"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\"",
"int testNumber",
"testNumber",
"FastReader in",
"in",
"PrintWriter out",
"out",
"static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(InputStream inputStream) {\n br = new BufferedReader(new InputStreamReader(inputStream));\n }\n\n public 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 public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader(InputStream inputStream) {\n br = new BufferedReader(new InputStreamReader(inputStream));\n }",
"FastReader",
"{\n br = new BufferedReader(new InputStreamReader(inputStream));\n }",
"br = new BufferedReader(new InputStreamReader(inputStream))",
"br",
"new BufferedReader(new InputStreamReader(inputStream))",
"InputStream inputStream",
"inputStream",
"public 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",
"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 class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n\n int[] a = new int[n];\n int[] b = new int[n];\n\n\n for (int i = 0; i < n; ++i) {\n a[i] = in.nextInt();\n b[i] = in.nextInt();\n }\n\n int count = 0;\n for (int i = 0; i < n; ++i) {\n if (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\n }\n } else {\n count = 0;\n }\n }\n\n if (count == 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(InputStream inputStream) {\n br = new BufferedReader(new InputStreamReader(inputStream));\n }\n\n public 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 public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n FastReader in = new FastReader(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, FastReader in, PrintWriter out) {\n int n = in.nextInt();\n\n int[] a = new int[n];\n int[] b = new int[n];\n\n\n for (int i = 0; i < n; ++i) {\n a[i] = in.nextInt();\n b[i] = in.nextInt();\n }\n\n int count = 0;\n for (int i = 0; i < n; ++i) {\n if (a[i] == b[i]) {\n count++;\n if (count == 3) {\n break;\n }\n } else {\n count = 0;\n }\n }\n\n if (count == 3) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n\n }\n\n static class FastReader {\n BufferedReader br;\n StringTokenizer st;\n\n public FastReader(InputStream inputStream) {\n br = new BufferedReader(new InputStreamReader(inputStream));\n }\n\n public 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 public int nextInt() {\n return Integer.parseInt(next());\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*
* @author Stirbul
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
FastReader in = new FastReader(inputStream);
PrintWriter out = new PrintWriter(outputStream);
BGoToJail solver = new BGoToJail();
solver.solve(1, in, out);
out.close();
}
static class BGoToJail {
public void solve(int testNumber, FastReader in, PrintWriter out) {
int n = in.nextInt();
int[] a = new int[n];
int[] b = new int[n];
for (int i = 0; i < n; ++i) {
a[i] = in.nextInt();
b[i] = in.nextInt();
}
int count = 0;
for (int i = 0; i < n; ++i) {
if (a[i] == b[i]) {
count++;
if (count == 3) {
break;
}
} else {
count = 0;
}
}
if (count == 3) {
out.println("Yes");
} else {
out.println("No");
}
}
}
static class FastReader {
BufferedReader br;
StringTokenizer st;
public FastReader(InputStream inputStream) {
br = new BufferedReader(new InputStreamReader(inputStream));
}
public String next() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
28,
13,
13,
30,
30,
4,
18,
18,
13,
13,
2,
13,
17,
4,
18,
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,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
13,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
42,
2,
40,
13,
17,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
13,
13,
30,
40,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
0,
13,
17,
3,
30,
0,
13,
17,
14,
13,
4,
18,
18,
13,
13,
17,
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,
41,
13,
20,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
18,
18,
13,
13,
13,
4,
18,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
13,
13,
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,
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
],
[
379,
8
],
[
379,
9
],
[
9,
10
],
[
9,
11
],
[
379,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
15,
18
],
[
19,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
20,
25
],
[
25,
26
],
[
25,
27
],
[
14,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
12,
33
],
[
33,
34
],
[
379,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
40,
42
],
[
37,
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
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
55,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
55,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
71,
73
],
[
55,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
37,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
35,
83
],
[
83,
84
],
[
379,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
87,
96
],
[
96,
97
],
[
87,
98
],
[
98,
99
],
[
87,
100
],
[
100,
101
],
[
100,
102
],
[
87,
103
],
[
103,
104
],
[
103,
105
],
[
87,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
106,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
111,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
120,
121
],
[
111,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
127,
128
],
[
126,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
136,
138
],
[
134,
139
],
[
133,
140
],
[
140,
141
],
[
140,
142
],
[
133,
143
],
[
122,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
87,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
150,
155
],
[
85,
156
],
[
156,
157
],
[
379,
158
],
[
158,
159
],
[
158,
160
],
[
160,
161
],
[
158,
162
],
[
162,
163
],
[
158,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
158,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
170,
176
],
[
176,
177
],
[
158,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
181,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
191,
198
],
[
198,
199
],
[
199,
200
],
[
199,
201
],
[
180,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
158,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
210,
213
],
[
213,
214
],
[
158,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
218,
219
],
[
219,
220
],
[
220,
221
],
[
219,
222
],
[
222,
223
],
[
158,
224
],
[
224,
225
],
[
224,
226
],
[
226,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
228,
231
],
[
231,
232
],
[
158,
233
],
[
233,
234
],
[
233,
235
],
[
235,
236
],
[
236,
237
],
[
235,
238
],
[
238,
239
],
[
238,
240
],
[
235,
243
],
[
243,
244
],
[
244,
245
],
[
245,
246
],
[
245,
247
],
[
243,
248
],
[
248,
249
],
[
248,
250
],
[
243,
251
],
[
251,
252
],
[
252,
253
],
[
243,
254
],
[
255,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
258,
259
],
[
255,
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
],
[
279,
282
],
[
235,
283
],
[
283,
284
],
[
233,
285
],
[
285,
286
],
[
233,
287
],
[
287,
288
],
[
158,
289
],
[
289,
290
],
[
289,
291
],
[
291,
292
],
[
292,
293
],
[
293,
294
],
[
293,
295
],
[
293,
296
],
[
289,
297
],
[
297,
298
],
[
158,
299
],
[
299,
300
],
[
299,
301
],
[
301,
302
],
[
302,
303
],
[
302,
304
],
[
301,
306
],
[
306,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
306,
311
],
[
311,
312
],
[
311,
313
],
[
306,
314
],
[
314,
315
],
[
315,
316
],
[
306,
317
],
[
317,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
318,
322
],
[
322,
323
],
[
301,
324
],
[
324,
325
],
[
299,
326
],
[
326,
327
],
[
158,
328
],
[
328,
329
],
[
328,
330
],
[
330,
331
],
[
331,
332
],
[
331,
333
],
[
330,
335
],
[
335,
336
],
[
336,
337
],
[
337,
338
],
[
337,
339
],
[
335,
340
],
[
340,
341
],
[
340,
342
],
[
335,
343
],
[
343,
344
],
[
344,
345
],
[
335,
346
],
[
346,
347
],
[
347,
348
],
[
348,
349
],
[
348,
350
],
[
347,
351
],
[
351,
352
],
[
330,
353
],
[
353,
354
],
[
328,
355
],
[
355,
356
],
[
158,
357
],
[
357,
358
],
[
357,
359
],
[
359,
360
],
[
360,
361
],
[
360,
362
],
[
359,
363
],
[
363,
364
],
[
364,
365
],
[
364,
366
],
[
366,
367
],
[
367,
368
],
[
368,
369
],
[
363,
370
],
[
370,
371
],
[
371,
372
],
[
371,
373
],
[
373,
374
],
[
374,
375
],
[
359,
376
],
[
376,
377
],
[
0,
378
],
[
378,
379
],
[
378,
380
]
]
| [
"import java.io.*;\nimport java.util.*;\n\npublic class Main{\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}\n public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}\n String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}\n int nextInt(){return Integer.parseInt(next());}\n long nextLong(){return Long.parseLong(next());}\n double nextDouble(){return Double.parseDouble(next());}\n char[][] readCharArray(int n,int m) {\n String str;\n char[][] arr = new char[n][m];\n for(int i=0;i<n;i++) {\n str=nextLine();\n for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }\n }\n return arr;\n }\n char[][] readCharArray(int n){\n return readCharArray(n,n);\n }\n int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}\n long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}\n String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}\n }\n static void printArray(int[] arr){\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }\n static final Random random=new Random();\n static void ruffleSort(int[] a) {\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }\n public static void main(String[] args) throws NumberFormatException, IOException {\n FastReader st = new FastReader();\n int n = st.nextInt();\n int d1,d2,count=0;\n boolean test=true;\n while(n-- > 0) {\n \td1 = st.nextInt();d2 = st.nextInt();\n \tif(d1==d2) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(test) System.out.println(\"No\");\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}\n public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}\n String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}\n int nextInt(){return Integer.parseInt(next());}\n long nextLong(){return Long.parseLong(next());}\n double nextDouble(){return Double.parseDouble(next());}\n char[][] readCharArray(int n,int m) {\n String str;\n char[][] arr = new char[n][m];\n for(int i=0;i<n;i++) {\n str=nextLine();\n for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }\n }\n return arr;\n }\n char[][] readCharArray(int n){\n return readCharArray(n,n);\n }\n int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}\n long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}\n String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}\n }\n static void printArray(int[] arr){\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }\n static final Random random=new Random();\n static void ruffleSort(int[] a) {\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }\n public static void main(String[] args) throws NumberFormatException, IOException {\n FastReader st = new FastReader();\n int n = st.nextInt();\n int d1,d2,count=0;\n boolean test=true;\n while(n-- > 0) {\n \td1 = st.nextInt();d2 = st.nextInt();\n \tif(d1==d2) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(test) System.out.println(\"No\");\n }\n}",
"Main",
"static final Random random=new Random();",
"random",
"new Random()",
"static void printArray(int[] arr){\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }",
"printArray",
"{\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }",
"for(int x:arr){\n System.out.print(x+\" \");\n }",
"int x",
"arr",
"{\n System.out.print(x+\" \");\n }",
"{\n System.out.print(x+\" \");\n }",
"System.out.print(x+\" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"x+\" \"",
"x",
"\" \"",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"int[] arr",
"arr",
"static void ruffleSort(int[] a) {\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }",
"ruffleSort",
"{\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }",
"int n=a.length;",
"n",
"a.length",
"a",
"a.length",
"for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }",
"{\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }",
"int oi=random.nextInt(n)",
"oi",
"random.nextInt(n)",
"random.nextInt",
"random",
"n",
"temp=a[oi];",
"temp",
"a[oi]",
"a",
"oi",
"a[oi]=a[i]",
"a[oi]",
"a",
"oi",
"a[i]",
"a",
"i",
"a[i]=temp",
"a[i]",
"a",
"i",
"temp",
"Arrays.sort(a)",
"Arrays.sort",
"Arrays",
"a",
"int[] a",
"a",
"public static void main(String[] args) throws NumberFormatException, IOException {\n FastReader st = new FastReader();\n int n = st.nextInt();\n int d1,d2,count=0;\n boolean test=true;\n while(n-- > 0) {\n \td1 = st.nextInt();d2 = st.nextInt();\n \tif(d1==d2) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(test) System.out.println(\"No\");\n }",
"main",
"{\n FastReader st = new FastReader();\n int n = st.nextInt();\n int d1,d2,count=0;\n boolean test=true;\n while(n-- > 0) {\n \td1 = st.nextInt();d2 = st.nextInt();\n \tif(d1==d2) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(test) System.out.println(\"No\");\n }",
"FastReader st = new FastReader();",
"st",
"new FastReader()",
"int n = st.nextInt();",
"n",
"st.nextInt()",
"st.nextInt",
"st",
"int d1",
"d1",
"d2",
"d2",
"count=0;",
"count",
"0",
"boolean test=true;",
"test",
"true",
"while(n-- > 0) {\n \td1 = st.nextInt();d2 = st.nextInt();\n \tif(d1==d2) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }",
"n-- > 0",
"n--",
"n",
"0",
"{\n \td1 = st.nextInt();d2 = st.nextInt();\n \tif(d1==d2) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }",
"d1 = st.nextInt()",
"d1",
"st.nextInt()",
"st.nextInt",
"st",
"d2 = st.nextInt()",
"d2",
"st.nextInt()",
"st.nextInt",
"st",
"if(d1==d2) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}",
"d1==d2",
"d1",
"d2",
"{\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}\n \t}",
"count++",
"count",
"if(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}",
"count==3",
"count",
"3",
"{\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"test=false",
"test",
"false",
"break;",
"{\n \t\tcount=0;\n \t}",
"count=0",
"count",
"0",
"if(test) System.out.println(\"No\");",
"test",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}\n public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}\n String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}\n int nextInt(){return Integer.parseInt(next());}\n long nextLong(){return Long.parseLong(next());}\n double nextDouble(){return Double.parseDouble(next());}\n char[][] readCharArray(int n,int m) {\n String str;\n char[][] arr = new char[n][m];\n for(int i=0;i<n;i++) {\n str=nextLine();\n for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }\n }\n return arr;\n }\n char[][] readCharArray(int n){\n return readCharArray(n,n);\n }\n int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}\n long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}\n String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}\n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}",
"FastReader",
"{br = new BufferedReader(new InputStreamReader(System.in));}",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}",
"FastReader",
"{br = new BufferedReader(new FileReader(fileName));}",
"br = new BufferedReader(new FileReader(fileName))",
"br",
"new BufferedReader(new FileReader(fileName))",
"String fileName",
"fileName",
"String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}",
"next",
"{while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}",
"while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}",
"try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}",
"catch (IOException e){e.printStackTrace();}",
"IOException e",
"{e.printStackTrace();}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{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(){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",
"char[][] readCharArray(int n,int m) {\n String str;\n char[][] arr = new char[n][m];\n for(int i=0;i<n;i++) {\n str=nextLine();\n for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }\n }\n return arr;\n }",
"readCharArray",
"{\n String str;\n char[][] arr = new char[n][m];\n for(int i=0;i<n;i++) {\n str=nextLine();\n for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }\n }\n return arr;\n }",
"String str;",
"str",
"char[][] arr = new char[n][m];",
"arr",
"new char[n][m]",
"n",
"m",
"for(int i=0;i<n;i++) {\n str=nextLine();\n for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n str=nextLine();\n for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }\n }",
"{\n str=nextLine();\n for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }\n }",
"str=nextLine()",
"str",
"nextLine()",
"nextLine",
"for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }",
"int j=0;",
"int j=0;",
"j",
"0",
"j<n",
"j",
"n",
"j++",
"j++",
"j",
"{\n arr[i][j]=str.charAt(j);\n }",
"{\n arr[i][j]=str.charAt(j);\n }",
"arr[i][j]=str.charAt(j)",
"arr[i][j]",
"arr[i]",
"arr",
"i",
"j",
"str.charAt(j)",
"str.charAt",
"str",
"j",
"return arr;",
"arr",
"int n",
"n",
"int m",
"m",
"char[][] readCharArray(int n){\n return readCharArray(n,n);\n }",
"readCharArray",
"{\n return readCharArray(n,n);\n }",
"return readCharArray(n,n);",
"readCharArray(n,n)",
"readCharArray",
"n",
"n",
"int n",
"n",
"int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}",
"readArray",
"{int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}",
"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[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}",
"readLongArray",
"{long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}",
"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",
"String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}",
"nextLine",
"{String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}",
"String str = \"\";",
"str",
"\"\"",
"try{str = br.readLine();}catch (IOException e){e.printStackTrace();}",
"catch (IOException e){e.printStackTrace();}",
"IOException e",
"{e.printStackTrace();}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{str = br.readLine();}",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main{\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}\n public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}\n String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}\n int nextInt(){return Integer.parseInt(next());}\n long nextLong(){return Long.parseLong(next());}\n double nextDouble(){return Double.parseDouble(next());}\n char[][] readCharArray(int n,int m) {\n String str;\n char[][] arr = new char[n][m];\n for(int i=0;i<n;i++) {\n str=nextLine();\n for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }\n }\n return arr;\n }\n char[][] readCharArray(int n){\n return readCharArray(n,n);\n }\n int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}\n long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}\n String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}\n }\n static void printArray(int[] arr){\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }\n static final Random random=new Random();\n static void ruffleSort(int[] a) {\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }\n public static void main(String[] args) throws NumberFormatException, IOException {\n FastReader st = new FastReader();\n int n = st.nextInt();\n int d1,d2,count=0;\n boolean test=true;\n while(n-- > 0) {\n \td1 = st.nextInt();d2 = st.nextInt();\n \tif(d1==d2) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(test) System.out.println(\"No\");\n }\n}",
"public class Main{\n static class FastReader{\n BufferedReader br;\n StringTokenizer st;\n public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}\n public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}\n String next(){while (st == null || !st.hasMoreElements()){try{st = new StringTokenizer(br.readLine());}catch (IOException e){e.printStackTrace();}}return st.nextToken();}\n int nextInt(){return Integer.parseInt(next());}\n long nextLong(){return Long.parseLong(next());}\n double nextDouble(){return Double.parseDouble(next());}\n char[][] readCharArray(int n,int m) {\n String str;\n char[][] arr = new char[n][m];\n for(int i=0;i<n;i++) {\n str=nextLine();\n for(int j=0;j<n;j++) {\n arr[i][j]=str.charAt(j);\n }\n }\n return arr;\n }\n char[][] readCharArray(int n){\n return readCharArray(n,n);\n }\n int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}\n long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}\n String nextLine(){String str = \"\";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}\n }\n static void printArray(int[] arr){\n for(int x:arr){\n System.out.print(x+\" \");\n }\n System.out.println();\n }\n static final Random random=new Random();\n static void ruffleSort(int[] a) {\n int n=a.length;//shuffle, then sort\n for (int i=0; i<n; i++) {\n int oi=random.nextInt(n), temp=a[oi];\n a[oi]=a[i]; a[i]=temp;\n }\n Arrays.sort(a);\n }\n public static void main(String[] args) throws NumberFormatException, IOException {\n FastReader st = new FastReader();\n int n = st.nextInt();\n int d1,d2,count=0;\n boolean test=true;\n while(n-- > 0) {\n \td1 = st.nextInt();d2 = st.nextInt();\n \tif(d1==d2) {\n \t\tcount++;\n \t\tif(count==3) {\n \t\t\tSystem.out.println(\"Yes\");\n \t\t\ttest=false;\n \t\t\tbreak;\n \t\t}\n \t}\n \telse {\n \t\tcount=0;\n \t}\n }\n if(test) System.out.println(\"No\");\n }\n}",
"Main"
]
| import java.io.*;
import java.util.*;
public class Main{
static class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader(){br = new BufferedReader(new InputStreamReader(System.in));}
public FastReader(String fileName) throws FileNotFoundException{br = new BufferedReader(new FileReader(fileName));}
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());}
char[][] readCharArray(int n,int m) {
String str;
char[][] arr = new char[n][m];
for(int i=0;i<n;i++) {
str=nextLine();
for(int j=0;j<n;j++) {
arr[i][j]=str.charAt(j);
}
}
return arr;
}
char[][] readCharArray(int n){
return readCharArray(n,n);
}
int[] readArray(int n){int[] a=new int[n];for (int i=0; i<n; i++) a[i]=nextInt();return a;}
long[] readLongArray(int n){long[] a=new long[n];for (int i=0; i<n; i++) a[i]=nextLong();return a;}
String nextLine(){String str = "";try{str = br.readLine();}catch (IOException e){e.printStackTrace();}return str;}
}
static void printArray(int[] arr){
for(int x:arr){
System.out.print(x+" ");
}
System.out.println();
}
static final Random random=new Random();
static void ruffleSort(int[] a) {
int n=a.length;//shuffle, then sort
for (int i=0; i<n; i++) {
int oi=random.nextInt(n), temp=a[oi];
a[oi]=a[i]; a[i]=temp;
}
Arrays.sort(a);
}
public static void main(String[] args) throws NumberFormatException, IOException {
FastReader st = new FastReader();
int n = st.nextInt();
int d1,d2,count=0;
boolean test=true;
while(n-- > 0) {
d1 = st.nextInt();d2 = st.nextInt();
if(d1==d2) {
count++;
if(count==3) {
System.out.println("Yes");
test=false;
break;
}
}
else {
count=0;
}
}
if(test) System.out.println("No");
}
} |
[
7,
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,
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,
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,
13,
17,
29,
4,
18,
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
],
[
133,
11
],
[
133,
12
],
[
12,
13
],
[
12,
14
],
[
133,
15
],
[
15,
16
],
[
15,
17
],
[
133,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
20,
27
],
[
27,
28
],
[
28,
29
],
[
18,
30
],
[
30,
31
],
[
133,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
40,
41
],
[
40,
42
],
[
34,
44
],
[
44,
45
],
[
44,
46
],
[
34,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
48,
56
],
[
56,
57
],
[
57,
58
],
[
48,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
34,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
75,
85
],
[
85,
86
],
[
86,
87
],
[
75,
88
],
[
89,
89
],
[
89,
90
],
[
90,
91
],
[
92,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
97,
99
],
[
92,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
100,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
92,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
111,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
90,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
123,
126
],
[
122,
127
],
[
34,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
0,
132
],
[
132,
133
],
[
132,
134
]
]
| [
"//No sorceries shall prevail.\nimport java.util.*;\nimport java.io.*;\nimport java.lang.reflect.Array;\npublic class Main {\n\n\tstatic Scanner inp= new Scanner(System.in);\n\tstatic PrintWriter out= new PrintWriter(System.out);\n\tpublic static void main(String args[]) {\t\t \t\n\t \t\n\t\tMain g=new Main();\n\t\tg.main();\n\t\tout.close();\n\t\t\n\t}\n\t//I hate dp\n\t\n\tvoid main() {\n\t\t\n\t\tint n=inp.nextInt();\n\t\tint[] a=new int[n],b=new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=inp.nextInt();\n\t\t\tb[i]=inp.nextInt();\n\t\t}\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tout.println(\"No\");\n\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\t/*********************************************************************************************************************************************************************************************************\n\t * ti;. .:,:i: :,;;itt;. fDDEDDEEEEEEKEEEEEKEEEEEEEEEEEEEEEEE###WKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWW#WWWWWKKKKKEE :,:. f::::. .,ijLGDDDDDDDEEEEEEE*\n\t *ti;. .:,:i: .:,;itt;: GLDEEGEEEEEEEEEEEEEEEEEEDEEEEEEEEEEE#W#WEKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKKKKKKG. .::. f:,...,ijLGDDDDDDDDEEEEEE *\n\t *ti;. .:,:i: :,;;iti, :fDDEEEEEEEEEEEEEEEKEEEEDEEEEEEEEEEEW##WEEEKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWWKKKKKKEG .::. .f,::,ijLGDDDDDDDDEEEEEE *\n\t *ti;. .:,:i: .,,;iti;. LDDEEEEEEEEEEKEEEEWEEEDDEEEEEEEEEEE#WWWEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWKKKKKEDj .::. .:L;;ijfGDDDDDDDDDEEEEE *\n\t *ti;. .:,:i: .:,;;iii:LLDEEEEEEEEEEEKEEEEEEEEDEEEEEEEEEEEW#WWEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWKWWWWWWWWWWWWWWKKKKKKKEL .::. .:;LijLGGDDDDDDDDEEEEE *\n\t *ti;. .:,:;: :,;;ittfDEEEEEEEEEEEEEEEEKEEEGEEEEEEEEEEEKWWWEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWKKKKKKKELj .::. :,;jffGGDDDDDDDDDEEEE *\n\t *ti;. .:,:i: .,;;tGGDEEEEEEEEEEEKEEEKEEEDEEEEEEEEEEEEWWWEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWKWWWWWWKKKKKKKEEL .::. .:;itDGGDDDDDDDDDEEEE *\n\t *ti;. .:::;: :;ifDEEEEEEEEEEEEKEEEKEEEEEEEEEEEEEEEWWWEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WWWKKKKKKKKEEf .::. :,itfGEDDDDDDDDDDDEE *\n\t *ti;. .:::;: :GGEEEEEEEEEEEKEKEEKEEEEEEEEEEEEEEEEWWEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKKEEDG .::. .,;jfLGKDLDDDDDDEEDD *\n\t *ti;. .:::;: fDEEEEEEKKKKKKKKKEKEEEEEEEEEEEEEEE#WEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#KKKKKKKKKKEEf .:::. .,;tfLGDEDDDDDDDDEEE *\n\t *ti;. :::;: fDEEEEEEKKKKKKKKKKWKEEEEEEEEEEEEEEEWKEEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKKKEEft :::. .,;tfLGDDDKDDDDDDDDD *\n\t *ti;. .::;: fDEEEEEEKKKKKKKWKKKKKEEEEEEEEEEEEE#WEEWEEEEEDEEDEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKEEGG :,:. .,;tfLGGDDDKDDDDDDDD *\n\t *ti;. .:.;: tGDEEEEKKKKKKKKKKKKKKKKKEEEEEEEEEEEWEEKWEEEEEEEDEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKKKKKEEDf :::. .,;tfLGGDDDDEDDDDDDD *\n\t *ti;. .::;: fDEEEEEKKKKKKKKKKKWKKKKKKKKEEEEEEEWWEEWEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKEEEft.::. .,;tfLGGDDDDDDEDDDDD *\n\t *ti;. .:.;: tGDEEEKKKKKKKKKKKKKKKKKKKKKKEKEEEEE#EEWWEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKEEEGD:::. .,;tfLGGDDDDDDDEDDDD *\n\t *ti;. .:.,. LDEEEEKKKKKKKKKKWKWKKKKKKKKKKKKEEEKWEKW#EEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKW##KKKKKKEEEEf,,:. .,;tfLGGDDDDDDDDEDDD *\n\t *ti;. ..:.,. LGDEEEEKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEEW#WEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKK##KKKKKEEEEEfi;,. .,;tfLGGDDDDDDDDDKDD *\n\t *tt;. .:.,: jDEEEEKKKKKKKKKKWWKKKKKKKKKKKKKKKKKWKE#WWEEEEEEEEEEEEEEWEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKWWKKKKEEEEDfG;,: .,;tfLGGDDDDDDDDDDKD *\n\t *tii,. .:.,. tGDEEEEKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKKWWWKEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKW#KKKKEEEEDGGi;,. .,;tfLGGDDDDDDDDDDDE *\n\t *ti;;,:. .:.,: fDEEEEKKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEK#WWKEEEEEEEEEEEEDEEEEEEEEEEEEEEGEEEEEEEEEEEEEEEEEEEKKKKKKKWWKKEEEEEEDDf;;;,. .,;tfLGGDDDDDDDDDDDD *\n\t *tii;,,:.. ...,. ;LEEEEEKKKKKKWKKKKWKKKKKKKKKKKKKKKKKEKKW#WEEEEEEEEEEEEEjEEEEEEEEEKEEEEGEEEEEEEEEKEEEEEEEEEEEEEEEEE#WKEEEEEEDDf;;;;,: .,itfLGGDDDDDDDDDDDD *\n\t *ti;,,,,,:. ...,. LDEEEEKKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKK#W#WEEEEEEEEEEEDDLEEEEEEEEEWEEEEDEEEEEEEEEKEEEEEEEEEEEEEEEEEWWEEEEEEEDDfj,,,,,:. .,itfGGGDDDDDDDDDDDD *\n\t *tii,,,,::::. ...,: .fDEEEEKKKKKKWKKKKWWWKKKKKKKKKKKKKKKEKKW#WWEEEEEEEEEEEKiKEEKEEEEEEWEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEEWWEEEEEEEDDLD:::,,,:. .,ijfGGGDDDDDDDDDDDD *\n\t *ti;:::::::::.. .:.,: LDEEEEKKKKKKKWKKKKWWKKKKKKKKKKKKKKKKtKKWWWWKEEEEEEEEEDiiDEEEEEEEEWWEEEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEWKEEEEEDDDGL:. .:,,,: .,ijLGGGDDDDDDDDDDDD *\n\t *tt;. .::::::::.. ...,: :fDEEEKKKKKKKKKKKKWW#KKKKKKKKKKKKKKKKfKKWWWWKEEEEEEEEDti,DEKEEEEEEWWEEEDEEEEEEEEEKEEEEEEEEEEEEEDEEEEE#WEEEEEGGDGf:. .:,;,:. .,ijLGGDDDDDDDDDDDDD *\n\t *tt;. .:::::::.. ...,: GDEEEKKKKKKKKWKKKKWWWKKKWKKKKKKKWWWKDEKLWWWWKKEEEEEEDEi,LDEEEEEEEEWWEEEEEEEEEEEEEEEEEEEEEEEEEDEDEEEEEW#EEEEDDDDGf,. :,,,:...,ijLGGGDDDDDDDDDDDD *\n\t *tt;. .....::::.. ...,: fDEEEKKKKKKKKWKKKKWWWWKKKWKKKKKKKKKKfWKiWWW#KKEEEEEEEi;.EDfEEEDEEiWWEEEEEEEEEEEEDGKEEEEEEEEEEDEEEEEEEWWEEEEDDDGGLi. .,;,:::,ijLGGGDDDDDDDDDDDD *\n\t *tt;. ....:::::. ...,. iDEEEEKKKKKKKKWKKWKWWWWWKKWWWKKKKKKKKtWKt#WWWKKEEEEEDji..DDKDDEDEGiWKEEEEEEEEEEDDEjEEEEEEEEEEEDEEEEEEEKWKEEDDDDGGff. .:,;,,;ijLGGGDDDDDDDDDDDD *\n\t *tt;. ....::::.. .:.,: .LDEEEKKKKKKKKKKKKWWWWKWWWWWWWWWWKKKKWtKKiDWWWKKKEEEEKi:..DEDDDDDDiiWKEEEEEEEEEEDDEijDEEEEEKEEEEEEEEEEEEWWEEGDDDGGLG. .:,;;iijLGGGDDDDDDDDDDDD *\n\t *tt;. .....:::.. ...,. .fEEEEKKKKKKKKWKKKKWWWWWWWWWWWWWWKWKKKiKDiLWWWWKEEEEEi,..fD:DDDDDti;WEEEEEEEEEEKDDi:iDDEEEEWEEEEEEEEEEEE#WEEGDDDDGGG. :,iitjLGGGDDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. GDEEEKKKKKKKKKWKKKWWW#WWWWWWWWWWWKWKKjiEjitWWWKKWEEEDi...DDLDDDDji;;WEEEEEEEEEEEDEj.iDDEEEEWEEEEEEEEEEEEWWEEDDDDDDGf. .,;tjfLGGDDDDDDDDDDDD *\n\t *tti. ....::::.. ...,. fEEEKKKKKKKKKKKKKKKW#WWWWWWWWWWWWWWWWtiEiiiWWWKKEWKEi....D.EDDDEi;.fWEEEEEEEEEEDDfL.;EDDEEEWEEEEEEEEEEEEWWEEEDDDDDGf. :;ijfLGGDDDDDDDDDDDD *\n\t *tti. ....::::.. ...,. LDEEEKKKKKKKKKKKKKKWWWWWWWWWWWWWWWW####WKiiiWWWKKKEEK,...:E:DDDEii..GWEEEEEEEEDWDDiL.,KDDEEEWEEEEEEEEEEEEWWKEEDDDDDGf: .,itfLGGDDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. fDEEEKKKKKKKKKWKKKKWWWWWWWWWWWWW########WLiiWWWKKKEEjD...G,DDDDi;...EWEEEEEEEEDKDEii..LDDEEEWEEEEEEEEEEEEWWWEEDDDDDGfi .,;tfLGGGDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. iGEEEKKKKKKKKKKWKKKKWWWWWWWWWWWW###########KiWWWKKEEE,.D..D.DDDii:...KKEEEEEEEEEDDj:...tEDEEEWEEEEEEEEEEEEWWWEEEDDDDDLL .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....::::......:. LEEEKKKKKKKKKKWWKKKWWW#KWWWWWWWW#####W####W##KWWKKEEL..:D.jjDDi;,....KKEEEEEEEDfDDi...:iKDEEEWKEEEEEEEEEEEWWWEEEEDDDDLG .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ...::::::..,. :GEEEKKKKKKKKKKKKWWWWW##WWWWWWWWW##WKWK#W#W####WWKEEK.....G.DDti,.....KKEEEEEEDWGDf.,...iKDEEEWWEEEEEEEEEEEW#WEEEEEDDDGL .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....::::::,. GDEEKKKKKKKKKKKKKWWWW###WWWWWWWWWW#WWWK###W#####WKEKK.....jDDL;;......KKEEEEEEEEEDi.f...;KDEEEWWEEEEEEEEEEEWWWWEEEEEDDGf .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....:::,,. .LEEEKKKKKWKKKKKWWWWWW###WWWWWWWWWW#WWKW#WW##W#WWWKEKD:....:DD:;......;KEEEEEEEKiDD..f...,KKEEEWWEEEEEEEEEEEWWWWEEEEEDDDf .:;tjLLGGGDDDDDDDDDD *\n\t *tti. ...::,,,:. GDEEKKKKKKKKKKKKWWWWWWW#WWWWWWWWWWW#KjKWWWWWWWWWWWWEK.j,..;fD.;.......fKEEEEEDKG:Di..,....DKEEEWWEEEEEEKEKKKWWWWEEEEEEDDf .:;tjLLGGDDDDDDDDDDD *\n\t *jti. ...::,,,,:. .fEEEKKKKKWKKKKKKWWWWWWW#WWWWWWWWWWK#KKKWWWWWWWWWWWWWK..f:.:G.,:.......EKEEEEEKK;:E:.......fKEEEWWKEKEKKKKKKKW#WWEEEEEEDDf: .,;tfLLGGDDDDDDDDDDD *\n\t *tti. ...:,,,;;,: iDEEKKKKKWKKKKKKKWWWWWWW#WWWWWWWWWWK#WDKWWKKWWWWWWWWWE..;G:G..,........KKEEEEEKi.Gi..:.....tKEEKWWWKKKKKKKKKKW##WKEEEEEEDfi .,;tfLLGGGDDDDDDDDDD *\n\t *tti. ....::,,;;;,LEEKKKKKKWKKKKKWWWWWWW###WWWWWWWWWWKWWDKWEEEWKKWWWWWKKj.:LG..;.........EKEEEEKG;.G...;.....;KKEKWWWKKKKKKKKKKW##WWKEEEEEDfL .,;tfLGGGDDDDDDDDDDD *\n\t *jti. ...::::,;ijDEEKKKKKWKKKKKKWKWWWWW##WWWWWWWWWWWKK#KKGDGDWEEWKKWKKGE,.i;.:.........:EKEEEKE;.:L...j.....,KWEKWWWKKKKKKKKKK####WKKEEEEDLG .,;tfLGGGGDDDDDDDDDD *\n\t *jti. ...:...,,;GEEKKKKKWWKKKKKWWWWWWWW###WWWWWWWWWKKKWWKiLGGEDEDEKGKKiEG..;...........jKEEEKK;:.G....,.....:KKEWWWWKKKKKKKWKK####WKKKKEEEGL .,;tfLGGGGDDDDDDDDDD *\n\t *jti. ...:. .:,GEEKKKKKWKKKKKWWWWWWWW####WWWWWWWWWKKKWWKii;fDLGDK: EEi:E:.............EKEEKK;;..L...........KKKWWWWKKKKKKKWKK####WKKKWKEEDf .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. ,EEKKKKKWWKKKKKWWWWWWWWW###WWWWWWWWKKKKfWWLt;i,. fi EG..D:.............EKEKK;;..t....:.......KWKWWWWKKKKKKKWKK####WKKKWEEEDf:. .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. GEEKKKKKWKKKKKWWWWWWWWW####WWWWWWWKKKKKt;KKEfff .;t.................KKKKi;:..GtGGfG.......KWWWWWWKKKKKKKWKK###WWWKKKKEEEf,,: .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. GEKKKKKWWKKKKKWWWWWWWWWW##WWWWWWWKKKKKKt;EiKKKK, ...t................jEKKG;;..,.....,LGi....KWWWWWWKKKKKKWKKKW####WKKKKKEEL,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. .GEEKKKKKWKKKKKWWWWWWWWWW###WWWWWWWKKKKKKtiE::tGG........................EEEj;;...,.........:D..DKWWWWWWKKKKK#KKW###W#WKKKKKEEfj:,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. DEKKKKKWWKKKKKWWWWWWWWW####WWWWWWWKKKKKKiiE:::.::.......................EEi;;...j.....f......:iDKWWWWWWKKKKK#WW######WKKKKKEELG :,,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. fEEKKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKK;tE::..........................DD;.;,.::......;........EWWWWWWWKKKKW#WW#####WWKKKWKKELG .:,,,:::,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. .DEKEKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKE,iD::..........................D..,;.,;tLffi...........DWDWWWW#KKKWWWWW#####W#KKKWKEEGL .:,;,,,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. ;EEKKKKWWKKKKKWWWWWW#WWWW####WWWWWWKKKKKEL:iD:..........................j ..;..;;:.....i,........DKtWWWWWKKWWWWWW#####WWWKKKEKEDf .:,;;;itfGGGDDDDDDDDDDDD *\n\t *jti. ...:. DEKKKKKWWKKKKWWWWWWW#WWWW####WWWWWWKKKKKEj:iG...............................:....................GKiWWWWWKKWW#WWW######WWKKKKKEEf .,;iitfGGGDDDDDDDDDDDD *\n\t *jti. ...:.:EKKKKKWWKKKKKWWWWWWW#WWW#####WWWWWKWKKKKEi:if:.................................iEKEKKKKKKDj......DKiWWWWWKWK##WW#######WWKKK:KEEL .:;itfGGGDDDDDDDDDDDD *\n\t *jji. ...:,DEEKKKWWWKWKKWWWWWWWWWWWW#####WWWWWWWKKKKEi:it..................................j. KKKKKKKKKKKf..DKiWWWWWKWW##WW#######WWKKK,KEEf .,;tfGGGDDDDDDDDDDDD *\n\t *jji. ..L:iDEEKKKWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKKi.i;.................................. . KKKWWWWWWWWK..DGiWWWWWKK##WWW#####W#WWKKKjEKEL, .:;tfGGGDDDDDDDDDDDD *\n\t *jji. .f:::EEEKKKWWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKK;.i,.................................:: KKEKWWWWWWfWK..EiiWWWWWKWW#WW##########KKKD,KELj .:;tfGGDDDDDDDDDDDDD *\n\t *jji. .t::::,DEEKKKWWKKKKWWWWWWWWW#WWWW#####WWWWKKWKKKEK;.i:.................................GDDEEEKKKWWWWWtWWD.E;iWWWWWW###WW#########WWKKK.EEDG .:;tfGGGDDDDDDDDDDDD *\n\t *jji. . j..::::EKEKKKWWWKKKKWWWWWWWWW#WWW######WWWWKKWKKKEK;.t:.................................ELLEDDEEEWWWWEtWK,.KiiWWWWWW###W##########WWKKK:EEEG .;tjfLLGDDDDDDDDDDDDDDD *\n\t *jji. i.::::::,EEEKKWWWKKKKKWWWWWWWWW#WWW#####WWWWWKWKKKKEE,.t..................................DfiEGDDDEEKKKttKWG.KiiWWWWW##WWW##########WWKKK:fEEL ,fGGGDDDDDDDDEEEDDDDDDDDDD *\n\t *jji. .;:..:::::DEEEKKWWWKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKED,.t..................................ifjDDGGEGDKK.ttKKE.DiWWWWW###WW##########WWWKKK:.KELiLGGGGDDDDDDDDDDDDEEEDDDDDDD *\n\t *jji. i.:.::::::,KEEKKWWWKKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKEL:.j..................................GGf,;ifLLED .iiKKi:fWWWWWW##W#W##########WWWKKK:.KKLGGDDDDDDDDDDDDDDDDEDDEEDDDDD *\n\t *jji. .j:.::::::::EEEKKKWWWKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKf:.f..................................:EEfftf .,. ;iE,..jWWWWWWW###W############WWKKK,:KKGDDDDDDDDDDDDDDDDDDDDDDDEDDDD *\n\t *jji. .:.::::::::,,EEEKKWWWKKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKt..G....................................EEELL; .j....tKWWWWWWW################WWWKKtfGKGEDDDDDDDDDDDDDDDDDDDDDDDEEDD *\n\t *jji. :...:::::::,,jEEKKWWWWKKKKKKWWWWWWWWW##KWW#####KWWWWWWKKKKEi..D....................................:jEEE.........;KKWWWWWWWW#WW##W##########WWKKDLGKEKDDDDDDDDDDDDDDDDDDDDDDDDDED *\n\t *jji. i:.::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWW##WWW#####WWWWWWWKKKKKi..D......................................:::::......,KKKWWWWWWWWW#####W########WWWKKKGGKKEGGGGGGGGDDDDDDDDDDDDDDDDDDE *\n\t *jji. i..:::::::::,,tEEKKWWWWKKKKKWWWWWWWWWWW##WW######WWWWWWWKKKKKi..D......................................::::......:EKKKWWWWWWWWWWW##WW########W#WKKWGGKKGGGGGGGGGGGGGGGDDDDDDDDDDDDD *\n\t *jji. .:::::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWWW##WW#####WWWWWWWWKKKKKi..D....................................:::::::::..tELii;KWWWWWWWWWW##WW######WWWWWWKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGDG *\n\t *jjt. :.::::::::,,,,fEEKKWWWWKKKKKKWWWWWWWWWW###WW####WWWWWWW#WKKKKKi..D....................................:::::::.:.,;;;;;;,KKWWWWWWWWW#WW########WWWKKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGGG *\n\t *jji. ;.::::::::,,,,;EEEKWWWWWKKKKKWWWWWWWWWWWW##WW###WKWWWWWK#WKKKKKi..G......................................:::::::,;;;;:...KKKWWWWWWWWWKWW#######WWWWKKGLGKDGGGGGGLLGGGGGGGGGGGGGGGGGGG *\n\t *jjt. f.:::::::::,,,,fEEKKWWWWWKKKKKWWWWWWWWWWW###WW##WKKWWWWWW#WKKKKK;.jt........i.............................:::::::;j;;....:E.KKKWWWWWWWKWW#####W#WWWWKKLLGWEEGGGGGLGGGGGGGGGGGGGGGGGGGG *\n\t *jjt. ...:::::::,,,,,;DEEKWWWWWKKKKKWWWWWWWWWWWW####WWWKKKWWWWWWWWKKKKK;.E;.........t.............................:::::ii;;.....D...KKWWWWWWWKWW#####WWEWWWKKGGGEKKGGGGGLGGGGGGGGGGGGGLGGGGGG *\n\t *fji. ;.:::::::,,,,,;LEEKKWWWWWKKKKKWWWWWWWWWWWW####KWKKKKWWWWWWWWKKKKKi.D;..........j.............................:::tt;,.....:.....KKWWWWWWKWWWW##WWWGWWWKKGGGGKEGGGGGGGGGGGGGGGGGGGLLGGGGL *\n\t *fji. t::::::::,,,,,,;EEEKWWWWWKKKKKKKWWWWWWWWWWW##WKWKKKKKWWWWWWWWKKKKKi:D;............j...........................::LL;,.............KKWWWWWKWWWWWWWWWGWWWKKGGGGKGGGGGGGGGGGGGGGGGGGGLLGGGGL *\n\t *fjt: .:::::::,,,,,,,DEEKWWWWWWKKKKKKKWWWWWWWWWWWWKKWKKKKKKWWWWK#WWKKKKWitE;........... ............................:G;;:...............KKKWWKKWWWWWWWWWGWWWKKGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGL *\n\t *fjji;:. .f:::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWWKKKKKKKKKKKWWKWWWWWKKKKWGKD;........................................L;;..................DKKWKKWWWWWWWWWGWWWKKDGGGKDGGGGGGGGGGGGGGGGGGGGGGGGGG *\n\t *fjjtii;,:. :::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWKKKKKKKKKKKKWWWWWW#WWKKKKWiEj;......................................:i,;....,...............;KKEKWWWWWWWWWGKWWKKDDGGDEGGGDGGGGGDGGGGGGGGGGGGGGGG *\n\t *fjtiiiii;;:. j::::::,,,,,,,;;EEEKWWWWW#KKKKKWWWWWWWWWKKKKKKWKKKKKKKWWWWWWWWWKKKKWtEL;:....................................;;;:...,;j................:KEEWWWWWWWWWDDWWKKDDDDDKDDDDDDDDDDDDDDDGGGGGGGGGGG *\n\t *fjti;;iiii;;,:::::::,,,,,,,,;EEEKWWWWWWWKKKKWWWWWWWWKKKKKKKWKKKKKKKWWWWWWW#W#KKKKWEEii;...................................f;:....,;L...................EEKWWWWWWWWDDWWKKDDDDDKEDDDDDDDDDDDDDDDDDDDDDGGGG *\n\t *fjt,,,;;;;ii;f::::::,,,,,,,;;EEKWWWWWWWKKKKKWWWKWWKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWKEij;:...............................:G;,.....,;f....................:tKKWWWWWWWDDWWKKDDDDDKKDDDDDDDDDDDDDDDDDDDDDDDDD *\n\t *jjt. ..:,;;;;,::::,,,,,,,,;;GEEWWWWWWWWKKKKWKKWKKKKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWEDi;j;............................,Li;L;;;..,;;f........................KKKKWWWKDDWWKKDDDGDKKGGGGGGGGDGDDDDDDDDDDDDDDD *\n\t *fjt. .:,,,:::::,,,,,,,;;;EEKWWWWWWWKKKKKKWKKKKKKKKKKKKKKKKKKKKKWKKKWKW##W#KKKKWEti;;G;........................tEEEL;;;;;;;;;;L..........................DKKKKKEDDWWKEDGftiLE;;;;itjLGGGGGGDDDDDDDDDDD *\n\t *fjt. .j::::,,,,,,,;;;DEEWWWWWWWWKKKKWKKKKKKKKKKKKKKKKKKKKKKKWKKWWWK##W#KKKKKEii;;;L;...................iDEEEEEEKKi;j;;;;jD.....:......................,KKKKDGGEKKE:::::;E::::::::::,tLGGDDDDDDDDDD *\n\t *fjt. .;:::,,,,,,,;;;;EEKWWWWWWWWKWKKKKKKKKKKKKKKKWKKKKKKKKKKWKKWWWW#WW#KKKKKKii;;;;f;.............:tDEEEEEKKKKKKKKEti;;;L...............................EEKf;:iKKE::::::E::::::::::::::ifDDDDDDDDD *\n\t *fjt: :::,,,,,,,,;;;DEEWWWWWWWWWEKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####KKKKKEiii;;;;f,.........iDEEEEKKKKKKKKKKKKKKKf;iG......i..........................fK::::KKE::::::E::::::::::::::::,tGGDDDDD *\n\t *fjt: t:::,,,,,,;;;;iDEKWWWWWWKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####WKKKKLiii;;;;;L,....,Li;EDEEEEKKKKKKKKKKKKKKKKiG......;:...........................:i:::KKE:::::,E,::::::::::::::::::iGDDDD *\n\t *jjt. f::,,,,,,,;;;;GEEWWWWKEEKEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKWWWWW###WWKKKKiii;;;;;;;G,;L;;iiEEEEEEEKKKKKKKKKKKKKWWKE......;t.........:....................j::KEE:,::,,D,,::::,,,,,,:::::::::tDDD *\n\t *fjt:. ,::,,,,,,,;;;;EEWWKEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKKWWWWW#W#KKKKKKiiiiii;;;;;i;;iiiEEKEEKKWKKKKKKKWKKKKKWWWGi;...;t......,;;;;,....................:,EEE,,,,,,D,,,,,,,,,,,,,,,,::,::::tG *\n\t *fjt:. ,::,,,,,,,;;;;DEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWW#W#KKKKKKiiiii;;i;;;;;iiiKKKEKKKKWWKWWWWWWKKKKWWWWW;;;:;L.....;;;;;;;;;....................,KEE,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,; *\n\t *fjt:. f:,,,,,,,;;;;jEDEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWW#W##KKKKKKiiiiiiii;i;;iiiEKKKKKKKKWKWWWWWWWWKKKWWWWWKi;;i.....,jEEfGi;;;;;...................EED,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,, *\n\t *fjt:. .f::,,,,,,;;jEEDEEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWKWWWWW###KKKKKLiiiiiiiiiiiiiiEEKKKKKKKKWWWWWWWWWWWWKWWWWWWGi;i;,..;jDDDKEGi;;;;;;:................EED,,,,,,D,,,,,,,,,,,,,,,,,,,,,,,,, *\n\t *fjt:. .. ;::,,,,,;;EDDEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKW#WW####KWKKKiiiiiiiiiiiiijKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWt;i;;;;i;DDDDDDGi;;;;;;;;:.............EDf;,,,;,G;;;;;;;;;;;;;;;,,,,,,,,,, *\n\t *fjt:......:,,,,,,;LDDDEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWWKWWWW####KKKKKiiiiiiiiiiijKEKKWKKKKKKKWWWWWWWWWWWWWWWWWWWWWWiLiii;i;DEEEEDDE;i;;;;;;;;;:..........EDi,;;;;;L;;;;;;;;;;;;;;;;;;,,,,,,, *\n\t *fjt:......:,,,,,;EDDDEEKEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKWWWWKKWWW##W#KWKKWEiiiiiijGKKKKKWWKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKi;iiiiDDEEEEEEDEi;;;;;;;;;;;;;,:.....ED;;;;;;;j;;;;;;;;;;;;;;;;;;;;;;;,, *\n\t *fjt:.....t,,,,,;DDDDEEEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKWWWW##WKWKKWKiiiKKKKKKKKKWWKKKKKKKKWWWWWWWWWWWWWWW#WWWWWWWWWiiiiifLEEEEEEEEDi;i;;;;;;;;;;;;.....DD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *\n\t *fjt:.....G,,,,,GDDDEEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKKWWWKKKWWW###WKWKKWKitKKKKKKKKKWKKKKKKKKKKWWWWWWWWWWWWWW###WWWWWWWWEiiiiiiiEEEEEEEEDGiiii;;;;;;;;;.....GD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *\n\t *fjt:.....L,,,,;GDDDEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWDGWWW###KKWWKWKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWW####WWWWWWWWWiiiiiiiiEEEEEEEEEEDi;i;;;;;;;;.....Lj;;;;;;i;iiiiii;;;;;;ii;;;;;;;;;;; *\n\t ***********************************************************************************************************************************************************************************************************/\n\n\t\t\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.lang.reflect.Array;",
"Array",
"java.lang.reflect",
"public class Main {\n\n\tstatic Scanner inp= new Scanner(System.in);\n\tstatic PrintWriter out= new PrintWriter(System.out);\n\tpublic static void main(String args[]) {\t\t \t\n\t \t\n\t\tMain g=new Main();\n\t\tg.main();\n\t\tout.close();\n\t\t\n\t}\n\t//I hate dp\n\t\n\tvoid main() {\n\t\t\n\t\tint n=inp.nextInt();\n\t\tint[] a=new int[n],b=new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=inp.nextInt();\n\t\t\tb[i]=inp.nextInt();\n\t\t}\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tout.println(\"No\");\n\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\t/*********************************************************************************************************************************************************************************************************\n\t * ti;. .:,:i: :,;;itt;. fDDEDDEEEEEEKEEEEEKEEEEEEEEEEEEEEEEE###WKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWW#WWWWWKKKKKEE :,:. f::::. .,ijLGDDDDDDDEEEEEEE*\n\t *ti;. .:,:i: .:,;itt;: GLDEEGEEEEEEEEEEEEEEEEEEDEEEEEEEEEEE#W#WEKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKKKKKKG. .::. f:,...,ijLGDDDDDDDDEEEEEE *\n\t *ti;. .:,:i: :,;;iti, :fDDEEEEEEEEEEEEEEEKEEEEDEEEEEEEEEEEW##WEEEKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWWKKKKKKEG .::. .f,::,ijLGDDDDDDDDEEEEEE *\n\t *ti;. .:,:i: .,,;iti;. LDDEEEEEEEEEEKEEEEWEEEDDEEEEEEEEEEE#WWWEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWKKKKKEDj .::. .:L;;ijfGDDDDDDDDDEEEEE *\n\t *ti;. .:,:i: .:,;;iii:LLDEEEEEEEEEEEKEEEEEEEEDEEEEEEEEEEEW#WWEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWKWWWWWWWWWWWWWWKKKKKKKEL .::. .:;LijLGGDDDDDDDDEEEEE *\n\t *ti;. .:,:;: :,;;ittfDEEEEEEEEEEEEEEEEKEEEGEEEEEEEEEEEKWWWEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWKKKKKKKELj .::. :,;jffGGDDDDDDDDDEEEE *\n\t *ti;. .:,:i: .,;;tGGDEEEEEEEEEEEKEEEKEEEDEEEEEEEEEEEEWWWEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWKWWWWWWKKKKKKKEEL .::. .:;itDGGDDDDDDDDDEEEE *\n\t *ti;. .:::;: :;ifDEEEEEEEEEEEEKEEEKEEEEEEEEEEEEEEEWWWEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WWWKKKKKKKKEEf .::. :,itfGEDDDDDDDDDDDEE *\n\t *ti;. .:::;: :GGEEEEEEEEEEEKEKEEKEEEEEEEEEEEEEEEEWWEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKKEEDG .::. .,;jfLGKDLDDDDDDEEDD *\n\t *ti;. .:::;: fDEEEEEEKKKKKKKKKEKEEEEEEEEEEEEEEE#WEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#KKKKKKKKKKEEf .:::. .,;tfLGDEDDDDDDDDEEE *\n\t *ti;. :::;: fDEEEEEEKKKKKKKKKKWKEEEEEEEEEEEEEEEWKEEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKKKEEft :::. .,;tfLGDDDKDDDDDDDDD *\n\t *ti;. .::;: fDEEEEEEKKKKKKKWKKKKKEEEEEEEEEEEEE#WEEWEEEEEDEEDEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKEEGG :,:. .,;tfLGGDDDKDDDDDDDD *\n\t *ti;. .:.;: tGDEEEEKKKKKKKKKKKKKKKKKEEEEEEEEEEEWEEKWEEEEEEEDEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKKKKKEEDf :::. .,;tfLGGDDDDEDDDDDDD *\n\t *ti;. .::;: fDEEEEEKKKKKKKKKKKWKKKKKKKKEEEEEEEWWEEWEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKEEEft.::. .,;tfLGGDDDDDDEDDDDD *\n\t *ti;. .:.;: tGDEEEKKKKKKKKKKKKKKKKKKKKKKEKEEEEE#EEWWEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKEEEGD:::. .,;tfLGGDDDDDDDEDDDD *\n\t *ti;. .:.,. LDEEEEKKKKKKKKKKWKWKKKKKKKKKKKKEEEKWEKW#EEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKW##KKKKKKEEEEf,,:. .,;tfLGGDDDDDDDDEDDD *\n\t *ti;. ..:.,. LGDEEEEKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEEW#WEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKK##KKKKKEEEEEfi;,. .,;tfLGGDDDDDDDDDKDD *\n\t *tt;. .:.,: jDEEEEKKKKKKKKKKWWKKKKKKKKKKKKKKKKKWKE#WWEEEEEEEEEEEEEEWEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKWWKKKKEEEEDfG;,: .,;tfLGGDDDDDDDDDDKD *\n\t *tii,. .:.,. tGDEEEEKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKKWWWKEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKW#KKKKEEEEDGGi;,. .,;tfLGGDDDDDDDDDDDE *\n\t *ti;;,:. .:.,: fDEEEEKKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEK#WWKEEEEEEEEEEEEDEEEEEEEEEEEEEEGEEEEEEEEEEEEEEEEEEEKKKKKKKWWKKEEEEEEDDf;;;,. .,;tfLGGDDDDDDDDDDDD *\n\t *tii;,,:.. ...,. ;LEEEEEKKKKKKWKKKKWKKKKKKKKKKKKKKKKKEKKW#WEEEEEEEEEEEEEjEEEEEEEEEKEEEEGEEEEEEEEEKEEEEEEEEEEEEEEEEE#WKEEEEEEDDf;;;;,: .,itfLGGDDDDDDDDDDDD *\n\t *ti;,,,,,:. ...,. LDEEEEKKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKK#W#WEEEEEEEEEEEDDLEEEEEEEEEWEEEEDEEEEEEEEEKEEEEEEEEEEEEEEEEEWWEEEEEEEDDfj,,,,,:. .,itfGGGDDDDDDDDDDDD *\n\t *tii,,,,::::. ...,: .fDEEEEKKKKKKWKKKKWWWKKKKKKKKKKKKKKKEKKW#WWEEEEEEEEEEEKiKEEKEEEEEEWEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEEWWEEEEEEEDDLD:::,,,:. .,ijfGGGDDDDDDDDDDDD *\n\t *ti;:::::::::.. .:.,: LDEEEEKKKKKKKWKKKKWWKKKKKKKKKKKKKKKKtKKWWWWKEEEEEEEEEDiiDEEEEEEEEWWEEEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEWKEEEEEDDDGL:. .:,,,: .,ijLGGGDDDDDDDDDDDD *\n\t *tt;. .::::::::.. ...,: :fDEEEKKKKKKKKKKKKWW#KKKKKKKKKKKKKKKKfKKWWWWKEEEEEEEEDti,DEKEEEEEEWWEEEDEEEEEEEEEKEEEEEEEEEEEEEDEEEEE#WEEEEEGGDGf:. .:,;,:. .,ijLGGDDDDDDDDDDDDD *\n\t *tt;. .:::::::.. ...,: GDEEEKKKKKKKKWKKKKWWWKKKWKKKKKKKWWWKDEKLWWWWKKEEEEEEDEi,LDEEEEEEEEWWEEEEEEEEEEEEEEEEEEEEEEEEEDEDEEEEEW#EEEEDDDDGf,. :,,,:...,ijLGGGDDDDDDDDDDDD *\n\t *tt;. .....::::.. ...,: fDEEEKKKKKKKKWKKKKWWWWKKKWKKKKKKKKKKfWKiWWW#KKEEEEEEEi;.EDfEEEDEEiWWEEEEEEEEEEEEDGKEEEEEEEEEEDEEEEEEEWWEEEEDDDGGLi. .,;,:::,ijLGGGDDDDDDDDDDDD *\n\t *tt;. ....:::::. ...,. iDEEEEKKKKKKKKWKKWKWWWWWKKWWWKKKKKKKKtWKt#WWWKKEEEEEDji..DDKDDEDEGiWKEEEEEEEEEEDDEjEEEEEEEEEEEDEEEEEEEKWKEEDDDDGGff. .:,;,,;ijLGGGDDDDDDDDDDDD *\n\t *tt;. ....::::.. .:.,: .LDEEEKKKKKKKKKKKKWWWWKWWWWWWWWWWKKKKWtKKiDWWWKKKEEEEKi:..DEDDDDDDiiWKEEEEEEEEEEDDEijDEEEEEKEEEEEEEEEEEEWWEEGDDDGGLG. .:,;;iijLGGGDDDDDDDDDDDD *\n\t *tt;. .....:::.. ...,. .fEEEEKKKKKKKKWKKKKWWWWWWWWWWWWWWKWKKKiKDiLWWWWKEEEEEi,..fD:DDDDDti;WEEEEEEEEEEKDDi:iDDEEEEWEEEEEEEEEEEE#WEEGDDDDGGG. :,iitjLGGGDDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. GDEEEKKKKKKKKKWKKKWWW#WWWWWWWWWWWKWKKjiEjitWWWKKWEEEDi...DDLDDDDji;;WEEEEEEEEEEEDEj.iDDEEEEWEEEEEEEEEEEEWWEEDDDDDDGf. .,;tjfLGGDDDDDDDDDDDD *\n\t *tti. ....::::.. ...,. fEEEKKKKKKKKKKKKKKKW#WWWWWWWWWWWWWWWWtiEiiiWWWKKEWKEi....D.EDDDEi;.fWEEEEEEEEEEDDfL.;EDDEEEWEEEEEEEEEEEEWWEEEDDDDDGf. :;ijfLGGDDDDDDDDDDDD *\n\t *tti. ....::::.. ...,. LDEEEKKKKKKKKKKKKKKWWWWWWWWWWWWWWWW####WKiiiWWWKKKEEK,...:E:DDDEii..GWEEEEEEEEDWDDiL.,KDDEEEWEEEEEEEEEEEEWWKEEDDDDDGf: .,itfLGGDDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. fDEEEKKKKKKKKKWKKKKWWWWWWWWWWWWW########WLiiWWWKKKEEjD...G,DDDDi;...EWEEEEEEEEDKDEii..LDDEEEWEEEEEEEEEEEEWWWEEDDDDDGfi .,;tfLGGGDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. iGEEEKKKKKKKKKKWKKKKWWWWWWWWWWWW###########KiWWWKKEEE,.D..D.DDDii:...KKEEEEEEEEEDDj:...tEDEEEWEEEEEEEEEEEEWWWEEEDDDDDLL .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....::::......:. LEEEKKKKKKKKKKWWKKKWWW#KWWWWWWWW#####W####W##KWWKKEEL..:D.jjDDi;,....KKEEEEEEEDfDDi...:iKDEEEWKEEEEEEEEEEEWWWEEEEDDDDLG .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ...::::::..,. :GEEEKKKKKKKKKKKKWWWWW##WWWWWWWWW##WKWK#W#W####WWKEEK.....G.DDti,.....KKEEEEEEDWGDf.,...iKDEEEWWEEEEEEEEEEEW#WEEEEEDDDGL .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....::::::,. GDEEKKKKKKKKKKKKKWWWW###WWWWWWWWWW#WWWK###W#####WKEKK.....jDDL;;......KKEEEEEEEEEDi.f...;KDEEEWWEEEEEEEEEEEWWWWEEEEEDDGf .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....:::,,. .LEEEKKKKKWKKKKKWWWWWW###WWWWWWWWWW#WWKW#WW##W#WWWKEKD:....:DD:;......;KEEEEEEEKiDD..f...,KKEEEWWEEEEEEEEEEEWWWWEEEEEDDDf .:;tjLLGGGDDDDDDDDDD *\n\t *tti. ...::,,,:. GDEEKKKKKKKKKKKKWWWWWWW#WWWWWWWWWWW#KjKWWWWWWWWWWWWEK.j,..;fD.;.......fKEEEEEDKG:Di..,....DKEEEWWEEEEEEKEKKKWWWWEEEEEEDDf .:;tjLLGGDDDDDDDDDDD *\n\t *jti. ...::,,,,:. .fEEEKKKKKWKKKKKKWWWWWWW#WWWWWWWWWWK#KKKWWWWWWWWWWWWWK..f:.:G.,:.......EKEEEEEKK;:E:.......fKEEEWWKEKEKKKKKKKW#WWEEEEEEDDf: .,;tfLLGGDDDDDDDDDDD *\n\t *tti. ...:,,,;;,: iDEEKKKKKWKKKKKKKWWWWWWW#WWWWWWWWWWK#WDKWWKKWWWWWWWWWE..;G:G..,........KKEEEEEKi.Gi..:.....tKEEKWWWKKKKKKKKKKW##WKEEEEEEDfi .,;tfLLGGGDDDDDDDDDD *\n\t *tti. ....::,,;;;,LEEKKKKKKWKKKKKWWWWWWW###WWWWWWWWWWKWWDKWEEEWKKWWWWWKKj.:LG..;.........EKEEEEKG;.G...;.....;KKEKWWWKKKKKKKKKKW##WWKEEEEEDfL .,;tfLGGGDDDDDDDDDDD *\n\t *jti. ...::::,;ijDEEKKKKKWKKKKKKWKWWWWW##WWWWWWWWWWWKK#KKGDGDWEEWKKWKKGE,.i;.:.........:EKEEEKE;.:L...j.....,KWEKWWWKKKKKKKKKK####WKKEEEEDLG .,;tfLGGGGDDDDDDDDDD *\n\t *jti. ...:...,,;GEEKKKKKWWKKKKKWWWWWWWW###WWWWWWWWWKKKWWKiLGGEDEDEKGKKiEG..;...........jKEEEKK;:.G....,.....:KKEWWWWKKKKKKKWKK####WKKKKEEEGL .,;tfLGGGGDDDDDDDDDD *\n\t *jti. ...:. .:,GEEKKKKKWKKKKKWWWWWWWW####WWWWWWWWWKKKWWKii;fDLGDK: EEi:E:.............EKEEKK;;..L...........KKKWWWWKKKKKKKWKK####WKKKWKEEDf .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. ,EEKKKKKWWKKKKKWWWWWWWWW###WWWWWWWWKKKKfWWLt;i,. fi EG..D:.............EKEKK;;..t....:.......KWKWWWWKKKKKKKWKK####WKKKWEEEDf:. .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. GEEKKKKKWKKKKKWWWWWWWWW####WWWWWWWKKKKKt;KKEfff .;t.................KKKKi;:..GtGGfG.......KWWWWWWKKKKKKKWKK###WWWKKKKEEEf,,: .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. GEKKKKKWWKKKKKWWWWWWWWWW##WWWWWWWKKKKKKt;EiKKKK, ...t................jEKKG;;..,.....,LGi....KWWWWWWKKKKKKWKKKW####WKKKKKEEL,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. .GEEKKKKKWKKKKKWWWWWWWWWW###WWWWWWWKKKKKKtiE::tGG........................EEEj;;...,.........:D..DKWWWWWWKKKKK#KKW###W#WKKKKKEEfj:,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. DEKKKKKWWKKKKKWWWWWWWWW####WWWWWWWKKKKKKiiE:::.::.......................EEi;;...j.....f......:iDKWWWWWWKKKKK#WW######WKKKKKEELG :,,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. fEEKKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKK;tE::..........................DD;.;,.::......;........EWWWWWWWKKKKW#WW#####WWKKKWKKELG .:,,,:::,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. .DEKEKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKE,iD::..........................D..,;.,;tLffi...........DWDWWWW#KKKWWWWW#####W#KKKWKEEGL .:,;,,,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. ;EEKKKKWWKKKKKWWWWWW#WWWW####WWWWWWKKKKKEL:iD:..........................j ..;..;;:.....i,........DKtWWWWWKKWWWWWW#####WWWKKKEKEDf .:,;;;itfGGGDDDDDDDDDDDD *\n\t *jti. ...:. DEKKKKKWWKKKKWWWWWWW#WWWW####WWWWWWKKKKKEj:iG...............................:....................GKiWWWWWKKWW#WWW######WWKKKKKEEf .,;iitfGGGDDDDDDDDDDDD *\n\t *jti. ...:.:EKKKKKWWKKKKKWWWWWWW#WWW#####WWWWWKWKKKKEi:if:.................................iEKEKKKKKKDj......DKiWWWWWKWK##WW#######WWKKK:KEEL .:;itfGGGDDDDDDDDDDDD *\n\t *jji. ...:,DEEKKKWWWKWKKWWWWWWWWWWWW#####WWWWWWWKKKKEi:it..................................j. KKKKKKKKKKKf..DKiWWWWWKWW##WW#######WWKKK,KEEf .,;tfGGGDDDDDDDDDDDD *\n\t *jji. ..L:iDEEKKKWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKKi.i;.................................. . KKKWWWWWWWWK..DGiWWWWWKK##WWW#####W#WWKKKjEKEL, .:;tfGGGDDDDDDDDDDDD *\n\t *jji. .f:::EEEKKKWWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKK;.i,.................................:: KKEKWWWWWWfWK..EiiWWWWWKWW#WW##########KKKD,KELj .:;tfGGDDDDDDDDDDDDD *\n\t *jji. .t::::,DEEKKKWWKKKKWWWWWWWWW#WWWW#####WWWWKKWKKKEK;.i:.................................GDDEEEKKKWWWWWtWWD.E;iWWWWWW###WW#########WWKKK.EEDG .:;tfGGGDDDDDDDDDDDD *\n\t *jji. . j..::::EKEKKKWWWKKKKWWWWWWWWW#WWW######WWWWKKWKKKEK;.t:.................................ELLEDDEEEWWWWEtWK,.KiiWWWWWW###W##########WWKKK:EEEG .;tjfLLGDDDDDDDDDDDDDDD *\n\t *jji. i.::::::,EEEKKWWWKKKKKWWWWWWWWW#WWW#####WWWWWKWKKKKEE,.t..................................DfiEGDDDEEKKKttKWG.KiiWWWWW##WWW##########WWKKK:fEEL ,fGGGDDDDDDDDEEEDDDDDDDDDD *\n\t *jji. .;:..:::::DEEEKKWWWKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKED,.t..................................ifjDDGGEGDKK.ttKKE.DiWWWWW###WW##########WWWKKK:.KELiLGGGGDDDDDDDDDDDDEEEDDDDDDD *\n\t *jji. i.:.::::::,KEEKKWWWKKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKEL:.j..................................GGf,;ifLLED .iiKKi:fWWWWWW##W#W##########WWWKKK:.KKLGGDDDDDDDDDDDDDDDDEDDEEDDDDD *\n\t *jji. .j:.::::::::EEEKKKWWWKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKf:.f..................................:EEfftf .,. ;iE,..jWWWWWWW###W############WWKKK,:KKGDDDDDDDDDDDDDDDDDDDDDDDEDDDD *\n\t *jji. .:.::::::::,,EEEKKWWWKKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKt..G....................................EEELL; .j....tKWWWWWWW################WWWKKtfGKGEDDDDDDDDDDDDDDDDDDDDDDDEEDD *\n\t *jji. :...:::::::,,jEEKKWWWWKKKKKKWWWWWWWWW##KWW#####KWWWWWWKKKKEi..D....................................:jEEE.........;KKWWWWWWWW#WW##W##########WWKKDLGKEKDDDDDDDDDDDDDDDDDDDDDDDDDED *\n\t *jji. i:.::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWW##WWW#####WWWWWWWKKKKKi..D......................................:::::......,KKKWWWWWWWWW#####W########WWWKKKGGKKEGGGGGGGGDDDDDDDDDDDDDDDDDDE *\n\t *jji. i..:::::::::,,tEEKKWWWWKKKKKWWWWWWWWWWW##WW######WWWWWWWKKKKKi..D......................................::::......:EKKKWWWWWWWWWWW##WW########W#WKKWGGKKGGGGGGGGGGGGGGGDDDDDDDDDDDDD *\n\t *jji. .:::::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWWW##WW#####WWWWWWWWKKKKKi..D....................................:::::::::..tELii;KWWWWWWWWWW##WW######WWWWWWKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGDG *\n\t *jjt. :.::::::::,,,,fEEKKWWWWKKKKKKWWWWWWWWWW###WW####WWWWWWW#WKKKKKi..D....................................:::::::.:.,;;;;;;,KKWWWWWWWWW#WW########WWWKKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGGG *\n\t *jji. ;.::::::::,,,,;EEEKWWWWWKKKKKWWWWWWWWWWWW##WW###WKWWWWWK#WKKKKKi..G......................................:::::::,;;;;:...KKKWWWWWWWWWKWW#######WWWWKKGLGKDGGGGGGLLGGGGGGGGGGGGGGGGGGG *\n\t *jjt. f.:::::::::,,,,fEEKKWWWWWKKKKKWWWWWWWWWWW###WW##WKKWWWWWW#WKKKKK;.jt........i.............................:::::::;j;;....:E.KKKWWWWWWWKWW#####W#WWWWKKLLGWEEGGGGGLGGGGGGGGGGGGGGGGGGGG *\n\t *jjt. ...:::::::,,,,,;DEEKWWWWWKKKKKWWWWWWWWWWWW####WWWKKKWWWWWWWWKKKKK;.E;.........t.............................:::::ii;;.....D...KKWWWWWWWKWW#####WWEWWWKKGGGEKKGGGGGLGGGGGGGGGGGGGLGGGGGG *\n\t *fji. ;.:::::::,,,,,;LEEKKWWWWWKKKKKWWWWWWWWWWWW####KWKKKKWWWWWWWWKKKKKi.D;..........j.............................:::tt;,.....:.....KKWWWWWWKWWWW##WWWGWWWKKGGGGKEGGGGGGGGGGGGGGGGGGGLLGGGGL *\n\t *fji. t::::::::,,,,,,;EEEKWWWWWKKKKKKKWWWWWWWWWWW##WKWKKKKKWWWWWWWWKKKKKi:D;............j...........................::LL;,.............KKWWWWWKWWWWWWWWWGWWWKKGGGGKGGGGGGGGGGGGGGGGGGGGLLGGGGL *\n\t *fjt: .:::::::,,,,,,,DEEKWWWWWWKKKKKKKWWWWWWWWWWWWKKWKKKKKKWWWWK#WWKKKKWitE;........... ............................:G;;:...............KKKWWKKWWWWWWWWWGWWWKKGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGL *\n\t *fjji;:. .f:::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWWKKKKKKKKKKKWWKWWWWWKKKKWGKD;........................................L;;..................DKKWKKWWWWWWWWWGWWWKKDGGGKDGGGGGGGGGGGGGGGGGGGGGGGGGG *\n\t *fjjtii;,:. :::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWKKKKKKKKKKKKWWWWWW#WWKKKKWiEj;......................................:i,;....,...............;KKEKWWWWWWWWWGKWWKKDDGGDEGGGDGGGGGDGGGGGGGGGGGGGGGG *\n\t *fjtiiiii;;:. j::::::,,,,,,,;;EEEKWWWWW#KKKKKWWWWWWWWWKKKKKKWKKKKKKKWWWWWWWWWKKKKWtEL;:....................................;;;:...,;j................:KEEWWWWWWWWWDDWWKKDDDDDKDDDDDDDDDDDDDDDGGGGGGGGGGG *\n\t *fjti;;iiii;;,:::::::,,,,,,,,;EEEKWWWWWWWKKKKWWWWWWWWKKKKKKKWKKKKKKKWWWWWWW#W#KKKKWEEii;...................................f;:....,;L...................EEKWWWWWWWWDDWWKKDDDDDKEDDDDDDDDDDDDDDDDDDDDDGGGG *\n\t *fjt,,,;;;;ii;f::::::,,,,,,,;;EEKWWWWWWWKKKKKWWWKWWKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWKEij;:...............................:G;,.....,;f....................:tKKWWWWWWWDDWWKKDDDDDKKDDDDDDDDDDDDDDDDDDDDDDDDD *\n\t *jjt. ..:,;;;;,::::,,,,,,,,;;GEEWWWWWWWWKKKKWKKWKKKKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWEDi;j;............................,Li;L;;;..,;;f........................KKKKWWWKDDWWKKDDDGDKKGGGGGGGGDGDDDDDDDDDDDDDDD *\n\t *fjt. .:,,,:::::,,,,,,,;;;EEKWWWWWWWKKKKKKWKKKKKKKKKKKKKKKKKKKKKWKKKWKW##W#KKKKWEti;;G;........................tEEEL;;;;;;;;;;L..........................DKKKKKEDDWWKEDGftiLE;;;;itjLGGGGGGDDDDDDDDDDD *\n\t *fjt. .j::::,,,,,,,;;;DEEWWWWWWWWKKKKWKKKKKKKKKKKKKKKKKKKKKKKWKKWWWK##W#KKKKKEii;;;L;...................iDEEEEEEKKi;j;;;;jD.....:......................,KKKKDGGEKKE:::::;E::::::::::,tLGGDDDDDDDDDD *\n\t *fjt. .;:::,,,,,,,;;;;EEKWWWWWWWWKWKKKKKKKKKKKKKKKWKKKKKKKKKKWKKWWWW#WW#KKKKKKii;;;;f;.............:tDEEEEEKKKKKKKKEti;;;L...............................EEKf;:iKKE::::::E::::::::::::::ifDDDDDDDDD *\n\t *fjt: :::,,,,,,,,;;;DEEWWWWWWWWWEKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####KKKKKEiii;;;;f,.........iDEEEEKKKKKKKKKKKKKKKf;iG......i..........................fK::::KKE::::::E::::::::::::::::,tGGDDDDD *\n\t *fjt: t:::,,,,,,;;;;iDEKWWWWWWKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####WKKKKLiii;;;;;L,....,Li;EDEEEEKKKKKKKKKKKKKKKKiG......;:...........................:i:::KKE:::::,E,::::::::::::::::::iGDDDD *\n\t *jjt. f::,,,,,,,;;;;GEEWWWWKEEKEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKWWWWW###WWKKKKiii;;;;;;;G,;L;;iiEEEEEEEKKKKKKKKKKKKKWWKE......;t.........:....................j::KEE:,::,,D,,::::,,,,,,:::::::::tDDD *\n\t *fjt:. ,::,,,,,,,;;;;EEWWKEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKKWWWWW#W#KKKKKKiiiiii;;;;;i;;iiiEEKEEKKWKKKKKKKWKKKKKWWWGi;...;t......,;;;;,....................:,EEE,,,,,,D,,,,,,,,,,,,,,,,::,::::tG *\n\t *fjt:. ,::,,,,,,,;;;;DEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWW#W#KKKKKKiiiii;;i;;;;;iiiKKKEKKKKWWKWWWWWWKKKKWWWWW;;;:;L.....;;;;;;;;;....................,KEE,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,; *\n\t *fjt:. f:,,,,,,,;;;;jEDEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWW#W##KKKKKKiiiiiiii;i;;iiiEKKKKKKKKWKWWWWWWWWKKKWWWWWKi;;i.....,jEEfGi;;;;;...................EED,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,, *\n\t *fjt:. .f::,,,,,,;;jEEDEEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWKWWWWW###KKKKKLiiiiiiiiiiiiiiEEKKKKKKKKWWWWWWWWWWWWKWWWWWWGi;i;,..;jDDDKEGi;;;;;;:................EED,,,,,,D,,,,,,,,,,,,,,,,,,,,,,,,, *\n\t *fjt:. .. ;::,,,,,;;EDDEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKW#WW####KWKKKiiiiiiiiiiiiijKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWt;i;;;;i;DDDDDDGi;;;;;;;;:.............EDf;,,,;,G;;;;;;;;;;;;;;;,,,,,,,,,, *\n\t *fjt:......:,,,,,,;LDDDEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWWKWWWW####KKKKKiiiiiiiiiiijKEKKWKKKKKKKWWWWWWWWWWWWWWWWWWWWWWiLiii;i;DEEEEDDE;i;;;;;;;;;:..........EDi,;;;;;L;;;;;;;;;;;;;;;;;;,,,,,,, *\n\t *fjt:......:,,,,,;EDDDEEKEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKWWWWKKWWW##W#KWKKWEiiiiiijGKKKKKWWKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKi;iiiiDDEEEEEEDEi;;;;;;;;;;;;;,:.....ED;;;;;;;j;;;;;;;;;;;;;;;;;;;;;;;,, *\n\t *fjt:.....t,,,,,;DDDDEEEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKWWWW##WKWKKWKiiiKKKKKKKKKWWKKKKKKKKWWWWWWWWWWWWWWW#WWWWWWWWWiiiiifLEEEEEEEEDi;i;;;;;;;;;;;;.....DD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *\n\t *fjt:.....G,,,,,GDDDEEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKKWWWKKKWWW###WKWKKWKitKKKKKKKKKWKKKKKKKKKKWWWWWWWWWWWWWW###WWWWWWWWEiiiiiiiEEEEEEEEDGiiii;;;;;;;;;.....GD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *\n\t *fjt:.....L,,,,;GDDDEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWDGWWW###KKWWKWKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWW####WWWWWWWWWiiiiiiiiEEEEEEEEEEDi;i;;;;;;;;.....Lj;;;;;;i;iiiiii;;;;;;ii;;;;;;;;;;; *\n\t ***********************************************************************************************************************************************************************************************************/\n\n\t\t\n}",
"Main",
"static Scanner inp= new Scanner(System.in);",
"inp",
"new Scanner(System.in)",
"static PrintWriter out= new PrintWriter(System.out);",
"out",
"new PrintWriter(System.out)",
"public static void main(String args[]) {\t\t \t\n\t \t\n\t\tMain g=new Main();\n\t\tg.main();\n\t\tout.close();\n\t\t\n\t}",
"main",
"{\t\t \t\n\t \t\n\t\tMain g=new Main();\n\t\tg.main();\n\t\tout.close();\n\t\t\n\t}",
"Main g=new Main();",
"g",
"new Main()",
"g.main()",
"g.main",
"g",
"out.close()",
"out.close",
"out",
"String args[]",
"args",
"void main() {\n\t\t\n\t\tint n=inp.nextInt();\n\t\tint[] a=new int[n],b=new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=inp.nextInt();\n\t\t\tb[i]=inp.nextInt();\n\t\t}\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tout.println(\"No\");\n\t}",
"main",
"{\n\t\t\n\t\tint n=inp.nextInt();\n\t\tint[] a=new int[n],b=new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=inp.nextInt();\n\t\t\tb[i]=inp.nextInt();\n\t\t}\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tout.println(\"No\");\n\t}",
"int n=inp.nextInt();",
"n",
"inp.nextInt()",
"inp.nextInt",
"inp",
"int[] a=new int[n]",
"a",
"new int[n]",
"n",
"b=new int[n];",
"b",
"new int[n]",
"n",
"for(int i=0;i<n;i++) {\n\t\t\ta[i]=inp.nextInt();\n\t\t\tb[i]=inp.nextInt();\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t\ta[i]=inp.nextInt();\n\t\t\tb[i]=inp.nextInt();\n\t\t}",
"{\n\t\t\ta[i]=inp.nextInt();\n\t\t\tb[i]=inp.nextInt();\n\t\t}",
"a[i]=inp.nextInt()",
"a[i]",
"a",
"i",
"inp.nextInt()",
"inp.nextInt",
"inp",
"b[i]=inp.nextInt()",
"b[i]",
"b",
"i",
"inp.nextInt()",
"inp.nextInt",
"inp",
"for(int i=0;i<n-2;i++) {\n\t\t\tif(a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\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[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}",
"if(a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]",
"a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]",
"a[i]==b[i]",
"a[i]",
"a",
"i",
"b[i]",
"b",
"i",
"a[i+1]==b[i+1]",
"a[i+1]",
"a",
"i+1",
"i",
"1",
"b[i+1]",
"b",
"i+1",
"i",
"1",
"a[i+2]==b[i+2]",
"a[i+2]",
"a",
"i+2",
"i",
"2",
"b[i+2]",
"b",
"i+2",
"i",
"2",
"{\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"return;",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"public class Main {\n\n\tstatic Scanner inp= new Scanner(System.in);\n\tstatic PrintWriter out= new PrintWriter(System.out);\n\tpublic static void main(String args[]) {\t\t \t\n\t \t\n\t\tMain g=new Main();\n\t\tg.main();\n\t\tout.close();\n\t\t\n\t}\n\t//I hate dp\n\t\n\tvoid main() {\n\t\t\n\t\tint n=inp.nextInt();\n\t\tint[] a=new int[n],b=new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=inp.nextInt();\n\t\t\tb[i]=inp.nextInt();\n\t\t}\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tout.println(\"No\");\n\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\t/*********************************************************************************************************************************************************************************************************\n\t * ti;. .:,:i: :,;;itt;. fDDEDDEEEEEEKEEEEEKEEEEEEEEEEEEEEEEE###WKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWW#WWWWWKKKKKEE :,:. f::::. .,ijLGDDDDDDDEEEEEEE*\n\t *ti;. .:,:i: .:,;itt;: GLDEEGEEEEEEEEEEEEEEEEEEDEEEEEEEEEEE#W#WEKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKKKKKKG. .::. f:,...,ijLGDDDDDDDDEEEEEE *\n\t *ti;. .:,:i: :,;;iti, :fDDEEEEEEEEEEEEEEEKEEEEDEEEEEEEEEEEW##WEEEKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWWKKKKKKEG .::. .f,::,ijLGDDDDDDDDEEEEEE *\n\t *ti;. .:,:i: .,,;iti;. LDDEEEEEEEEEEKEEEEWEEEDDEEEEEEEEEEE#WWWEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWKKKKKEDj .::. .:L;;ijfGDDDDDDDDDEEEEE *\n\t *ti;. .:,:i: .:,;;iii:LLDEEEEEEEEEEEKEEEEEEEEDEEEEEEEEEEEW#WWEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWKWWWWWWWWWWWWWWKKKKKKKEL .::. .:;LijLGGDDDDDDDDEEEEE *\n\t *ti;. .:,:;: :,;;ittfDEEEEEEEEEEEEEEEEKEEEGEEEEEEEEEEEKWWWEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWKKKKKKKELj .::. :,;jffGGDDDDDDDDDEEEE *\n\t *ti;. .:,:i: .,;;tGGDEEEEEEEEEEEKEEEKEEEDEEEEEEEEEEEEWWWEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWKWWWWWWKKKKKKKEEL .::. .:;itDGGDDDDDDDDDEEEE *\n\t *ti;. .:::;: :;ifDEEEEEEEEEEEEKEEEKEEEEEEEEEEEEEEEWWWEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WWWKKKKKKKKEEf .::. :,itfGEDDDDDDDDDDDEE *\n\t *ti;. .:::;: :GGEEEEEEEEEEEKEKEEKEEEEEEEEEEEEEEEEWWEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKKEEDG .::. .,;jfLGKDLDDDDDDEEDD *\n\t *ti;. .:::;: fDEEEEEEKKKKKKKKKEKEEEEEEEEEEEEEEE#WEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#KKKKKKKKKKEEf .:::. .,;tfLGDEDDDDDDDDEEE *\n\t *ti;. :::;: fDEEEEEEKKKKKKKKKKWKEEEEEEEEEEEEEEEWKEEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKKKEEft :::. .,;tfLGDDDKDDDDDDDDD *\n\t *ti;. .::;: fDEEEEEEKKKKKKKWKKKKKEEEEEEEEEEEEE#WEEWEEEEEDEEDEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKEEGG :,:. .,;tfLGGDDDKDDDDDDDD *\n\t *ti;. .:.;: tGDEEEEKKKKKKKKKKKKKKKKKEEEEEEEEEEEWEEKWEEEEEEEDEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKKKKKEEDf :::. .,;tfLGGDDDDEDDDDDDD *\n\t *ti;. .::;: fDEEEEEKKKKKKKKKKKWKKKKKKKKEEEEEEEWWEEWEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKEEEft.::. .,;tfLGGDDDDDDEDDDDD *\n\t *ti;. .:.;: tGDEEEKKKKKKKKKKKKKKKKKKKKKKEKEEEEE#EEWWEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKEEEGD:::. .,;tfLGGDDDDDDDEDDDD *\n\t *ti;. .:.,. LDEEEEKKKKKKKKKKWKWKKKKKKKKKKKKEEEKWEKW#EEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKW##KKKKKKEEEEf,,:. .,;tfLGGDDDDDDDDEDDD *\n\t *ti;. ..:.,. LGDEEEEKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEEW#WEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKK##KKKKKEEEEEfi;,. .,;tfLGGDDDDDDDDDKDD *\n\t *tt;. .:.,: jDEEEEKKKKKKKKKKWWKKKKKKKKKKKKKKKKKWKE#WWEEEEEEEEEEEEEEWEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKWWKKKKEEEEDfG;,: .,;tfLGGDDDDDDDDDDKD *\n\t *tii,. .:.,. tGDEEEEKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKKWWWKEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKW#KKKKEEEEDGGi;,. .,;tfLGGDDDDDDDDDDDE *\n\t *ti;;,:. .:.,: fDEEEEKKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEK#WWKEEEEEEEEEEEEDEEEEEEEEEEEEEEGEEEEEEEEEEEEEEEEEEEKKKKKKKWWKKEEEEEEDDf;;;,. .,;tfLGGDDDDDDDDDDDD *\n\t *tii;,,:.. ...,. ;LEEEEEKKKKKKWKKKKWKKKKKKKKKKKKKKKKKEKKW#WEEEEEEEEEEEEEjEEEEEEEEEKEEEEGEEEEEEEEEKEEEEEEEEEEEEEEEEE#WKEEEEEEDDf;;;;,: .,itfLGGDDDDDDDDDDDD *\n\t *ti;,,,,,:. ...,. LDEEEEKKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKK#W#WEEEEEEEEEEEDDLEEEEEEEEEWEEEEDEEEEEEEEEKEEEEEEEEEEEEEEEEEWWEEEEEEEDDfj,,,,,:. .,itfGGGDDDDDDDDDDDD *\n\t *tii,,,,::::. ...,: .fDEEEEKKKKKKWKKKKWWWKKKKKKKKKKKKKKKEKKW#WWEEEEEEEEEEEKiKEEKEEEEEEWEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEEWWEEEEEEEDDLD:::,,,:. .,ijfGGGDDDDDDDDDDDD *\n\t *ti;:::::::::.. .:.,: LDEEEEKKKKKKKWKKKKWWKKKKKKKKKKKKKKKKtKKWWWWKEEEEEEEEEDiiDEEEEEEEEWWEEEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEWKEEEEEDDDGL:. .:,,,: .,ijLGGGDDDDDDDDDDDD *\n\t *tt;. .::::::::.. ...,: :fDEEEKKKKKKKKKKKKWW#KKKKKKKKKKKKKKKKfKKWWWWKEEEEEEEEDti,DEKEEEEEEWWEEEDEEEEEEEEEKEEEEEEEEEEEEEDEEEEE#WEEEEEGGDGf:. .:,;,:. .,ijLGGDDDDDDDDDDDDD *\n\t *tt;. .:::::::.. ...,: GDEEEKKKKKKKKWKKKKWWWKKKWKKKKKKKWWWKDEKLWWWWKKEEEEEEDEi,LDEEEEEEEEWWEEEEEEEEEEEEEEEEEEEEEEEEEDEDEEEEEW#EEEEDDDDGf,. :,,,:...,ijLGGGDDDDDDDDDDDD *\n\t *tt;. .....::::.. ...,: fDEEEKKKKKKKKWKKKKWWWWKKKWKKKKKKKKKKfWKiWWW#KKEEEEEEEi;.EDfEEEDEEiWWEEEEEEEEEEEEDGKEEEEEEEEEEDEEEEEEEWWEEEEDDDGGLi. .,;,:::,ijLGGGDDDDDDDDDDDD *\n\t *tt;. ....:::::. ...,. iDEEEEKKKKKKKKWKKWKWWWWWKKWWWKKKKKKKKtWKt#WWWKKEEEEEDji..DDKDDEDEGiWKEEEEEEEEEEDDEjEEEEEEEEEEEDEEEEEEEKWKEEDDDDGGff. .:,;,,;ijLGGGDDDDDDDDDDDD *\n\t *tt;. ....::::.. .:.,: .LDEEEKKKKKKKKKKKKWWWWKWWWWWWWWWWKKKKWtKKiDWWWKKKEEEEKi:..DEDDDDDDiiWKEEEEEEEEEEDDEijDEEEEEKEEEEEEEEEEEEWWEEGDDDGGLG. .:,;;iijLGGGDDDDDDDDDDDD *\n\t *tt;. .....:::.. ...,. .fEEEEKKKKKKKKWKKKKWWWWWWWWWWWWWWKWKKKiKDiLWWWWKEEEEEi,..fD:DDDDDti;WEEEEEEEEEEKDDi:iDDEEEEWEEEEEEEEEEEE#WEEGDDDDGGG. :,iitjLGGGDDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. GDEEEKKKKKKKKKWKKKWWW#WWWWWWWWWWWKWKKjiEjitWWWKKWEEEDi...DDLDDDDji;;WEEEEEEEEEEEDEj.iDDEEEEWEEEEEEEEEEEEWWEEDDDDDDGf. .,;tjfLGGDDDDDDDDDDDD *\n\t *tti. ....::::.. ...,. fEEEKKKKKKKKKKKKKKKW#WWWWWWWWWWWWWWWWtiEiiiWWWKKEWKEi....D.EDDDEi;.fWEEEEEEEEEEDDfL.;EDDEEEWEEEEEEEEEEEEWWEEEDDDDDGf. :;ijfLGGDDDDDDDDDDDD *\n\t *tti. ....::::.. ...,. LDEEEKKKKKKKKKKKKKKWWWWWWWWWWWWWWWW####WKiiiWWWKKKEEK,...:E:DDDEii..GWEEEEEEEEDWDDiL.,KDDEEEWEEEEEEEEEEEEWWKEEDDDDDGf: .,itfLGGDDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. fDEEEKKKKKKKKKWKKKKWWWWWWWWWWWWW########WLiiWWWKKKEEjD...G,DDDDi;...EWEEEEEEEEDKDEii..LDDEEEWEEEEEEEEEEEEWWWEEDDDDDGfi .,;tfLGGGDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. iGEEEKKKKKKKKKKWKKKKWWWWWWWWWWWW###########KiWWWKKEEE,.D..D.DDDii:...KKEEEEEEEEEDDj:...tEDEEEWEEEEEEEEEEEEWWWEEEDDDDDLL .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....::::......:. LEEEKKKKKKKKKKWWKKKWWW#KWWWWWWWW#####W####W##KWWKKEEL..:D.jjDDi;,....KKEEEEEEEDfDDi...:iKDEEEWKEEEEEEEEEEEWWWEEEEDDDDLG .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ...::::::..,. :GEEEKKKKKKKKKKKKWWWWW##WWWWWWWWW##WKWK#W#W####WWKEEK.....G.DDti,.....KKEEEEEEDWGDf.,...iKDEEEWWEEEEEEEEEEEW#WEEEEEDDDGL .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....::::::,. GDEEKKKKKKKKKKKKKWWWW###WWWWWWWWWW#WWWK###W#####WKEKK.....jDDL;;......KKEEEEEEEEEDi.f...;KDEEEWWEEEEEEEEEEEWWWWEEEEEDDGf .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....:::,,. .LEEEKKKKKWKKKKKWWWWWW###WWWWWWWWWW#WWKW#WW##W#WWWKEKD:....:DD:;......;KEEEEEEEKiDD..f...,KKEEEWWEEEEEEEEEEEWWWWEEEEEDDDf .:;tjLLGGGDDDDDDDDDD *\n\t *tti. ...::,,,:. GDEEKKKKKKKKKKKKWWWWWWW#WWWWWWWWWWW#KjKWWWWWWWWWWWWEK.j,..;fD.;.......fKEEEEEDKG:Di..,....DKEEEWWEEEEEEKEKKKWWWWEEEEEEDDf .:;tjLLGGDDDDDDDDDDD *\n\t *jti. ...::,,,,:. .fEEEKKKKKWKKKKKKWWWWWWW#WWWWWWWWWWK#KKKWWWWWWWWWWWWWK..f:.:G.,:.......EKEEEEEKK;:E:.......fKEEEWWKEKEKKKKKKKW#WWEEEEEEDDf: .,;tfLLGGDDDDDDDDDDD *\n\t *tti. ...:,,,;;,: iDEEKKKKKWKKKKKKKWWWWWWW#WWWWWWWWWWK#WDKWWKKWWWWWWWWWE..;G:G..,........KKEEEEEKi.Gi..:.....tKEEKWWWKKKKKKKKKKW##WKEEEEEEDfi .,;tfLLGGGDDDDDDDDDD *\n\t *tti. ....::,,;;;,LEEKKKKKKWKKKKKWWWWWWW###WWWWWWWWWWKWWDKWEEEWKKWWWWWKKj.:LG..;.........EKEEEEKG;.G...;.....;KKEKWWWKKKKKKKKKKW##WWKEEEEEDfL .,;tfLGGGDDDDDDDDDDD *\n\t *jti. ...::::,;ijDEEKKKKKWKKKKKKWKWWWWW##WWWWWWWWWWWKK#KKGDGDWEEWKKWKKGE,.i;.:.........:EKEEEKE;.:L...j.....,KWEKWWWKKKKKKKKKK####WKKEEEEDLG .,;tfLGGGGDDDDDDDDDD *\n\t *jti. ...:...,,;GEEKKKKKWWKKKKKWWWWWWWW###WWWWWWWWWKKKWWKiLGGEDEDEKGKKiEG..;...........jKEEEKK;:.G....,.....:KKEWWWWKKKKKKKWKK####WKKKKEEEGL .,;tfLGGGGDDDDDDDDDD *\n\t *jti. ...:. .:,GEEKKKKKWKKKKKWWWWWWWW####WWWWWWWWWKKKWWKii;fDLGDK: EEi:E:.............EKEEKK;;..L...........KKKWWWWKKKKKKKWKK####WKKKWKEEDf .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. ,EEKKKKKWWKKKKKWWWWWWWWW###WWWWWWWWKKKKfWWLt;i,. fi EG..D:.............EKEKK;;..t....:.......KWKWWWWKKKKKKKWKK####WKKKWEEEDf:. .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. GEEKKKKKWKKKKKWWWWWWWWW####WWWWWWWKKKKKt;KKEfff .;t.................KKKKi;:..GtGGfG.......KWWWWWWKKKKKKKWKK###WWWKKKKEEEf,,: .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. GEKKKKKWWKKKKKWWWWWWWWWW##WWWWWWWKKKKKKt;EiKKKK, ...t................jEKKG;;..,.....,LGi....KWWWWWWKKKKKKWKKKW####WKKKKKEEL,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. .GEEKKKKKWKKKKKWWWWWWWWWW###WWWWWWWKKKKKKtiE::tGG........................EEEj;;...,.........:D..DKWWWWWWKKKKK#KKW###W#WKKKKKEEfj:,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. DEKKKKKWWKKKKKWWWWWWWWW####WWWWWWWKKKKKKiiE:::.::.......................EEi;;...j.....f......:iDKWWWWWWKKKKK#WW######WKKKKKEELG :,,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. fEEKKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKK;tE::..........................DD;.;,.::......;........EWWWWWWWKKKKW#WW#####WWKKKWKKELG .:,,,:::,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. .DEKEKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKE,iD::..........................D..,;.,;tLffi...........DWDWWWW#KKKWWWWW#####W#KKKWKEEGL .:,;,,,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. ;EEKKKKWWKKKKKWWWWWW#WWWW####WWWWWWKKKKKEL:iD:..........................j ..;..;;:.....i,........DKtWWWWWKKWWWWWW#####WWWKKKEKEDf .:,;;;itfGGGDDDDDDDDDDDD *\n\t *jti. ...:. DEKKKKKWWKKKKWWWWWWW#WWWW####WWWWWWKKKKKEj:iG...............................:....................GKiWWWWWKKWW#WWW######WWKKKKKEEf .,;iitfGGGDDDDDDDDDDDD *\n\t *jti. ...:.:EKKKKKWWKKKKKWWWWWWW#WWW#####WWWWWKWKKKKEi:if:.................................iEKEKKKKKKDj......DKiWWWWWKWK##WW#######WWKKK:KEEL .:;itfGGGDDDDDDDDDDDD *\n\t *jji. ...:,DEEKKKWWWKWKKWWWWWWWWWWWW#####WWWWWWWKKKKEi:it..................................j. KKKKKKKKKKKf..DKiWWWWWKWW##WW#######WWKKK,KEEf .,;tfGGGDDDDDDDDDDDD *\n\t *jji. ..L:iDEEKKKWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKKi.i;.................................. . KKKWWWWWWWWK..DGiWWWWWKK##WWW#####W#WWKKKjEKEL, .:;tfGGGDDDDDDDDDDDD *\n\t *jji. .f:::EEEKKKWWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKK;.i,.................................:: KKEKWWWWWWfWK..EiiWWWWWKWW#WW##########KKKD,KELj .:;tfGGDDDDDDDDDDDDD *\n\t *jji. .t::::,DEEKKKWWKKKKWWWWWWWWW#WWWW#####WWWWKKWKKKEK;.i:.................................GDDEEEKKKWWWWWtWWD.E;iWWWWWW###WW#########WWKKK.EEDG .:;tfGGGDDDDDDDDDDDD *\n\t *jji. . j..::::EKEKKKWWWKKKKWWWWWWWWW#WWW######WWWWKKWKKKEK;.t:.................................ELLEDDEEEWWWWEtWK,.KiiWWWWWW###W##########WWKKK:EEEG .;tjfLLGDDDDDDDDDDDDDDD *\n\t *jji. i.::::::,EEEKKWWWKKKKKWWWWWWWWW#WWW#####WWWWWKWKKKKEE,.t..................................DfiEGDDDEEKKKttKWG.KiiWWWWW##WWW##########WWKKK:fEEL ,fGGGDDDDDDDDEEEDDDDDDDDDD *\n\t *jji. .;:..:::::DEEEKKWWWKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKED,.t..................................ifjDDGGEGDKK.ttKKE.DiWWWWW###WW##########WWWKKK:.KELiLGGGGDDDDDDDDDDDDEEEDDDDDDD *\n\t *jji. i.:.::::::,KEEKKWWWKKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKEL:.j..................................GGf,;ifLLED .iiKKi:fWWWWWW##W#W##########WWWKKK:.KKLGGDDDDDDDDDDDDDDDDEDDEEDDDDD *\n\t *jji. .j:.::::::::EEEKKKWWWKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKf:.f..................................:EEfftf .,. ;iE,..jWWWWWWW###W############WWKKK,:KKGDDDDDDDDDDDDDDDDDDDDDDDEDDDD *\n\t *jji. .:.::::::::,,EEEKKWWWKKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKt..G....................................EEELL; .j....tKWWWWWWW################WWWKKtfGKGEDDDDDDDDDDDDDDDDDDDDDDDEEDD *\n\t *jji. :...:::::::,,jEEKKWWWWKKKKKKWWWWWWWWW##KWW#####KWWWWWWKKKKEi..D....................................:jEEE.........;KKWWWWWWWW#WW##W##########WWKKDLGKEKDDDDDDDDDDDDDDDDDDDDDDDDDED *\n\t *jji. i:.::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWW##WWW#####WWWWWWWKKKKKi..D......................................:::::......,KKKWWWWWWWWW#####W########WWWKKKGGKKEGGGGGGGGDDDDDDDDDDDDDDDDDDE *\n\t *jji. i..:::::::::,,tEEKKWWWWKKKKKWWWWWWWWWWW##WW######WWWWWWWKKKKKi..D......................................::::......:EKKKWWWWWWWWWWW##WW########W#WKKWGGKKGGGGGGGGGGGGGGGDDDDDDDDDDDDD *\n\t *jji. .:::::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWWW##WW#####WWWWWWWWKKKKKi..D....................................:::::::::..tELii;KWWWWWWWWWW##WW######WWWWWWKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGDG *\n\t *jjt. :.::::::::,,,,fEEKKWWWWKKKKKKWWWWWWWWWW###WW####WWWWWWW#WKKKKKi..D....................................:::::::.:.,;;;;;;,KKWWWWWWWWW#WW########WWWKKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGGG *\n\t *jji. ;.::::::::,,,,;EEEKWWWWWKKKKKWWWWWWWWWWWW##WW###WKWWWWWK#WKKKKKi..G......................................:::::::,;;;;:...KKKWWWWWWWWWKWW#######WWWWKKGLGKDGGGGGGLLGGGGGGGGGGGGGGGGGGG *\n\t *jjt. f.:::::::::,,,,fEEKKWWWWWKKKKKWWWWWWWWWWW###WW##WKKWWWWWW#WKKKKK;.jt........i.............................:::::::;j;;....:E.KKKWWWWWWWKWW#####W#WWWWKKLLGWEEGGGGGLGGGGGGGGGGGGGGGGGGGG *\n\t *jjt. ...:::::::,,,,,;DEEKWWWWWKKKKKWWWWWWWWWWWW####WWWKKKWWWWWWWWKKKKK;.E;.........t.............................:::::ii;;.....D...KKWWWWWWWKWW#####WWEWWWKKGGGEKKGGGGGLGGGGGGGGGGGGGLGGGGGG *\n\t *fji. ;.:::::::,,,,,;LEEKKWWWWWKKKKKWWWWWWWWWWWW####KWKKKKWWWWWWWWKKKKKi.D;..........j.............................:::tt;,.....:.....KKWWWWWWKWWWW##WWWGWWWKKGGGGKEGGGGGGGGGGGGGGGGGGGLLGGGGL *\n\t *fji. t::::::::,,,,,,;EEEKWWWWWKKKKKKKWWWWWWWWWWW##WKWKKKKKWWWWWWWWKKKKKi:D;............j...........................::LL;,.............KKWWWWWKWWWWWWWWWGWWWKKGGGGKGGGGGGGGGGGGGGGGGGGGLLGGGGL *\n\t *fjt: .:::::::,,,,,,,DEEKWWWWWWKKKKKKKWWWWWWWWWWWWKKWKKKKKKWWWWK#WWKKKKWitE;........... ............................:G;;:...............KKKWWKKWWWWWWWWWGWWWKKGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGL *\n\t *fjji;:. .f:::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWWKKKKKKKKKKKWWKWWWWWKKKKWGKD;........................................L;;..................DKKWKKWWWWWWWWWGWWWKKDGGGKDGGGGGGGGGGGGGGGGGGGGGGGGGG *\n\t *fjjtii;,:. :::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWKKKKKKKKKKKKWWWWWW#WWKKKKWiEj;......................................:i,;....,...............;KKEKWWWWWWWWWGKWWKKDDGGDEGGGDGGGGGDGGGGGGGGGGGGGGGG *\n\t *fjtiiiii;;:. j::::::,,,,,,,;;EEEKWWWWW#KKKKKWWWWWWWWWKKKKKKWKKKKKKKWWWWWWWWWKKKKWtEL;:....................................;;;:...,;j................:KEEWWWWWWWWWDDWWKKDDDDDKDDDDDDDDDDDDDDDGGGGGGGGGGG *\n\t *fjti;;iiii;;,:::::::,,,,,,,,;EEEKWWWWWWWKKKKWWWWWWWWKKKKKKKWKKKKKKKWWWWWWW#W#KKKKWEEii;...................................f;:....,;L...................EEKWWWWWWWWDDWWKKDDDDDKEDDDDDDDDDDDDDDDDDDDDDGGGG *\n\t *fjt,,,;;;;ii;f::::::,,,,,,,;;EEKWWWWWWWKKKKKWWWKWWKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWKEij;:...............................:G;,.....,;f....................:tKKWWWWWWWDDWWKKDDDDDKKDDDDDDDDDDDDDDDDDDDDDDDDD *\n\t *jjt. ..:,;;;;,::::,,,,,,,,;;GEEWWWWWWWWKKKKWKKWKKKKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWEDi;j;............................,Li;L;;;..,;;f........................KKKKWWWKDDWWKKDDDGDKKGGGGGGGGDGDDDDDDDDDDDDDDD *\n\t *fjt. .:,,,:::::,,,,,,,;;;EEKWWWWWWWKKKKKKWKKKKKKKKKKKKKKKKKKKKKWKKKWKW##W#KKKKWEti;;G;........................tEEEL;;;;;;;;;;L..........................DKKKKKEDDWWKEDGftiLE;;;;itjLGGGGGGDDDDDDDDDDD *\n\t *fjt. .j::::,,,,,,,;;;DEEWWWWWWWWKKKKWKKKKKKKKKKKKKKKKKKKKKKKWKKWWWK##W#KKKKKEii;;;L;...................iDEEEEEEKKi;j;;;;jD.....:......................,KKKKDGGEKKE:::::;E::::::::::,tLGGDDDDDDDDDD *\n\t *fjt. .;:::,,,,,,,;;;;EEKWWWWWWWWKWKKKKKKKKKKKKKKKWKKKKKKKKKKWKKWWWW#WW#KKKKKKii;;;;f;.............:tDEEEEEKKKKKKKKEti;;;L...............................EEKf;:iKKE::::::E::::::::::::::ifDDDDDDDDD *\n\t *fjt: :::,,,,,,,,;;;DEEWWWWWWWWWEKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####KKKKKEiii;;;;f,.........iDEEEEKKKKKKKKKKKKKKKf;iG......i..........................fK::::KKE::::::E::::::::::::::::,tGGDDDDD *\n\t *fjt: t:::,,,,,,;;;;iDEKWWWWWWKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####WKKKKLiii;;;;;L,....,Li;EDEEEEKKKKKKKKKKKKKKKKiG......;:...........................:i:::KKE:::::,E,::::::::::::::::::iGDDDD *\n\t *jjt. f::,,,,,,,;;;;GEEWWWWKEEKEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKWWWWW###WWKKKKiii;;;;;;;G,;L;;iiEEEEEEEKKKKKKKKKKKKKWWKE......;t.........:....................j::KEE:,::,,D,,::::,,,,,,:::::::::tDDD *\n\t *fjt:. ,::,,,,,,,;;;;EEWWKEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKKWWWWW#W#KKKKKKiiiiii;;;;;i;;iiiEEKEEKKWKKKKKKKWKKKKKWWWGi;...;t......,;;;;,....................:,EEE,,,,,,D,,,,,,,,,,,,,,,,::,::::tG *\n\t *fjt:. ,::,,,,,,,;;;;DEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWW#W#KKKKKKiiiii;;i;;;;;iiiKKKEKKKKWWKWWWWWWKKKKWWWWW;;;:;L.....;;;;;;;;;....................,KEE,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,; *\n\t *fjt:. f:,,,,,,,;;;;jEDEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWW#W##KKKKKKiiiiiiii;i;;iiiEKKKKKKKKWKWWWWWWWWKKKWWWWWKi;;i.....,jEEfGi;;;;;...................EED,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,, *\n\t *fjt:. .f::,,,,,,;;jEEDEEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWKWWWWW###KKKKKLiiiiiiiiiiiiiiEEKKKKKKKKWWWWWWWWWWWWKWWWWWWGi;i;,..;jDDDKEGi;;;;;;:................EED,,,,,,D,,,,,,,,,,,,,,,,,,,,,,,,, *\n\t *fjt:. .. ;::,,,,,;;EDDEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKW#WW####KWKKKiiiiiiiiiiiiijKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWt;i;;;;i;DDDDDDGi;;;;;;;;:.............EDf;,,,;,G;;;;;;;;;;;;;;;,,,,,,,,,, *\n\t *fjt:......:,,,,,,;LDDDEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWWKWWWW####KKKKKiiiiiiiiiiijKEKKWKKKKKKKWWWWWWWWWWWWWWWWWWWWWWiLiii;i;DEEEEDDE;i;;;;;;;;;:..........EDi,;;;;;L;;;;;;;;;;;;;;;;;;,,,,,,, *\n\t *fjt:......:,,,,,;EDDDEEKEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKWWWWKKWWW##W#KWKKWEiiiiiijGKKKKKWWKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKi;iiiiDDEEEEEEDEi;;;;;;;;;;;;;,:.....ED;;;;;;;j;;;;;;;;;;;;;;;;;;;;;;;,, *\n\t *fjt:.....t,,,,,;DDDDEEEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKWWWW##WKWKKWKiiiKKKKKKKKKWWKKKKKKKKWWWWWWWWWWWWWWW#WWWWWWWWWiiiiifLEEEEEEEEDi;i;;;;;;;;;;;;.....DD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *\n\t *fjt:.....G,,,,,GDDDEEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKKWWWKKKWWW###WKWKKWKitKKKKKKKKKWKKKKKKKKKKWWWWWWWWWWWWWW###WWWWWWWWEiiiiiiiEEEEEEEEDGiiii;;;;;;;;;.....GD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *\n\t *fjt:.....L,,,,;GDDDEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWDGWWW###KKWWKWKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWW####WWWWWWWWWiiiiiiiiEEEEEEEEEEDi;i;;;;;;;;.....Lj;;;;;;i;iiiiii;;;;;;ii;;;;;;;;;;; *\n\t ***********************************************************************************************************************************************************************************************************/\n\n\t\t\n}",
"public class Main {\n\n\tstatic Scanner inp= new Scanner(System.in);\n\tstatic PrintWriter out= new PrintWriter(System.out);\n\tpublic static void main(String args[]) {\t\t \t\n\t \t\n\t\tMain g=new Main();\n\t\tg.main();\n\t\tout.close();\n\t\t\n\t}\n\t//I hate dp\n\t\n\tvoid main() {\n\t\t\n\t\tint n=inp.nextInt();\n\t\tint[] a=new int[n],b=new int[n];\n\t\tfor(int i=0;i<n;i++) {\n\t\t\ta[i]=inp.nextInt();\n\t\t\tb[i]=inp.nextInt();\n\t\t}\n\t\tfor(int i=0;i<n-2;i++) {\n\t\t\tif(a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {\n\t\t\t\tout.println(\"Yes\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tout.println(\"No\");\n\t}\n\t\n\t\n\t\n\t\n\t\n\t\n\t/*********************************************************************************************************************************************************************************************************\n\t * ti;. .:,:i: :,;;itt;. fDDEDDEEEEEEKEEEEEKEEEEEEEEEEEEEEEEE###WKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWW#WWWWWKKKKKEE :,:. f::::. .,ijLGDDDDDDDEEEEEEE*\n\t *ti;. .:,:i: .:,;itt;: GLDEEGEEEEEEEEEEEEEEEEEEDEEEEEEEEEEE#W#WEKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKKKKKKG. .::. f:,...,ijLGDDDDDDDDEEEEEE *\n\t *ti;. .:,:i: :,;;iti, :fDDEEEEEEEEEEEEEEEKEEEEDEEEEEEEEEEEW##WEEEKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWWKKKKKKEG .::. .f,::,ijLGDDDDDDDDEEEEEE *\n\t *ti;. .:,:i: .,,;iti;. LDDEEEEEEEEEEKEEEEWEEEDDEEEEEEEEEEE#WWWEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWKKKKKEDj .::. .:L;;ijfGDDDDDDDDDEEEEE *\n\t *ti;. .:,:i: .:,;;iii:LLDEEEEEEEEEEEKEEEEEEEEDEEEEEEEEEEEW#WWEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWKWWWWWWWWWWWWWWKKKKKKKEL .::. .:;LijLGGDDDDDDDDEEEEE *\n\t *ti;. .:,:;: :,;;ittfDEEEEEEEEEEEEEEEEKEEEGEEEEEEEEEEEKWWWEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWKKKKKKKELj .::. :,;jffGGDDDDDDDDDEEEE *\n\t *ti;. .:,:i: .,;;tGGDEEEEEEEEEEEKEEEKEEEDEEEEEEEEEEEEWWWEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWKWWWWWWKKKKKKKEEL .::. .:;itDGGDDDDDDDDDEEEE *\n\t *ti;. .:::;: :;ifDEEEEEEEEEEEEKEEEKEEEEEEEEEEEEEEEWWWEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WWWKKKKKKKKEEf .::. :,itfGEDDDDDDDDDDDEE *\n\t *ti;. .:::;: :GGEEEEEEEEEEEKEKEEKEEEEEEEEEEEEEEEEWWEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKKEEDG .::. .,;jfLGKDLDDDDDDEEDD *\n\t *ti;. .:::;: fDEEEEEEKKKKKKKKKEKEEEEEEEEEEEEEEE#WEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#KKKKKKKKKKEEf .:::. .,;tfLGDEDDDDDDDDEEE *\n\t *ti;. :::;: fDEEEEEEKKKKKKKKKKWKEEEEEEEEEEEEEEEWKEEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKKKEEft :::. .,;tfLGDDDKDDDDDDDDD *\n\t *ti;. .::;: fDEEEEEEKKKKKKKWKKKKKEEEEEEEEEEEEE#WEEWEEEEEDEEDEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKEEGG :,:. .,;tfLGGDDDKDDDDDDDD *\n\t *ti;. .:.;: tGDEEEEKKKKKKKKKKKKKKKKKEEEEEEEEEEEWEEKWEEEEEEEDEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKKKKKEEDf :::. .,;tfLGGDDDDEDDDDDDD *\n\t *ti;. .::;: fDEEEEEKKKKKKKKKKKWKKKKKKKKEEEEEEEWWEEWEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKEEEft.::. .,;tfLGGDDDDDDEDDDDD *\n\t *ti;. .:.;: tGDEEEKKKKKKKKKKKKKKKKKKKKKKEKEEEEE#EEWWEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKEEEGD:::. .,;tfLGGDDDDDDDEDDDD *\n\t *ti;. .:.,. LDEEEEKKKKKKKKKKWKWKKKKKKKKKKKKEEEKWEKW#EEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKW##KKKKKKEEEEf,,:. .,;tfLGGDDDDDDDDEDDD *\n\t *ti;. ..:.,. LGDEEEEKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEEW#WEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKK##KKKKKEEEEEfi;,. .,;tfLGGDDDDDDDDDKDD *\n\t *tt;. .:.,: jDEEEEKKKKKKKKKKWWKKKKKKKKKKKKKKKKKWKE#WWEEEEEEEEEEEEEEWEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKWWKKKKEEEEDfG;,: .,;tfLGGDDDDDDDDDDKD *\n\t *tii,. .:.,. tGDEEEEKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKKWWWKEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKW#KKKKEEEEDGGi;,. .,;tfLGGDDDDDDDDDDDE *\n\t *ti;;,:. .:.,: fDEEEEKKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEK#WWKEEEEEEEEEEEEDEEEEEEEEEEEEEEGEEEEEEEEEEEEEEEEEEEKKKKKKKWWKKEEEEEEDDf;;;,. .,;tfLGGDDDDDDDDDDDD *\n\t *tii;,,:.. ...,. ;LEEEEEKKKKKKWKKKKWKKKKKKKKKKKKKKKKKEKKW#WEEEEEEEEEEEEEjEEEEEEEEEKEEEEGEEEEEEEEEKEEEEEEEEEEEEEEEEE#WKEEEEEEDDf;;;;,: .,itfLGGDDDDDDDDDDDD *\n\t *ti;,,,,,:. ...,. LDEEEEKKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKK#W#WEEEEEEEEEEEDDLEEEEEEEEEWEEEEDEEEEEEEEEKEEEEEEEEEEEEEEEEEWWEEEEEEEDDfj,,,,,:. .,itfGGGDDDDDDDDDDDD *\n\t *tii,,,,::::. ...,: .fDEEEEKKKKKKWKKKKWWWKKKKKKKKKKKKKKKEKKW#WWEEEEEEEEEEEKiKEEKEEEEEEWEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEEWWEEEEEEEDDLD:::,,,:. .,ijfGGGDDDDDDDDDDDD *\n\t *ti;:::::::::.. .:.,: LDEEEEKKKKKKKWKKKKWWKKKKKKKKKKKKKKKKtKKWWWWKEEEEEEEEEDiiDEEEEEEEEWWEEEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEWKEEEEEDDDGL:. .:,,,: .,ijLGGGDDDDDDDDDDDD *\n\t *tt;. .::::::::.. ...,: :fDEEEKKKKKKKKKKKKWW#KKKKKKKKKKKKKKKKfKKWWWWKEEEEEEEEDti,DEKEEEEEEWWEEEDEEEEEEEEEKEEEEEEEEEEEEEDEEEEE#WEEEEEGGDGf:. .:,;,:. .,ijLGGDDDDDDDDDDDDD *\n\t *tt;. .:::::::.. ...,: GDEEEKKKKKKKKWKKKKWWWKKKWKKKKKKKWWWKDEKLWWWWKKEEEEEEDEi,LDEEEEEEEEWWEEEEEEEEEEEEEEEEEEEEEEEEEDEDEEEEEW#EEEEDDDDGf,. :,,,:...,ijLGGGDDDDDDDDDDDD *\n\t *tt;. .....::::.. ...,: fDEEEKKKKKKKKWKKKKWWWWKKKWKKKKKKKKKKfWKiWWW#KKEEEEEEEi;.EDfEEEDEEiWWEEEEEEEEEEEEDGKEEEEEEEEEEDEEEEEEEWWEEEEDDDGGLi. .,;,:::,ijLGGGDDDDDDDDDDDD *\n\t *tt;. ....:::::. ...,. iDEEEEKKKKKKKKWKKWKWWWWWKKWWWKKKKKKKKtWKt#WWWKKEEEEEDji..DDKDDEDEGiWKEEEEEEEEEEDDEjEEEEEEEEEEEDEEEEEEEKWKEEDDDDGGff. .:,;,,;ijLGGGDDDDDDDDDDDD *\n\t *tt;. ....::::.. .:.,: .LDEEEKKKKKKKKKKKKWWWWKWWWWWWWWWWKKKKWtKKiDWWWKKKEEEEKi:..DEDDDDDDiiWKEEEEEEEEEEDDEijDEEEEEKEEEEEEEEEEEEWWEEGDDDGGLG. .:,;;iijLGGGDDDDDDDDDDDD *\n\t *tt;. .....:::.. ...,. .fEEEEKKKKKKKKWKKKKWWWWWWWWWWWWWWKWKKKiKDiLWWWWKEEEEEi,..fD:DDDDDti;WEEEEEEEEEEKDDi:iDDEEEEWEEEEEEEEEEEE#WEEGDDDDGGG. :,iitjLGGGDDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. GDEEEKKKKKKKKKWKKKWWW#WWWWWWWWWWWKWKKjiEjitWWWKKWEEEDi...DDLDDDDji;;WEEEEEEEEEEEDEj.iDDEEEEWEEEEEEEEEEEEWWEEDDDDDDGf. .,;tjfLGGDDDDDDDDDDDD *\n\t *tti. ....::::.. ...,. fEEEKKKKKKKKKKKKKKKW#WWWWWWWWWWWWWWWWtiEiiiWWWKKEWKEi....D.EDDDEi;.fWEEEEEEEEEEDDfL.;EDDEEEWEEEEEEEEEEEEWWEEEDDDDDGf. :;ijfLGGDDDDDDDDDDDD *\n\t *tti. ....::::.. ...,. LDEEEKKKKKKKKKKKKKKWWWWWWWWWWWWWWWW####WKiiiWWWKKKEEK,...:E:DDDEii..GWEEEEEEEEDWDDiL.,KDDEEEWEEEEEEEEEEEEWWKEEDDDDDGf: .,itfLGGDDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. fDEEEKKKKKKKKKWKKKKWWWWWWWWWWWWW########WLiiWWWKKKEEjD...G,DDDDi;...EWEEEEEEEEDKDEii..LDDEEEWEEEEEEEEEEEEWWWEEDDDDDGfi .,;tfLGGGDDDDDDDDDDD *\n\t *tti. .....:::.. ...,. iGEEEKKKKKKKKKKWKKKKWWWWWWWWWWWW###########KiWWWKKEEE,.D..D.DDDii:...KKEEEEEEEEEDDj:...tEDEEEWEEEEEEEEEEEEWWWEEEDDDDDLL .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....::::......:. LEEEKKKKKKKKKKWWKKKWWW#KWWWWWWWW#####W####W##KWWKKEEL..:D.jjDDi;,....KKEEEEEEEDfDDi...:iKDEEEWKEEEEEEEEEEEWWWEEEEDDDDLG .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ...::::::..,. :GEEEKKKKKKKKKKKKWWWWW##WWWWWWWWW##WKWK#W#W####WWKEEK.....G.DDti,.....KKEEEEEEDWGDf.,...iKDEEEWWEEEEEEEEEEEW#WEEEEEDDDGL .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....::::::,. GDEEKKKKKKKKKKKKKWWWW###WWWWWWWWWW#WWWK###W#####WKEKK.....jDDL;;......KKEEEEEEEEEDi.f...;KDEEEWWEEEEEEEEEEEWWWWEEEEEDDGf .,;tjLLGGDDDDDDDDDDD *\n\t *tti. ....:::,,. .LEEEKKKKKWKKKKKWWWWWW###WWWWWWWWWW#WWKW#WW##W#WWWKEKD:....:DD:;......;KEEEEEEEKiDD..f...,KKEEEWWEEEEEEEEEEEWWWWEEEEEDDDf .:;tjLLGGGDDDDDDDDDD *\n\t *tti. ...::,,,:. GDEEKKKKKKKKKKKKWWWWWWW#WWWWWWWWWWW#KjKWWWWWWWWWWWWEK.j,..;fD.;.......fKEEEEEDKG:Di..,....DKEEEWWEEEEEEKEKKKWWWWEEEEEEDDf .:;tjLLGGDDDDDDDDDDD *\n\t *jti. ...::,,,,:. .fEEEKKKKKWKKKKKKWWWWWWW#WWWWWWWWWWK#KKKWWWWWWWWWWWWWK..f:.:G.,:.......EKEEEEEKK;:E:.......fKEEEWWKEKEKKKKKKKW#WWEEEEEEDDf: .,;tfLLGGDDDDDDDDDDD *\n\t *tti. ...:,,,;;,: iDEEKKKKKWKKKKKKKWWWWWWW#WWWWWWWWWWK#WDKWWKKWWWWWWWWWE..;G:G..,........KKEEEEEKi.Gi..:.....tKEEKWWWKKKKKKKKKKW##WKEEEEEEDfi .,;tfLLGGGDDDDDDDDDD *\n\t *tti. ....::,,;;;,LEEKKKKKKWKKKKKWWWWWWW###WWWWWWWWWWKWWDKWEEEWKKWWWWWKKj.:LG..;.........EKEEEEKG;.G...;.....;KKEKWWWKKKKKKKKKKW##WWKEEEEEDfL .,;tfLGGGDDDDDDDDDDD *\n\t *jti. ...::::,;ijDEEKKKKKWKKKKKKWKWWWWW##WWWWWWWWWWWKK#KKGDGDWEEWKKWKKGE,.i;.:.........:EKEEEKE;.:L...j.....,KWEKWWWKKKKKKKKKK####WKKEEEEDLG .,;tfLGGGGDDDDDDDDDD *\n\t *jti. ...:...,,;GEEKKKKKWWKKKKKWWWWWWWW###WWWWWWWWWKKKWWKiLGGEDEDEKGKKiEG..;...........jKEEEKK;:.G....,.....:KKEWWWWKKKKKKKWKK####WKKKKEEEGL .,;tfLGGGGDDDDDDDDDD *\n\t *jti. ...:. .:,GEEKKKKKWKKKKKWWWWWWWW####WWWWWWWWWKKKWWKii;fDLGDK: EEi:E:.............EKEEKK;;..L...........KKKWWWWKKKKKKKWKK####WKKKWKEEDf .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. ,EEKKKKKWWKKKKKWWWWWWWWW###WWWWWWWWKKKKfWWLt;i,. fi EG..D:.............EKEKK;;..t....:.......KWKWWWWKKKKKKKWKK####WKKKWEEEDf:. .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. GEEKKKKKWKKKKKWWWWWWWWW####WWWWWWWKKKKKt;KKEfff .;t.................KKKKi;:..GtGGfG.......KWWWWWWKKKKKKKWKK###WWWKKKKEEEf,,: .,;tfGGGGDDDDDDDDDDD *\n\t *jti. ...:. GEKKKKKWWKKKKKWWWWWWWWWW##WWWWWWWKKKKKKt;EiKKKK, ...t................jEKKG;;..,.....,LGi....KWWWWWWKKKKKKWKKKW####WKKKKKEEL,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. .GEEKKKKKWKKKKKWWWWWWWWWW###WWWWWWWKKKKKKtiE::tGG........................EEEj;;...,.........:D..DKWWWWWWKKKKK#KKW###W#WKKKKKEEfj:,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. DEKKKKKWWKKKKKWWWWWWWWW####WWWWWWWKKKKKKiiE:::.::.......................EEi;;...j.....f......:iDKWWWWWWKKKKK#WW######WKKKKKEELG :,,,,:. .,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. fEEKKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKK;tE::..........................DD;.;,.::......;........EWWWWWWWKKKKW#WW#####WWKKKWKKELG .:,,,:::,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. .DEKEKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKE,iD::..........................D..,;.,;tLffi...........DWDWWWW#KKKWWWWW#####W#KKKWKEEGL .:,;,,,;tfGGGDDDDDDDDDDDD *\n\t *jti. ...:. ;EEKKKKWWKKKKKWWWWWW#WWWW####WWWWWWKKKKKEL:iD:..........................j ..;..;;:.....i,........DKtWWWWWKKWWWWWW#####WWWKKKEKEDf .:,;;;itfGGGDDDDDDDDDDDD *\n\t *jti. ...:. DEKKKKKWWKKKKWWWWWWW#WWWW####WWWWWWKKKKKEj:iG...............................:....................GKiWWWWWKKWW#WWW######WWKKKKKEEf .,;iitfGGGDDDDDDDDDDDD *\n\t *jti. ...:.:EKKKKKWWKKKKKWWWWWWW#WWW#####WWWWWKWKKKKEi:if:.................................iEKEKKKKKKDj......DKiWWWWWKWK##WW#######WWKKK:KEEL .:;itfGGGDDDDDDDDDDDD *\n\t *jji. ...:,DEEKKKWWWKWKKWWWWWWWWWWWW#####WWWWWWWKKKKEi:it..................................j. KKKKKKKKKKKf..DKiWWWWWKWW##WW#######WWKKK,KEEf .,;tfGGGDDDDDDDDDDDD *\n\t *jji. ..L:iDEEKKKWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKKi.i;.................................. . KKKWWWWWWWWK..DGiWWWWWKK##WWW#####W#WWKKKjEKEL, .:;tfGGGDDDDDDDDDDDD *\n\t *jji. .f:::EEEKKKWWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKK;.i,.................................:: KKEKWWWWWWfWK..EiiWWWWWKWW#WW##########KKKD,KELj .:;tfGGDDDDDDDDDDDDD *\n\t *jji. .t::::,DEEKKKWWKKKKWWWWWWWWW#WWWW#####WWWWKKWKKKEK;.i:.................................GDDEEEKKKWWWWWtWWD.E;iWWWWWW###WW#########WWKKK.EEDG .:;tfGGGDDDDDDDDDDDD *\n\t *jji. . j..::::EKEKKKWWWKKKKWWWWWWWWW#WWW######WWWWKKWKKKEK;.t:.................................ELLEDDEEEWWWWEtWK,.KiiWWWWWW###W##########WWKKK:EEEG .;tjfLLGDDDDDDDDDDDDDDD *\n\t *jji. i.::::::,EEEKKWWWKKKKKWWWWWWWWW#WWW#####WWWWWKWKKKKEE,.t..................................DfiEGDDDEEKKKttKWG.KiiWWWWW##WWW##########WWKKK:fEEL ,fGGGDDDDDDDDEEEDDDDDDDDDD *\n\t *jji. .;:..:::::DEEEKKWWWKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKED,.t..................................ifjDDGGEGDKK.ttKKE.DiWWWWW###WW##########WWWKKK:.KELiLGGGGDDDDDDDDDDDDEEEDDDDDDD *\n\t *jji. i.:.::::::,KEEKKWWWKKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKEL:.j..................................GGf,;ifLLED .iiKKi:fWWWWWW##W#W##########WWWKKK:.KKLGGDDDDDDDDDDDDDDDDEDDEEDDDDD *\n\t *jji. .j:.::::::::EEEKKKWWWKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKf:.f..................................:EEfftf .,. ;iE,..jWWWWWWW###W############WWKKK,:KKGDDDDDDDDDDDDDDDDDDDDDDDEDDDD *\n\t *jji. .:.::::::::,,EEEKKWWWKKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKt..G....................................EEELL; .j....tKWWWWWWW################WWWKKtfGKGEDDDDDDDDDDDDDDDDDDDDDDDEEDD *\n\t *jji. :...:::::::,,jEEKKWWWWKKKKKKWWWWWWWWW##KWW#####KWWWWWWKKKKEi..D....................................:jEEE.........;KKWWWWWWWW#WW##W##########WWKKDLGKEKDDDDDDDDDDDDDDDDDDDDDDDDDED *\n\t *jji. i:.::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWW##WWW#####WWWWWWWKKKKKi..D......................................:::::......,KKKWWWWWWWWW#####W########WWWKKKGGKKEGGGGGGGGDDDDDDDDDDDDDDDDDDE *\n\t *jji. i..:::::::::,,tEEKKWWWWKKKKKWWWWWWWWWWW##WW######WWWWWWWKKKKKi..D......................................::::......:EKKKWWWWWWWWWWW##WW########W#WKKWGGKKGGGGGGGGGGGGGGGDDDDDDDDDDDDD *\n\t *jji. .:::::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWWW##WW#####WWWWWWWWKKKKKi..D....................................:::::::::..tELii;KWWWWWWWWWW##WW######WWWWWWKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGDG *\n\t *jjt. :.::::::::,,,,fEEKKWWWWKKKKKKWWWWWWWWWW###WW####WWWWWWW#WKKKKKi..D....................................:::::::.:.,;;;;;;,KKWWWWWWWWW#WW########WWWKKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGGG *\n\t *jji. ;.::::::::,,,,;EEEKWWWWWKKKKKWWWWWWWWWWWW##WW###WKWWWWWK#WKKKKKi..G......................................:::::::,;;;;:...KKKWWWWWWWWWKWW#######WWWWKKGLGKDGGGGGGLLGGGGGGGGGGGGGGGGGGG *\n\t *jjt. f.:::::::::,,,,fEEKKWWWWWKKKKKWWWWWWWWWWW###WW##WKKWWWWWW#WKKKKK;.jt........i.............................:::::::;j;;....:E.KKKWWWWWWWKWW#####W#WWWWKKLLGWEEGGGGGLGGGGGGGGGGGGGGGGGGGG *\n\t *jjt. ...:::::::,,,,,;DEEKWWWWWKKKKKWWWWWWWWWWWW####WWWKKKWWWWWWWWKKKKK;.E;.........t.............................:::::ii;;.....D...KKWWWWWWWKWW#####WWEWWWKKGGGEKKGGGGGLGGGGGGGGGGGGGLGGGGGG *\n\t *fji. ;.:::::::,,,,,;LEEKKWWWWWKKKKKWWWWWWWWWWWW####KWKKKKWWWWWWWWKKKKKi.D;..........j.............................:::tt;,.....:.....KKWWWWWWKWWWW##WWWGWWWKKGGGGKEGGGGGGGGGGGGGGGGGGGLLGGGGL *\n\t *fji. t::::::::,,,,,,;EEEKWWWWWKKKKKKKWWWWWWWWWWW##WKWKKKKKWWWWWWWWKKKKKi:D;............j...........................::LL;,.............KKWWWWWKWWWWWWWWWGWWWKKGGGGKGGGGGGGGGGGGGGGGGGGGLLGGGGL *\n\t *fjt: .:::::::,,,,,,,DEEKWWWWWWKKKKKKKWWWWWWWWWWWWKKWKKKKKKWWWWK#WWKKKKWitE;........... ............................:G;;:...............KKKWWKKWWWWWWWWWGWWWKKGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGL *\n\t *fjji;:. .f:::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWWKKKKKKKKKKKWWKWWWWWKKKKWGKD;........................................L;;..................DKKWKKWWWWWWWWWGWWWKKDGGGKDGGGGGGGGGGGGGGGGGGGGGGGGGG *\n\t *fjjtii;,:. :::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWKKKKKKKKKKKKWWWWWW#WWKKKKWiEj;......................................:i,;....,...............;KKEKWWWWWWWWWGKWWKKDDGGDEGGGDGGGGGDGGGGGGGGGGGGGGGG *\n\t *fjtiiiii;;:. j::::::,,,,,,,;;EEEKWWWWW#KKKKKWWWWWWWWWKKKKKKWKKKKKKKWWWWWWWWWKKKKWtEL;:....................................;;;:...,;j................:KEEWWWWWWWWWDDWWKKDDDDDKDDDDDDDDDDDDDDDGGGGGGGGGGG *\n\t *fjti;;iiii;;,:::::::,,,,,,,,;EEEKWWWWWWWKKKKWWWWWWWWKKKKKKKWKKKKKKKWWWWWWW#W#KKKKWEEii;...................................f;:....,;L...................EEKWWWWWWWWDDWWKKDDDDDKEDDDDDDDDDDDDDDDDDDDDDGGGG *\n\t *fjt,,,;;;;ii;f::::::,,,,,,,;;EEKWWWWWWWKKKKKWWWKWWKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWKEij;:...............................:G;,.....,;f....................:tKKWWWWWWWDDWWKKDDDDDKKDDDDDDDDDDDDDDDDDDDDDDDDD *\n\t *jjt. ..:,;;;;,::::,,,,,,,,;;GEEWWWWWWWWKKKKWKKWKKKKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWEDi;j;............................,Li;L;;;..,;;f........................KKKKWWWKDDWWKKDDDGDKKGGGGGGGGDGDDDDDDDDDDDDDDD *\n\t *fjt. .:,,,:::::,,,,,,,;;;EEKWWWWWWWKKKKKKWKKKKKKKKKKKKKKKKKKKKKWKKKWKW##W#KKKKWEti;;G;........................tEEEL;;;;;;;;;;L..........................DKKKKKEDDWWKEDGftiLE;;;;itjLGGGGGGDDDDDDDDDDD *\n\t *fjt. .j::::,,,,,,,;;;DEEWWWWWWWWKKKKWKKKKKKKKKKKKKKKKKKKKKKKWKKWWWK##W#KKKKKEii;;;L;...................iDEEEEEEKKi;j;;;;jD.....:......................,KKKKDGGEKKE:::::;E::::::::::,tLGGDDDDDDDDDD *\n\t *fjt. .;:::,,,,,,,;;;;EEKWWWWWWWWKWKKKKKKKKKKKKKKKWKKKKKKKKKKWKKWWWW#WW#KKKKKKii;;;;f;.............:tDEEEEEKKKKKKKKEti;;;L...............................EEKf;:iKKE::::::E::::::::::::::ifDDDDDDDDD *\n\t *fjt: :::,,,,,,,,;;;DEEWWWWWWWWWEKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####KKKKKEiii;;;;f,.........iDEEEEKKKKKKKKKKKKKKKf;iG......i..........................fK::::KKE::::::E::::::::::::::::,tGGDDDDD *\n\t *fjt: t:::,,,,,,;;;;iDEKWWWWWWKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####WKKKKLiii;;;;;L,....,Li;EDEEEEKKKKKKKKKKKKKKKKiG......;:...........................:i:::KKE:::::,E,::::::::::::::::::iGDDDD *\n\t *jjt. f::,,,,,,,;;;;GEEWWWWKEEKEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKWWWWW###WWKKKKiii;;;;;;;G,;L;;iiEEEEEEEKKKKKKKKKKKKKWWKE......;t.........:....................j::KEE:,::,,D,,::::,,,,,,:::::::::tDDD *\n\t *fjt:. ,::,,,,,,,;;;;EEWWKEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKKWWWWW#W#KKKKKKiiiiii;;;;;i;;iiiEEKEEKKWKKKKKKKWKKKKKWWWGi;...;t......,;;;;,....................:,EEE,,,,,,D,,,,,,,,,,,,,,,,::,::::tG *\n\t *fjt:. ,::,,,,,,,;;;;DEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWW#W#KKKKKKiiiii;;i;;;;;iiiKKKEKKKKWWKWWWWWWKKKKWWWWW;;;:;L.....;;;;;;;;;....................,KEE,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,; *\n\t *fjt:. f:,,,,,,,;;;;jEDEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWW#W##KKKKKKiiiiiiii;i;;iiiEKKKKKKKKWKWWWWWWWWKKKWWWWWKi;;i.....,jEEfGi;;;;;...................EED,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,, *\n\t *fjt:. .f::,,,,,,;;jEEDEEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWKWWWWW###KKKKKLiiiiiiiiiiiiiiEEKKKKKKKKWWWWWWWWWWWWKWWWWWWGi;i;,..;jDDDKEGi;;;;;;:................EED,,,,,,D,,,,,,,,,,,,,,,,,,,,,,,,, *\n\t *fjt:. .. ;::,,,,,;;EDDEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKW#WW####KWKKKiiiiiiiiiiiiijKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWt;i;;;;i;DDDDDDGi;;;;;;;;:.............EDf;,,,;,G;;;;;;;;;;;;;;;,,,,,,,,,, *\n\t *fjt:......:,,,,,,;LDDDEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWWKWWWW####KKKKKiiiiiiiiiiijKEKKWKKKKKKKWWWWWWWWWWWWWWWWWWWWWWiLiii;i;DEEEEDDE;i;;;;;;;;;:..........EDi,;;;;;L;;;;;;;;;;;;;;;;;;,,,,,,, *\n\t *fjt:......:,,,,,;EDDDEEKEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKWWWWKKWWW##W#KWKKWEiiiiiijGKKKKKWWKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKi;iiiiDDEEEEEEDEi;;;;;;;;;;;;;,:.....ED;;;;;;;j;;;;;;;;;;;;;;;;;;;;;;;,, *\n\t *fjt:.....t,,,,,;DDDDEEEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKWWWW##WKWKKWKiiiKKKKKKKKKWWKKKKKKKKWWWWWWWWWWWWWWW#WWWWWWWWWiiiiifLEEEEEEEEDi;i;;;;;;;;;;;;.....DD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *\n\t *fjt:.....G,,,,,GDDDEEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKKWWWKKKWWW###WKWKKWKitKKKKKKKKKWKKKKKKKKKKWWWWWWWWWWWWWW###WWWWWWWWEiiiiiiiEEEEEEEEDGiiii;;;;;;;;;.....GD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *\n\t *fjt:.....L,,,,;GDDDEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWDGWWW###KKWWKWKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWW####WWWWWWWWWiiiiiiiiEEEEEEEEEEDi;i;;;;;;;;.....Lj;;;;;;i;iiiiii;;;;;;ii;;;;;;;;;;; *\n\t ***********************************************************************************************************************************************************************************************************/\n\n\t\t\n}",
"Main"
]
| //No sorceries shall prevail.
import java.util.*;
import java.io.*;
import java.lang.reflect.Array;
public class Main {
static Scanner inp= new Scanner(System.in);
static PrintWriter out= new PrintWriter(System.out);
public static void main(String args[]) {
Main g=new Main();
g.main();
out.close();
}
//I hate dp
void main() {
int n=inp.nextInt();
int[] a=new int[n],b=new int[n];
for(int i=0;i<n;i++) {
a[i]=inp.nextInt();
b[i]=inp.nextInt();
}
for(int i=0;i<n-2;i++) {
if(a[i]==b[i] && a[i+1]==b[i+1] && a[i+2]==b[i+2]) {
out.println("Yes");
return;
}
}
out.println("No");
}
/*********************************************************************************************************************************************************************************************************
* ti;. .:,:i: :,;;itt;. fDDEDDEEEEEEKEEEEEKEEEEEEEEEEEEEEEEE###WKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWW#WWWWWKKKKKEE :,:. f::::. .,ijLGDDDDDDDEEEEEEE*
*ti;. .:,:i: .:,;itt;: GLDEEGEEEEEEEEEEEEEEEEEEDEEEEEEEEEEE#W#WEKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKKKKKKG. .::. f:,...,ijLGDDDDDDDDEEEEEE *
*ti;. .:,:i: :,;;iti, :fDDEEEEEEEEEEEEEEEKEEEEDEEEEEEEEEEEW##WEEEKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWWKKKKKKEG .::. .f,::,ijLGDDDDDDDDEEEEEE *
*ti;. .:,:i: .,,;iti;. LDDEEEEEEEEEEKEEEEWEEEDDEEEEEEEEEEE#WWWEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWWWWWKKKKKEDj .::. .:L;;ijfGDDDDDDDDDEEEEE *
*ti;. .:,:i: .:,;;iii:LLDEEEEEEEEEEEKEEEEEEEEDEEEEEEEEEEEW#WWEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKWWKWWWWWWWWWWWWWWKKKKKKKEL .::. .:;LijLGGDDDDDDDDEEEEE *
*ti;. .:,:;: :,;;ittfDEEEEEEEEEEEEEEEEKEEEGEEEEEEEEEEEKWWWEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWWWWKKKKKKKELj .::. :,;jffGGDDDDDDDDDEEEE *
*ti;. .:,:i: .,;;tGGDEEEEEEEEEEEKEEEKEEEDEEEEEEEEEEEEWWWEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWKWWWWWWKKKKKKKEEL .::. .:;itDGGDDDDDDDDDEEEE *
*ti;. .:::;: :;ifDEEEEEEEEEEEEKEEEKEEEEEEEEEEEEEEEWWWEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WWWKKKKKKKKEEf .::. :,itfGEDDDDDDDDDDDEE *
*ti;. .:::;: :GGEEEEEEEEEEEKEKEEKEEEEEEEEEEEEEEEEWWEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKKEEDG .::. .,;jfLGKDLDDDDDDEEDD *
*ti;. .:::;: fDEEEEEEKKKKKKKKKEKEEEEEEEEEEEEEEE#WEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#KKKKKKKKKKEEf .:::. .,;tfLGDEDDDDDDDDEEE *
*ti;. :::;: fDEEEEEEKKKKKKKKKKWKEEEEEEEEEEEEEEEWKEEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKKKEEft :::. .,;tfLGDDDKDDDDDDDDD *
*ti;. .::;: fDEEEEEEKKKKKKKWKKKKKEEEEEEEEEEEEE#WEEWEEEEEDEEDEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKKKEEGG :,:. .,;tfLGGDDDKDDDDDDDD *
*ti;. .:.;: tGDEEEEKKKKKKKKKKKKKKKKKEEEEEEEEEEEWEEKWEEEEEEEDEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKKKKKEEDf :::. .,;tfLGGDDDDEDDDDDDD *
*ti;. .::;: fDEEEEEKKKKKKKKKKKWKKKKKKKKEEEEEEEWWEEWEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKW##KKKKKKKEEEft.::. .,;tfLGGDDDDDDEDDDDD *
*ti;. .:.;: tGDEEEKKKKKKKKKKKKKKKKKKKKKKEKEEEEE#EEWWEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKW#WKKKKKKEEEGD:::. .,;tfLGGDDDDDDDEDDDD *
*ti;. .:.,. LDEEEEKKKKKKKKKKWKWKKKKKKKKKKKKEEEKWEKW#EEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKW##KKKKKKEEEEf,,:. .,;tfLGGDDDDDDDDEDDD *
*ti;. ..:.,. LGDEEEEKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEEW#WEEEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEKEKKKKKKKKKKKKKKKK##KKKKKEEEEEfi;,. .,;tfLGGDDDDDDDDDKDD *
*tt;. .:.,: jDEEEEKKKKKKKKKKWWKKKKKKKKKKKKKKKKKWKE#WWEEEEEEEEEEEEEEWEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKKKKKKWWKKKKEEEEDfG;,: .,;tfLGGDDDDDDDDDDKD *
*tii,. .:.,. tGDEEEEKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKKWWWKEEEEEEEEEEEEEKEEEEEEEEEEEEEEEEEEEEEEEEEEEEEKKKKKKKKKKKW#KKKKEEEEDGGi;,. .,;tfLGGDDDDDDDDDDDE *
*ti;;,:. .:.,: fDEEEEKKKKKKKKKKKWKKKKKKKKKKKKKKKKKWEK#WWKEEEEEEEEEEEEDEEEEEEEEEEEEEEGEEEEEEEEEEEEEEEEEEEKKKKKKKWWKKEEEEEEDDf;;;,. .,;tfLGGDDDDDDDDDDDD *
*tii;,,:.. ...,. ;LEEEEEKKKKKKWKKKKWKKKKKKKKKKKKKKKKKEKKW#WEEEEEEEEEEEEEjEEEEEEEEEKEEEEGEEEEEEEEEKEEEEEEEEEEEEEEEEE#WKEEEEEEDDf;;;;,: .,itfLGGDDDDDDDDDDDD *
*ti;,,,,,:. ...,. LDEEEEKKKKKKKKKKKWWWKKKKKKKKKKKKKKKWKK#W#WEEEEEEEEEEEDDLEEEEEEEEEWEEEEDEEEEEEEEEKEEEEEEEEEEEEEEEEEWWEEEEEEEDDfj,,,,,:. .,itfGGGDDDDDDDDDDDD *
*tii,,,,::::. ...,: .fDEEEEKKKKKKWKKKKWWWKKKKKKKKKKKKKKKEKKW#WWEEEEEEEEEEEKiKEEKEEEEEEWEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEEWWEEEEEEEDDLD:::,,,:. .,ijfGGGDDDDDDDDDDDD *
*ti;:::::::::.. .:.,: LDEEEEKKKKKKKWKKKKWWKKKKKKKKKKKKKKKKtKKWWWWKEEEEEEEEEDiiDEEEEEEEEWWEEEEEEDEEEEEEEEEEEEEEEEEEEEEEEEEEWKEEEEEDDDGL:. .:,,,: .,ijLGGGDDDDDDDDDDDD *
*tt;. .::::::::.. ...,: :fDEEEKKKKKKKKKKKKWW#KKKKKKKKKKKKKKKKfKKWWWWKEEEEEEEEDti,DEKEEEEEEWWEEEDEEEEEEEEEKEEEEEEEEEEEEEDEEEEE#WEEEEEGGDGf:. .:,;,:. .,ijLGGDDDDDDDDDDDDD *
*tt;. .:::::::.. ...,: GDEEEKKKKKKKKWKKKKWWWKKKWKKKKKKKWWWKDEKLWWWWKKEEEEEEDEi,LDEEEEEEEEWWEEEEEEEEEEEEEEEEEEEEEEEEEDEDEEEEEW#EEEEDDDDGf,. :,,,:...,ijLGGGDDDDDDDDDDDD *
*tt;. .....::::.. ...,: fDEEEKKKKKKKKWKKKKWWWWKKKWKKKKKKKKKKfWKiWWW#KKEEEEEEEi;.EDfEEEDEEiWWEEEEEEEEEEEEDGKEEEEEEEEEEDEEEEEEEWWEEEEDDDGGLi. .,;,:::,ijLGGGDDDDDDDDDDDD *
*tt;. ....:::::. ...,. iDEEEEKKKKKKKKWKKWKWWWWWKKWWWKKKKKKKKtWKt#WWWKKEEEEEDji..DDKDDEDEGiWKEEEEEEEEEEDDEjEEEEEEEEEEEDEEEEEEEKWKEEDDDDGGff. .:,;,,;ijLGGGDDDDDDDDDDDD *
*tt;. ....::::.. .:.,: .LDEEEKKKKKKKKKKKKWWWWKWWWWWWWWWWKKKKWtKKiDWWWKKKEEEEKi:..DEDDDDDDiiWKEEEEEEEEEEDDEijDEEEEEKEEEEEEEEEEEEWWEEGDDDGGLG. .:,;;iijLGGGDDDDDDDDDDDD *
*tt;. .....:::.. ...,. .fEEEEKKKKKKKKWKKKKWWWWWWWWWWWWWWKWKKKiKDiLWWWWKEEEEEi,..fD:DDDDDti;WEEEEEEEEEEKDDi:iDDEEEEWEEEEEEEEEEEE#WEEGDDDDGGG. :,iitjLGGGDDDDDDDDDDDD *
*tti. .....:::.. ...,. GDEEEKKKKKKKKKWKKKWWW#WWWWWWWWWWWKWKKjiEjitWWWKKWEEEDi...DDLDDDDji;;WEEEEEEEEEEEDEj.iDDEEEEWEEEEEEEEEEEEWWEEDDDDDDGf. .,;tjfLGGDDDDDDDDDDDD *
*tti. ....::::.. ...,. fEEEKKKKKKKKKKKKKKKW#WWWWWWWWWWWWWWWWtiEiiiWWWKKEWKEi....D.EDDDEi;.fWEEEEEEEEEEDDfL.;EDDEEEWEEEEEEEEEEEEWWEEEDDDDDGf. :;ijfLGGDDDDDDDDDDDD *
*tti. ....::::.. ...,. LDEEEKKKKKKKKKKKKKKWWWWWWWWWWWWWWWW####WKiiiWWWKKKEEK,...:E:DDDEii..GWEEEEEEEEDWDDiL.,KDDEEEWEEEEEEEEEEEEWWKEEDDDDDGf: .,itfLGGDDDDDDDDDDDD *
*tti. .....:::.. ...,. fDEEEKKKKKKKKKWKKKKWWWWWWWWWWWWW########WLiiWWWKKKEEjD...G,DDDDi;...EWEEEEEEEEDKDEii..LDDEEEWEEEEEEEEEEEEWWWEEDDDDDGfi .,;tfLGGGDDDDDDDDDDD *
*tti. .....:::.. ...,. iGEEEKKKKKKKKKKWKKKKWWWWWWWWWWWW###########KiWWWKKEEE,.D..D.DDDii:...KKEEEEEEEEEDDj:...tEDEEEWEEEEEEEEEEEEWWWEEEDDDDDLL .,;tjLLGGDDDDDDDDDDD *
*tti. ....::::......:. LEEEKKKKKKKKKKWWKKKWWW#KWWWWWWWW#####W####W##KWWKKEEL..:D.jjDDi;,....KKEEEEEEEDfDDi...:iKDEEEWKEEEEEEEEEEEWWWEEEEDDDDLG .,;tjLLGGDDDDDDDDDDD *
*tti. ...::::::..,. :GEEEKKKKKKKKKKKKWWWWW##WWWWWWWWW##WKWK#W#W####WWKEEK.....G.DDti,.....KKEEEEEEDWGDf.,...iKDEEEWWEEEEEEEEEEEW#WEEEEEDDDGL .,;tjLLGGDDDDDDDDDDD *
*tti. ....::::::,. GDEEKKKKKKKKKKKKKWWWW###WWWWWWWWWW#WWWK###W#####WKEKK.....jDDL;;......KKEEEEEEEEEDi.f...;KDEEEWWEEEEEEEEEEEWWWWEEEEEDDGf .,;tjLLGGDDDDDDDDDDD *
*tti. ....:::,,. .LEEEKKKKKWKKKKKWWWWWW###WWWWWWWWWW#WWKW#WW##W#WWWKEKD:....:DD:;......;KEEEEEEEKiDD..f...,KKEEEWWEEEEEEEEEEEWWWWEEEEEDDDf .:;tjLLGGGDDDDDDDDDD *
*tti. ...::,,,:. GDEEKKKKKKKKKKKKWWWWWWW#WWWWWWWWWWW#KjKWWWWWWWWWWWWEK.j,..;fD.;.......fKEEEEEDKG:Di..,....DKEEEWWEEEEEEKEKKKWWWWEEEEEEDDf .:;tjLLGGDDDDDDDDDDD *
*jti. ...::,,,,:. .fEEEKKKKKWKKKKKKWWWWWWW#WWWWWWWWWWK#KKKWWWWWWWWWWWWWK..f:.:G.,:.......EKEEEEEKK;:E:.......fKEEEWWKEKEKKKKKKKW#WWEEEEEEDDf: .,;tfLLGGDDDDDDDDDDD *
*tti. ...:,,,;;,: iDEEKKKKKWKKKKKKKWWWWWWW#WWWWWWWWWWK#WDKWWKKWWWWWWWWWE..;G:G..,........KKEEEEEKi.Gi..:.....tKEEKWWWKKKKKKKKKKW##WKEEEEEEDfi .,;tfLLGGGDDDDDDDDDD *
*tti. ....::,,;;;,LEEKKKKKKWKKKKKWWWWWWW###WWWWWWWWWWKWWDKWEEEWKKWWWWWKKj.:LG..;.........EKEEEEKG;.G...;.....;KKEKWWWKKKKKKKKKKW##WWKEEEEEDfL .,;tfLGGGDDDDDDDDDDD *
*jti. ...::::,;ijDEEKKKKKWKKKKKKWKWWWWW##WWWWWWWWWWWKK#KKGDGDWEEWKKWKKGE,.i;.:.........:EKEEEKE;.:L...j.....,KWEKWWWKKKKKKKKKK####WKKEEEEDLG .,;tfLGGGGDDDDDDDDDD *
*jti. ...:...,,;GEEKKKKKWWKKKKKWWWWWWWW###WWWWWWWWWKKKWWKiLGGEDEDEKGKKiEG..;...........jKEEEKK;:.G....,.....:KKEWWWWKKKKKKKWKK####WKKKKEEEGL .,;tfLGGGGDDDDDDDDDD *
*jti. ...:. .:,GEEKKKKKWKKKKKWWWWWWWW####WWWWWWWWWKKKWWKii;fDLGDK: EEi:E:.............EKEEKK;;..L...........KKKWWWWKKKKKKKWKK####WKKKWKEEDf .,;tfGGGGDDDDDDDDDDD *
*jti. ...:. ,EEKKKKKWWKKKKKWWWWWWWWW###WWWWWWWWKKKKfWWLt;i,. fi EG..D:.............EKEKK;;..t....:.......KWKWWWWKKKKKKKWKK####WKKKWEEEDf:. .,;tfGGGGDDDDDDDDDDD *
*jti. ...:. GEEKKKKKWKKKKKWWWWWWWWW####WWWWWWWKKKKKt;KKEfff .;t.................KKKKi;:..GtGGfG.......KWWWWWWKKKKKKKWKK###WWWKKKKEEEf,,: .,;tfGGGGDDDDDDDDDDD *
*jti. ...:. GEKKKKKWWKKKKKWWWWWWWWWW##WWWWWWWKKKKKKt;EiKKKK, ...t................jEKKG;;..,.....,LGi....KWWWWWWKKKKKKWKKKW####WKKKKKEEL,,,:. .,;tfGGGDDDDDDDDDDDD *
*jti. ...:. .GEEKKKKKWKKKKKWWWWWWWWWW###WWWWWWWKKKKKKtiE::tGG........................EEEj;;...,.........:D..DKWWWWWWKKKKK#KKW###W#WKKKKKEEfj:,,,:. .,;tfGGGDDDDDDDDDDDD *
*jti. ...:. DEKKKKKWWKKKKKWWWWWWWWW####WWWWWWWKKKKKKiiE:::.::.......................EEi;;...j.....f......:iDKWWWWWWKKKKK#WW######WKKKKKEELG :,,,,:. .,;tfGGGDDDDDDDDDDDD *
*jti. ...:. fEEKKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKK;tE::..........................DD;.;,.::......;........EWWWWWWWKKKKW#WW#####WWKKKWKKELG .:,,,:::,;tfGGGDDDDDDDDDDDD *
*jti. ...:. .DEKEKKKWWKKKKWWWWWWWWWWW###WWWWWWWWKKKKKE,iD::..........................D..,;.,;tLffi...........DWDWWWW#KKKWWWWW#####W#KKKWKEEGL .:,;,,,;tfGGGDDDDDDDDDDDD *
*jti. ...:. ;EEKKKKWWKKKKKWWWWWW#WWWW####WWWWWWKKKKKEL:iD:..........................j ..;..;;:.....i,........DKtWWWWWKKWWWWWW#####WWWKKKEKEDf .:,;;;itfGGGDDDDDDDDDDDD *
*jti. ...:. DEKKKKKWWKKKKWWWWWWW#WWWW####WWWWWWKKKKKEj:iG...............................:....................GKiWWWWWKKWW#WWW######WWKKKKKEEf .,;iitfGGGDDDDDDDDDDDD *
*jti. ...:.:EKKKKKWWKKKKKWWWWWWW#WWW#####WWWWWKWKKKKEi:if:.................................iEKEKKKKKKDj......DKiWWWWWKWK##WW#######WWKKK:KEEL .:;itfGGGDDDDDDDDDDDD *
*jji. ...:,DEEKKKWWWKWKKWWWWWWWWWWWW#####WWWWWWWKKKKEi:it..................................j. KKKKKKKKKKKf..DKiWWWWWKWW##WW#######WWKKK,KEEf .,;tfGGGDDDDDDDDDDDD *
*jji. ..L:iDEEKKKWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKKi.i;.................................. . KKKWWWWWWWWK..DGiWWWWWKK##WWW#####W#WWKKKjEKEL, .:;tfGGGDDDDDDDDDDDD *
*jji. .f:::EEEKKKWWWKKKKKWWWWWWWWWWWW#####WWWWWKWKKKKK;.i,.................................:: KKEKWWWWWWfWK..EiiWWWWWKWW#WW##########KKKD,KELj .:;tfGGDDDDDDDDDDDDD *
*jji. .t::::,DEEKKKWWKKKKWWWWWWWWW#WWWW#####WWWWKKWKKKEK;.i:.................................GDDEEEKKKWWWWWtWWD.E;iWWWWWW###WW#########WWKKK.EEDG .:;tfGGGDDDDDDDDDDDD *
*jji. . j..::::EKEKKKWWWKKKKWWWWWWWWW#WWW######WWWWKKWKKKEK;.t:.................................ELLEDDEEEWWWWEtWK,.KiiWWWWWW###W##########WWKKK:EEEG .;tjfLLGDDDDDDDDDDDDDDD *
*jji. i.::::::,EEEKKWWWKKKKKWWWWWWWWW#WWW#####WWWWWKWKKKKEE,.t..................................DfiEGDDDEEKKKttKWG.KiiWWWWW##WWW##########WWKKK:fEEL ,fGGGDDDDDDDDEEEDDDDDDDDDD *
*jji. .;:..:::::DEEEKKWWWKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKED,.t..................................ifjDDGGEGDKK.ttKKE.DiWWWWW###WW##########WWWKKK:.KELiLGGGGDDDDDDDDDDDDEEEDDDDDDD *
*jji. i.:.::::::,KEEKKWWWKKKKKKWWWWWWWWW#WWWW####WWWWWWWKKKKEL:.j..................................GGf,;ifLLED .iiKKi:fWWWWWW##W#W##########WWWKKK:.KKLGGDDDDDDDDDDDDDDDDEDDEEDDDDD *
*jji. .j:.::::::::EEEKKKWWWKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKf:.f..................................:EEfftf .,. ;iE,..jWWWWWWW###W############WWKKK,:KKGDDDDDDDDDDDDDDDDDDDDDDDEDDDD *
*jji. .:.::::::::,,EEEKKWWWKKKKKKKWWWWWWWW##WWW#####WWWWWWWKKKKKt..G....................................EEELL; .j....tKWWWWWWW################WWWKKtfGKGEDDDDDDDDDDDDDDDDDDDDDDDEEDD *
*jji. :...:::::::,,jEEKKWWWWKKKKKKWWWWWWWWW##KWW#####KWWWWWWKKKKEi..D....................................:jEEE.........;KKWWWWWWWW#WW##W##########WWKKDLGKEKDDDDDDDDDDDDDDDDDDDDDDDDDED *
*jji. i:.::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWW##WWW#####WWWWWWWKKKKKi..D......................................:::::......,KKKWWWWWWWWW#####W########WWWKKKGGKKEGGGGGGGGDDDDDDDDDDDDDDDDDDE *
*jji. i..:::::::::,,tEEKKWWWWKKKKKWWWWWWWWWWW##WW######WWWWWWWKKKKKi..D......................................::::......:EKKKWWWWWWWWWWW##WW########W#WKKWGGKKGGGGGGGGGGGGGGGDDDDDDDDDDDDD *
*jji. .:::::::::::,,,EEEKKWWWWKKKKKWWWWWWWWWWW##WW#####WWWWWWWWKKKKKi..D....................................:::::::::..tELii;KWWWWWWWWWW##WW######WWWWWWKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGDG *
*jjt. :.::::::::,,,,fEEKKWWWWKKKKKKWWWWWWWWWW###WW####WWWWWWW#WKKKKKi..D....................................:::::::.:.,;;;;;;,KKWWWWWWWWW#WW########WWWKKWGGGKGGGGGGGGGGGGGGGGGGGGGGGGGGGG *
*jji. ;.::::::::,,,,;EEEKWWWWWKKKKKWWWWWWWWWWWW##WW###WKWWWWWK#WKKKKKi..G......................................:::::::,;;;;:...KKKWWWWWWWWWKWW#######WWWWKKGLGKDGGGGGGLLGGGGGGGGGGGGGGGGGGG *
*jjt. f.:::::::::,,,,fEEKKWWWWWKKKKKWWWWWWWWWWW###WW##WKKWWWWWW#WKKKKK;.jt........i.............................:::::::;j;;....:E.KKKWWWWWWWKWW#####W#WWWWKKLLGWEEGGGGGLGGGGGGGGGGGGGGGGGGGG *
*jjt. ...:::::::,,,,,;DEEKWWWWWKKKKKWWWWWWWWWWWW####WWWKKKWWWWWWWWKKKKK;.E;.........t.............................:::::ii;;.....D...KKWWWWWWWKWW#####WWEWWWKKGGGEKKGGGGGLGGGGGGGGGGGGGLGGGGGG *
*fji. ;.:::::::,,,,,;LEEKKWWWWWKKKKKWWWWWWWWWWWW####KWKKKKWWWWWWWWKKKKKi.D;..........j.............................:::tt;,.....:.....KKWWWWWWKWWWW##WWWGWWWKKGGGGKEGGGGGGGGGGGGGGGGGGGLLGGGGL *
*fji. t::::::::,,,,,,;EEEKWWWWWKKKKKKKWWWWWWWWWWW##WKWKKKKKWWWWWWWWKKKKKi:D;............j...........................::LL;,.............KKWWWWWKWWWWWWWWWGWWWKKGGGGKGGGGGGGGGGGGGGGGGGGGLLGGGGL *
*fjt: .:::::::,,,,,,,DEEKWWWWWWKKKKKKKWWWWWWWWWWWWKKWKKKKKKWWWWK#WWKKKKWitE;........... ............................:G;;:...............KKKWWKKWWWWWWWWWGWWWKKGGGGWGGGGGGGGGGGGGGGGGGGGGGGGGGL *
*fjji;:. .f:::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWWKKKKKKKKKKKWWKWWWWWKKKKWGKD;........................................L;;..................DKKWKKWWWWWWWWWGWWWKKDGGGKDGGGGGGGGGGGGGGGGGGGGGGGGGG *
*fjjtii;,:. :::::::,,,,,,,;EEEKWWWWWWKKKKKKWWWWWWWWWWKKKKKKKKKKKKWWWWWW#WWKKKKWiEj;......................................:i,;....,...............;KKEKWWWWWWWWWGKWWKKDDGGDEGGGDGGGGGDGGGGGGGGGGGGGGGG *
*fjtiiiii;;:. j::::::,,,,,,,;;EEEKWWWWW#KKKKKWWWWWWWWWKKKKKKWKKKKKKKWWWWWWWWWKKKKWtEL;:....................................;;;:...,;j................:KEEWWWWWWWWWDDWWKKDDDDDKDDDDDDDDDDDDDDDGGGGGGGGGGG *
*fjti;;iiii;;,:::::::,,,,,,,,;EEEKWWWWWWWKKKKWWWWWWWWKKKKKKKWKKKKKKKWWWWWWW#W#KKKKWEEii;...................................f;:....,;L...................EEKWWWWWWWWDDWWKKDDDDDKEDDDDDDDDDDDDDDDDDDDDDGGGG *
*fjt,,,;;;;ii;f::::::,,,,,,,;;EEKWWWWWWWKKKKKWWWKWWKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWKEij;:...............................:G;,.....,;f....................:tKKWWWWWWWDDWWKKDDDDDKKDDDDDDDDDDDDDDDDDDDDDDDDD *
*jjt. ..:,;;;;,::::,,,,,,,,;;GEEWWWWWWWWKKKKWKKWKKKKKKKKKKKKKKKKKKKKWWWWWWW#W#KKKKWEDi;j;............................,Li;L;;;..,;;f........................KKKKWWWKDDWWKKDDDGDKKGGGGGGGGDGDDDDDDDDDDDDDDD *
*fjt. .:,,,:::::,,,,,,,;;;EEKWWWWWWWKKKKKKWKKKKKKKKKKKKKKKKKKKKKWKKKWKW##W#KKKKWEti;;G;........................tEEEL;;;;;;;;;;L..........................DKKKKKEDDWWKEDGftiLE;;;;itjLGGGGGGDDDDDDDDDDD *
*fjt. .j::::,,,,,,,;;;DEEWWWWWWWWKKKKWKKKKKKKKKKKKKKKKKKKKKKKWKKWWWK##W#KKKKKEii;;;L;...................iDEEEEEEKKi;j;;;;jD.....:......................,KKKKDGGEKKE:::::;E::::::::::,tLGGDDDDDDDDDD *
*fjt. .;:::,,,,,,,;;;;EEKWWWWWWWWKWKKKKKKKKKKKKKKKWKKKKKKKKKKWKKWWWW#WW#KKKKKKii;;;;f;.............:tDEEEEEKKKKKKKKEti;;;L...............................EEKf;:iKKE::::::E::::::::::::::ifDDDDDDDDD *
*fjt: :::,,,,,,,,;;;DEEWWWWWWWWWEKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####KKKKKEiii;;;;f,.........iDEEEEKKKKKKKKKKKKKKKf;iG......i..........................fK::::KKE::::::E::::::::::::::::,tGGDDDDD *
*fjt: t:::,,,,,,;;;;iDEKWWWWWWKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKWWWW####WKKKKLiii;;;;;L,....,Li;EDEEEEKKKKKKKKKKKKKKKKiG......;:...........................:i:::KKE:::::,E,::::::::::::::::::iGDDDD *
*jjt. f::,,,,,,,;;;;GEEWWWWKEEKEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKWWWWW###WWKKKKiii;;;;;;;G,;L;;iiEEEEEEEKKKKKKKKKKKKKWWKE......;t.........:....................j::KEE:,::,,D,,::::,,,,,,:::::::::tDDD *
*fjt:. ,::,,,,,,,;;;;EEWWKEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKWWKKWWWWW#W#KKKKKKiiiiii;;;;;i;;iiiEEKEEKKWKKKKKKKWKKKKKWWWGi;...;t......,;;;;,....................:,EEE,,,,,,D,,,,,,,,,,,,,,,,::,::::tG *
*fjt:. ,::,,,,,,,;;;;DEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWW#W#KKKKKKiiiii;;i;;;;;iiiKKKEKKKKWWKWWWWWWKKKKWWWWW;;;:;L.....;;;;;;;;;....................,KEE,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,; *
*fjt:. f:,,,,,,,;;;;jEDEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWW#W##KKKKKKiiiiiiii;i;;iiiEKKKKKKKKWKWWWWWWWWKKKWWWWWKi;;i.....,jEEfGi;;;;;...................EED,,,,,,E,,,,,,,,,,,,,,,,,,,,,,,,, *
*fjt:. .f::,,,,,,;;jEEDEEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWKWWWWW###KKKKKLiiiiiiiiiiiiiiEEKKKKKKKKWWWWWWWWWWWWKWWWWWWGi;i;,..;jDDDKEGi;;;;;;:................EED,,,,,,D,,,,,,,,,,,,,,,,,,,,,,,,, *
*fjt:. .. ;::,,,,,;;EDDEEEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWKKW#WW####KWKKKiiiiiiiiiiiiijKKKKKKKKKKWWWWWWWWWWWWWWWWWWWWWt;i;;;;i;DDDDDDGi;;;;;;;;:.............EDf;,,,;,G;;;;;;;;;;;;;;;,,,,,,,,,, *
*fjt:......:,,,,,,;LDDDEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKWWWWKWWWW####KKKKKiiiiiiiiiiijKEKKWKKKKKKKWWWWWWWWWWWWWWWWWWWWWWiLiii;i;DEEEEDDE;i;;;;;;;;;:..........EDi,;;;;;L;;;;;;;;;;;;;;;;;;,,,,,,, *
*fjt:......:,,,,,;EDDDEEKEEEEEEEEEKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKWWWWKKWWW##W#KWKKWEiiiiiijGKKKKKWWKKKKKKKKWWWWWWWWWWWWWWWWWWWWWWKi;iiiiDDEEEEEEDEi;;;;;;;;;;;;;,:.....ED;;;;;;;j;;;;;;;;;;;;;;;;;;;;;;;,, *
*fjt:.....t,,,,,;DDDDEEEKEEEEEEEEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWKKKWWWW##WKWKKWKiiiKKKKKKKKKWWKKKKKKKKWWWWWWWWWWWWWWW#WWWWWWWWWiiiiifLEEEEEEEEDi;i;;;;;;;;;;;;.....DD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *
*fjt:.....G,,,,,GDDDEEEEEEEEEEEEKKKKKKKKKKKKKKKKWKKKKKKKKKKKKKKKWWWKKKWWW###WKWKKWKitKKKKKKKKKWKKKKKKKKKKWWWWWWWWWWWWWW###WWWWWWWWEiiiiiiiEEEEEEEEDGiiii;;;;;;;;;.....GD;;;;;;;i;;;;;;;;;;;;;;;;;;;;;;;;; *
*fjt:.....L,,,,;GDDDEEEEEEEEEEKEKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKWWWWWDGWWW###KKWWKWKKKKKKKKKKKKKKKKKKKKKKKWWWWWWWWWWWWW####WWWWWWWWWiiiiiiiiEEEEEEEEEEDi;i;;;;;;;;.....Lj;;;;;;i;iiiiii;;;;;;ii;;;;;;;;;;; *
***********************************************************************************************************************************************************************************************************/
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
2,
17,
17,
41,
13,
41,
13,
12,
13,
30,
41,
13,
4,
13,
41,
13,
17,
41,
13,
20,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
13,
41,
13,
4,
13,
0,
18,
13,
2,
13,
17,
20,
11,
1,
41,
13,
17,
2,
2,
13,
17,
13,
1,
40,
13,
30,
30,
14,
2,
2,
18,
18,
13,
13,
13,
18,
18,
13,
2,
13,
17,
13,
18,
18,
13,
2,
13,
17,
13,
30,
4,
13,
17,
29,
4,
13,
17,
23,
13,
12,
13,
30,
0,
13,
20,
0,
13,
20,
41,
13,
4,
18,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
4,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
18,
13,
13,
17,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
4,
18,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
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,
6,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
0,
18,
36,
13,
13,
0,
13,
2,
13,
13,
23,
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,
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
],
[
378,
11
],
[
378,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
14,
16
],
[
378,
17
],
[
17,
18
],
[
378,
19
],
[
19,
20
],
[
378,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
23,
28
],
[
28,
29
],
[
28,
30
],
[
23,
31
],
[
31,
32
],
[
31,
33
],
[
23,
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
],
[
47,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
47,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
56,
62
],
[
23,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
63,
73
],
[
73,
74
],
[
74,
75
],
[
63,
76
],
[
77,
77
],
[
77,
78
],
[
78,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
80,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
80,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
96,
98
],
[
93,
99
],
[
78,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
100,
104
],
[
23,
105
],
[
105,
106
],
[
105,
107
],
[
21,
108
],
[
108,
109
],
[
378,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
116,
118
],
[
112,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
112,
124
],
[
124,
125
],
[
124,
126
],
[
112,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
127,
132
],
[
132,
133
],
[
132,
134
],
[
127,
135
],
[
135,
136
],
[
136,
137
],
[
127,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
112,
142
],
[
142,
143
],
[
143,
144
],
[
112,
145
],
[
145,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
145,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
153,
154
],
[
151,
155
],
[
150,
156
],
[
110,
157
],
[
157,
158
],
[
378,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
164,
165
],
[
164,
166
],
[
162,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
159,
171
],
[
171,
172
],
[
378,
173
],
[
173,
174
],
[
173,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
176,
179
],
[
173,
180
],
[
180,
181
],
[
378,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
182,
189
],
[
189,
190
],
[
378,
191
],
[
191,
192
],
[
191,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
195,
198
],
[
198,
199
],
[
199,
200
],
[
378,
201
],
[
201,
202
],
[
201,
203
],
[
203,
204
],
[
204,
205
],
[
205,
206
],
[
206,
207
],
[
205,
208
],
[
208,
209
],
[
209,
210
],
[
378,
211
],
[
211,
212
],
[
211,
213
],
[
213,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
215,
218
],
[
218,
219
],
[
219,
220
],
[
378,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
224,
225
],
[
225,
226
],
[
226,
227
],
[
378,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
232,
236
],
[
232,
237
],
[
237,
238
],
[
237,
239
],
[
237,
240
],
[
240,
241
],
[
240,
242
],
[
228,
243
],
[
243,
244
],
[
228,
245
],
[
245,
246
],
[
378,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
250,
251
],
[
251,
252
],
[
252,
253
],
[
252,
254
],
[
251,
255
],
[
251,
256
],
[
256,
257
],
[
256,
258
],
[
256,
259
],
[
259,
260
],
[
259,
261
],
[
247,
262
],
[
262,
263
],
[
247,
264
],
[
264,
265
],
[
378,
266
],
[
266,
267
],
[
266,
268
],
[
268,
269
],
[
269,
270
],
[
270,
271
],
[
271,
272
],
[
271,
273
],
[
270,
274
],
[
270,
275
],
[
275,
276
],
[
275,
277
],
[
277,
278
],
[
277,
279
],
[
279,
280
],
[
279,
281
],
[
281,
282
],
[
281,
283
],
[
266,
284
],
[
284,
285
],
[
378,
286
],
[
286,
287
],
[
286,
288
],
[
288,
289
],
[
286,
290
],
[
290,
291
],
[
286,
292
],
[
292,
293
],
[
286,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
297,
301
],
[
296,
302
],
[
302,
303
],
[
303,
304
],
[
303,
305
],
[
302,
306
],
[
296,
307
],
[
307,
308
],
[
307,
309
],
[
309,
310
],
[
309,
311
],
[
294,
312
],
[
312,
313
],
[
294,
314
],
[
314,
315
],
[
378,
316
],
[
316,
317
],
[
316,
318
],
[
318,
319
],
[
316,
320
],
[
320,
321
],
[
316,
322
],
[
322,
323
],
[
322,
324
],
[
324,
325
],
[
325,
326
],
[
325,
327
],
[
316,
328
],
[
328,
329
],
[
328,
330
],
[
330,
331
],
[
331,
332
],
[
332,
333
],
[
333,
334
],
[
333,
335
],
[
332,
336
],
[
336,
337
],
[
337,
338
],
[
338,
339
],
[
331,
340
],
[
340,
341
],
[
341,
342
],
[
342,
343
],
[
342,
344
],
[
344,
345
],
[
345,
346
],
[
346,
347
],
[
341,
348
],
[
348,
349
],
[
349,
350
],
[
349,
351
],
[
330,
352
],
[
352,
353
],
[
353,
354
],
[
354,
355
],
[
316,
356
],
[
356,
357
],
[
356,
358
],
[
358,
359
],
[
359,
360
],
[
359,
361
],
[
358,
362
],
[
362,
363
],
[
363,
364
],
[
363,
365
],
[
365,
366
],
[
366,
367
],
[
367,
368
],
[
362,
369
],
[
369,
370
],
[
370,
371
],
[
370,
372
],
[
372,
373
],
[
373,
374
],
[
358,
375
],
[
375,
376
],
[
0,
377
],
[
377,
378
],
[
377,
379
]
]
| [
"import java.util.*;\nimport java.io.*;\nimport java.math.*;\n \npublic class Main\n{\n static class Pair{\n int first, second;\n boolean flag;\n public Pair(int first, int second){\n this.first = first;\n this.second = second;\n flag = (first == second);\n }\n }\n\n public static void process(int test_number)throws IOException\n {\n int n = ni(), res = 0;\n Pair arr[] = new Pair[n];\n\n for(int i = 1; i <= n; i++){\n int x = ni(), y = ni();\n arr[i - 1] = new Pair(x, y);\n } \n\n for(int i = 0; i + 2 < n; i++){\n if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){\n pn(\"Yes\");\n return ;\n }\n }\n\n pn(\"No\");\n }\n \n static final long mod = (long)1e9+7l;\n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc = new FastReader();\n \n long s = System.currentTimeMillis();\n int t = 1;\n //t = ni();\n for(int i = 1; i <= t; i++)\n process(i);\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n\n static void trace(Object... o){ System.err.println(Arrays.deepToString(o)); };\n static void pn(Object o){ out.println(o); }\n static void p(Object o){ out.print(o); }\n static int ni()throws IOException{ return Integer.parseInt(sc.next()); }\n static long nl()throws IOException{ return Long.parseLong(sc.next()); }\n static double nd()throws IOException{ return Double.parseDouble(sc.next()); }\n static String nln()throws IOException{ return sc.nextLine(); }\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 \n static class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main\n{\n static class Pair{\n int first, second;\n boolean flag;\n public Pair(int first, int second){\n this.first = first;\n this.second = second;\n flag = (first == second);\n }\n }\n\n public static void process(int test_number)throws IOException\n {\n int n = ni(), res = 0;\n Pair arr[] = new Pair[n];\n\n for(int i = 1; i <= n; i++){\n int x = ni(), y = ni();\n arr[i - 1] = new Pair(x, y);\n } \n\n for(int i = 0; i + 2 < n; i++){\n if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){\n pn(\"Yes\");\n return ;\n }\n }\n\n pn(\"No\");\n }\n \n static final long mod = (long)1e9+7l;\n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc = new FastReader();\n \n long s = System.currentTimeMillis();\n int t = 1;\n //t = ni();\n for(int i = 1; i <= t; i++)\n process(i);\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n\n static void trace(Object... o){ System.err.println(Arrays.deepToString(o)); };\n static void pn(Object o){ out.println(o); }\n static void p(Object o){ out.print(o); }\n static int ni()throws IOException{ return Integer.parseInt(sc.next()); }\n static long nl()throws IOException{ return Long.parseLong(sc.next()); }\n static double nd()throws IOException{ return Double.parseDouble(sc.next()); }\n static String nln()throws IOException{ return sc.nextLine(); }\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 \n static class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n}",
"Main",
"static final long mod = (long)1e9+7l;",
"mod",
"(long)1e9+7l",
"(long)1e9",
"7l",
"static FastReader sc;",
"sc",
"static PrintWriter out;",
"out",
"public static void process(int test_number)throws IOException\n {\n int n = ni(), res = 0;\n Pair arr[] = new Pair[n];\n\n for(int i = 1; i <= n; i++){\n int x = ni(), y = ni();\n arr[i - 1] = new Pair(x, y);\n } \n\n for(int i = 0; i + 2 < n; i++){\n if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){\n pn(\"Yes\");\n return ;\n }\n }\n\n pn(\"No\");\n }",
"process",
"{\n int n = ni(), res = 0;\n Pair arr[] = new Pair[n];\n\n for(int i = 1; i <= n; i++){\n int x = ni(), y = ni();\n arr[i - 1] = new Pair(x, y);\n } \n\n for(int i = 0; i + 2 < n; i++){\n if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){\n pn(\"Yes\");\n return ;\n }\n }\n\n pn(\"No\");\n }",
"int n = ni()",
"n",
"ni()",
"ni",
"res = 0;",
"res",
"0",
"Pair arr[] = new Pair[n];",
"arr",
"new Pair[n]",
"n",
"for(int i = 1; i <= n; i++){\n int x = ni(), y = ni();\n arr[i - 1] = new Pair(x, y);\n }",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int x = ni(), y = ni();\n arr[i - 1] = new Pair(x, y);\n }",
"{\n int x = ni(), y = ni();\n arr[i - 1] = new Pair(x, y);\n }",
"int x = ni()",
"x",
"ni()",
"ni",
"y = ni();",
"y",
"ni()",
"ni",
"arr[i - 1] = new Pair(x, y)",
"arr[i - 1]",
"arr",
"i - 1",
"i",
"1",
"new Pair(x, y)",
"for(int i = 0; i + 2 < n; i++){\n if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){\n pn(\"Yes\");\n return ;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i + 2 < n",
"i + 2",
"i",
"2",
"n",
"i++",
"i++",
"i",
"{\n if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){\n pn(\"Yes\");\n return ;\n }\n }",
"{\n if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){\n pn(\"Yes\");\n return ;\n }\n }",
"if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){\n pn(\"Yes\");\n return ;\n }",
"arr[i].flag && arr[i + 1].flag && arr[i + 2].flag",
"arr[i].flag && arr[i + 1].flag && arr[i + 2].flag",
"arr[i].flag",
"arr[i]",
"arr",
"i",
"arr[i].flag",
"arr[i + 1].flag",
"arr[i + 1]",
"arr",
"i + 1",
"i",
"1",
"arr[i + 1].flag",
"arr[i + 2].flag",
"arr[i + 2]",
"arr",
"i + 2",
"i",
"2",
"arr[i + 2].flag",
"{\n pn(\"Yes\");\n return ;\n }",
"pn(\"Yes\")",
"pn",
"\"Yes\"",
"return ;",
"pn(\"No\")",
"pn",
"\"No\"",
"int test_number",
"test_number",
"public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc = new FastReader();\n \n long s = System.currentTimeMillis();\n int t = 1;\n //t = ni();\n for(int i = 1; i <= t; i++)\n process(i);\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }",
"main",
"{\n out = new PrintWriter(System.out);\n sc = new FastReader();\n \n long s = System.currentTimeMillis();\n int t = 1;\n //t = ni();\n for(int i = 1; i <= t; i++)\n process(i);\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }",
"out = new PrintWriter(System.out)",
"out",
"new PrintWriter(System.out)",
"sc = new FastReader()",
"sc",
"new FastReader()",
"long s = System.currentTimeMillis();",
"s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"int t = 1;",
"t",
"1",
"for(int i = 1; i <= t; i++)\n process(i);",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= t",
"i",
"t",
"i++",
"i++",
"i",
"process(i);",
"process(i)",
"process",
"i",
"out.flush()",
"out.flush",
"out",
"System.err.println(System.currentTimeMillis()-s+\"ms\")",
"System.err.println",
"System.err",
"System",
"System.err",
"System.currentTimeMillis()-s+\"ms\"",
"System.currentTimeMillis()-s",
"System.currentTimeMillis()",
"System.currentTimeMillis",
"System",
"s",
"\"ms\"",
"String[]args",
"args",
"static void trace(Object... o){ System.err.println(Arrays.deepToString(o)); }",
"trace",
"{ 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",
"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 int ni()throws IOException{ return Integer.parseInt(sc.next()); }",
"ni",
"{ return Integer.parseInt(sc.next()); }",
"return Integer.parseInt(sc.next());",
"Integer.parseInt(sc.next())",
"Integer.parseInt",
"Integer",
"sc.next()",
"sc.next",
"sc",
"static long nl()throws IOException{ return Long.parseLong(sc.next()); }",
"nl",
"{ return Long.parseLong(sc.next()); }",
"return Long.parseLong(sc.next());",
"Long.parseLong(sc.next())",
"Long.parseLong",
"Long",
"sc.next()",
"sc.next",
"sc",
"static double nd()throws IOException{ return Double.parseDouble(sc.next()); }",
"nd",
"{ return Double.parseDouble(sc.next()); }",
"return Double.parseDouble(sc.next());",
"Double.parseDouble(sc.next())",
"Double.parseDouble",
"Double",
"sc.next()",
"sc.next",
"sc",
"static String nln()throws IOException{ return sc.nextLine(); }",
"nln",
"{ return sc.nextLine(); }",
"return sc.nextLine();",
"sc.nextLine()",
"sc.nextLine",
"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 class Pair{\n int first, second;\n boolean flag;\n public Pair(int first, int second){\n this.first = first;\n this.second = second;\n flag = (first == second);\n }\n }",
"Pair",
"int first",
"first",
"second;",
"second",
"boolean flag;",
"flag",
"public Pair(int first, int second){\n this.first = first;\n this.second = second;\n flag = (first == second);\n }",
"Pair",
"{\n this.first = first;\n this.second = second;\n flag = (first == second);\n }",
"this.first = first",
"this.first",
"this",
"this.first",
"first",
"this.second = second",
"this.second",
"this",
"this.second",
"second",
"flag = (first == second)",
"flag",
"(first == second)",
"first",
"second",
"int first",
"first",
"int second",
"second",
"static class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n }",
"FastReader",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n }",
"FastReader",
"{ \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{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n }",
"next",
"{ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n }",
"while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n }",
"st == null || !st.hasMoreElements()",
"st == null",
"st",
"null",
"!st.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"st",
"{ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n }",
"try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); }",
"catch (IOException e){ e.printStackTrace(); }",
"IOException e",
"{ e.printStackTrace(); }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ st = new StringTokenizer(br.readLine()); }",
"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{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n }",
"nextLine",
"{ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n }",
"String str = \"\";",
"str",
"\"\"",
"try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); }",
"catch (IOException e) { e.printStackTrace(); }",
"IOException e",
"{ e.printStackTrace(); }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{ str = br.readLine(); }",
"str = br.readLine()",
"str",
"br.readLine()",
"br.readLine",
"br",
"return str;",
"str",
"public class Main\n{\n static class Pair{\n int first, second;\n boolean flag;\n public Pair(int first, int second){\n this.first = first;\n this.second = second;\n flag = (first == second);\n }\n }\n\n public static void process(int test_number)throws IOException\n {\n int n = ni(), res = 0;\n Pair arr[] = new Pair[n];\n\n for(int i = 1; i <= n; i++){\n int x = ni(), y = ni();\n arr[i - 1] = new Pair(x, y);\n } \n\n for(int i = 0; i + 2 < n; i++){\n if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){\n pn(\"Yes\");\n return ;\n }\n }\n\n pn(\"No\");\n }\n \n static final long mod = (long)1e9+7l;\n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc = new FastReader();\n \n long s = System.currentTimeMillis();\n int t = 1;\n //t = ni();\n for(int i = 1; i <= t; i++)\n process(i);\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n\n static void trace(Object... o){ System.err.println(Arrays.deepToString(o)); };\n static void pn(Object o){ out.println(o); }\n static void p(Object o){ out.print(o); }\n static int ni()throws IOException{ return Integer.parseInt(sc.next()); }\n static long nl()throws IOException{ return Long.parseLong(sc.next()); }\n static double nd()throws IOException{ return Double.parseDouble(sc.next()); }\n static String nln()throws IOException{ return sc.nextLine(); }\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 \n static class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n}",
"public class Main\n{\n static class Pair{\n int first, second;\n boolean flag;\n public Pair(int first, int second){\n this.first = first;\n this.second = second;\n flag = (first == second);\n }\n }\n\n public static void process(int test_number)throws IOException\n {\n int n = ni(), res = 0;\n Pair arr[] = new Pair[n];\n\n for(int i = 1; i <= n; i++){\n int x = ni(), y = ni();\n arr[i - 1] = new Pair(x, y);\n } \n\n for(int i = 0; i + 2 < n; i++){\n if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){\n pn(\"Yes\");\n return ;\n }\n }\n\n pn(\"No\");\n }\n \n static final long mod = (long)1e9+7l;\n \n static FastReader sc;\n static PrintWriter out;\n public static void main(String[]args)throws IOException\n {\n out = new PrintWriter(System.out);\n sc = new FastReader();\n \n long s = System.currentTimeMillis();\n int t = 1;\n //t = ni();\n for(int i = 1; i <= t; i++)\n process(i);\n \n out.flush();\n System.err.println(System.currentTimeMillis()-s+\"ms\");\n }\n\n static void trace(Object... o){ System.err.println(Arrays.deepToString(o)); };\n static void pn(Object o){ out.println(o); }\n static void p(Object o){ out.print(o); }\n static int ni()throws IOException{ return Integer.parseInt(sc.next()); }\n static long nl()throws IOException{ return Long.parseLong(sc.next()); }\n static double nd()throws IOException{ return Double.parseDouble(sc.next()); }\n static String nln()throws IOException{ return sc.nextLine(); }\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 \n static class FastReader{ \n BufferedReader br; \n StringTokenizer st; \n \n public FastReader(){ \n br = new BufferedReader(new InputStreamReader(System.in)); \n } \n \n String next(){ \n while (st == null || !st.hasMoreElements()){ \n try{ st = new StringTokenizer(br.readLine()); } catch (IOException e){ e.printStackTrace(); } \n } \n return st.nextToken(); \n } \n \n String nextLine(){ \n String str = \"\"; \n try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } \n return str; \n } \n } \n}",
"Main"
]
| import java.util.*;
import java.io.*;
import java.math.*;
public class Main
{
static class Pair{
int first, second;
boolean flag;
public Pair(int first, int second){
this.first = first;
this.second = second;
flag = (first == second);
}
}
public static void process(int test_number)throws IOException
{
int n = ni(), res = 0;
Pair arr[] = new Pair[n];
for(int i = 1; i <= n; i++){
int x = ni(), y = ni();
arr[i - 1] = new Pair(x, y);
}
for(int i = 0; i + 2 < n; i++){
if(arr[i].flag && arr[i + 1].flag && arr[i + 2].flag){
pn("Yes");
return ;
}
}
pn("No");
}
static final long mod = (long)1e9+7l;
static FastReader sc;
static PrintWriter out;
public static void main(String[]args)throws IOException
{
out = new PrintWriter(System.out);
sc = new FastReader();
long s = System.currentTimeMillis();
int t = 1;
//t = ni();
for(int i = 1; i <= t; i++)
process(i);
out.flush();
System.err.println(System.currentTimeMillis()-s+"ms");
}
static void trace(Object... o){ System.err.println(Arrays.deepToString(o)); };
static void pn(Object o){ out.println(o); }
static void p(Object o){ out.print(o); }
static int ni()throws IOException{ return Integer.parseInt(sc.next()); }
static long nl()throws IOException{ return Long.parseLong(sc.next()); }
static double nd()throws IOException{ return Double.parseDouble(sc.next()); }
static String nln()throws IOException{ return sc.nextLine(); }
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 class FastReader{
BufferedReader br;
StringTokenizer st;
public FastReader(){
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();
}
String nextLine(){
String str = "";
try{ str = br.readLine(); } catch (IOException e) { e.printStackTrace(); }
return str;
}
}
}
|
[
7,
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,
12,
13,
30,
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,
40,
13,
30,
14,
2,
13,
17,
0,
13,
17,
41,
13,
17,
14,
2,
2,
13,
17,
2,
13,
17,
0,
13,
17,
4,
18,
13,
8,
13,
17,
17,
23,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
144,
17
],
[
144,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
20,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
40,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
18,
49
],
[
49,
50
],
[
144,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
55,
64
],
[
64,
65
],
[
64,
66
],
[
55,
67
],
[
67,
68
],
[
67,
69
],
[
55,
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
],
[
85,
88
],
[
88,
89
],
[
89,
90
],
[
82,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
97,
98
],
[
82,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
106,
107
],
[
99,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
113,
114
],
[
113,
115
],
[
55,
116
],
[
116,
117
],
[
116,
118
],
[
55,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
124,
125
],
[
124,
126
],
[
119,
127
],
[
127,
128
],
[
127,
129
],
[
55,
130
],
[
130,
131
],
[
131,
132
],
[
130,
133
],
[
133,
134
],
[
133,
135
],
[
133,
136
],
[
53,
137
],
[
137,
138
],
[
53,
139
],
[
139,
140
],
[
53,
141
],
[
141,
142
],
[
0,
143
],
[
143,
144
],
[
143,
145
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int cnt = 0;\n int rencnt = 0;\n for (int i = 0; i < n; i++) {\n int d1 = Integer.parseInt(in.next());\n int d2 = Integer.parseInt(in.next());\n if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }\n }\n\n boolean ok = false;\n if (rencnt >= 3 && cnt >= 3) ok = true;\n out.println(ok ? \"Yes\" : \"No\");\n\n }\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.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int cnt = 0;\n int rencnt = 0;\n for (int i = 0; i < n; i++) {\n int d1 = Integer.parseInt(in.next());\n int d2 = Integer.parseInt(in.next());\n if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }\n }\n\n boolean ok = false;\n if (rencnt >= 3 && cnt >= 3) ok = true;\n out.println(ok ? \"Yes\" : \"No\");\n\n }\n\n }\n}",
"Main",
"public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\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",
"Scanner in = new Scanner(inputStream);",
"in",
"new Scanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"BGoToJail solver = new BGoToJail();",
"solver",
"new BGoToJail()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class BGoToJail {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int cnt = 0;\n int rencnt = 0;\n for (int i = 0; i < n; i++) {\n int d1 = Integer.parseInt(in.next());\n int d2 = Integer.parseInt(in.next());\n if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }\n }\n\n boolean ok = false;\n if (rencnt >= 3 && cnt >= 3) ok = true;\n out.println(ok ? \"Yes\" : \"No\");\n\n }\n\n }",
"BGoToJail",
"public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int cnt = 0;\n int rencnt = 0;\n for (int i = 0; i < n; i++) {\n int d1 = Integer.parseInt(in.next());\n int d2 = Integer.parseInt(in.next());\n if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }\n }\n\n boolean ok = false;\n if (rencnt >= 3 && cnt >= 3) ok = true;\n out.println(ok ? \"Yes\" : \"No\");\n\n }",
"solve",
"{\n // 入力\n int n = Integer.parseInt(in.next());\n int cnt = 0;\n int rencnt = 0;\n for (int i = 0; i < n; i++) {\n int d1 = Integer.parseInt(in.next());\n int d2 = Integer.parseInt(in.next());\n if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }\n }\n\n boolean ok = false;\n if (rencnt >= 3 && cnt >= 3) ok = true;\n out.println(ok ? \"Yes\" : \"No\");\n\n }",
"int n = Integer.parseInt(in.next());",
"n",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"in",
"int cnt = 0;",
"cnt",
"0",
"int rencnt = 0;",
"rencnt",
"0",
"for (int i = 0; i < n; i++) {\n int d1 = Integer.parseInt(in.next());\n int d2 = Integer.parseInt(in.next());\n if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int d1 = Integer.parseInt(in.next());\n int d2 = Integer.parseInt(in.next());\n if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }\n }",
"{\n int d1 = Integer.parseInt(in.next());\n int d2 = Integer.parseInt(in.next());\n if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }\n }",
"int d1 = Integer.parseInt(in.next());",
"d1",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"in",
"int d2 = Integer.parseInt(in.next());",
"d2",
"Integer.parseInt(in.next())",
"Integer.parseInt",
"Integer",
"in.next()",
"in.next",
"in",
"if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }",
"d1 == d2",
"d1",
"d2",
"{\n cnt++;\n rencnt++;\n }",
"cnt++",
"cnt",
"rencnt++",
"rencnt",
"{\n if (rencnt < 3) rencnt = 0;\n }",
"if (rencnt < 3) rencnt = 0;",
"rencnt < 3",
"rencnt",
"3",
"rencnt = 0",
"rencnt",
"0",
"boolean ok = false;",
"ok",
"false",
"if (rencnt >= 3 && cnt >= 3) ok = true;",
"rencnt >= 3 && cnt >= 3",
"rencnt >= 3",
"rencnt",
"3",
"cnt >= 3",
"cnt",
"3",
"ok = true",
"ok",
"true",
"out.println(ok ? \"Yes\" : \"No\")",
"out.println",
"out",
"ok ? \"Yes\" : \"No\"",
"ok",
"\"Yes\"",
"\"No\"",
"int testNumber",
"testNumber",
"Scanner in",
"in",
"PrintWriter out",
"out",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int cnt = 0;\n int rencnt = 0;\n for (int i = 0; i < n; i++) {\n int d1 = Integer.parseInt(in.next());\n int d2 = Integer.parseInt(in.next());\n if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }\n }\n\n boolean ok = false;\n if (rencnt >= 3 && cnt >= 3) ok = true;\n out.println(ok ? \"Yes\" : \"No\");\n\n }\n\n }\n}",
"public class Main {\n public static void main(String[] args) {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, Scanner in, PrintWriter out) {\n // 入力\n int n = Integer.parseInt(in.next());\n int cnt = 0;\n int rencnt = 0;\n for (int i = 0; i < n; i++) {\n int d1 = Integer.parseInt(in.next());\n int d2 = Integer.parseInt(in.next());\n if (d1 == d2) {\n cnt++;\n rencnt++;\n } else {\n if (rencnt < 3) rencnt = 0;\n }\n }\n\n boolean ok = false;\n if (rencnt >= 3 && cnt >= 3) ok = true;\n out.println(ok ? \"Yes\" : \"No\");\n\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
BGoToJail solver = new BGoToJail();
solver.solve(1, in, out);
out.close();
}
static class BGoToJail {
public void solve(int testNumber, Scanner in, PrintWriter out) {
// 入力
int n = Integer.parseInt(in.next());
int cnt = 0;
int rencnt = 0;
for (int i = 0; i < n; i++) {
int d1 = Integer.parseInt(in.next());
int d2 = Integer.parseInt(in.next());
if (d1 == d2) {
cnt++;
rencnt++;
} else {
if (rencnt < 3) rencnt = 0;
}
}
boolean ok = false;
if (rencnt >= 3 && cnt >= 3) ok = true;
out.println(ok ? "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,
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,
10,
6,
13
]
| [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
85,
5
],
[
85,
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
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
59,
63
],
[
8,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
64,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
6,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
]
| [
"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 int N = sc.nextInt();\n\n int seqCount = 0;\n int maxSeq = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a==b){\n seqCount++;\n }else{\n seqCount=0;\n }\n\n maxSeq = Math.max(seqCount,maxSeq);\n\n\n }\n\n if(maxSeq >=3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }\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 int N = sc.nextInt();\n\n int seqCount = 0;\n int maxSeq = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a==b){\n seqCount++;\n }else{\n seqCount=0;\n }\n\n maxSeq = Math.max(seqCount,maxSeq);\n\n\n }\n\n if(maxSeq >=3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }\n\n}",
"Main",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n\n int seqCount = 0;\n int maxSeq = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a==b){\n seqCount++;\n }else{\n seqCount=0;\n }\n\n maxSeq = Math.max(seqCount,maxSeq);\n\n\n }\n\n if(maxSeq >=3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n\n int seqCount = 0;\n int maxSeq = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a==b){\n seqCount++;\n }else{\n seqCount=0;\n }\n\n maxSeq = Math.max(seqCount,maxSeq);\n\n\n }\n\n if(maxSeq >=3){\n System.out.println(\"Yes\");\n }else{\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 seqCount = 0;",
"seqCount",
"0",
"int maxSeq = 0;",
"maxSeq",
"0",
"for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a==b){\n seqCount++;\n }else{\n seqCount=0;\n }\n\n maxSeq = Math.max(seqCount,maxSeq);\n\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){\n seqCount++;\n }else{\n seqCount=0;\n }\n\n maxSeq = Math.max(seqCount,maxSeq);\n\n\n }",
"{\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a==b){\n seqCount++;\n }else{\n seqCount=0;\n }\n\n maxSeq = Math.max(seqCount,maxSeq);\n\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 seqCount++;\n }else{\n seqCount=0;\n }",
"a==b",
"a",
"b",
"{\n seqCount++;\n }",
"seqCount++",
"seqCount",
"{\n seqCount=0;\n }",
"seqCount=0",
"seqCount",
"0",
"maxSeq = Math.max(seqCount,maxSeq)",
"maxSeq",
"Math.max(seqCount,maxSeq)",
"Math.max",
"Math",
"seqCount",
"maxSeq",
"if(maxSeq >=3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"maxSeq >=3",
"maxSeq",
"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\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n\n int seqCount = 0;\n int maxSeq = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a==b){\n seqCount++;\n }else{\n seqCount=0;\n }\n\n maxSeq = Math.max(seqCount,maxSeq);\n\n\n }\n\n if(maxSeq >=3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n\n }\n\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n\n int N = sc.nextInt();\n\n int seqCount = 0;\n int maxSeq = 0;\n for (int i = 0; i < N; i++) {\n int a = sc.nextInt();\n int b = sc.nextInt();\n\n if(a==b){\n seqCount++;\n }else{\n seqCount=0;\n }\n\n maxSeq = Math.max(seqCount,maxSeq);\n\n\n }\n\n if(maxSeq >=3){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\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 N = sc.nextInt();
int seqCount = 0;
int maxSeq = 0;
for (int i = 0; i < N; i++) {
int a = sc.nextInt();
int b = sc.nextInt();
if(a==b){
seqCount++;
}else{
seqCount=0;
}
maxSeq = Math.max(seqCount,maxSeq);
}
if(maxSeq >=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,
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,
12,
13,
30,
41,
13,
17,
42,
2,
40,
13,
17,
30,
41,
13,
17,
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,
4,
18,
13,
41,
13,
4,
18,
13,
0,
18,
13,
13,
20,
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,
30,
4,
18,
13,
17,
30,
4,
18,
13,
17,
23,
13,
23,
13,
23,
13,
6,
13,
41,
13,
12,
13,
30,
0,
13,
20,
23,
13,
12,
13,
30,
0,
18,
36,
13,
20,
23,
13,
12,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
4,
18,
13,
17,
4,
18,
13,
18,
13,
13,
23,
13,
12,
13,
30,
4,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
4,
18,
13,
6,
13,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
12,
13,
30,
0,
18,
36,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
40,
17,
30,
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,
30,
29,
40,
17,
29,
18,
13,
40,
13,
12,
13,
30,
41,
13,
4,
13,
42,
4,
13,
13,
30,
0,
13,
4,
13,
41,
13,
17,
14,
2,
13,
17,
30,
0,
13,
40,
17,
0,
13,
4,
13,
41,
13,
17,
42,
40,
4,
13,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
30,
37,
20,
0,
13,
17,
0,
13,
2,
13,
17,
0,
13,
4,
13,
29,
2,
13,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
4,
18,
13,
13,
29,
4,
13,
13,
23,
13,
12,
13,
30,
29,
2,
2,
2,
2,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
17,
2,
13,
40,
17,
23,
13,
6,
13,
12,
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
],
[
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
],
[
469,
35
],
[
469,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
38,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
38,
49
],
[
49,
50
],
[
49,
51
],
[
38,
52
],
[
52,
53
],
[
52,
54
],
[
38,
55
],
[
55,
56
],
[
55,
57
],
[
38,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
58,
62
],
[
58,
63
],
[
38,
64
],
[
64,
65
],
[
65,
66
],
[
36,
67
],
[
67,
68
],
[
469,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
77,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
82,
91
],
[
91,
92
],
[
91,
93
],
[
82,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
96,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
108,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
108,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
82,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
131,
133
],
[
124,
134
],
[
134,
135
],
[
135,
136
],
[
124,
137
],
[
138,
138
],
[
138,
139
],
[
139,
140
],
[
141,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
142,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
141,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
157,
159
],
[
154,
160
],
[
153,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
164,
165
],
[
164,
166
],
[
161,
167
],
[
141,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
172,
174
],
[
169,
175
],
[
168,
176
],
[
176,
177
],
[
177,
178
],
[
177,
179
],
[
179,
180
],
[
179,
181
],
[
176,
182
],
[
139,
183
],
[
183,
184
],
[
184,
185
],
[
184,
186
],
[
183,
187
],
[
82,
188
],
[
188,
189
],
[
188,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
191,
194
],
[
188,
195
],
[
195,
196
],
[
196,
197
],
[
197,
198
],
[
196,
199
],
[
71,
200
],
[
200,
201
],
[
71,
202
],
[
202,
203
],
[
71,
204
],
[
204,
205
],
[
469,
206
],
[
206,
207
],
[
206,
208
],
[
208,
209
],
[
206,
210
],
[
210,
211
],
[
210,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
210,
216
],
[
216,
217
],
[
206,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
221,
222
],
[
222,
223
],
[
222,
224
],
[
221,
225
],
[
218,
226
],
[
226,
227
],
[
206,
228
],
[
228,
229
],
[
228,
230
],
[
230,
231
],
[
231,
232
],
[
232,
233
],
[
233,
234
],
[
233,
235
],
[
231,
236
],
[
236,
237
],
[
236,
238
],
[
238,
239
],
[
238,
240
],
[
231,
241
],
[
241,
242
],
[
242,
243
],
[
231,
244
],
[
245,
245
],
[
245,
246
],
[
246,
247
],
[
247,
248
],
[
247,
249
],
[
246,
250
],
[
250,
251
],
[
251,
252
],
[
252,
253
],
[
251,
254
],
[
245,
255
],
[
255,
256
],
[
256,
257
],
[
255,
258
],
[
258,
259
],
[
258,
260
],
[
228,
261
],
[
261,
262
],
[
206,
263
],
[
263,
264
],
[
263,
265
],
[
265,
266
],
[
266,
267
],
[
266,
268
],
[
265,
269
],
[
269,
270
],
[
270,
271
],
[
263,
272
],
[
272,
273
],
[
206,
274
],
[
274,
275
],
[
274,
276
],
[
276,
277
],
[
277,
278
],
[
278,
279
],
[
469,
280
],
[
280,
281
],
[
280,
282
],
[
282,
283
],
[
280,
284
],
[
284,
285
],
[
284,
286
],
[
280,
288
],
[
288,
289
],
[
280,
290
],
[
290,
291
],
[
280,
292
],
[
292,
293
],
[
280,
294
],
[
294,
295
],
[
294,
296
],
[
296,
297
],
[
297,
298
],
[
298,
299
],
[
298,
300
],
[
297,
301
],
[
294,
302
],
[
302,
303
],
[
280,
304
],
[
304,
305
],
[
304,
306
],
[
306,
307
],
[
307,
308
],
[
308,
309
],
[
308,
310
],
[
310,
311
],
[
307,
312
],
[
312,
313
],
[
313,
314
],
[
306,
315
],
[
315,
316
],
[
316,
317
],
[
316,
318
],
[
315,
319
],
[
319,
320
],
[
320,
321
],
[
320,
322
],
[
319,
323
],
[
323,
324
],
[
324,
325
],
[
324,
326
],
[
326,
327
],
[
327,
328
],
[
323,
329
],
[
329,
330
],
[
330,
331
],
[
330,
332
],
[
332,
333
],
[
333,
334
],
[
332,
335
],
[
319,
336
],
[
336,
337
],
[
337,
338
],
[
337,
339
],
[
336,
340
],
[
340,
341
],
[
341,
342
],
[
342,
343
],
[
306,
344
],
[
344,
345
],
[
345,
346
],
[
345,
347
],
[
347,
348
],
[
280,
349
],
[
349,
350
],
[
349,
351
],
[
351,
352
],
[
352,
353
],
[
352,
354
],
[
354,
355
],
[
351,
356
],
[
356,
357
],
[
357,
358
],
[
357,
359
],
[
356,
360
],
[
360,
361
],
[
361,
362
],
[
361,
363
],
[
363,
364
],
[
351,
365
],
[
365,
366
],
[
365,
367
],
[
351,
368
],
[
368,
369
],
[
369,
370
],
[
369,
371
],
[
368,
372
],
[
372,
373
],
[
373,
374
],
[
373,
375
],
[
375,
376
],
[
372,
377
],
[
377,
378
],
[
377,
379
],
[
379,
380
],
[
351,
381
],
[
381,
382
],
[
381,
383
],
[
351,
384
],
[
384,
385
],
[
385,
386
],
[
386,
387
],
[
386,
388
],
[
384,
389
],
[
389,
390
],
[
390,
391
],
[
391,
392
],
[
392,
393
],
[
392,
394
],
[
391,
395
],
[
395,
396
],
[
395,
397
],
[
390,
398
],
[
398,
399
],
[
399,
400
],
[
389,
401
],
[
401,
402
],
[
401,
403
],
[
389,
404
],
[
404,
405
],
[
404,
406
],
[
406,
407
],
[
406,
408
],
[
389,
409
],
[
409,
410
],
[
409,
411
],
[
411,
412
],
[
351,
413
],
[
413,
414
],
[
414,
415
],
[
414,
416
],
[
280,
417
],
[
417,
418
],
[
417,
419
],
[
419,
420
],
[
420,
421
],
[
421,
422
],
[
421,
423
],
[
420,
424
],
[
424,
425
],
[
425,
426
],
[
426,
427
],
[
427,
428
],
[
426,
429
],
[
419,
430
],
[
430,
431
],
[
431,
432
],
[
431,
433
],
[
417,
434
],
[
434,
435
],
[
280,
436
],
[
436,
437
],
[
436,
438
],
[
438,
439
],
[
439,
440
],
[
443,
441
],
[
453,
442
],
[
450,
443
],
[
443,
444
],
[
444,
445
],
[
444,
446
],
[
443,
447
],
[
447,
448
],
[
447,
449
],
[
450,
450
],
[
450,
451
],
[
450,
452
],
[
453,
453
],
[
453,
454
],
[
453,
455
],
[
443,
456
],
[
456,
457
],
[
456,
458
],
[
458,
459
],
[
436,
460
],
[
460,
461
],
[
280,
462
],
[
462,
463
],
[
462,
464
],
[
464,
465
],
[
464,
466
],
[
466,
467
],
[
0,
468
],
[
468,
469
],
[
468,
470
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.OutputStream;\nimport java.io.PrintWriter;\nimport java.io.BufferedWriter;\nimport java.io.Writer;\nimport java.io.OutputStreamWriter;\nimport java.util.InputMismatchException;\nimport java.io.IOException;\nimport java.io.InputStream;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\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 OutputWriter out = new OutputWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n boolean ok = false;\n int n = in.nextInt();\n int[][] arr = new int[n][2];\n for (int i = 0; i < n; i++) {\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }\n for (int i = 0; i < n - 2; i++) {\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }\n if (ok) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void print(Object... objects) {\n for (int i = 0; i < objects.length; ++i) {\n if (i != 0) {\n writer.print(' ');\n }\n writer.print(objects[i]);\n }\n }\n\n public void println(Object... objects) {\n print(objects);\n writer.println();\n }\n\n public void close() {\n writer.close();\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\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.OutputStream;",
"OutputStream",
"java.io",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.io.BufferedWriter;",
"BufferedWriter",
"java.io",
"import java.io.Writer;",
"Writer",
"java.io",
"import java.io.OutputStreamWriter;",
"OutputStreamWriter",
"java.io",
"import java.util.InputMismatchException;",
"InputMismatchException",
"java.util",
"import java.io.IOException;",
"IOException",
"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 OutputWriter out = new OutputWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n boolean ok = false;\n int n = in.nextInt();\n int[][] arr = new int[n][2];\n for (int i = 0; i < n; i++) {\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }\n for (int i = 0; i < n - 2; i++) {\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }\n if (ok) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void print(Object... objects) {\n for (int i = 0; i < objects.length; ++i) {\n if (i != 0) {\n writer.print(' ');\n }\n writer.print(objects[i]);\n }\n }\n\n public void println(Object... objects) {\n print(objects);\n writer.println();\n }\n\n public void close() {\n writer.close();\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\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 OutputWriter out = new OutputWriter(outputStream);\n BGoToJail solver = new BGoToJail();\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 OutputWriter out = new OutputWriter(outputStream);\n BGoToJail solver = new BGoToJail();\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)",
"OutputWriter out = new OutputWriter(outputStream);",
"out",
"new OutputWriter(outputStream)",
"BGoToJail solver = new BGoToJail();",
"solver",
"new BGoToJail()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class BGoToJail {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n boolean ok = false;\n int n = in.nextInt();\n int[][] arr = new int[n][2];\n for (int i = 0; i < n; i++) {\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }\n for (int i = 0; i < n - 2; i++) {\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }\n if (ok) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n }\n\n }",
"BGoToJail",
"public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n boolean ok = false;\n int n = in.nextInt();\n int[][] arr = new int[n][2];\n for (int i = 0; i < n; i++) {\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }\n for (int i = 0; i < n - 2; i++) {\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }\n if (ok) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n }",
"solve",
"{\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n boolean ok = false;\n int n = in.nextInt();\n int[][] arr = new int[n][2];\n for (int i = 0; i < n; i++) {\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }\n for (int i = 0; i < n - 2; i++) {\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }\n if (ok) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n }",
"int ntc = 1;",
"ntc",
"1",
"while ((ntc--) > 0) {\n boolean ok = false;\n int n = in.nextInt();\n int[][] arr = new int[n][2];\n for (int i = 0; i < n; i++) {\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }\n for (int i = 0; i < n - 2; i++) {\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }\n if (ok) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }",
"(ntc--) > 0",
"(ntc--)",
"ntc",
"0",
"{\n boolean ok = false;\n int n = in.nextInt();\n int[][] arr = new int[n][2];\n for (int i = 0; i < n; i++) {\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }\n for (int i = 0; i < n - 2; i++) {\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }\n if (ok) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }",
"boolean ok = false;",
"ok",
"false",
"int n = in.nextInt();",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"int[][] arr = new int[n][2];",
"arr",
"new int[n][2]",
"n",
"2",
"for (int i = 0; i < n; i++) {\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }",
"{\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }",
"int a = in.nextInt();",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"int b = in.nextInt();",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"arr[i] = new int[]{a, b}",
"arr[i]",
"arr",
"i",
"new int[]{a, b}",
"for (int i = 0; i < n - 2; i++) {\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\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 (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }",
"{\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }",
"if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }",
"arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]",
"arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]",
"arr[i][0] == arr[i][1]",
"arr[i][0]",
"arr[i]",
"arr",
"i",
"0",
"arr[i][1]",
"arr[i]",
"arr",
"i",
"1",
"arr[i + 1][0] == arr[i + 1][1]",
"arr[i + 1][0]",
"arr[i + 1]",
"arr",
"i + 1",
"i",
"1",
"0",
"arr[i + 1][1]",
"arr[i + 1]",
"arr",
"i + 1",
"i",
"1",
"1",
"arr[i + 2][0] == arr[i + 2][1]",
"arr[i + 2][0]",
"arr[i + 2]",
"arr",
"i + 2",
"i",
"2",
"0",
"arr[i + 2][1]",
"arr[i + 2]",
"arr",
"i + 2",
"i",
"2",
"1",
"{\n ok = true;\n break;\n }",
"ok = true",
"ok",
"true",
"break;",
"if (ok) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }",
"ok",
"{\n out.println(\"Yes\");\n }",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"{\n out.println(\"No\");\n }",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"int testNumber",
"testNumber",
"InputReader in",
"in",
"OutputWriter out",
"out",
"static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void print(Object... objects) {\n for (int i = 0; i < objects.length; ++i) {\n if (i != 0) {\n writer.print(' ');\n }\n writer.print(objects[i]);\n }\n }\n\n public void println(Object... objects) {\n print(objects);\n writer.println();\n }\n\n public void close() {\n writer.close();\n }\n\n }",
"OutputWriter",
"private final PrintWriter writer;",
"writer",
"public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }",
"OutputWriter",
"{\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }",
"writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"writer",
"new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)))",
"OutputStream outputStream",
"outputStream",
"public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }",
"OutputWriter",
"{\n this.writer = new PrintWriter(writer);\n }",
"this.writer = new PrintWriter(writer)",
"this.writer",
"this",
"this.writer",
"new PrintWriter(writer)",
"Writer writer",
"writer",
"public void print(Object... objects) {\n for (int i = 0; i < objects.length; ++i) {\n if (i != 0) {\n writer.print(' ');\n }\n writer.print(objects[i]);\n }\n }",
"print",
"{\n for (int i = 0; i < objects.length; ++i) {\n if (i != 0) {\n writer.print(' ');\n }\n writer.print(objects[i]);\n }\n }",
"for (int i = 0; i < objects.length; ++i) {\n if (i != 0) {\n writer.print(' ');\n }\n writer.print(objects[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < objects.length",
"i",
"objects.length",
"objects",
"objects.length",
"++i",
"++i",
"i",
"{\n if (i != 0) {\n writer.print(' ');\n }\n writer.print(objects[i]);\n }",
"{\n if (i != 0) {\n writer.print(' ');\n }\n writer.print(objects[i]);\n }",
"if (i != 0) {\n writer.print(' ');\n }",
"i != 0",
"i",
"0",
"{\n writer.print(' ');\n }",
"writer.print(' ')",
"writer.print",
"writer",
"' '",
"writer.print(objects[i])",
"writer.print",
"writer",
"objects[i]",
"objects",
"i",
"Object... objects",
"objects",
"public void println(Object... objects) {\n print(objects);\n writer.println();\n }",
"println",
"{\n print(objects);\n writer.println();\n }",
"print(objects)",
"print",
"objects",
"writer.println()",
"writer.println",
"writer",
"Object... objects",
"objects",
"public void close() {\n writer.close();\n }",
"close",
"{\n writer.close();\n }",
"writer.close()",
"writer.close",
"writer",
"static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }",
"InputReader",
"private InputStream stream;",
"stream",
"private byte[] buf = new byte[1024];",
"buf",
"new byte[1024]",
"1024",
"private int curChar;",
"curChar",
"private int numChars;",
"numChars",
"private InputReader.SpaceCharFilter filter;",
"filter",
"public InputReader(InputStream stream) {\n this.stream = stream;\n }",
"InputReader",
"{\n this.stream = stream;\n }",
"this.stream = stream",
"this.stream",
"this",
"this.stream",
"stream",
"InputStream stream",
"stream",
"public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }",
"read",
"{\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }",
"if (numChars == -1) {\n throw new InputMismatchException();\n }",
"numChars == -1",
"numChars",
"-1",
"1",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }",
"curChar >= numChars",
"curChar",
"numChars",
"{\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }",
"curChar = 0",
"curChar",
"0",
"try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }",
"catch (IOException e) {\n throw new InputMismatchException();\n }",
"IOException e",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"{\n numChars = stream.read(buf);\n }",
"numChars = stream.read(buf)",
"numChars",
"stream.read(buf)",
"stream.read",
"stream",
"buf",
"if (numChars <= 0) {\n return -1;\n }",
"numChars <= 0",
"numChars",
"0",
"{\n return -1;\n }",
"return -1;",
"-1",
"1",
"return buf[curChar++];",
"buf[curChar++]",
"buf",
"curChar++",
"curChar",
"public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"nextInt",
"{\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }",
"int c = read();",
"c",
"read()",
"read",
"while (isSpaceChar(c)) {\n c = read();\n }",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n c = read();\n }",
"c = read()",
"c",
"read()",
"read",
"int sgn = 1;",
"sgn",
"1",
"if (c == '-') {\n sgn = -1;\n c = read();\n }",
"c == '-'",
"c",
"'-'",
"{\n sgn = -1;\n c = read();\n }",
"sgn = -1",
"sgn",
"-1",
"1",
"c = read()",
"c",
"read()",
"read",
"int res = 0;",
"res",
"0",
"do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));",
"!isSpaceChar(c)",
"isSpaceChar(c)",
"isSpaceChar",
"c",
"{\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n }",
"if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }",
"c < '0' || c > '9'",
"c < '0'",
"c",
"'0'",
"c > '9'",
"c",
"'9'",
"{\n throw new InputMismatchException();\n }",
"throw new InputMismatchException();",
"new InputMismatchException()",
"res *= 10",
"res",
"10",
"res += c - '0'",
"res",
"c - '0'",
"c",
"'0'",
"c = read()",
"c",
"read()",
"read",
"return res * sgn;",
"res * sgn",
"res",
"sgn",
"public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }",
"isSpaceChar",
"{\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }",
"if (filter != null) {\n return filter.isSpaceChar(c);\n }",
"filter != null",
"filter",
"null",
"{\n return filter.isSpaceChar(c);\n }",
"return filter.isSpaceChar(c);",
"filter.isSpaceChar(c)",
"filter.isSpaceChar",
"filter",
"c",
"return isWhitespace(c);",
"isWhitespace(c)",
"isWhitespace",
"c",
"int c",
"c",
"public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"isWhitespace",
"{\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }",
"return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == '\\t'",
"c == '\\r'",
"c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1",
"c == ' '",
"c",
"' '",
"c == '\\n'",
"c",
"'\\n'",
"c == '\\r'",
"c",
"'\\r'",
"c == '\\t'",
"c",
"'\\t'",
"c == -1",
"c",
"-1",
"1",
"int c",
"c",
"public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }",
"SpaceCharFilter",
"public boolean isSpaceChar(int ch);",
"isSpaceChar",
"int ch",
"ch",
"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 OutputWriter out = new OutputWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n boolean ok = false;\n int n = in.nextInt();\n int[][] arr = new int[n][2];\n for (int i = 0; i < n; i++) {\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }\n for (int i = 0; i < n - 2; i++) {\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }\n if (ok) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void print(Object... objects) {\n for (int i = 0; i < objects.length; ++i) {\n if (i != 0) {\n writer.print(' ');\n }\n writer.print(objects[i]);\n }\n }\n\n public void println(Object... objects) {\n print(objects);\n writer.println();\n }\n\n public void close() {\n writer.close();\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\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 OutputWriter out = new OutputWriter(outputStream);\n BGoToJail solver = new BGoToJail();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class BGoToJail {\n public void solve(int testNumber, InputReader in, OutputWriter out) {\n int ntc = 1;\n// ntc = in.nextInt();\n while ((ntc--) > 0) {\n boolean ok = false;\n int n = in.nextInt();\n int[][] arr = new int[n][2];\n for (int i = 0; i < n; i++) {\n int a = in.nextInt();\n int b = in.nextInt();\n arr[i] = new int[]{a, b};\n }\n for (int i = 0; i < n - 2; i++) {\n if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {\n ok = true;\n break;\n }\n }\n if (ok) {\n out.println(\"Yes\");\n } else {\n out.println(\"No\");\n }\n }\n }\n\n }\n\n static class OutputWriter {\n private final PrintWriter writer;\n\n public OutputWriter(OutputStream outputStream) {\n writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));\n }\n\n public OutputWriter(Writer writer) {\n this.writer = new PrintWriter(writer);\n }\n\n public void print(Object... objects) {\n for (int i = 0; i < objects.length; ++i) {\n if (i != 0) {\n writer.print(' ');\n }\n writer.print(objects[i]);\n }\n }\n\n public void println(Object... objects) {\n print(objects);\n writer.println();\n }\n\n public void close() {\n writer.close();\n }\n\n }\n\n static class InputReader {\n private InputStream stream;\n private byte[] buf = new byte[1024];\n private int curChar;\n private int numChars;\n private InputReader.SpaceCharFilter filter;\n\n public InputReader(InputStream stream) {\n this.stream = stream;\n }\n\n public int read() {\n if (numChars == -1) {\n throw new InputMismatchException();\n }\n if (curChar >= numChars) {\n curChar = 0;\n try {\n numChars = stream.read(buf);\n } catch (IOException e) {\n throw new InputMismatchException();\n }\n if (numChars <= 0) {\n return -1;\n }\n }\n return buf[curChar++];\n }\n\n public int nextInt() {\n int c = read();\n while (isSpaceChar(c)) {\n c = read();\n }\n int sgn = 1;\n if (c == '-') {\n sgn = -1;\n c = read();\n }\n int res = 0;\n do {\n if (c < '0' || c > '9') {\n throw new InputMismatchException();\n }\n res *= 10;\n res += c - '0';\n c = read();\n } while (!isSpaceChar(c));\n return res * sgn;\n }\n\n public boolean isSpaceChar(int c) {\n if (filter != null) {\n return filter.isSpaceChar(c);\n }\n return isWhitespace(c);\n }\n\n public static boolean isWhitespace(int c) {\n return c == ' ' || c == '\\n' || c == '\\r' || c == '\\t' || c == -1;\n }\n\n public interface SpaceCharFilter {\n public boolean isSpaceChar(int ch);\n\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
InputReader in = new InputReader(inputStream);
OutputWriter out = new OutputWriter(outputStream);
BGoToJail solver = new BGoToJail();
solver.solve(1, in, out);
out.close();
}
static class BGoToJail {
public void solve(int testNumber, InputReader in, OutputWriter out) {
int ntc = 1;
// ntc = in.nextInt();
while ((ntc--) > 0) {
boolean ok = false;
int n = in.nextInt();
int[][] arr = new int[n][2];
for (int i = 0; i < n; i++) {
int a = in.nextInt();
int b = in.nextInt();
arr[i] = new int[]{a, b};
}
for (int i = 0; i < n - 2; i++) {
if (arr[i][0] == arr[i][1] && arr[i + 1][0] == arr[i + 1][1] && arr[i + 2][0] == arr[i + 2][1]) {
ok = true;
break;
}
}
if (ok) {
out.println("Yes");
} else {
out.println("No");
}
}
}
}
static class OutputWriter {
private final PrintWriter writer;
public OutputWriter(OutputStream outputStream) {
writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
}
public OutputWriter(Writer writer) {
this.writer = new PrintWriter(writer);
}
public void print(Object... objects) {
for (int i = 0; i < objects.length; ++i) {
if (i != 0) {
writer.print(' ');
}
writer.print(objects[i]);
}
}
public void println(Object... objects) {
print(objects);
writer.println();
}
public void close() {
writer.close();
}
}
static class InputReader {
private InputStream stream;
private byte[] buf = new byte[1024];
private int curChar;
private int numChars;
private InputReader.SpaceCharFilter filter;
public InputReader(InputStream stream) {
this.stream = stream;
}
public int read() {
if (numChars == -1) {
throw new InputMismatchException();
}
if (curChar >= numChars) {
curChar = 0;
try {
numChars = stream.read(buf);
} catch (IOException e) {
throw new InputMismatchException();
}
if (numChars <= 0) {
return -1;
}
}
return buf[curChar++];
}
public int nextInt() {
int c = read();
while (isSpaceChar(c)) {
c = read();
}
int sgn = 1;
if (c == '-') {
sgn = -1;
c = read();
}
int res = 0;
do {
if (c < '0' || c > '9') {
throw new InputMismatchException();
}
res *= 10;
res += c - '0';
c = read();
} while (!isSpaceChar(c));
return res * sgn;
}
public boolean isSpaceChar(int c) {
if (filter != null) {
return filter.isSpaceChar(c);
}
return isWhitespace(c);
}
public static boolean isWhitespace(int c) {
return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
}
public interface SpaceCharFilter {
public boolean isSpaceChar(int ch);
}
}
}
|
[
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,
30,
40,
13,
14,
2,
13,
13,
30,
0,
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
],
[
107,
5
],
[
107,
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
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
59,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
8,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
86,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
6,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
]
| [
"import java.util.*;\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[][] a = new int[n][2];\n\t\tint count = 0;\n\t\tint max = 0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ta[i][0] = sc.nextInt();\n\t\t\ta[i][1] = sc.nextInt();\n\t\t\tif( a[i][0] == a[i][1] ){\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\tif( max >= 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.*;",
"util.*",
"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[][] a = new int[n][2];\n\t\tint count = 0;\n\t\tint max = 0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ta[i][0] = sc.nextInt();\n\t\t\ta[i][1] = sc.nextInt();\n\t\t\tif( a[i][0] == a[i][1] ){\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\tif( max >= 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\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] a = new int[n][2];\n\t\tint count = 0;\n\t\tint max = 0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ta[i][0] = sc.nextInt();\n\t\t\ta[i][1] = sc.nextInt();\n\t\t\tif( a[i][0] == a[i][1] ){\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\tif( max >= 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\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] a = new int[n][2];\n\t\tint count = 0;\n\t\tint max = 0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ta[i][0] = sc.nextInt();\n\t\t\ta[i][1] = sc.nextInt();\n\t\t\tif( a[i][0] == a[i][1] ){\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\tif( max >= 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 n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int[][] a = new int[n][2];",
"a",
"new int[n][2]",
"n",
"2",
"int count = 0;",
"count",
"0",
"int max = 0;",
"max",
"0",
"for(int i=0;i<n;i++){\n\t\t\ta[i][0] = sc.nextInt();\n\t\t\ta[i][1] = sc.nextInt();\n\t\t\tif( a[i][0] == a[i][1] ){\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 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\ta[i][0] = sc.nextInt();\n\t\t\ta[i][1] = sc.nextInt();\n\t\t\tif( a[i][0] == a[i][1] ){\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}",
"{\n\t\t\ta[i][0] = sc.nextInt();\n\t\t\ta[i][1] = sc.nextInt();\n\t\t\tif( a[i][0] == a[i][1] ){\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\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",
"if( a[i][0] == a[i][1] ){\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}",
"a[i][0] == a[i][1]",
"a[i][0]",
"a[i]",
"a",
"i",
"0",
"a[i][1]",
"a[i]",
"a",
"i",
"1",
"{\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}",
"count++",
"count",
"if( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}",
"count > max",
"count",
"max",
"{\n\t\t\t\t\tmax = count;\n\t\t\t\t}",
"max = count",
"max",
"count",
"{\n\t\t\t\tcount = 0;\n\t\t\t}",
"count = 0",
"count",
"0",
"if( max >= 3 ){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else{\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"max >= 3",
"max",
"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\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] a = new int[n][2];\n\t\tint count = 0;\n\t\tint max = 0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ta[i][0] = sc.nextInt();\n\t\t\ta[i][1] = sc.nextInt();\n\t\t\tif( a[i][0] == a[i][1] ){\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\tif( max >= 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\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint[][] a = new int[n][2];\n\t\tint count = 0;\n\t\tint max = 0;\n\t\tfor(int i=0;i<n;i++){\n\t\t\ta[i][0] = sc.nextInt();\n\t\t\ta[i][1] = sc.nextInt();\n\t\t\tif( a[i][0] == a[i][1] ){\n\t\t\t\tcount++;\n\t\t\t\tif( count > max ){\n\t\t\t\t\tmax = count;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tcount = 0;\n\t\t\t}\n\t\t}\n\t\tif( max >= 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.*;
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];
int count = 0;
int max = 0;
for(int i=0;i<n;i++){
a[i][0] = sc.nextInt();
a[i][1] = sc.nextInt();
if( a[i][0] == a[i][1] ){
count++;
if( count > max ){
max = count;
}
}else{
count = 0;
}
}
if( max >= 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,
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,
12,
13,
30,
41,
13,
17,
42,
2,
40,
13,
17,
30,
4,
13,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
17,
13,
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,
4,
18,
13,
17,
29,
4,
18,
13,
17,
23,
13,
23,
13,
6,
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,
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,
0,
18,
13,
13,
4,
18,
13,
13,
13,
29,
13,
23,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
238,
17
],
[
238,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
23,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
28,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
20,
34
],
[
34,
35
],
[
34,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
20,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
40,
45
],
[
20,
46
],
[
46,
47
],
[
47,
48
],
[
18,
49
],
[
49,
50
],
[
238,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
59,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
65,
68
],
[
53,
69
],
[
69,
70
],
[
53,
71
],
[
71,
72
],
[
53,
73
],
[
73,
74
],
[
51,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
77,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
85,
89
],
[
85,
90
],
[
77,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
96,
98
],
[
98,
99
],
[
98,
100
],
[
91,
101
],
[
101,
102
],
[
102,
103
],
[
91,
104
],
[
105,
105
],
[
105,
106
],
[
106,
107
],
[
108,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
109,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
108,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
121,
127
],
[
120,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
131,
132
],
[
131,
133
],
[
128,
134
],
[
108,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
139,
140
],
[
139,
141
],
[
136,
142
],
[
135,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
146,
147
],
[
146,
148
],
[
143,
149
],
[
106,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
151,
154
],
[
150,
155
],
[
77,
156
],
[
156,
157
],
[
157,
158
],
[
156,
159
],
[
75,
160
],
[
160,
161
],
[
75,
162
],
[
162,
163
],
[
238,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
169,
171
],
[
168,
173
],
[
173,
174
],
[
174,
175
],
[
175,
176
],
[
175,
177
],
[
173,
178
],
[
178,
179
],
[
178,
180
],
[
173,
181
],
[
181,
182
],
[
182,
183
],
[
173,
184
],
[
185,
185
],
[
185,
186
],
[
186,
187
],
[
187,
188
],
[
187,
189
],
[
186,
190
],
[
190,
191
],
[
191,
192
],
[
168,
193
],
[
193,
194
],
[
166,
195
],
[
195,
196
],
[
166,
197
],
[
197,
198
],
[
164,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
202,
204
],
[
201,
207
],
[
207,
208
],
[
208,
209
],
[
209,
210
],
[
209,
211
],
[
207,
212
],
[
212,
213
],
[
212,
214
],
[
207,
215
],
[
215,
216
],
[
216,
217
],
[
207,
218
],
[
219,
219
],
[
219,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
220,
224
],
[
224,
225
],
[
225,
226
],
[
224,
227
],
[
224,
228
],
[
201,
229
],
[
229,
230
],
[
199,
231
],
[
231,
232
],
[
199,
233
],
[
233,
234
],
[
199,
235
],
[
235,
236
],
[
0,
237
],
[
237,
238
],
[
237,
239
]
]
| [
"import java.io.OutputStream;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.PrintWriter;\nimport java.util.Scanner;\n\n/**\n * Built using CHelper plug-in\n * Actual solution is at the top\n */\npublic class Main\n{\n public static void main(String[] args)\n {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class Task\n {\n public void solve(int testNumber, Scanner in, PrintWriter out)\n {\n int T = 1;\n while (T-- > 0)\n {\n solveOne(in, out);\n }\n }\n\n private void solveOne(Scanner in, PrintWriter out)\n {\n int N = in.nextInt();\n int M[][] = CPUtils.readIntMatrix(N, 2, in);\n\n for (int i = 0; i < N - 2; i++)\n {\n if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n }\n\n }\n\n static class CPUtils\n {\n public static int[] readIntArray(int size, Scanner in)\n {\n int[] array = new int[size];\n for (int i = 0; i < size; i++)\n {\n array[i] = in.nextInt();\n }\n return array;\n }\n\n public static int[][] readIntMatrix(int rows, int columns, Scanner in)\n {\n int[][] matrix = new int[rows][columns];\n for (int i = 0; i < rows; i++)\n {\n matrix[i] = CPUtils.readIntArray(columns, in);\n }\n return matrix;\n }\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.util.Scanner;",
"Scanner",
"java.util",
"public class Main\n{\n public static void main(String[] args)\n {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class Task\n {\n public void solve(int testNumber, Scanner in, PrintWriter out)\n {\n int T = 1;\n while (T-- > 0)\n {\n solveOne(in, out);\n }\n }\n\n private void solveOne(Scanner in, PrintWriter out)\n {\n int N = in.nextInt();\n int M[][] = CPUtils.readIntMatrix(N, 2, in);\n\n for (int i = 0; i < N - 2; i++)\n {\n if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n }\n\n }\n\n static class CPUtils\n {\n public static int[] readIntArray(int size, Scanner in)\n {\n int[] array = new int[size];\n for (int i = 0; i < size; i++)\n {\n array[i] = in.nextInt();\n }\n return array;\n }\n\n public static int[][] readIntMatrix(int rows, int columns, Scanner in)\n {\n int[][] matrix = new int[rows][columns];\n for (int i = 0; i < rows; i++)\n {\n matrix[i] = CPUtils.readIntArray(columns, in);\n }\n return matrix;\n }\n\n }\n}",
"Main",
"public static void main(String[] args)\n {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(1, in, out);\n out.close();\n }",
"main",
"{\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\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",
"Scanner in = new Scanner(inputStream);",
"in",
"new Scanner(inputStream)",
"PrintWriter out = new PrintWriter(outputStream);",
"out",
"new PrintWriter(outputStream)",
"Task solver = new Task();",
"solver",
"new Task()",
"solver.solve(1, in, out)",
"solver.solve",
"solver",
"1",
"in",
"out",
"out.close()",
"out.close",
"out",
"String[] args",
"args",
"static class Task\n {\n public void solve(int testNumber, Scanner in, PrintWriter out)\n {\n int T = 1;\n while (T-- > 0)\n {\n solveOne(in, out);\n }\n }\n\n private void solveOne(Scanner in, PrintWriter out)\n {\n int N = in.nextInt();\n int M[][] = CPUtils.readIntMatrix(N, 2, in);\n\n for (int i = 0; i < N - 2; i++)\n {\n if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n }\n\n }",
"Task",
"public void solve(int testNumber, Scanner in, PrintWriter out)\n {\n int T = 1;\n while (T-- > 0)\n {\n solveOne(in, out);\n }\n }",
"solve",
"{\n int T = 1;\n while (T-- > 0)\n {\n solveOne(in, out);\n }\n }",
"int T = 1;",
"T",
"1",
"while (T-- > 0)\n {\n solveOne(in, out);\n }",
"T-- > 0",
"T--",
"T",
"0",
"{\n solveOne(in, out);\n }",
"solveOne(in, out)",
"solveOne",
"in",
"out",
"int testNumber",
"testNumber",
"Scanner in",
"in",
"PrintWriter out",
"out",
"private void solveOne(Scanner in, PrintWriter out)\n {\n int N = in.nextInt();\n int M[][] = CPUtils.readIntMatrix(N, 2, in);\n\n for (int i = 0; i < N - 2; i++)\n {\n if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n }",
"solveOne",
"{\n int N = in.nextInt();\n int M[][] = CPUtils.readIntMatrix(N, 2, in);\n\n for (int i = 0; i < N - 2; i++)\n {\n if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n }",
"int N = in.nextInt();",
"N",
"in.nextInt()",
"in.nextInt",
"in",
"int M[][] = CPUtils.readIntMatrix(N, 2, in);",
"M",
"CPUtils.readIntMatrix(N, 2, in)",
"CPUtils.readIntMatrix",
"CPUtils",
"N",
"2",
"in",
"for (int i = 0; i < N - 2; i++)\n {\n if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < N - 2",
"i",
"N - 2",
"N",
"2",
"i++",
"i++",
"i",
"{\n if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }\n }",
"{\n if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }\n }",
"if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }",
"M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1]",
"M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1]",
"M[i][0] == M[i][1]",
"M[i][0]",
"M[i]",
"M",
"i",
"0",
"M[i][1]",
"M[i]",
"M",
"i",
"1",
"M[i + 1][0] == M[i + 1][1]",
"M[i + 1][0]",
"M[i + 1]",
"M",
"i + 1",
"i",
"1",
"0",
"M[i + 1][1]",
"M[i + 1]",
"M",
"i + 1",
"i",
"1",
"1",
"M[i + 2][0] == M[i + 2][1]",
"M[i + 2][0]",
"M[i + 2]",
"M",
"i + 2",
"i",
"2",
"0",
"M[i + 2][1]",
"M[i + 2]",
"M",
"i + 2",
"i",
"2",
"1",
"{\n out.println(\"Yes\");\n return;\n }",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"return;",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"Scanner in",
"in",
"PrintWriter out",
"out",
"static class CPUtils\n {\n public static int[] readIntArray(int size, Scanner in)\n {\n int[] array = new int[size];\n for (int i = 0; i < size; i++)\n {\n array[i] = in.nextInt();\n }\n return array;\n }\n\n public static int[][] readIntMatrix(int rows, int columns, Scanner in)\n {\n int[][] matrix = new int[rows][columns];\n for (int i = 0; i < rows; i++)\n {\n matrix[i] = CPUtils.readIntArray(columns, in);\n }\n return matrix;\n }\n\n }",
"CPUtils",
"public static int[] readIntArray(int size, Scanner in)\n {\n int[] array = new int[size];\n for (int i = 0; i < size; i++)\n {\n array[i] = in.nextInt();\n }\n return array;\n }",
"readIntArray",
"{\n int[] array = new int[size];\n for (int i = 0; i < size; i++)\n {\n array[i] = in.nextInt();\n }\n return array;\n }",
"int[] array = new int[size];",
"array",
"new int[size]",
"size",
"for (int i = 0; i < size; i++)\n {\n array[i] = in.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < size",
"i",
"size",
"i++",
"i++",
"i",
"{\n array[i] = in.nextInt();\n }",
"{\n array[i] = in.nextInt();\n }",
"array[i] = in.nextInt()",
"array[i]",
"array",
"i",
"in.nextInt()",
"in.nextInt",
"in",
"return array;",
"array",
"int size",
"size",
"Scanner in",
"in",
"public static int[][] readIntMatrix(int rows, int columns, Scanner in)\n {\n int[][] matrix = new int[rows][columns];\n for (int i = 0; i < rows; i++)\n {\n matrix[i] = CPUtils.readIntArray(columns, in);\n }\n return matrix;\n }",
"readIntMatrix",
"{\n int[][] matrix = new int[rows][columns];\n for (int i = 0; i < rows; i++)\n {\n matrix[i] = CPUtils.readIntArray(columns, in);\n }\n return matrix;\n }",
"int[][] matrix = new int[rows][columns];",
"matrix",
"new int[rows][columns]",
"rows",
"columns",
"for (int i = 0; i < rows; i++)\n {\n matrix[i] = CPUtils.readIntArray(columns, in);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < rows",
"i",
"rows",
"i++",
"i++",
"i",
"{\n matrix[i] = CPUtils.readIntArray(columns, in);\n }",
"{\n matrix[i] = CPUtils.readIntArray(columns, in);\n }",
"matrix[i] = CPUtils.readIntArray(columns, in)",
"matrix[i]",
"matrix",
"i",
"CPUtils.readIntArray(columns, in)",
"CPUtils.readIntArray",
"CPUtils",
"columns",
"in",
"return matrix;",
"matrix",
"int rows",
"rows",
"int columns",
"columns",
"Scanner in",
"in",
"public class Main\n{\n public static void main(String[] args)\n {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class Task\n {\n public void solve(int testNumber, Scanner in, PrintWriter out)\n {\n int T = 1;\n while (T-- > 0)\n {\n solveOne(in, out);\n }\n }\n\n private void solveOne(Scanner in, PrintWriter out)\n {\n int N = in.nextInt();\n int M[][] = CPUtils.readIntMatrix(N, 2, in);\n\n for (int i = 0; i < N - 2; i++)\n {\n if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n }\n\n }\n\n static class CPUtils\n {\n public static int[] readIntArray(int size, Scanner in)\n {\n int[] array = new int[size];\n for (int i = 0; i < size; i++)\n {\n array[i] = in.nextInt();\n }\n return array;\n }\n\n public static int[][] readIntMatrix(int rows, int columns, Scanner in)\n {\n int[][] matrix = new int[rows][columns];\n for (int i = 0; i < rows; i++)\n {\n matrix[i] = CPUtils.readIntArray(columns, in);\n }\n return matrix;\n }\n\n }\n}",
"public class Main\n{\n public static void main(String[] args)\n {\n InputStream inputStream = System.in;\n OutputStream outputStream = System.out;\n Scanner in = new Scanner(inputStream);\n PrintWriter out = new PrintWriter(outputStream);\n Task solver = new Task();\n solver.solve(1, in, out);\n out.close();\n }\n\n static class Task\n {\n public void solve(int testNumber, Scanner in, PrintWriter out)\n {\n int T = 1;\n while (T-- > 0)\n {\n solveOne(in, out);\n }\n }\n\n private void solveOne(Scanner in, PrintWriter out)\n {\n int N = in.nextInt();\n int M[][] = CPUtils.readIntMatrix(N, 2, in);\n\n for (int i = 0; i < N - 2; i++)\n {\n if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])\n {\n out.println(\"Yes\");\n return;\n }\n }\n out.println(\"No\");\n }\n\n }\n\n static class CPUtils\n {\n public static int[] readIntArray(int size, Scanner in)\n {\n int[] array = new int[size];\n for (int i = 0; i < size; i++)\n {\n array[i] = in.nextInt();\n }\n return array;\n }\n\n public static int[][] readIntMatrix(int rows, int columns, Scanner in)\n {\n int[][] matrix = new int[rows][columns];\n for (int i = 0; i < rows; i++)\n {\n matrix[i] = CPUtils.readIntArray(columns, in);\n }\n return matrix;\n }\n\n }\n}",
"Main"
]
| import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Scanner;
/**
* Built using CHelper plug-in
* Actual solution is at the top
*/
public class Main
{
public static void main(String[] args)
{
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
Scanner in = new Scanner(inputStream);
PrintWriter out = new PrintWriter(outputStream);
Task solver = new Task();
solver.solve(1, in, out);
out.close();
}
static class Task
{
public void solve(int testNumber, Scanner in, PrintWriter out)
{
int T = 1;
while (T-- > 0)
{
solveOne(in, out);
}
}
private void solveOne(Scanner in, PrintWriter out)
{
int N = in.nextInt();
int M[][] = CPUtils.readIntMatrix(N, 2, in);
for (int i = 0; i < N - 2; i++)
{
if (M[i][0] == M[i][1] && M[i + 1][0] == M[i + 1][1] && M[i + 2][0] == M[i + 2][1])
{
out.println("Yes");
return;
}
}
out.println("No");
}
}
static class CPUtils
{
public static int[] readIntArray(int size, Scanner in)
{
int[] array = new int[size];
for (int i = 0; i < size; i++)
{
array[i] = in.nextInt();
}
return array;
}
public static int[][] readIntMatrix(int rows, int columns, Scanner in)
{
int[][] matrix = new int[rows][columns];
for (int i = 0; i < rows; i++)
{
matrix[i] = CPUtils.readIntArray(columns, in);
}
return matrix;
}
}
}
|
[
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,
2,
13,
17,
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,
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
],
[
117,
5
],
[
117,
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
],
[
61,
62
],
[
61,
63
],
[
60,
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
],
[
102,
104
],
[
8,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
110,
111
],
[
110,
112
],
[
110,
113
],
[
6,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
]
| [
"import java.util.*;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = scan.nextInt();\n b[i] = scan.nextInt();\n }\n boolean ans = false;\n for (int i = 0; i + 2 < n; i++) {\n if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;\n }\n System.out.println(ans ? \"Yes\" : \"No\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = scan.nextInt();\n b[i] = scan.nextInt();\n }\n boolean ans = false;\n for (int i = 0; i + 2 < n; i++) {\n if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;\n }\n System.out.println(ans ? \"Yes\" : \"No\");\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = scan.nextInt();\n b[i] = scan.nextInt();\n }\n boolean ans = false;\n for (int i = 0; i + 2 < n; i++) {\n if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;\n }\n System.out.println(ans ? \"Yes\" : \"No\");\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = scan.nextInt();\n b[i] = scan.nextInt();\n }\n boolean ans = false;\n for (int i = 0; i + 2 < n; i++) {\n if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;\n }\n System.out.println(ans ? \"Yes\" : \"No\");\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int n = scan.nextInt();",
"n",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int[] a = new int[n];",
"a",
"new int[n]",
"n",
"int[] b = new int[n];",
"b",
"new int[n]",
"n",
"for (int i = 0; i < n; i++) {\n a[i] = scan.nextInt();\n b[i] = scan.nextInt();\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < n",
"i",
"n",
"i++",
"i++",
"i",
"{\n a[i] = scan.nextInt();\n b[i] = scan.nextInt();\n }",
"{\n a[i] = scan.nextInt();\n b[i] = scan.nextInt();\n }",
"a[i] = scan.nextInt()",
"a[i]",
"a",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"b[i] = scan.nextInt()",
"b[i]",
"b",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"boolean ans = false;",
"ans",
"false",
"for (int i = 0; i + 2 < n; i++) {\n if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i + 2 < n",
"i + 2",
"i",
"2",
"n",
"i++",
"i++",
"i",
"{\n if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;\n }",
"{\n if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;\n }",
"if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;",
"a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]",
"a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]",
"a[i] == b[i]",
"a[i]",
"a",
"i",
"b[i]",
"b",
"i",
"a[i + 1] == b[i + 1]",
"a[i + 1]",
"a",
"i + 1",
"i",
"1",
"b[i + 1]",
"b",
"i + 1",
"i",
"1",
"a[i + 2] == b[i + 2]",
"a[i + 2]",
"a",
"i + 2",
"i",
"2",
"b[i + 2]",
"b",
"i + 2",
"i",
"2",
"ans = true",
"ans",
"true",
"System.out.println(ans ? \"Yes\" : \"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"ans ? \"Yes\" : \"No\"",
"ans",
"\"Yes\"",
"\"No\"",
"String[] args",
"args",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = scan.nextInt();\n b[i] = scan.nextInt();\n }\n boolean ans = false;\n for (int i = 0; i + 2 < n; i++) {\n if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;\n }\n System.out.println(ans ? \"Yes\" : \"No\");\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n int n = scan.nextInt();\n int[] a = new int[n];\n int[] b = new int[n];\n for (int i = 0; i < n; i++) {\n a[i] = scan.nextInt();\n b[i] = scan.nextInt();\n }\n boolean ans = false;\n for (int i = 0; i + 2 < n; i++) {\n if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;\n }\n System.out.println(ans ? \"Yes\" : \"No\");\n }\n}",
"Main"
]
| import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int n = scan.nextInt();
int[] a = new int[n];
int[] b = new int[n];
for (int i = 0; i < n; i++) {
a[i] = scan.nextInt();
b[i] = scan.nextInt();
}
boolean ans = false;
for (int i = 0; i + 2 < n; i++) {
if (a[i] == b[i] && a[i + 1] == b[i + 1] && a[i + 2] == b[i + 2]) ans = true;
}
System.out.println(ans ? "Yes" : "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,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
3,
14,
2,
18,
18,
13,
13,
17,
18,
18,
13,
13,
17,
40,
13,
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,
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
],
[
68,
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
],
[
74,
88
],
[
88,
89
],
[
88,
90
],
[
8,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
91,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
6,
109
],
[
109,
110
]
]
| [
"import java.util.*;\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[][] d = new int[n][2];\n for(int i=0; i<n; i++){\n d[i][0] = sc.nextInt();\n d[i][1] = sc.nextInt();\n }\n \n int cnt = 0;\n for(int i=0; i<n; i++){\n if(cnt>=3) break;\n if(d[i][0]==d[i][1]) cnt++;\n else cnt = 0;\n }\n \n if(cnt>=3){\n System.out.println(\"Yes\");\n }\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 \n int n = sc.nextInt();\n int[][] d = new int[n][2];\n for(int i=0; i<n; i++){\n d[i][0] = sc.nextInt();\n d[i][1] = sc.nextInt();\n }\n \n int cnt = 0;\n for(int i=0; i<n; i++){\n if(cnt>=3) break;\n if(d[i][0]==d[i][1]) cnt++;\n else cnt = 0;\n }\n \n if(cnt>=3){\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[][] d = new int[n][2];\n for(int i=0; i<n; i++){\n d[i][0] = sc.nextInt();\n d[i][1] = sc.nextInt();\n }\n \n int cnt = 0;\n for(int i=0; i<n; i++){\n if(cnt>=3) break;\n if(d[i][0]==d[i][1]) cnt++;\n else cnt = 0;\n }\n \n if(cnt>=3){\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[][] d = new int[n][2];\n for(int i=0; i<n; i++){\n d[i][0] = sc.nextInt();\n d[i][1] = sc.nextInt();\n }\n \n int cnt = 0;\n for(int i=0; i<n; i++){\n if(cnt>=3) break;\n if(d[i][0]==d[i][1]) cnt++;\n else cnt = 0;\n }\n \n if(cnt>=3){\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[][] d = new int[n][2];",
"d",
"new int[n][2]",
"n",
"2",
"for(int i=0; i<n; i++){\n d[i][0] = sc.nextInt();\n d[i][1] = sc.nextInt();\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n d[i][0] = sc.nextInt();\n d[i][1] = sc.nextInt();\n }",
"{\n d[i][0] = sc.nextInt();\n d[i][1] = sc.nextInt();\n }",
"d[i][0] = sc.nextInt()",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d[i][1] = sc.nextInt()",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cnt = 0;",
"cnt",
"0",
"for(int i=0; i<n; i++){\n if(cnt>=3) break;\n if(d[i][0]==d[i][1]) cnt++;\n else cnt = 0;\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n if(cnt>=3) break;\n if(d[i][0]==d[i][1]) cnt++;\n else cnt = 0;\n }",
"{\n if(cnt>=3) break;\n if(d[i][0]==d[i][1]) cnt++;\n else cnt = 0;\n }",
"if(cnt>=3) break;",
"cnt>=3",
"cnt",
"3",
"break;",
"if(d[i][0]==d[i][1]) cnt++;\n else cnt = 0;",
"d[i][0]==d[i][1]",
"d[i][0]",
"d[i]",
"d",
"i",
"0",
"d[i][1]",
"d[i]",
"d",
"i",
"1",
"cnt++",
"cnt",
"cnt = 0",
"cnt",
"0",
"if(cnt>=3){\n System.out.println(\"Yes\");\n }\n else{\n System.out.println(\"No\");\n }",
"cnt>=3",
"cnt",
"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"
]
| import java.util.*;
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++){
d[i][0] = sc.nextInt();
d[i][1] = sc.nextInt();
}
int cnt = 0;
for(int i=0; i<n; i++){
if(cnt>=3) break;
if(d[i][0]==d[i][1]) cnt++;
else cnt = 0;
}
if(cnt>=3){
System.out.println("Yes");
}
else{
System.out.println("No");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
0,
13,
0,
13,
17,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
13,
13,
40,
13,
30,
14,
2,
13,
13,
0,
13,
13,
0,
13,
17,
14,
2,
13,
13,
0,
13,
13,
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
],
[
110,
8
],
[
110,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
16,
24
],
[
24,
25
],
[
16,
26
],
[
26,
27
],
[
16,
28
],
[
28,
29
],
[
16,
30
],
[
30,
31
],
[
16,
32
],
[
32,
33
],
[
16,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
16,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
16,
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
],
[
56,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
56,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
78,
80
],
[
73,
81
],
[
81,
82
],
[
81,
83
],
[
16,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
88,
90
],
[
16,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
91,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
9,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
]
| [
"import java.util.Scanner;\nimport java.util.Arrays;\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\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int t,n,i,a,b,k,m;\n\t\t n=sc.nextInt();\n\t\t \n\t\t m=k=0;\n\t\t for(i=0;i<n;i++)\n\t\t {\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }\n\t\t if(k>m)\n\t\t m=k;\n\t\t if(m>=3)\n\t\t System.out.println(\"Yes\");\n\t\t else\n\t\t System.out.println(\"No\");\n\t\t }\n\t\t catch(Exception e) {\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int t,n,i,a,b,k,m;\n\t\t n=sc.nextInt();\n\t\t \n\t\t m=k=0;\n\t\t for(i=0;i<n;i++)\n\t\t {\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }\n\t\t if(k>m)\n\t\t m=k;\n\t\t if(m>=3)\n\t\t System.out.println(\"Yes\");\n\t\t else\n\t\t System.out.println(\"No\");\n\t\t }\n\t\t catch(Exception e) {\n\t\t}\n\t}\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int t,n,i,a,b,k,m;\n\t\t n=sc.nextInt();\n\t\t \n\t\t m=k=0;\n\t\t for(i=0;i<n;i++)\n\t\t {\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }\n\t\t if(k>m)\n\t\t m=k;\n\t\t if(m>=3)\n\t\t System.out.println(\"Yes\");\n\t\t else\n\t\t System.out.println(\"No\");\n\t\t }\n\t\t catch(Exception e) {\n\t\t}\n\t}",
"main",
"{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int t,n,i,a,b,k,m;\n\t\t n=sc.nextInt();\n\t\t \n\t\t m=k=0;\n\t\t for(i=0;i<n;i++)\n\t\t {\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }\n\t\t if(k>m)\n\t\t m=k;\n\t\t if(m>=3)\n\t\t System.out.println(\"Yes\");\n\t\t else\n\t\t System.out.println(\"No\");\n\t\t }\n\t\t catch(Exception e) {\n\t\t}\n\t}",
"try {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int t,n,i,a,b,k,m;\n\t\t n=sc.nextInt();\n\t\t \n\t\t m=k=0;\n\t\t for(i=0;i<n;i++)\n\t\t {\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }\n\t\t if(k>m)\n\t\t m=k;\n\t\t if(m>=3)\n\t\t System.out.println(\"Yes\");\n\t\t else\n\t\t System.out.println(\"No\");\n\t\t }\n\t\t catch(Exception e) {\n\t\t}",
"catch(Exception e) {\n\t\t}",
"Exception e",
"{\n\t\t}",
"{\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int t,n,i,a,b,k,m;\n\t\t n=sc.nextInt();\n\t\t \n\t\t m=k=0;\n\t\t for(i=0;i<n;i++)\n\t\t {\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }\n\t\t if(k>m)\n\t\t m=k;\n\t\t if(m>=3)\n\t\t System.out.println(\"Yes\");\n\t\t else\n\t\t System.out.println(\"No\");\n\t\t }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int t",
"t",
"n",
"n",
"i",
"i",
"a",
"a",
"b",
"b",
"k",
"k",
"m;",
"m",
"n=sc.nextInt()",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"m=k=0",
"m",
"k=0",
"k",
"0",
"for(i=0;i<n;i++)\n\t\t {\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }",
"i=0;",
"i=0",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }",
"{\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }",
"a=sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b=sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }",
"a==b",
"a",
"b",
"k++",
"k",
"{\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }",
"if(k>m)\n\t\t m=k;",
"k>m",
"k",
"m",
"m=k",
"m",
"k",
"k=0",
"k",
"0",
"if(k>m)\n\t\t m=k;",
"k>m",
"k",
"m",
"m=k",
"m",
"k",
"if(m>=3)\n\t\t System.out.println(\"Yes\");\n\t\t else\n\t\t System.out.println(\"No\");",
"m>=3",
"m",
"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{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int t,n,i,a,b,k,m;\n\t\t n=sc.nextInt();\n\t\t \n\t\t m=k=0;\n\t\t for(i=0;i<n;i++)\n\t\t {\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }\n\t\t if(k>m)\n\t\t m=k;\n\t\t if(m>=3)\n\t\t System.out.println(\"Yes\");\n\t\t else\n\t\t System.out.println(\"No\");\n\t\t }\n\t\t catch(Exception e) {\n\t\t}\n\t}\n}",
"public class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\ttry {\n\t\t Scanner sc = new Scanner(System.in);\n\t\t int t,n,i,a,b,k,m;\n\t\t n=sc.nextInt();\n\t\t \n\t\t m=k=0;\n\t\t for(i=0;i<n;i++)\n\t\t {\n\t\t a=sc.nextInt();\n\t\t b=sc.nextInt();\n\t\t if(a==b)\n\t\t k++;\n\t\t else\n\t\t {\n\t\t \n\t\t if(k>m)\n\t\t m=k;\n\t\t k=0;\n\t\t }\n\t\t }\n\t\t if(k>m)\n\t\t m=k;\n\t\t if(m>=3)\n\t\t System.out.println(\"Yes\");\n\t\t else\n\t\t System.out.println(\"No\");\n\t\t }\n\t\t catch(Exception e) {\n\t\t}\n\t}\n}",
"Main"
]
| import java.util.Scanner;
import java.util.Arrays;
/* 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
{
try {
Scanner sc = new Scanner(System.in);
int t,n,i,a,b,k,m;
n=sc.nextInt();
m=k=0;
for(i=0;i<n;i++)
{
a=sc.nextInt();
b=sc.nextInt();
if(a==b)
k++;
else
{
if(k>m)
m=k;
k=0;
}
}
if(k>m)
m=k;
if(m>=3)
System.out.println("Yes");
else
System.out.println("No");
}
catch(Exception e) {
}
}
}
|
[
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,
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,
13,
1,
40,
13,
30,
30,
14,
2,
13,
17,
30,
3,
14,
2,
18,
13,
13,
18,
13,
13,
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,
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
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
19,
20
],
[
19,
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,
36
],
[
36,
37
],
[
36,
38
],
[
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
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
61,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
23,
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
],
[
84,
86
],
[
83,
87
],
[
87,
88
],
[
82,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
94,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
89,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
23,
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
],
[
21,
122
],
[
122,
123
]
]
| [
"import java.util.Scanner;\nimport java.util.Arrays;\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.stream.Collectors;\nimport java.util.HashSet;\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 k=0;k<N ;k++ ) {\n D1[k]=sc.nextInt();\n D2[k]=sc.nextInt();\n }\nfor (int n=0;n<N ;n++ ) {\n if (count==3) {\n break;\n }\n if (D1[n]==D2[n]) {\n count++;\n }else{\n count=0;\n }\n}\nif(count==3){\n System.out.println(\"Yes\");\n\n}else{\n System.out.println(\"No\");\n}\n\n}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"import java.util.stream.Collectors;",
"Collectors",
"java.util.stream",
"import java.util.HashSet;",
"HashSet",
"java.util",
"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 k=0;k<N ;k++ ) {\n D1[k]=sc.nextInt();\n D2[k]=sc.nextInt();\n }\nfor (int n=0;n<N ;n++ ) {\n if (count==3) {\n break;\n }\n if (D1[n]==D2[n]) {\n count++;\n }else{\n count=0;\n }\n}\nif(count==3){\n System.out.println(\"Yes\");\n\n}else{\n System.out.println(\"No\");\n}\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 k=0;k<N ;k++ ) {\n D1[k]=sc.nextInt();\n D2[k]=sc.nextInt();\n }\nfor (int n=0;n<N ;n++ ) {\n if (count==3) {\n break;\n }\n if (D1[n]==D2[n]) {\n count++;\n }else{\n count=0;\n }\n}\nif(count==3){\n System.out.println(\"Yes\");\n\n}else{\n System.out.println(\"No\");\n}\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 k=0;k<N ;k++ ) {\n D1[k]=sc.nextInt();\n D2[k]=sc.nextInt();\n }\nfor (int n=0;n<N ;n++ ) {\n if (count==3) {\n break;\n }\n if (D1[n]==D2[n]) {\n count++;\n }else{\n count=0;\n }\n}\nif(count==3){\n System.out.println(\"Yes\");\n\n}else{\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 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 k=0;k<N ;k++ ) {\n D1[k]=sc.nextInt();\n D2[k]=sc.nextInt();\n }",
"int k=0;",
"int k=0;",
"k",
"0",
"k<N",
"k",
"N",
"k++",
"k++",
"k",
"{\n D1[k]=sc.nextInt();\n D2[k]=sc.nextInt();\n }",
"{\n D1[k]=sc.nextInt();\n D2[k]=sc.nextInt();\n }",
"D1[k]=sc.nextInt()",
"D1[k]",
"D1",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"D2[k]=sc.nextInt()",
"D2[k]",
"D2",
"k",
"sc.nextInt()",
"sc.nextInt",
"sc",
"for (int n=0;n<N ;n++ ) {\n if (count==3) {\n break;\n }\n if (D1[n]==D2[n]) {\n count++;\n }else{\n count=0;\n }\n}",
"int n=0;",
"int n=0;",
"n",
"0",
"n<N",
"n",
"N",
"n++",
"n++",
"n",
"{\n if (count==3) {\n break;\n }\n if (D1[n]==D2[n]) {\n count++;\n }else{\n count=0;\n }\n}",
"{\n if (count==3) {\n break;\n }\n if (D1[n]==D2[n]) {\n count++;\n }else{\n count=0;\n }\n}",
"if (count==3) {\n break;\n }",
"count==3",
"count",
"3",
"{\n break;\n }",
"break;",
"if (D1[n]==D2[n]) {\n count++;\n }else{\n count=0;\n }",
"D1[n]==D2[n]",
"D1[n]",
"D1",
"n",
"D2[n]",
"D2",
"n",
"{\n count++;\n }",
"count++",
"count",
"{\n count=0;\n }",
"count=0",
"count",
"0",
"if(count==3){\n System.out.println(\"Yes\");\n\n}else{\n System.out.println(\"No\");\n}",
"count==3",
"count",
"3",
"{\n System.out.println(\"Yes\");\n\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;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import java.util.HashSet;
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 k=0;k<N ;k++ ) {
D1[k]=sc.nextInt();
D2[k]=sc.nextInt();
}
for (int n=0;n<N ;n++ ) {
if (count==3) {
break;
}
if (D1[n]==D2[n]) {
count++;
}else{
count=0;
}
}
if(count==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,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
20,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
13,
14,
2,
13,
4,
18,
13,
14,
2,
13,
17,
0,
18,
13,
13,
2,
18,
13,
2,
13,
17,
17,
0,
18,
13,
17,
17,
14,
2,
18,
13,
13,
17,
30,
0,
13,
17,
3,
14,
40,
4,
18,
13,
17,
0,
13,
17,
4,
18,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
0,
13,
20,
23,
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,
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
],
[
194,
20
],
[
194,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
27,
29
],
[
23,
30
],
[
30,
31
],
[
30,
32
],
[
33,
34
],
[
34,
35
],
[
23,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
36,
46
],
[
46,
47
],
[
47,
48
],
[
36,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
70,
76
],
[
62,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
50,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
83,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
23,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
95,
98
],
[
93,
99
],
[
99,
100
],
[
99,
101
],
[
23,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
21,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
110,
114
],
[
114,
115
],
[
110,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
119,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
116,
130
],
[
130,
131
],
[
110,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
110,
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
],
[
110,
166
],
[
166,
167
],
[
166,
168
],
[
168,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
170,
173
],
[
173,
174
],
[
110,
175
],
[
175,
176
],
[
175,
177
],
[
177,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
179,
182
],
[
182,
183
],
[
110,
184
],
[
184,
185
],
[
184,
186
],
[
186,
187
],
[
187,
188
],
[
188,
189
],
[
189,
190
],
[
188,
191
],
[
191,
192
],
[
0,
193
],
[
193,
194
],
[
193,
195
]
]
| [
"import java.io.BufferedReader;\nimport java.io.FileNotFoundException;\nimport java.io.FileReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main {\n public static void main(String[] args) {\n FastScanner scanner = new FastScanner();\n String s = \"\";\n int[] set = new int[scanner.nextInt()];\n for (int i = 0; i < set.length; i++) {\n int a = scanner.nextInt();\n if (a == scanner.nextInt())\n if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;\n if (set[i] == 3) {\n s = \"Yes\";\n break;\n }\n }\n if (!s.equals(\"Yes\"))\n s = \"No\";\n System.out.println(s);\n }\n}\n\nclass FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner(String s) {\n try {\n br = new BufferedReader(new FileReader(s));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }\n\n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String nextToken() {\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(nextToken());\n }\n\n long nextLong() {\n return Long.parseLong(nextToken());\n }\n\n double nextDouble() {\n return Double.parseDouble(nextToken());\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.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main {\n public static void main(String[] args) {\n FastScanner scanner = new FastScanner();\n String s = \"\";\n int[] set = new int[scanner.nextInt()];\n for (int i = 0; i < set.length; i++) {\n int a = scanner.nextInt();\n if (a == scanner.nextInt())\n if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;\n if (set[i] == 3) {\n s = \"Yes\";\n break;\n }\n }\n if (!s.equals(\"Yes\"))\n s = \"No\";\n System.out.println(s);\n }\n}",
"Main",
"public static void main(String[] args) {\n FastScanner scanner = new FastScanner();\n String s = \"\";\n int[] set = new int[scanner.nextInt()];\n for (int i = 0; i < set.length; i++) {\n int a = scanner.nextInt();\n if (a == scanner.nextInt())\n if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;\n if (set[i] == 3) {\n s = \"Yes\";\n break;\n }\n }\n if (!s.equals(\"Yes\"))\n s = \"No\";\n System.out.println(s);\n }",
"main",
"{\n FastScanner scanner = new FastScanner();\n String s = \"\";\n int[] set = new int[scanner.nextInt()];\n for (int i = 0; i < set.length; i++) {\n int a = scanner.nextInt();\n if (a == scanner.nextInt())\n if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;\n if (set[i] == 3) {\n s = \"Yes\";\n break;\n }\n }\n if (!s.equals(\"Yes\"))\n s = \"No\";\n System.out.println(s);\n }",
"FastScanner scanner = new FastScanner();",
"scanner",
"new FastScanner()",
"String s = \"\";",
"s",
"\"\"",
"int[] set = new int[scanner.nextInt()];",
"set",
"new int[scanner.nextInt()]",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"for (int i = 0; i < set.length; i++) {\n int a = scanner.nextInt();\n if (a == scanner.nextInt())\n if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;\n if (set[i] == 3) {\n s = \"Yes\";\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < set.length",
"i",
"set.length",
"set",
"set.length",
"i++",
"i++",
"i",
"{\n int a = scanner.nextInt();\n if (a == scanner.nextInt())\n if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;\n if (set[i] == 3) {\n s = \"Yes\";\n break;\n }\n }",
"{\n int a = scanner.nextInt();\n if (a == scanner.nextInt())\n if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;\n if (set[i] == 3) {\n s = \"Yes\";\n break;\n }\n }",
"int a = scanner.nextInt();",
"a",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if (a == scanner.nextInt())\n if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;",
"a == scanner.nextInt()",
"a",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;",
"i != 0",
"i",
"0",
"set[i] = set[i - 1] + 1",
"set[i]",
"set",
"i",
"set[i - 1] + 1",
"set[i - 1]",
"set",
"i - 1",
"i",
"1",
"1",
"set[0] = 1",
"set[0]",
"set",
"0",
"1",
"if (set[i] == 3) {\n s = \"Yes\";\n break;\n }",
"set[i] == 3",
"set[i]",
"set",
"i",
"3",
"{\n s = \"Yes\";\n break;\n }",
"s = \"Yes\"",
"s",
"\"Yes\"",
"break;",
"if (!s.equals(\"Yes\"))\n s = \"No\";",
"!s.equals(\"Yes\")",
"s.equals(\"Yes\")",
"s.equals",
"s",
"\"Yes\"",
"s = \"No\"",
"s",
"\"No\"",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String[] args",
"args",
"class FastScanner {\n BufferedReader br;\n StringTokenizer st;\n\n public FastScanner(String s) {\n try {\n br = new BufferedReader(new FileReader(s));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }\n\n public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }\n\n String nextToken() {\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(nextToken());\n }\n\n long nextLong() {\n return Long.parseLong(nextToken());\n }\n\n double nextDouble() {\n return Double.parseDouble(nextToken());\n }\n}",
"FastScanner",
"BufferedReader br;",
"br",
"StringTokenizer st;",
"st",
"public FastScanner(String s) {\n try {\n br = new BufferedReader(new FileReader(s));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"FastScanner",
"{\n try {\n br = new BufferedReader(new FileReader(s));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n }",
"try {\n br = new BufferedReader(new FileReader(s));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }",
"catch (FileNotFoundException e) {\n e.printStackTrace();\n }",
"FileNotFoundException e",
"{\n e.printStackTrace();\n }",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n br = new BufferedReader(new FileReader(s));\n }",
"br = new BufferedReader(new FileReader(s))",
"br",
"new BufferedReader(new FileReader(s))",
"String s",
"s",
"public FastScanner() {\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"FastScanner",
"{\n br = new BufferedReader(new InputStreamReader(System.in));\n }",
"br = new BufferedReader(new InputStreamReader(System.in))",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String nextToken() {\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 }",
"nextToken",
"{\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(nextToken());\n }",
"nextInt",
"{\n return Integer.parseInt(nextToken());\n }",
"return Integer.parseInt(nextToken());",
"Integer.parseInt(nextToken())",
"Integer.parseInt",
"Integer",
"nextToken()",
"nextToken",
"long nextLong() {\n return Long.parseLong(nextToken());\n }",
"nextLong",
"{\n return Long.parseLong(nextToken());\n }",
"return Long.parseLong(nextToken());",
"Long.parseLong(nextToken())",
"Long.parseLong",
"Long",
"nextToken()",
"nextToken",
"double nextDouble() {\n return Double.parseDouble(nextToken());\n }",
"nextDouble",
"{\n return Double.parseDouble(nextToken());\n }",
"return Double.parseDouble(nextToken());",
"Double.parseDouble(nextToken())",
"Double.parseDouble",
"Double",
"nextToken()",
"nextToken",
"public class Main {\n public static void main(String[] args) {\n FastScanner scanner = new FastScanner();\n String s = \"\";\n int[] set = new int[scanner.nextInt()];\n for (int i = 0; i < set.length; i++) {\n int a = scanner.nextInt();\n if (a == scanner.nextInt())\n if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;\n if (set[i] == 3) {\n s = \"Yes\";\n break;\n }\n }\n if (!s.equals(\"Yes\"))\n s = \"No\";\n System.out.println(s);\n }\n}",
"public class Main {\n public static void main(String[] args) {\n FastScanner scanner = new FastScanner();\n String s = \"\";\n int[] set = new int[scanner.nextInt()];\n for (int i = 0; i < set.length; i++) {\n int a = scanner.nextInt();\n if (a == scanner.nextInt())\n if (i != 0)\n set[i] = set[i - 1] + 1;\n else\n set[0] = 1;\n if (set[i] == 3) {\n s = \"Yes\";\n break;\n }\n }\n if (!s.equals(\"Yes\"))\n s = \"No\";\n System.out.println(s);\n }\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main {
public static void main(String[] args) {
FastScanner scanner = new FastScanner();
String s = "";
int[] set = new int[scanner.nextInt()];
for (int i = 0; i < set.length; i++) {
int a = scanner.nextInt();
if (a == scanner.nextInt())
if (i != 0)
set[i] = set[i - 1] + 1;
else
set[0] = 1;
if (set[i] == 3) {
s = "Yes";
break;
}
}
if (!s.equals("Yes"))
s = "No";
System.out.println(s);
}
}
class FastScanner {
BufferedReader br;
StringTokenizer st;
public FastScanner(String s) {
try {
br = new BufferedReader(new FileReader(s));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
}
public FastScanner() {
br = new BufferedReader(new InputStreamReader(System.in));
}
String nextToken() {
while (st == null || !st.hasMoreElements()) {
try {
st = new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
}
return st.nextToken();
}
int nextInt() {
return Integer.parseInt(nextToken());
}
long nextLong() {
return Long.parseLong(nextToken());
}
double nextDouble() {
return Double.parseDouble(nextToken());
}
} |
[
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,
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,
2,
13,
13,
2,
13,
17,
30,
14,
2,
13,
17,
9,
40,
13,
0,
13,
17,
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
],
[
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
],
[
23,
25
],
[
8,
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
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
57,
63
],
[
63,
64
],
[
49,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
68,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
6,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
]
| [
"import java.util.*;\n\npublic class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint d1=0, d2=0;\n\tint ans=0;\n\n\tfor(int i=0; i<N; i++){\n\t d1 = sc.nextInt();\n\t d2 = sc.nextInt();\n\t if(d1==d2 || ans>=3){\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }else ans=0;\n\t}\n\tif(ans>=3)System.out.println(\"Yes\");\n\telse 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\tint N = sc.nextInt();\n\tint d1=0, d2=0;\n\tint ans=0;\n\n\tfor(int i=0; i<N; i++){\n\t d1 = sc.nextInt();\n\t d2 = sc.nextInt();\n\t if(d1==d2 || ans>=3){\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }else ans=0;\n\t}\n\tif(ans>=3)System.out.println(\"Yes\");\n\telse System.out.println(\"No\");\n }\n}",
"Main",
"public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint d1=0, d2=0;\n\tint ans=0;\n\n\tfor(int i=0; i<N; i++){\n\t d1 = sc.nextInt();\n\t d2 = sc.nextInt();\n\t if(d1==d2 || ans>=3){\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }else ans=0;\n\t}\n\tif(ans>=3)System.out.println(\"Yes\");\n\telse System.out.println(\"No\");\n }",
"main",
"{\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint d1=0, d2=0;\n\tint ans=0;\n\n\tfor(int i=0; i<N; i++){\n\t d1 = sc.nextInt();\n\t d2 = sc.nextInt();\n\t if(d1==d2 || ans>=3){\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }else ans=0;\n\t}\n\tif(ans>=3)System.out.println(\"Yes\");\n\telse 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 d1=0",
"d1",
"0",
"d2=0;",
"d2",
"0",
"int ans=0;",
"ans",
"0",
"for(int i=0; i<N; i++){\n\t d1 = sc.nextInt();\n\t d2 = sc.nextInt();\n\t if(d1==d2 || ans>=3){\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }else ans=0;\n\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n\t d1 = sc.nextInt();\n\t d2 = sc.nextInt();\n\t if(d1==d2 || ans>=3){\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }else ans=0;\n\t}",
"{\n\t d1 = sc.nextInt();\n\t d2 = sc.nextInt();\n\t if(d1==d2 || ans>=3){\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }else ans=0;\n\t}",
"d1 = sc.nextInt()",
"d1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d2 = sc.nextInt()",
"d2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(d1==d2 || ans>=3){\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }else ans=0;",
"d1==d2 || ans>=3",
"d1==d2",
"d1",
"d2",
"ans>=3",
"ans",
"3",
"{\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }",
"if(ans>=3)continue;",
"ans>=3",
"ans",
"3",
"continue;",
"ans++",
"ans",
"ans=0",
"ans",
"0",
"if(ans>=3)System.out.println(\"Yes\");\n\telse System.out.println(\"No\");",
"ans>=3",
"ans",
"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 public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint d1=0, d2=0;\n\tint ans=0;\n\n\tfor(int i=0; i<N; i++){\n\t d1 = sc.nextInt();\n\t d2 = sc.nextInt();\n\t if(d1==d2 || ans>=3){\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }else ans=0;\n\t}\n\tif(ans>=3)System.out.println(\"Yes\");\n\telse System.out.println(\"No\");\n }\n}",
"public class Main{\n public static void main(String[] args){\n\tScanner sc = new Scanner(System.in);\n\tint N = sc.nextInt();\n\tint d1=0, d2=0;\n\tint ans=0;\n\n\tfor(int i=0; i<N; i++){\n\t d1 = sc.nextInt();\n\t d2 = sc.nextInt();\n\t if(d1==d2 || ans>=3){\n\t\tif(ans>=3)continue;\n\t\tans++;\n\t }else ans=0;\n\t}\n\tif(ans>=3)System.out.println(\"Yes\");\n\telse 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 N = sc.nextInt();
int d1=0, d2=0;
int ans=0;
for(int i=0; i<N; i++){
d1 = sc.nextInt();
d2 = sc.nextInt();
if(d1==d2 || ans>=3){
if(ans>=3)continue;
ans++;
}else ans=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,
17,
41,
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,
14,
2,
13,
13,
0,
13,
17,
14,
2,
13,
17,
30,
4,
18,
18,
13,
13,
17,
0,
13,
17,
3,
14,
2,
13,
17,
4,
18,
18,
13,
13,
17,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
2,
2,
2,
13,
13,
2,
13,
13,
2,
2,
13,
13,
2,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
17,
2,
13,
17,
29,
13,
41,
13,
17,
41,
13,
13,
41,
13,
17,
42,
2,
13,
13,
30,
41,
13,
2,
2,
13,
13,
17,
14,
2,
2,
13,
13,
13,
29,
13,
14,
2,
2,
13,
13,
13,
30,
0,
13,
2,
13,
17,
0,
13,
13,
0,
13,
2,
13,
17,
29,
13,
23,
13,
12,
13,
30,
41,
13,
40,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
17,
2,
13,
13,
30,
0,
13,
13,
3,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
2,
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,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
17,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
17,
14,
2,
13,
17,
30,
29,
17,
14,
2,
2,
13,
17,
17,
30,
29,
17,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
13,
17,
1,
0,
13,
2,
13,
17,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
17,
29,
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
],
[
376,
11
],
[
376,
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,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
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
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
48,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
37,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
65,
72
],
[
72,
73
],
[
72,
74
],
[
65,
75
],
[
14,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
80,
85
],
[
12,
86
],
[
86,
87
],
[
376,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
101,
102
],
[
101,
103
],
[
96,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
108,
110
],
[
90,
111
],
[
111,
112
],
[
88,
113
],
[
113,
114
],
[
88,
115
],
[
115,
116
],
[
88,
117
],
[
117,
118
],
[
88,
119
],
[
119,
120
],
[
376,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
129,
131
],
[
124,
132
],
[
132,
133
],
[
123,
134
],
[
134,
135
],
[
134,
136
],
[
123,
137
],
[
137,
138
],
[
137,
139
],
[
123,
140
],
[
140,
141
],
[
140,
142
],
[
123,
143
],
[
143,
144
],
[
144,
145
],
[
144,
146
],
[
143,
147
],
[
147,
148
],
[
148,
149
],
[
148,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
147,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
157,
159
],
[
156,
160
],
[
155,
161
],
[
161,
162
],
[
147,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
165,
167
],
[
164,
168
],
[
163,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
172,
174
],
[
169,
175
],
[
175,
176
],
[
175,
177
],
[
163,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
180,
182
],
[
123,
183
],
[
183,
184
],
[
121,
185
],
[
185,
186
],
[
376,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
189,
194
],
[
194,
195
],
[
195,
196
],
[
196,
197
],
[
196,
198
],
[
194,
199
],
[
199,
200
],
[
199,
201
],
[
201,
202
],
[
202,
203
],
[
201,
204
],
[
194,
205
],
[
205,
206
],
[
206,
207
],
[
194,
208
],
[
209,
209
],
[
209,
210
],
[
210,
211
],
[
211,
212
],
[
212,
213
],
[
213,
214
],
[
213,
215
],
[
212,
216
],
[
211,
217
],
[
217,
218
],
[
217,
219
],
[
210,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
220,
224
],
[
189,
225
],
[
225,
226
],
[
187,
227
],
[
227,
228
],
[
187,
229
],
[
229,
230
],
[
376,
231
],
[
231,
232
],
[
231,
233
],
[
233,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
234,
238
],
[
238,
239
],
[
233,
240
],
[
240,
241
],
[
241,
242
],
[
241,
243
],
[
243,
244
],
[
243,
245
],
[
241,
246
],
[
231,
247
],
[
247,
248
],
[
231,
249
],
[
249,
250
],
[
376,
251
],
[
251,
252
],
[
251,
253
],
[
253,
254
],
[
254,
255
],
[
255,
256
],
[
256,
257
],
[
256,
258
],
[
255,
259
],
[
259,
260
],
[
259,
261
],
[
259,
262
],
[
251,
263
],
[
263,
264
],
[
251,
265
],
[
265,
266
],
[
376,
267
],
[
267,
268
],
[
267,
269
],
[
269,
270
],
[
270,
271
],
[
271,
272
],
[
271,
273
],
[
270,
274
],
[
274,
275
],
[
275,
276
],
[
269,
277
],
[
277,
278
],
[
278,
279
],
[
278,
280
],
[
277,
281
],
[
281,
282
],
[
282,
283
],
[
269,
284
],
[
284,
285
],
[
285,
286
],
[
286,
287
],
[
286,
288
],
[
284,
289
],
[
289,
290
],
[
289,
291
],
[
291,
292
],
[
292,
293
],
[
293,
294
],
[
292,
295
],
[
291,
296
],
[
284,
297
],
[
297,
298
],
[
298,
299
],
[
284,
300
],
[
301,
301
],
[
301,
302
],
[
302,
303
],
[
303,
304
],
[
304,
305
],
[
304,
306
],
[
303,
307
],
[
302,
308
],
[
308,
309
],
[
309,
310
],
[
269,
311
],
[
311,
312
],
[
267,
313
],
[
313,
314
],
[
376,
315
],
[
315,
316
],
[
315,
317
],
[
317,
318
],
[
318,
319
],
[
319,
320
],
[
319,
321
],
[
318,
322
],
[
322,
323
],
[
323,
324
],
[
317,
325
],
[
325,
326
],
[
326,
327
],
[
326,
328
],
[
325,
329
],
[
329,
330
],
[
330,
331
],
[
317,
332
],
[
332,
333
],
[
333,
334
],
[
334,
335
],
[
334,
336
],
[
333,
337
],
[
332,
338
],
[
338,
339
],
[
339,
340
],
[
317,
341
],
[
341,
342
],
[
342,
343
],
[
343,
344
],
[
343,
345
],
[
341,
346
],
[
346,
347
],
[
346,
348
],
[
348,
349
],
[
349,
350
],
[
350,
351
],
[
349,
352
],
[
348,
353
],
[
341,
354
],
[
354,
355
],
[
355,
356
],
[
355,
357
],
[
357,
358
],
[
357,
359
],
[
341,
360
],
[
361,
361
],
[
361,
362
],
[
362,
363
],
[
363,
364
],
[
364,
365
],
[
364,
366
],
[
363,
367
],
[
362,
368
],
[
368,
369
],
[
369,
370
],
[
317,
371
],
[
371,
372
],
[
315,
373
],
[
373,
374
],
[
0,
375
],
[
375,
376
],
[
375,
377
]
]
| [
"//package hiougyf;\nimport java.io.*;\nimport java.util.*;\nimport java.util.Map.Entry;\npublic class Main{\t\n\t\tpublic static void main(String[] args){ \n\t\tScanner sc =new Scanner(System.in);\n\t\tint hh=1000000007,t=sc.nextInt();\n\t\tint ans=0,k=0;\n\t\twhile(t-->0) {\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tif(a==b) ans++;\n\t\telse if(a!=b) ans=0;\n\t\tif(ans>=3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tk=9;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\t\tif(k!=9) System.out.println(\"No\");\n\t\t\n }\n\t\tstatic double distance(long a,long b,long a1,long b1) {\n\t\t\t//System.out.println(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\tdouble d1=Math.sqrt(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\treturn d1;\n\t\t}\n\t\n\t public static int floorSqrt(int x) \n\t { \n\t // Base Cases \n\t if (x == 0 || x == 1) \n\t return x; \n\t \n\t // Do Binary Search for floor(sqrt(x)) \n\t int start = 1, end = x, ans=0; \n\t while (start <= end) \n\t { \n\t int mid = (start + end) / 2; \n\t \n\t // If x is a perfect square \n\t if (mid*mid == x) \n\t return mid; \n\t \n\t // Since we need floor, we update answer when mid*mid is \n\t // smaller than x, and move closer to sqrt(x) \n\t if (mid*mid < x) \n\t { \n\t start = mid + 1; \n\t ans = mid; \n\t } \n\t else // If mid*mid is greater than x \n\t end = mid-1; \n\t } \n\t return ans; \n\t } \n\t\tstatic int div(int n,int b) {\n\t\t\tint g=-1;\n\t\t\tfor(int i=2;i<=Math.sqrt(n);i++) {\n\t\t\t\tif(n%i==0&&i!=b) {\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn g;\n\t\t}\n\t \n\t \n\t public static int gcd(int a, int b) \n\t { \n\t if (a == 0) \n\t return b; \n\t \n\t return gcd(b%a, a); \n\t } \n\t public static int lcm(int a, int b) \n\t { \n\t return (a*b)/gcd(a, b); \n\t } \n\t public static boolean isPrime1(int n) {\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n for (int i = 2; i <= Math.sqrt(n) + 1; i++) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n public static boolean isPrime(int n) {\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n if (n % 2 == 0) {\n return false;\n }\n for (int i = 3; i <= Math.sqrt(n) + 1; i = i + 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n\t \n\t\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.util.Map.Entry;",
"Entry",
"java.util.Map",
"public class Main{\t\n\t\tpublic static void main(String[] args){ \n\t\tScanner sc =new Scanner(System.in);\n\t\tint hh=1000000007,t=sc.nextInt();\n\t\tint ans=0,k=0;\n\t\twhile(t-->0) {\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tif(a==b) ans++;\n\t\telse if(a!=b) ans=0;\n\t\tif(ans>=3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tk=9;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\t\tif(k!=9) System.out.println(\"No\");\n\t\t\n }\n\t\tstatic double distance(long a,long b,long a1,long b1) {\n\t\t\t//System.out.println(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\tdouble d1=Math.sqrt(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\treturn d1;\n\t\t}\n\t\n\t public static int floorSqrt(int x) \n\t { \n\t // Base Cases \n\t if (x == 0 || x == 1) \n\t return x; \n\t \n\t // Do Binary Search for floor(sqrt(x)) \n\t int start = 1, end = x, ans=0; \n\t while (start <= end) \n\t { \n\t int mid = (start + end) / 2; \n\t \n\t // If x is a perfect square \n\t if (mid*mid == x) \n\t return mid; \n\t \n\t // Since we need floor, we update answer when mid*mid is \n\t // smaller than x, and move closer to sqrt(x) \n\t if (mid*mid < x) \n\t { \n\t start = mid + 1; \n\t ans = mid; \n\t } \n\t else // If mid*mid is greater than x \n\t end = mid-1; \n\t } \n\t return ans; \n\t } \n\t\tstatic int div(int n,int b) {\n\t\t\tint g=-1;\n\t\t\tfor(int i=2;i<=Math.sqrt(n);i++) {\n\t\t\t\tif(n%i==0&&i!=b) {\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn g;\n\t\t}\n\t \n\t \n\t public static int gcd(int a, int b) \n\t { \n\t if (a == 0) \n\t return b; \n\t \n\t return gcd(b%a, a); \n\t } \n\t public static int lcm(int a, int b) \n\t { \n\t return (a*b)/gcd(a, b); \n\t } \n\t public static boolean isPrime1(int n) {\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n for (int i = 2; i <= Math.sqrt(n) + 1; i++) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n public static boolean isPrime(int n) {\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n if (n % 2 == 0) {\n return false;\n }\n for (int i = 3; i <= Math.sqrt(n) + 1; i = i + 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n\t \n\t\n}",
"Main",
"public static void main(String[] args){ \n\t\tScanner sc =new Scanner(System.in);\n\t\tint hh=1000000007,t=sc.nextInt();\n\t\tint ans=0,k=0;\n\t\twhile(t-->0) {\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tif(a==b) ans++;\n\t\telse if(a!=b) ans=0;\n\t\tif(ans>=3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tk=9;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\t\tif(k!=9) System.out.println(\"No\");\n\t\t\n }",
"main",
"{ \n\t\tScanner sc =new Scanner(System.in);\n\t\tint hh=1000000007,t=sc.nextInt();\n\t\tint ans=0,k=0;\n\t\twhile(t-->0) {\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tif(a==b) ans++;\n\t\telse if(a!=b) ans=0;\n\t\tif(ans>=3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tk=9;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\t\tif(k!=9) System.out.println(\"No\");\n\t\t\n }",
"Scanner sc =new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int hh=1000000007",
"hh",
"1000000007",
"t=sc.nextInt();",
"t",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int ans=0",
"ans",
"0",
"k=0;",
"k",
"0",
"while(t-->0) {\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tif(a==b) ans++;\n\t\telse if(a!=b) ans=0;\n\t\tif(ans>=3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tk=9;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}",
"t-->0",
"t--",
"t",
"0",
"{\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tif(a==b) ans++;\n\t\telse if(a!=b) ans=0;\n\t\tif(ans>=3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tk=9;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}",
"int a=sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b=sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a==b) ans++;\n\t\telse if(a!=b) ans=0;",
"a==b",
"a",
"b",
"ans++",
"ans",
"if(a!=b) ans=0;",
"a!=b",
"a",
"b",
"ans=0",
"ans",
"0",
"if(ans>=3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tk=9;\n\t\t\tbreak;\n\t\t}",
"ans>=3",
"ans",
"3",
"{\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tk=9;\n\t\t\tbreak;\n\t\t}",
"System.out.println(\"Yes\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Yes\"",
"k=9",
"k",
"9",
"break;",
"if(k!=9) System.out.println(\"No\");",
"k!=9",
"k",
"9",
"System.out.println(\"No\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"No\"",
"String[] args",
"args",
"static double distance(long a,long b,long a1,long b1) {\n\t\t\t//System.out.println(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\tdouble d1=Math.sqrt(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\treturn d1;\n\t\t}",
"distance",
"{\n\t\t\t//System.out.println(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\tdouble d1=Math.sqrt(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\treturn d1;\n\t\t}",
"double d1=Math.sqrt(((a-a1)*(a-a1))+((b-b1)*(b-b1)));",
"d1",
"Math.sqrt(((a-a1)*(a-a1))+((b-b1)*(b-b1)))",
"Math.sqrt",
"Math",
"((a-a1)*(a-a1))+((b-b1)*(b-b1))",
"((a-a1)*(a-a1))",
"(a-a1)",
"a",
"a1",
"(a-a1)",
"a",
"a1",
"((b-b1)*(b-b1))",
"(b-b1)",
"b",
"b1",
"(b-b1)",
"b",
"b1",
"return d1;",
"d1",
"long a",
"a",
"long b",
"b",
"long a1",
"a1",
"long b1",
"b1",
"public static int floorSqrt(int x) \n\t { \n\t // Base Cases \n\t if (x == 0 || x == 1) \n\t return x; \n\t \n\t // Do Binary Search for floor(sqrt(x)) \n\t int start = 1, end = x, ans=0; \n\t while (start <= end) \n\t { \n\t int mid = (start + end) / 2; \n\t \n\t // If x is a perfect square \n\t if (mid*mid == x) \n\t return mid; \n\t \n\t // Since we need floor, we update answer when mid*mid is \n\t // smaller than x, and move closer to sqrt(x) \n\t if (mid*mid < x) \n\t { \n\t start = mid + 1; \n\t ans = mid; \n\t } \n\t else // If mid*mid is greater than x \n\t end = mid-1; \n\t } \n\t return ans; \n\t }",
"floorSqrt",
"{ \n\t // Base Cases \n\t if (x == 0 || x == 1) \n\t return x; \n\t \n\t // Do Binary Search for floor(sqrt(x)) \n\t int start = 1, end = x, ans=0; \n\t while (start <= end) \n\t { \n\t int mid = (start + end) / 2; \n\t \n\t // If x is a perfect square \n\t if (mid*mid == x) \n\t return mid; \n\t \n\t // Since we need floor, we update answer when mid*mid is \n\t // smaller than x, and move closer to sqrt(x) \n\t if (mid*mid < x) \n\t { \n\t start = mid + 1; \n\t ans = mid; \n\t } \n\t else // If mid*mid is greater than x \n\t end = mid-1; \n\t } \n\t return ans; \n\t }",
"if (x == 0 || x == 1) \n\t return x;",
"x == 0 || x == 1",
"x == 0",
"x",
"0",
"x == 1",
"x",
"1",
"return x;",
"x",
"int start = 1",
"start",
"1",
"end = x",
"end",
"x",
"ans=0;",
"ans",
"0",
"while (start <= end) \n\t { \n\t int mid = (start + end) / 2; \n\t \n\t // If x is a perfect square \n\t if (mid*mid == x) \n\t return mid; \n\t \n\t // Since we need floor, we update answer when mid*mid is \n\t // smaller than x, and move closer to sqrt(x) \n\t if (mid*mid < x) \n\t { \n\t start = mid + 1; \n\t ans = mid; \n\t } \n\t else // If mid*mid is greater than x \n\t end = mid-1; \n\t }",
"start <= end",
"start",
"end",
"{ \n\t int mid = (start + end) / 2; \n\t \n\t // If x is a perfect square \n\t if (mid*mid == x) \n\t return mid; \n\t \n\t // Since we need floor, we update answer when mid*mid is \n\t // smaller than x, and move closer to sqrt(x) \n\t if (mid*mid < x) \n\t { \n\t start = mid + 1; \n\t ans = mid; \n\t } \n\t else // If mid*mid is greater than x \n\t end = mid-1; \n\t }",
"int mid = (start + end) / 2;",
"mid",
"(start + end) / 2",
"(start + end)",
"start",
"end",
"2",
"if (mid*mid == x) \n\t return mid;",
"mid*mid == x",
"mid*mid",
"mid",
"mid",
"x",
"return mid;",
"mid",
"if (mid*mid < x) \n\t { \n\t start = mid + 1; \n\t ans = mid; \n\t } \n\t else // If mid*mid is greater than x \n\t end = mid-1;",
"mid*mid < x",
"mid*mid",
"mid",
"mid",
"x",
"{ \n\t start = mid + 1; \n\t ans = mid; \n\t }",
"start = mid + 1",
"start",
"mid + 1",
"mid",
"1",
"ans = mid",
"ans",
"mid",
"end = mid-1",
"end",
"mid-1",
"mid",
"1",
"return ans;",
"ans",
"int x",
"x",
"static int div(int n,int b) {\n\t\t\tint g=-1;\n\t\t\tfor(int i=2;i<=Math.sqrt(n);i++) {\n\t\t\t\tif(n%i==0&&i!=b) {\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn g;\n\t\t}",
"div",
"{\n\t\t\tint g=-1;\n\t\t\tfor(int i=2;i<=Math.sqrt(n);i++) {\n\t\t\t\tif(n%i==0&&i!=b) {\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn g;\n\t\t}",
"int g=-1;",
"g",
"-1",
"1",
"for(int i=2;i<=Math.sqrt(n);i++) {\n\t\t\t\tif(n%i==0&&i!=b) {\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int i=2;",
"int i=2;",
"i",
"2",
"i<=Math.sqrt(n)",
"i",
"Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(n%i==0&&i!=b) {\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(n%i==0&&i!=b) {\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(n%i==0&&i!=b) {\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"n%i==0&&i!=b",
"n%i==0",
"n%i",
"n",
"i",
"0",
"i!=b",
"i",
"b",
"{\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"g=i",
"g",
"i",
"break;",
"return g;",
"g",
"int n",
"n",
"int b",
"b",
"public static int gcd(int a, int b) \n\t { \n\t if (a == 0) \n\t return b; \n\t \n\t return gcd(b%a, a); \n\t }",
"gcd",
"{ \n\t if (a == 0) \n\t return b; \n\t \n\t return gcd(b%a, a); \n\t }",
"if (a == 0) \n\t return b;",
"a == 0",
"a",
"0",
"return b;",
"b",
"return gcd(b%a, a);",
"gcd(b%a, a)",
"gcd",
"b%a",
"b",
"a",
"a",
"int a",
"a",
"int b",
"b",
"public static int lcm(int a, int b) \n\t { \n\t return (a*b)/gcd(a, b); \n\t }",
"lcm",
"{ \n\t return (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",
"int a",
"a",
"int b",
"b",
"public static boolean isPrime1(int n) {\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n for (int i = 2; i <= Math.sqrt(n) + 1; i++) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }",
"isPrime1",
"{\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n for (int i = 2; i <= Math.sqrt(n) + 1; i++) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }",
"if (n <= 1) {\n return false;\n }",
"n <= 1",
"n",
"1",
"{\n return false;\n }",
"return false;",
"false",
"if (n == 2) {\n return true;\n }",
"n == 2",
"n",
"2",
"{\n return true;\n }",
"return true;",
"true",
"for (int i = 2; i <= Math.sqrt(n) + 1; i++) {\n if (n % i == 0) {\n return false;\n }\n }",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i <= Math.sqrt(n) + 1",
"i",
"Math.sqrt(n) + 1",
"Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"1",
"i++",
"i++",
"i",
"{\n if (n % i == 0) {\n return false;\n }\n }",
"{\n if (n % i == 0) {\n return false;\n }\n }",
"if (n % i == 0) {\n return false;\n }",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public static boolean isPrime(int n) {\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n if (n % 2 == 0) {\n return false;\n }\n for (int i = 3; i <= Math.sqrt(n) + 1; i = i + 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }",
"isPrime",
"{\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n if (n % 2 == 0) {\n return false;\n }\n for (int i = 3; i <= Math.sqrt(n) + 1; i = i + 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }",
"if (n <= 1) {\n return false;\n }",
"n <= 1",
"n",
"1",
"{\n return false;\n }",
"return false;",
"false",
"if (n == 2) {\n return true;\n }",
"n == 2",
"n",
"2",
"{\n return true;\n }",
"return true;",
"true",
"if (n % 2 == 0) {\n return false;\n }",
"n % 2 == 0",
"n % 2",
"n",
"2",
"0",
"{\n return false;\n }",
"return false;",
"false",
"for (int i = 3; i <= Math.sqrt(n) + 1; i = i + 2) {\n if (n % i == 0) {\n return false;\n }\n }",
"int i = 3;",
"int i = 3;",
"i",
"3",
"i <= Math.sqrt(n) + 1",
"i",
"Math.sqrt(n) + 1",
"Math.sqrt(n)",
"Math.sqrt",
"Math",
"n",
"1",
"i = i + 2",
"i = i + 2",
"i",
"i + 2",
"i",
"2",
"{\n if (n % i == 0) {\n return false;\n }\n }",
"{\n if (n % i == 0) {\n return false;\n }\n }",
"if (n % i == 0) {\n return false;\n }",
"n % i == 0",
"n % i",
"n",
"i",
"0",
"{\n return false;\n }",
"return false;",
"false",
"return true;",
"true",
"int n",
"n",
"public class Main{\t\n\t\tpublic static void main(String[] args){ \n\t\tScanner sc =new Scanner(System.in);\n\t\tint hh=1000000007,t=sc.nextInt();\n\t\tint ans=0,k=0;\n\t\twhile(t-->0) {\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tif(a==b) ans++;\n\t\telse if(a!=b) ans=0;\n\t\tif(ans>=3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tk=9;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\t\tif(k!=9) System.out.println(\"No\");\n\t\t\n }\n\t\tstatic double distance(long a,long b,long a1,long b1) {\n\t\t\t//System.out.println(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\tdouble d1=Math.sqrt(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\treturn d1;\n\t\t}\n\t\n\t public static int floorSqrt(int x) \n\t { \n\t // Base Cases \n\t if (x == 0 || x == 1) \n\t return x; \n\t \n\t // Do Binary Search for floor(sqrt(x)) \n\t int start = 1, end = x, ans=0; \n\t while (start <= end) \n\t { \n\t int mid = (start + end) / 2; \n\t \n\t // If x is a perfect square \n\t if (mid*mid == x) \n\t return mid; \n\t \n\t // Since we need floor, we update answer when mid*mid is \n\t // smaller than x, and move closer to sqrt(x) \n\t if (mid*mid < x) \n\t { \n\t start = mid + 1; \n\t ans = mid; \n\t } \n\t else // If mid*mid is greater than x \n\t end = mid-1; \n\t } \n\t return ans; \n\t } \n\t\tstatic int div(int n,int b) {\n\t\t\tint g=-1;\n\t\t\tfor(int i=2;i<=Math.sqrt(n);i++) {\n\t\t\t\tif(n%i==0&&i!=b) {\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn g;\n\t\t}\n\t \n\t \n\t public static int gcd(int a, int b) \n\t { \n\t if (a == 0) \n\t return b; \n\t \n\t return gcd(b%a, a); \n\t } \n\t public static int lcm(int a, int b) \n\t { \n\t return (a*b)/gcd(a, b); \n\t } \n\t public static boolean isPrime1(int n) {\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n for (int i = 2; i <= Math.sqrt(n) + 1; i++) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n public static boolean isPrime(int n) {\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n if (n % 2 == 0) {\n return false;\n }\n for (int i = 3; i <= Math.sqrt(n) + 1; i = i + 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n\t \n\t\n}",
"public class Main{\t\n\t\tpublic static void main(String[] args){ \n\t\tScanner sc =new Scanner(System.in);\n\t\tint hh=1000000007,t=sc.nextInt();\n\t\tint ans=0,k=0;\n\t\twhile(t-->0) {\n\t\tint a=sc.nextInt();\n\t\tint b=sc.nextInt();\n\t\tif(a==b) ans++;\n\t\telse if(a!=b) ans=0;\n\t\tif(ans>=3) {\n\t\t\tSystem.out.println(\"Yes\");\n\t\t\tk=9;\n\t\t\tbreak;\n\t\t}\n\t\t\n\t}\n\t\tif(k!=9) System.out.println(\"No\");\n\t\t\n }\n\t\tstatic double distance(long a,long b,long a1,long b1) {\n\t\t\t//System.out.println(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\tdouble d1=Math.sqrt(((a-a1)*(a-a1))+((b-b1)*(b-b1)));\n\t\t\treturn d1;\n\t\t}\n\t\n\t public static int floorSqrt(int x) \n\t { \n\t // Base Cases \n\t if (x == 0 || x == 1) \n\t return x; \n\t \n\t // Do Binary Search for floor(sqrt(x)) \n\t int start = 1, end = x, ans=0; \n\t while (start <= end) \n\t { \n\t int mid = (start + end) / 2; \n\t \n\t // If x is a perfect square \n\t if (mid*mid == x) \n\t return mid; \n\t \n\t // Since we need floor, we update answer when mid*mid is \n\t // smaller than x, and move closer to sqrt(x) \n\t if (mid*mid < x) \n\t { \n\t start = mid + 1; \n\t ans = mid; \n\t } \n\t else // If mid*mid is greater than x \n\t end = mid-1; \n\t } \n\t return ans; \n\t } \n\t\tstatic int div(int n,int b) {\n\t\t\tint g=-1;\n\t\t\tfor(int i=2;i<=Math.sqrt(n);i++) {\n\t\t\t\tif(n%i==0&&i!=b) {\n\t\t\t\t\tg=i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn g;\n\t\t}\n\t \n\t \n\t public static int gcd(int a, int b) \n\t { \n\t if (a == 0) \n\t return b; \n\t \n\t return gcd(b%a, a); \n\t } \n\t public static int lcm(int a, int b) \n\t { \n\t return (a*b)/gcd(a, b); \n\t } \n\t public static boolean isPrime1(int n) {\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n for (int i = 2; i <= Math.sqrt(n) + 1; i++) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n public static boolean isPrime(int n) {\n if (n <= 1) {\n return false;\n }\n if (n == 2) {\n return true;\n }\n if (n % 2 == 0) {\n return false;\n }\n for (int i = 3; i <= Math.sqrt(n) + 1; i = i + 2) {\n if (n % i == 0) {\n return false;\n }\n }\n return true;\n }\n\t \n\t\n}",
"Main"
]
| //package hiougyf;
import java.io.*;
import java.util.*;
import java.util.Map.Entry;
public class Main{
public static void main(String[] args){
Scanner sc =new Scanner(System.in);
int hh=1000000007,t=sc.nextInt();
int ans=0,k=0;
while(t-->0) {
int a=sc.nextInt();
int b=sc.nextInt();
if(a==b) ans++;
else if(a!=b) ans=0;
if(ans>=3) {
System.out.println("Yes");
k=9;
break;
}
}
if(k!=9) System.out.println("No");
}
static double distance(long a,long b,long a1,long b1) {
//System.out.println(((a-a1)*(a-a1))+((b-b1)*(b-b1)));
double d1=Math.sqrt(((a-a1)*(a-a1))+((b-b1)*(b-b1)));
return d1;
}
public static int floorSqrt(int x)
{
// Base Cases
if (x == 0 || x == 1)
return x;
// Do Binary Search for floor(sqrt(x))
int start = 1, end = x, ans=0;
while (start <= end)
{
int mid = (start + end) / 2;
// If x is a perfect square
if (mid*mid == x)
return mid;
// Since we need floor, we update answer when mid*mid is
// smaller than x, and move closer to sqrt(x)
if (mid*mid < x)
{
start = mid + 1;
ans = mid;
}
else // If mid*mid is greater than x
end = mid-1;
}
return ans;
}
static int div(int n,int b) {
int g=-1;
for(int i=2;i<=Math.sqrt(n);i++) {
if(n%i==0&&i!=b) {
g=i;
break;
}
}
return g;
}
public static int gcd(int a, int b)
{
if (a == 0)
return b;
return gcd(b%a, a);
}
public static int lcm(int a, int b)
{
return (a*b)/gcd(a, b);
}
public static boolean isPrime1(int n) {
if (n <= 1) {
return false;
}
if (n == 2) {
return true;
}
for (int i = 2; i <= Math.sqrt(n) + 1; i++) {
if (n % i == 0) {
return false;
}
}
return true;
}
public static boolean isPrime(int n) {
if (n <= 1) {
return false;
}
if (n == 2) {
return true;
}
if (n % 2 == 0) {
return false;
}
for (int i = 3; i <= Math.sqrt(n) + 1; i = i + 2) {
if (n % i == 0) {
return false;
}
}
return true;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
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,
13,
17,
3,
14,
2,
13,
17,
4,
18,
13,
17,
23,
13,
23,
13,
12,
13,
30,
38,
30,
41,
13,
20,
41,
13,
20,
4,
18,
20,
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
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
104,
17
],
[
104,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
20,
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
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
67,
72
],
[
20,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
18,
81
],
[
81,
82
],
[
18,
83
],
[
83,
84
],
[
104,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
93,
95
],
[
89,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
96,
100
],
[
85,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
]
| [
"import java.io.PrintWriter;\nimport java.util.Arrays;\nimport java.util.HashSet;\nimport java.util.Scanner;\nimport java.util.Set;\n\npublic class Main {\n\n void solve(Scanner in, PrintWriter out) {\n int t = in.nextInt();\n int cpt = 0;\n\n for (int i = 0; i < t; ++i) {\n int a1 = in.nextInt();\n int b1 = in.nextInt();\n if (a1 == b1) {\n cpt++;\n } else {\n cpt = 0;\n }\n\n if (cpt == 3) {\n out.println(\"Yes\");\n break;\n }\n }\n if (cpt != 3)\n out.println(\"No\");\n }\n\n public static void main(String[] args) {\n try(Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out)) {\n new Main().solve(in, out);\n }\n }\n}",
"import java.io.PrintWriter;",
"PrintWriter",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.HashSet;",
"HashSet",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Set;",
"Set",
"java.util",
"public class Main {\n\n void solve(Scanner in, PrintWriter out) {\n int t = in.nextInt();\n int cpt = 0;\n\n for (int i = 0; i < t; ++i) {\n int a1 = in.nextInt();\n int b1 = in.nextInt();\n if (a1 == b1) {\n cpt++;\n } else {\n cpt = 0;\n }\n\n if (cpt == 3) {\n out.println(\"Yes\");\n break;\n }\n }\n if (cpt != 3)\n out.println(\"No\");\n }\n\n public static void main(String[] args) {\n try(Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out)) {\n new Main().solve(in, out);\n }\n }\n}",
"Main",
"void solve(Scanner in, PrintWriter out) {\n int t = in.nextInt();\n int cpt = 0;\n\n for (int i = 0; i < t; ++i) {\n int a1 = in.nextInt();\n int b1 = in.nextInt();\n if (a1 == b1) {\n cpt++;\n } else {\n cpt = 0;\n }\n\n if (cpt == 3) {\n out.println(\"Yes\");\n break;\n }\n }\n if (cpt != 3)\n out.println(\"No\");\n }",
"solve",
"{\n int t = in.nextInt();\n int cpt = 0;\n\n for (int i = 0; i < t; ++i) {\n int a1 = in.nextInt();\n int b1 = in.nextInt();\n if (a1 == b1) {\n cpt++;\n } else {\n cpt = 0;\n }\n\n if (cpt == 3) {\n out.println(\"Yes\");\n break;\n }\n }\n if (cpt != 3)\n out.println(\"No\");\n }",
"int t = in.nextInt();",
"t",
"in.nextInt()",
"in.nextInt",
"in",
"int cpt = 0;",
"cpt",
"0",
"for (int i = 0; i < t; ++i) {\n int a1 = in.nextInt();\n int b1 = in.nextInt();\n if (a1 == b1) {\n cpt++;\n } else {\n cpt = 0;\n }\n\n if (cpt == 3) {\n out.println(\"Yes\");\n break;\n }\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < t",
"i",
"t",
"++i",
"++i",
"i",
"{\n int a1 = in.nextInt();\n int b1 = in.nextInt();\n if (a1 == b1) {\n cpt++;\n } else {\n cpt = 0;\n }\n\n if (cpt == 3) {\n out.println(\"Yes\");\n break;\n }\n }",
"{\n int a1 = in.nextInt();\n int b1 = in.nextInt();\n if (a1 == b1) {\n cpt++;\n } else {\n cpt = 0;\n }\n\n if (cpt == 3) {\n out.println(\"Yes\");\n break;\n }\n }",
"int a1 = in.nextInt();",
"a1",
"in.nextInt()",
"in.nextInt",
"in",
"int b1 = in.nextInt();",
"b1",
"in.nextInt()",
"in.nextInt",
"in",
"if (a1 == b1) {\n cpt++;\n } else {\n cpt = 0;\n }",
"a1 == b1",
"a1",
"b1",
"{\n cpt++;\n }",
"cpt++",
"cpt",
"{\n cpt = 0;\n }",
"cpt = 0",
"cpt",
"0",
"if (cpt == 3) {\n out.println(\"Yes\");\n break;\n }",
"cpt == 3",
"cpt",
"3",
"{\n out.println(\"Yes\");\n break;\n }",
"out.println(\"Yes\")",
"out.println",
"out",
"\"Yes\"",
"break;",
"if (cpt != 3)\n out.println(\"No\");",
"cpt != 3",
"cpt",
"3",
"out.println(\"No\")",
"out.println",
"out",
"\"No\"",
"Scanner in",
"in",
"PrintWriter out",
"out",
"public static void main(String[] args) {\n try(Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out)) {\n new Main().solve(in, out);\n }\n }",
"main",
"{\n try(Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out)) {\n new Main().solve(in, out);\n }\n }",
"try(Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out)) {\n new Main().solve(in, out);\n }",
"{\n new Main().solve(in, out);\n }",
"Scanner in = new Scanner(System.in)",
"Scanner in = new Scanner(System.in)",
"new Scanner(System.in)",
"PrintWriter out = new PrintWriter(System.out)",
"PrintWriter out = new PrintWriter(System.out)",
"new PrintWriter(System.out)",
"new Main().solve(in, out)",
"new Main().solve",
"new Main()",
"in",
"out",
"String[] args",
"args",
"public class Main {\n\n void solve(Scanner in, PrintWriter out) {\n int t = in.nextInt();\n int cpt = 0;\n\n for (int i = 0; i < t; ++i) {\n int a1 = in.nextInt();\n int b1 = in.nextInt();\n if (a1 == b1) {\n cpt++;\n } else {\n cpt = 0;\n }\n\n if (cpt == 3) {\n out.println(\"Yes\");\n break;\n }\n }\n if (cpt != 3)\n out.println(\"No\");\n }\n\n public static void main(String[] args) {\n try(Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out)) {\n new Main().solve(in, out);\n }\n }\n}",
"public class Main {\n\n void solve(Scanner in, PrintWriter out) {\n int t = in.nextInt();\n int cpt = 0;\n\n for (int i = 0; i < t; ++i) {\n int a1 = in.nextInt();\n int b1 = in.nextInt();\n if (a1 == b1) {\n cpt++;\n } else {\n cpt = 0;\n }\n\n if (cpt == 3) {\n out.println(\"Yes\");\n break;\n }\n }\n if (cpt != 3)\n out.println(\"No\");\n }\n\n public static void main(String[] args) {\n try(Scanner in = new Scanner(System.in);\n PrintWriter out = new PrintWriter(System.out)) {\n new Main().solve(in, out);\n }\n }\n}",
"Main"
]
| import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;
public class Main {
void solve(Scanner in, PrintWriter out) {
int t = in.nextInt();
int cpt = 0;
for (int i = 0; i < t; ++i) {
int a1 = in.nextInt();
int b1 = in.nextInt();
if (a1 == b1) {
cpt++;
} else {
cpt = 0;
}
if (cpt == 3) {
out.println("Yes");
break;
}
}
if (cpt != 3)
out.println("No");
}
public static void main(String[] args) {
try(Scanner in = new Scanner(System.in);
PrintWriter out = new PrintWriter(System.out)) {
new Main().solve(in, out);
}
}
}
|
[
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,
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,
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
],
[
88,
8
],
[
88,
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
],
[
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
],
[
60,
62
],
[
49,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
11,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
67,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
9,
85
],
[
85,
86
],
[
0,
87
],
[
87,
88
],
[
87,
89
]
]
| [
"import java.util.*;\nimport java.io.*;\n\npublic class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n int flag = 0;\n for(int i=0;i<n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if(d1==d2){\n count++;\n if(count==3)flag=1;\n }else{\n count = 0;\n }\n }\n if(flag==1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n int flag = 0;\n for(int i=0;i<n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if(d1==d2){\n count++;\n if(count==3)flag=1;\n }else{\n count = 0;\n }\n }\n if(flag==1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main",
"public static void main(String[] args) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n int flag = 0;\n for(int i=0;i<n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if(d1==d2){\n count++;\n if(count==3)flag=1;\n }else{\n count = 0;\n }\n }\n if(flag==1){\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 count = 0;\n int flag = 0;\n for(int i=0;i<n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if(d1==d2){\n count++;\n if(count==3)flag=1;\n }else{\n count = 0;\n }\n }\n if(flag==1){\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 count = 0;",
"count",
"0",
"int flag = 0;",
"flag",
"0",
"for(int i=0;i<n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if(d1==d2){\n count++;\n if(count==3)flag=1;\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 if(d1==d2){\n count++;\n if(count==3)flag=1;\n }else{\n count = 0;\n }\n }",
"{\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if(d1==d2){\n count++;\n if(count==3)flag=1;\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)flag=1;\n }else{\n count = 0;\n }",
"d1==d2",
"d1",
"d2",
"{\n count++;\n if(count==3)flag=1;\n }",
"count++",
"count",
"if(count==3)flag=1;",
"count==3",
"count",
"3",
"flag=1",
"flag",
"1",
"{\n count = 0;\n }",
"count = 0",
"count",
"0",
"if(flag==1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }",
"flag==1",
"flag",
"1",
"{\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) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n int flag = 0;\n for(int i=0;i<n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if(d1==d2){\n count++;\n if(count==3)flag=1;\n }else{\n count = 0;\n }\n }\n if(flag==1){\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) throws Exception {\n Scanner sc = new Scanner(System.in);\n int n = sc.nextInt();\n int count = 0;\n int flag = 0;\n for(int i=0;i<n;i++){\n int d1 = sc.nextInt();\n int d2 = sc.nextInt();\n if(d1==d2){\n count++;\n if(count==3)flag=1;\n }else{\n count = 0;\n }\n }\n if(flag==1){\n System.out.println(\"Yes\");\n }else{\n System.out.println(\"No\");\n }\n }\n}",
"Main"
]
| import java.util.*;
import java.io.*;
public class Main {
public static void main(String[] args) throws Exception {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int count = 0;
int flag = 0;
for(int i=0;i<n;i++){
int d1 = sc.nextInt();
int d2 = sc.nextInt();
if(d1==d2){
count++;
if(count==3)flag=1;
}else{
count = 0;
}
}
if(flag==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,
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,
30,
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
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
87,
11
],
[
87,
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
],
[
56,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
63,
65
],
[
52,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
14,
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
],
[
12,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
]
| [
"/* package codechef; // 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 /* Name of the class has to be \"Main\" only if the class is public. */\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n /* Name of the class has to be \"Main\" only if the class is public. */\n\t Scanner syed=new Scanner(System.in);\n\t int looplim=syed.nextInt();\n\t boolean hua=false; \n\t int count=0;\n\t for(int iter=0;iter<looplim;iter++)\n\t {\n\t int a=syed.nextInt();\n\t int b=syed.nextInt();\n\t if(a==b){count++;\n\t if(count>=3) hua=true;}\n\t else {count=0;}\n\t \n\t \n\t }\n\t if (hua)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"public class Main\n{\n /* Name of the class has to be \"Main\" only if the class is public. */\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n /* Name of the class has to be \"Main\" only if the class is public. */\n\t Scanner syed=new Scanner(System.in);\n\t int looplim=syed.nextInt();\n\t boolean hua=false; \n\t int count=0;\n\t for(int iter=0;iter<looplim;iter++)\n\t {\n\t int a=syed.nextInt();\n\t int b=syed.nextInt();\n\t if(a==b){count++;\n\t if(count>=3) hua=true;}\n\t else {count=0;}\n\t \n\t \n\t }\n\t if (hua)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t}\n}",
"Main",
"/* Name of the class has to be \"Main\" only if the class is public. */\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n /* Name of the class has to be \"Main\" only if the class is public. */\n\t Scanner syed=new Scanner(System.in);\n\t int looplim=syed.nextInt();\n\t boolean hua=false; \n\t int count=0;\n\t for(int iter=0;iter<looplim;iter++)\n\t {\n\t int a=syed.nextInt();\n\t int b=syed.nextInt();\n\t if(a==b){count++;\n\t if(count>=3) hua=true;}\n\t else {count=0;}\n\t \n\t \n\t }\n\t if (hua)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t}",
"main",
"{\n /* Name of the class has to be \"Main\" only if the class is public. */\n\t Scanner syed=new Scanner(System.in);\n\t int looplim=syed.nextInt();\n\t boolean hua=false; \n\t int count=0;\n\t for(int iter=0;iter<looplim;iter++)\n\t {\n\t int a=syed.nextInt();\n\t int b=syed.nextInt();\n\t if(a==b){count++;\n\t if(count>=3) hua=true;}\n\t else {count=0;}\n\t \n\t \n\t }\n\t if (hua)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t}",
"Scanner syed=new Scanner(System.in);",
"syed",
"new Scanner(System.in)",
"int looplim=syed.nextInt();",
"looplim",
"syed.nextInt()",
"syed.nextInt",
"syed",
"boolean hua=false;",
"hua",
"false",
"int count=0;",
"count",
"0",
"for(int iter=0;iter<looplim;iter++)\n\t {\n\t int a=syed.nextInt();\n\t int b=syed.nextInt();\n\t if(a==b){count++;\n\t if(count>=3) hua=true;}\n\t else {count=0;}\n\t \n\t \n\t }",
"int iter=0;",
"int iter=0;",
"iter",
"0",
"iter<looplim",
"iter",
"looplim",
"iter++",
"iter++",
"iter",
"{\n\t int a=syed.nextInt();\n\t int b=syed.nextInt();\n\t if(a==b){count++;\n\t if(count>=3) hua=true;}\n\t else {count=0;}\n\t \n\t \n\t }",
"{\n\t int a=syed.nextInt();\n\t int b=syed.nextInt();\n\t if(a==b){count++;\n\t if(count>=3) hua=true;}\n\t else {count=0;}\n\t \n\t \n\t }",
"int a=syed.nextInt();",
"a",
"syed.nextInt()",
"syed.nextInt",
"syed",
"int b=syed.nextInt();",
"b",
"syed.nextInt()",
"syed.nextInt",
"syed",
"if(a==b){count++;\n\t if(count>=3) hua=true;}\n\t else {count=0;}",
"a==b",
"a",
"b",
"{count++;\n\t if(count>=3) hua=true;}",
"count++",
"count",
"if(count>=3) hua=true;",
"count>=3",
"count",
"3",
"hua=true",
"hua",
"true",
"{count=0;}",
"count=0",
"count",
"0",
"if (hua)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");",
"hua",
"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 /* Name of the class has to be \"Main\" only if the class is public. */\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n /* Name of the class has to be \"Main\" only if the class is public. */\n\t Scanner syed=new Scanner(System.in);\n\t int looplim=syed.nextInt();\n\t boolean hua=false; \n\t int count=0;\n\t for(int iter=0;iter<looplim;iter++)\n\t {\n\t int a=syed.nextInt();\n\t int b=syed.nextInt();\n\t if(a==b){count++;\n\t if(count>=3) hua=true;}\n\t else {count=0;}\n\t \n\t \n\t }\n\t if (hua)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t}\n}",
"public class Main\n{\n /* Name of the class has to be \"Main\" only if the class is public. */\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n /* Name of the class has to be \"Main\" only if the class is public. */\n\t Scanner syed=new Scanner(System.in);\n\t int looplim=syed.nextInt();\n\t boolean hua=false; \n\t int count=0;\n\t for(int iter=0;iter<looplim;iter++)\n\t {\n\t int a=syed.nextInt();\n\t int b=syed.nextInt();\n\t if(a==b){count++;\n\t if(count>=3) hua=true;}\n\t else {count=0;}\n\t \n\t \n\t }\n\t if (hua)\n\t System.out.println(\"Yes\");\n\t else\n\t System.out.println(\"No\");\n\t \n\t}\n}",
"Main"
]
| /* package codechef; // 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
{
/* Name of the class has to be "Main" only if the class is public. */
public static void main (String[] args) throws java.lang.Exception
{
/* Name of the class has to be "Main" only if the class is public. */
Scanner syed=new Scanner(System.in);
int looplim=syed.nextInt();
boolean hua=false;
int count=0;
for(int iter=0;iter<looplim;iter++)
{
int a=syed.nextInt();
int b=syed.nextInt();
if(a==b){count++;
if(count>=3) hua=true;}
else {count=0;}
}
if (hua)
System.out.println("Yes");
else
System.out.println("No");
}
} |
[
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,
0,
18,
13,
13,
20,
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,
13,
18,
18,
13,
13,
13,
2,
18,
18,
13,
2,
13,
17,
13,
18,
18,
13,
2,
13,
17,
13,
2,
18,
18,
13,
2,
13,
17,
13,
18,
18,
13,
2,
13,
17,
13,
30,
0,
13,
17,
3,
14,
40,
13,
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,
13,
0,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
20,
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,
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,
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
],
[
240,
14
],
[
240,
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
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
17,
48
],
[
48,
49
],
[
48,
50
],
[
17,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
51,
61
],
[
61,
62
],
[
62,
63
],
[
51,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
68,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
81,
87
],
[
80,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
88,
94
],
[
68,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
96,
102
],
[
95,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
106,
108
],
[
103,
109
],
[
66,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
17,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
118,
123
],
[
115,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
15,
130
],
[
130,
131
],
[
240,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
132,
136
],
[
136,
137
],
[
132,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
140,
144
],
[
144,
145
],
[
144,
146
],
[
138,
147
],
[
147,
148
],
[
138,
149
],
[
149,
150
],
[
240,
151
],
[
151,
152
],
[
151,
153
],
[
153,
154
],
[
151,
155
],
[
155,
156
],
[
151,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
151,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
167,
170
],
[
170,
171
],
[
151,
172
],
[
172,
173
],
[
172,
174
],
[
174,
175
],
[
175,
176
],
[
176,
177
],
[
177,
178
],
[
176,
179
],
[
179,
180
],
[
151,
181
],
[
181,
182
],
[
181,
183
],
[
183,
184
],
[
184,
185
],
[
185,
186
],
[
186,
187
],
[
185,
188
],
[
188,
189
],
[
151,
190
],
[
190,
191
],
[
190,
192
],
[
192,
193
],
[
193,
194
],
[
194,
195
],
[
195,
196
],
[
195,
197
],
[
194,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
193,
202
],
[
202,
203
],
[
203,
204
],
[
204,
205
],
[
204,
206
],
[
206,
207
],
[
207,
208
],
[
208,
209
],
[
203,
210
],
[
210,
211
],
[
211,
212
],
[
211,
213
],
[
192,
214
],
[
214,
215
],
[
215,
216
],
[
216,
217
],
[
151,
218
],
[
218,
219
],
[
218,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
220,
224
],
[
224,
225
],
[
225,
226
],
[
225,
227
],
[
227,
228
],
[
228,
229
],
[
229,
230
],
[
224,
231
],
[
231,
232
],
[
232,
233
],
[
232,
234
],
[
234,
235
],
[
235,
236
],
[
220,
237
],
[
237,
238
],
[
0,
239
],
[
239,
240
],
[
239,
241
]
]
| [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\npublic class Main\n{\n public static void main(String[] args)\n {\n CP sc =new CP();\n int n = sc.nextInt();\n Pair[] p = new Pair[n];\n for(int i=0;i<n;i++){\n p[i] = new Pair(sc.nextInt(), sc.nextInt());\n }\n boolean flag = true;\n for(int i=0;i<n-2;i++){\n if(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){\n flag = false;\n break;\n }\n }\n if(!flag)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n static class Pair{\n int x,y;\n Pair(int a, int b){\n x=a;\n y=b;\n }\n }\n /*****************************************************************************/\n static class CP\n {\n BufferedReader bufferedReader;\n StringTokenizer stringTokenizer;\n public CP() {\n bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n }\n int nextInt() {\n return Integer.parseInt(NNNN());\n }\n long nextLong() {\n return Long.parseLong(NNNN());\n }\n double nextDouble() {\n return Double.parseDouble(NNNN());\n }\n String NNNN() {\n while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {\n try {\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n return stringTokenizer.nextToken();\n }\n String nextLine() {\n String spl = \"\";\n try {\n spl = bufferedReader.readLine();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return spl;\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.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main\n{\n public static void main(String[] args)\n {\n CP sc =new CP();\n int n = sc.nextInt();\n Pair[] p = new Pair[n];\n for(int i=0;i<n;i++){\n p[i] = new Pair(sc.nextInt(), sc.nextInt());\n }\n boolean flag = true;\n for(int i=0;i<n-2;i++){\n if(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){\n flag = false;\n break;\n }\n }\n if(!flag)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n static class Pair{\n int x,y;\n Pair(int a, int b){\n x=a;\n y=b;\n }\n }\n /*****************************************************************************/\n static class CP\n {\n BufferedReader bufferedReader;\n StringTokenizer stringTokenizer;\n public CP() {\n bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n }\n int nextInt() {\n return Integer.parseInt(NNNN());\n }\n long nextLong() {\n return Long.parseLong(NNNN());\n }\n double nextDouble() {\n return Double.parseDouble(NNNN());\n }\n String NNNN() {\n while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {\n try {\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n return stringTokenizer.nextToken();\n }\n String nextLine() {\n String spl = \"\";\n try {\n spl = bufferedReader.readLine();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return spl;\n }\n }\n /*****************************************************************************/\n}",
"Main",
"public static void main(String[] args)\n {\n CP sc =new CP();\n int n = sc.nextInt();\n Pair[] p = new Pair[n];\n for(int i=0;i<n;i++){\n p[i] = new Pair(sc.nextInt(), sc.nextInt());\n }\n boolean flag = true;\n for(int i=0;i<n-2;i++){\n if(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){\n flag = false;\n break;\n }\n }\n if(!flag)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"main",
"{\n CP sc =new CP();\n int n = sc.nextInt();\n Pair[] p = new Pair[n];\n for(int i=0;i<n;i++){\n p[i] = new Pair(sc.nextInt(), sc.nextInt());\n }\n boolean flag = true;\n for(int i=0;i<n-2;i++){\n if(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){\n flag = false;\n break;\n }\n }\n if(!flag)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }",
"CP sc =new CP();",
"sc",
"new CP()",
"int n = sc.nextInt();",
"n",
"sc.nextInt()",
"sc.nextInt",
"sc",
"Pair[] p = new Pair[n];",
"p",
"new Pair[n]",
"n",
"for(int i=0;i<n;i++){\n p[i] = new Pair(sc.nextInt(), sc.nextInt());\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<n",
"i",
"n",
"i++",
"i++",
"i",
"{\n p[i] = new Pair(sc.nextInt(), sc.nextInt());\n }",
"{\n p[i] = new Pair(sc.nextInt(), sc.nextInt());\n }",
"p[i] = new Pair(sc.nextInt(), sc.nextInt())",
"p[i]",
"p",
"i",
"new Pair(sc.nextInt(), sc.nextInt())",
"boolean flag = true;",
"flag",
"true",
"for(int i=0;i<n-2;i++){\n if(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){\n flag = false;\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(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){\n flag = false;\n break;\n }\n }",
"{\n if(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){\n flag = false;\n break;\n }\n }",
"if(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){\n flag = false;\n break;\n }",
"p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y",
"p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y",
"p[i].x==p[i].y",
"p[i].x",
"p[i]",
"p",
"i",
"p[i].x",
"p[i].y",
"p[i]",
"p",
"i",
"p[i].y",
"p[i+1].x==p[i+1].y",
"p[i+1].x",
"p[i+1]",
"p",
"i+1",
"i",
"1",
"p[i+1].x",
"p[i+1].y",
"p[i+1]",
"p",
"i+1",
"i",
"1",
"p[i+1].y",
"p[i+2].x==p[i+2].y",
"p[i+2].x",
"p[i+2]",
"p",
"i+2",
"i",
"2",
"p[i+2].x",
"p[i+2].y",
"p[i+2]",
"p",
"i+2",
"i",
"2",
"p[i+2].y",
"{\n flag = false;\n break;\n }",
"flag = false",
"flag",
"false",
"break;",
"if(!flag)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");",
"!flag",
"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",
"static class Pair{\n int x,y;\n Pair(int a, int b){\n x=a;\n y=b;\n }\n }",
"Pair",
"int x",
"x",
"y;",
"y",
"Pair(int a, int b){\n x=a;\n y=b;\n }",
"Pair",
"{\n x=a;\n y=b;\n }",
"x=a",
"x",
"a",
"y=b",
"y",
"b",
"int a",
"a",
"int b",
"b",
"static class CP\n {\n BufferedReader bufferedReader;\n StringTokenizer stringTokenizer;\n public CP() {\n bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n }\n int nextInt() {\n return Integer.parseInt(NNNN());\n }\n long nextLong() {\n return Long.parseLong(NNNN());\n }\n double nextDouble() {\n return Double.parseDouble(NNNN());\n }\n String NNNN() {\n while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {\n try {\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n return stringTokenizer.nextToken();\n }\n String nextLine() {\n String spl = \"\";\n try {\n spl = bufferedReader.readLine();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return spl;\n }\n }",
"CP",
"BufferedReader bufferedReader;",
"bufferedReader",
"StringTokenizer stringTokenizer;",
"stringTokenizer",
"public CP() {\n bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n }",
"CP",
"{\n bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n }",
"bufferedReader = new BufferedReader(new InputStreamReader(System.in))",
"bufferedReader",
"new BufferedReader(new InputStreamReader(System.in))",
"int nextInt() {\n return Integer.parseInt(NNNN());\n }",
"nextInt",
"{\n return Integer.parseInt(NNNN());\n }",
"return Integer.parseInt(NNNN());",
"Integer.parseInt(NNNN())",
"Integer.parseInt",
"Integer",
"NNNN()",
"NNNN",
"long nextLong() {\n return Long.parseLong(NNNN());\n }",
"nextLong",
"{\n return Long.parseLong(NNNN());\n }",
"return Long.parseLong(NNNN());",
"Long.parseLong(NNNN())",
"Long.parseLong",
"Long",
"NNNN()",
"NNNN",
"double nextDouble() {\n return Double.parseDouble(NNNN());\n }",
"nextDouble",
"{\n return Double.parseDouble(NNNN());\n }",
"return Double.parseDouble(NNNN());",
"Double.parseDouble(NNNN())",
"Double.parseDouble",
"Double",
"NNNN()",
"NNNN",
"String NNNN() {\n while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {\n try {\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n return stringTokenizer.nextToken();\n }",
"NNNN",
"{\n while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {\n try {\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n return stringTokenizer.nextToken();\n }",
"while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {\n try {\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }",
"stringTokenizer == null || !stringTokenizer.hasMoreElements()",
"stringTokenizer == null",
"stringTokenizer",
"null",
"!stringTokenizer.hasMoreElements()",
"stringTokenizer.hasMoreElements()",
"stringTokenizer.hasMoreElements",
"stringTokenizer",
"{\n try {\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }",
"try {\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }\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 stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }",
"stringTokenizer = new StringTokenizer(bufferedReader.readLine())",
"stringTokenizer",
"new StringTokenizer(bufferedReader.readLine())",
"return stringTokenizer.nextToken();",
"stringTokenizer.nextToken()",
"stringTokenizer.nextToken",
"stringTokenizer",
"String nextLine() {\n String spl = \"\";\n try {\n spl = bufferedReader.readLine();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return spl;\n }",
"nextLine",
"{\n String spl = \"\";\n try {\n spl = bufferedReader.readLine();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return spl;\n }",
"String spl = \"\";",
"spl",
"\"\"",
"try {\n spl = bufferedReader.readLine();\n }\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 spl = bufferedReader.readLine();\n }",
"spl = bufferedReader.readLine()",
"spl",
"bufferedReader.readLine()",
"bufferedReader.readLine",
"bufferedReader",
"return spl;",
"spl",
"public class Main\n{\n public static void main(String[] args)\n {\n CP sc =new CP();\n int n = sc.nextInt();\n Pair[] p = new Pair[n];\n for(int i=0;i<n;i++){\n p[i] = new Pair(sc.nextInt(), sc.nextInt());\n }\n boolean flag = true;\n for(int i=0;i<n-2;i++){\n if(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){\n flag = false;\n break;\n }\n }\n if(!flag)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n static class Pair{\n int x,y;\n Pair(int a, int b){\n x=a;\n y=b;\n }\n }\n /*****************************************************************************/\n static class CP\n {\n BufferedReader bufferedReader;\n StringTokenizer stringTokenizer;\n public CP() {\n bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n }\n int nextInt() {\n return Integer.parseInt(NNNN());\n }\n long nextLong() {\n return Long.parseLong(NNNN());\n }\n double nextDouble() {\n return Double.parseDouble(NNNN());\n }\n String NNNN() {\n while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {\n try {\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n return stringTokenizer.nextToken();\n }\n String nextLine() {\n String spl = \"\";\n try {\n spl = bufferedReader.readLine();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return spl;\n }\n }\n /*****************************************************************************/\n}",
"public class Main\n{\n public static void main(String[] args)\n {\n CP sc =new CP();\n int n = sc.nextInt();\n Pair[] p = new Pair[n];\n for(int i=0;i<n;i++){\n p[i] = new Pair(sc.nextInt(), sc.nextInt());\n }\n boolean flag = true;\n for(int i=0;i<n-2;i++){\n if(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){\n flag = false;\n break;\n }\n }\n if(!flag)\n System.out.println(\"Yes\");\n else\n System.out.println(\"No\");\n }\n static class Pair{\n int x,y;\n Pair(int a, int b){\n x=a;\n y=b;\n }\n }\n /*****************************************************************************/\n static class CP\n {\n BufferedReader bufferedReader;\n StringTokenizer stringTokenizer;\n public CP() {\n bufferedReader = new BufferedReader(new InputStreamReader(System.in));\n }\n int nextInt() {\n return Integer.parseInt(NNNN());\n }\n long nextLong() {\n return Long.parseLong(NNNN());\n }\n double nextDouble() {\n return Double.parseDouble(NNNN());\n }\n String NNNN() {\n while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {\n try {\n stringTokenizer = new StringTokenizer(bufferedReader.readLine());\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n }\n return stringTokenizer.nextToken();\n }\n String nextLine() {\n String spl = \"\";\n try {\n spl = bufferedReader.readLine();\n }\n catch (IOException e) {\n e.printStackTrace();\n }\n return spl;\n }\n }\n /*****************************************************************************/\n}",
"Main"
]
| import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main
{
public static void main(String[] args)
{
CP sc =new CP();
int n = sc.nextInt();
Pair[] p = new Pair[n];
for(int i=0;i<n;i++){
p[i] = new Pair(sc.nextInt(), sc.nextInt());
}
boolean flag = true;
for(int i=0;i<n-2;i++){
if(p[i].x==p[i].y && p[i+1].x==p[i+1].y && p[i+2].x==p[i+2].y){
flag = false;
break;
}
}
if(!flag)
System.out.println("Yes");
else
System.out.println("No");
}
static class Pair{
int x,y;
Pair(int a, int b){
x=a;
y=b;
}
}
/*****************************************************************************/
static class CP
{
BufferedReader bufferedReader;
StringTokenizer stringTokenizer;
public CP() {
bufferedReader = new BufferedReader(new InputStreamReader(System.in));
}
int nextInt() {
return Integer.parseInt(NNNN());
}
long nextLong() {
return Long.parseLong(NNNN());
}
double nextDouble() {
return Double.parseDouble(NNNN());
}
String NNNN() {
while (stringTokenizer == null || !stringTokenizer.hasMoreElements()) {
try {
stringTokenizer = new StringTokenizer(bufferedReader.readLine());
}
catch (IOException e) {
e.printStackTrace();
}
}
return stringTokenizer.nextToken();
}
String nextLine() {
String spl = "";
try {
spl = bufferedReader.readLine();
}
catch (IOException e) {
e.printStackTrace();
}
return spl;
}
}
/*****************************************************************************/
} |
[
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,
0,
13,
2,
13,
17,
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,
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
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
46,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
35,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
8,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
68,
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\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tboolean judge = 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\tcount = count + 1;\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\tjudge = true;\n\t\t\t}\n\t\t}\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\t}\n\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 count = 0;\n\t\tboolean judge = 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\tcount = count + 1;\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\tjudge = true;\n\t\t\t}\n\t\t}\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\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\tint count = 0;\n\t\tboolean judge = 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\tcount = count + 1;\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\tjudge = true;\n\t\t\t}\n\t\t}\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\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tboolean judge = 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\tcount = count + 1;\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\tjudge = true;\n\t\t\t}\n\t\t}\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\t}",
"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 judge = false;",
"judge",
"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\tcount = count + 1;\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\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 d1 = sc.nextInt();\n\t\t\tint d2 = sc.nextInt();\n\t\t\tif (d1 == d2) {\n\t\t\t\tcount = count + 1;\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\tjudge = true;\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\tcount = count + 1;\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\tjudge = true;\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\tcount = count + 1;\n\t\t\t} else {\n\t\t\t\tcount = 0;\n\t\t\t}",
"d1 == d2",
"d1",
"d2",
"{\n\t\t\t\tcount = count + 1;\n\t\t\t}",
"count = count + 1",
"count",
"count + 1",
"count",
"1",
"{\n\t\t\t\tcount = 0;\n\t\t\t}",
"count = 0",
"count",
"0",
"if (count == 3) {\n\t\t\t\tjudge = true;\n\t\t\t}",
"count == 3",
"count",
"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\"",
"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 count = 0;\n\t\tboolean judge = 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\tcount = count + 1;\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\tjudge = true;\n\t\t\t}\n\t\t}\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\t}\n\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 count = 0;\n\t\tboolean judge = 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\tcount = count + 1;\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\tjudge = true;\n\t\t\t}\n\t\t}\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\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 count = 0;
boolean judge = false;
for (int i = 0; i < n; i++) {
int d1 = sc.nextInt();
int d2 = sc.nextInt();
if (d1 == d2) {
count = count + 1;
} else {
count = 0;
}
if (count == 3) {
judge = true;
}
}
if (judge) {
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,
20,
11,
1,
41,
13,
17,
2,
13,
2,
13,
17,
1,
40,
13,
30,
30,
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,
4,
18,
13,
2,
17,
13,
4,
18,
13,
2,
2,
17,
13,
17,
30,
40,
13,
30,
0,
13,
17,
14,
2,
13,
17,
30,
0,
13,
17,
3,
14,
13,
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
],
[
114,
8
],
[
114,
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
],
[
30,
31
],
[
30,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
23,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
11,
44
],
[
44,
45
],
[
44,
46
],
[
11,
47
],
[
47,
48
],
[
47,
49
],
[
11,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
50,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
68,
70
],
[
64,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
63,
79
],
[
79,
80
],
[
80,
81
],
[
63,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
62,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
11,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
95,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
105,
110
],
[
9,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
]
| [
"import java.util.ArrayList;\nimport java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tArrayList<Integer> D = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < N * 2; i ++) {\n\t\t\tD.add(stdIn.nextInt());\n\t\t}\n\t\t\n\t\tint keepCnt = 0;\n\t\tboolean ans = false;\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tif(D.get(2 * i) == D.get(2 * i + 1)) {\n\t\t\t\tkeepCnt ++;\n\t\t\t}else {\n\t\t\t\tkeepCnt = 0;\n\t\t\t}\n\t\t\tif(keepCnt == 3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans){\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.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tArrayList<Integer> D = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < N * 2; i ++) {\n\t\t\tD.add(stdIn.nextInt());\n\t\t}\n\t\t\n\t\tint keepCnt = 0;\n\t\tboolean ans = false;\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tif(D.get(2 * i) == D.get(2 * i + 1)) {\n\t\t\t\tkeepCnt ++;\n\t\t\t}else {\n\t\t\t\tkeepCnt = 0;\n\t\t\t}\n\t\t\tif(keepCnt == 3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans){\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\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tArrayList<Integer> D = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < N * 2; i ++) {\n\t\t\tD.add(stdIn.nextInt());\n\t\t}\n\t\t\n\t\tint keepCnt = 0;\n\t\tboolean ans = false;\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tif(D.get(2 * i) == D.get(2 * i + 1)) {\n\t\t\t\tkeepCnt ++;\n\t\t\t}else {\n\t\t\t\tkeepCnt = 0;\n\t\t\t}\n\t\t\tif(keepCnt == 3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans){\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\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tArrayList<Integer> D = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < N * 2; i ++) {\n\t\t\tD.add(stdIn.nextInt());\n\t\t}\n\t\t\n\t\tint keepCnt = 0;\n\t\tboolean ans = false;\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tif(D.get(2 * i) == D.get(2 * i + 1)) {\n\t\t\t\tkeepCnt ++;\n\t\t\t}else {\n\t\t\t\tkeepCnt = 0;\n\t\t\t}\n\t\t\tif(keepCnt == 3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}\n\t}",
"Scanner stdIn = new Scanner(System.in);",
"stdIn",
"new Scanner(System.in)",
"int N = stdIn.nextInt();",
"N",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"ArrayList<Integer> D = new ArrayList<Integer>();",
"D",
"new ArrayList<Integer>()",
"for(int i = 0; i < N * 2; i ++) {\n\t\t\tD.add(stdIn.nextInt());\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\tD.add(stdIn.nextInt());\n\t\t}",
"{\n\t\t\tD.add(stdIn.nextInt());\n\t\t}",
"D.add(stdIn.nextInt())",
"D.add",
"D",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"int keepCnt = 0;",
"keepCnt",
"0",
"boolean ans = false;",
"ans",
"false",
"for(int i = 0; i < N; i ++) {\n\t\t\tif(D.get(2 * i) == D.get(2 * i + 1)) {\n\t\t\t\tkeepCnt ++;\n\t\t\t}else {\n\t\t\t\tkeepCnt = 0;\n\t\t\t}\n\t\t\tif(keepCnt == 3) {\n\t\t\t\tans = true;\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\tif(D.get(2 * i) == D.get(2 * i + 1)) {\n\t\t\t\tkeepCnt ++;\n\t\t\t}else {\n\t\t\t\tkeepCnt = 0;\n\t\t\t}\n\t\t\tif(keepCnt == 3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(D.get(2 * i) == D.get(2 * i + 1)) {\n\t\t\t\tkeepCnt ++;\n\t\t\t}else {\n\t\t\t\tkeepCnt = 0;\n\t\t\t}\n\t\t\tif(keepCnt == 3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"if(D.get(2 * i) == D.get(2 * i + 1)) {\n\t\t\t\tkeepCnt ++;\n\t\t\t}else {\n\t\t\t\tkeepCnt = 0;\n\t\t\t}",
"D.get(2 * i) == D.get(2 * i + 1)",
"D.get(2 * i)",
"D.get",
"D",
"2 * i",
"2",
"i",
"D.get(2 * i + 1)",
"D.get",
"D",
"2 * i + 1",
"2 * i",
"2",
"i",
"1",
"{\n\t\t\t\tkeepCnt ++;\n\t\t\t}",
"keepCnt ++",
"keepCnt",
"{\n\t\t\t\tkeepCnt = 0;\n\t\t\t}",
"keepCnt = 0",
"keepCnt",
"0",
"if(keepCnt == 3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}",
"keepCnt == 3",
"keepCnt",
"3",
"{\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}",
"ans = true",
"ans",
"true",
"break;",
"if(ans){\n\t\t\tSystem.out.println(\"Yes\");\n\t\t}else {\n\t\t\tSystem.out.println(\"No\");\n\t\t}",
"ans",
"{\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\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tArrayList<Integer> D = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < N * 2; i ++) {\n\t\t\tD.add(stdIn.nextInt());\n\t\t}\n\t\t\n\t\tint keepCnt = 0;\n\t\tboolean ans = false;\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tif(D.get(2 * i) == D.get(2 * i + 1)) {\n\t\t\t\tkeepCnt ++;\n\t\t\t}else {\n\t\t\t\tkeepCnt = 0;\n\t\t\t}\n\t\t\tif(keepCnt == 3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans){\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\t\tScanner stdIn = new Scanner(System.in);\n\t\tint N = stdIn.nextInt();\n\t\tArrayList<Integer> D = new ArrayList<Integer>();\n\t\tfor(int i = 0; i < N * 2; i ++) {\n\t\t\tD.add(stdIn.nextInt());\n\t\t}\n\t\t\n\t\tint keepCnt = 0;\n\t\tboolean ans = false;\n\t\tfor(int i = 0; i < N; i ++) {\n\t\t\tif(D.get(2 * i) == D.get(2 * i + 1)) {\n\t\t\t\tkeepCnt ++;\n\t\t\t}else {\n\t\t\t\tkeepCnt = 0;\n\t\t\t}\n\t\t\tif(keepCnt == 3) {\n\t\t\t\tans = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(ans){\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.ArrayList;
import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner stdIn = new Scanner(System.in);
int N = stdIn.nextInt();
ArrayList<Integer> D = new ArrayList<Integer>();
for(int i = 0; i < N * 2; i ++) {
D.add(stdIn.nextInt());
}
int keepCnt = 0;
boolean ans = false;
for(int i = 0; i < N; i ++) {
if(D.get(2 * i) == D.get(2 * i + 1)) {
keepCnt ++;
}else {
keepCnt = 0;
}
if(keepCnt == 3) {
ans = true;
break;
}
}
if(ans){
System.out.println("Yes");
}else {
System.out.println("No");
}
}
} |
[
7,
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,
17,
42,
2,
40,
13,
17,
30,
4,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
41,
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,
30,
40,
13,
0,
13,
17,
0,
13,
4,
18,
13,
13,
13,
14,
2,
13,
17,
4,
18,
13,
17,
4,
18,
13,
17,
23,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
4,
18,
18,
13,
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,
38,
5,
13,
30,
4,
18,
13,
30,
29,
4,
18,
13,
29,
17,
23,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
206,
14
],
[
206,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
24,
26
],
[
17,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
27,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
33,
36
],
[
17,
37
],
[
37,
38
],
[
38,
39
],
[
15,
40
],
[
40,
41
],
[
206,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
44,
50
],
[
50,
51
],
[
50,
52
],
[
44,
53
],
[
53,
54
],
[
53,
55
],
[
44,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
56,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
61,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
77,
78
],
[
72,
79
],
[
79,
80
],
[
79,
81
],
[
61,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
84,
87
],
[
84,
88
],
[
44,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
89,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
42,
101
],
[
101,
102
],
[
42,
103
],
[
103,
104
],
[
206,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
108,
113
],
[
107,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
105,
124
],
[
124,
125
],
[
105,
126
],
[
126,
127
],
[
206,
128
],
[
128,
129
],
[
128,
130
],
[
130,
131
],
[
130,
132
],
[
128,
133
],
[
133,
134
],
[
133,
135
],
[
128,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
142,
143
],
[
139,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
148,
149
],
[
149,
150
],
[
144,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
138,
155
],
[
155,
156
],
[
156,
157
],
[
157,
158
],
[
128,
159
],
[
159,
160
],
[
159,
161
],
[
161,
162
],
[
162,
163
],
[
163,
164
],
[
163,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
162,
169
],
[
169,
170
],
[
170,
171
],
[
171,
172
],
[
172,
173
],
[
161,
174
],
[
174,
175
],
[
159,
176
],
[
176,
177
],
[
128,
178
],
[
178,
179
],
[
178,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
182,
185
],
[
185,
186
],
[
128,
187
],
[
187,
188
],
[
187,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
191,
194
],
[
194,
195
],
[
128,
196
],
[
196,
197
],
[
196,
198
],
[
198,
199
],
[
199,
200
],
[
200,
201
],
[
201,
202
],
[
200,
203
],
[
203,
204
],
[
0,
205
],
[
205,
206
],
[
205,
207
]
]
| [
"import java.io.*;\nimport java.math.*;\nimport java.util.*;\nimport java.lang.*;\n\n// import java.text.DecimalFormat; \n// import java.text.DecimalFormatSymbols; \n/*\n \n \n \n */\n\npublic class Main {\n\n public static void main(String args[] ) throws Exception {\n PrintWriter pw=new PrintWriter(System.out);\n FastScanner sc = new FastScanner();\n \n int t=1;\n //t = sc.ni();\n while(t-->0) {\n \tsolve(pw,sc);\n }\n \n pw.close();\n }\n \n private static void solve(PrintWriter pw, FastScanner sc) {\n \tint n = sc.ni();\n \tint co = 0;\n \tint max= 0;\n \twhile(n-->0){\n \t\tint d1 = sc.ni(),d2 = sc.ni();\n \t\tif(d1==d2) {\n \t\t\tco++;\n \t\t} else \n \t\t\tco=0;\n \t\tmax = Math.max(max, co);\n \t}\n \tif(max>=3)\n \t\tpw.print(\"Yes\");\n \telse \n \t\tpw.print(\"No\");\n \t\n\t}\n \n\n\tstatic <T> void deb(T x,int o){\n System.out.print(x);\n if(o==0) {\n \t System.out.println();\n \t \n }\n }\n \n \n static class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\t\n\t\tpublic String ne() {\n\t\t\twhile (!st.hasMoreElements())\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\tpublic String ne(int k) {\n\t\t\ttry {\n\t\t\t\treturn br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn \"Not able to read\";\n\t\t}\n\t\t\n\t\tint ni() {\n\t\t\treturn Integer.parseInt(ne());\n\t\t}\n\t\t\n\t\tlong nl() {\n\t\t\treturn Long.parseLong(ne());\n\t\t}\n\t\t\n\t\tdouble nd() {\n\t\t\treturn Double.parseDouble(ne());\n\t\t}\n\t\t\n\t \n\t}\n \n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"public class Main {\n\n public static void main(String args[] ) throws Exception {\n PrintWriter pw=new PrintWriter(System.out);\n FastScanner sc = new FastScanner();\n \n int t=1;\n //t = sc.ni();\n while(t-->0) {\n \tsolve(pw,sc);\n }\n \n pw.close();\n }\n \n private static void solve(PrintWriter pw, FastScanner sc) {\n \tint n = sc.ni();\n \tint co = 0;\n \tint max= 0;\n \twhile(n-->0){\n \t\tint d1 = sc.ni(),d2 = sc.ni();\n \t\tif(d1==d2) {\n \t\t\tco++;\n \t\t} else \n \t\t\tco=0;\n \t\tmax = Math.max(max, co);\n \t}\n \tif(max>=3)\n \t\tpw.print(\"Yes\");\n \telse \n \t\tpw.print(\"No\");\n \t\n\t}\n \n\n\tstatic <T> void deb(T x,int o){\n System.out.print(x);\n if(o==0) {\n \t System.out.println();\n \t \n }\n }\n \n \n static class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\t\n\t\tpublic String ne() {\n\t\t\twhile (!st.hasMoreElements())\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\tpublic String ne(int k) {\n\t\t\ttry {\n\t\t\t\treturn br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn \"Not able to read\";\n\t\t}\n\t\t\n\t\tint ni() {\n\t\t\treturn Integer.parseInt(ne());\n\t\t}\n\t\t\n\t\tlong nl() {\n\t\t\treturn Long.parseLong(ne());\n\t\t}\n\t\t\n\t\tdouble nd() {\n\t\t\treturn Double.parseDouble(ne());\n\t\t}\n\t\t\n\t \n\t}\n \n}",
"Main",
"public static void main(String args[] ) throws Exception {\n PrintWriter pw=new PrintWriter(System.out);\n FastScanner sc = new FastScanner();\n \n int t=1;\n //t = sc.ni();\n while(t-->0) {\n \tsolve(pw,sc);\n }\n \n pw.close();\n }",
"main",
"{\n PrintWriter pw=new PrintWriter(System.out);\n FastScanner sc = new FastScanner();\n \n int t=1;\n //t = sc.ni();\n while(t-->0) {\n \tsolve(pw,sc);\n }\n \n pw.close();\n }",
"PrintWriter pw=new PrintWriter(System.out);",
"pw",
"new PrintWriter(System.out)",
"FastScanner sc = new FastScanner();",
"sc",
"new FastScanner()",
"int t=1;",
"t",
"1",
"while(t-->0) {\n \tsolve(pw,sc);\n }",
"t-->0",
"t--",
"t",
"0",
"{\n \tsolve(pw,sc);\n }",
"solve(pw,sc)",
"solve",
"pw",
"sc",
"pw.close()",
"pw.close",
"pw",
"String args[]",
"args",
"private static void solve(PrintWriter pw, FastScanner sc) {\n \tint n = sc.ni();\n \tint co = 0;\n \tint max= 0;\n \twhile(n-->0){\n \t\tint d1 = sc.ni(),d2 = sc.ni();\n \t\tif(d1==d2) {\n \t\t\tco++;\n \t\t} else \n \t\t\tco=0;\n \t\tmax = Math.max(max, co);\n \t}\n \tif(max>=3)\n \t\tpw.print(\"Yes\");\n \telse \n \t\tpw.print(\"No\");\n \t\n\t}",
"solve",
"{\n \tint n = sc.ni();\n \tint co = 0;\n \tint max= 0;\n \twhile(n-->0){\n \t\tint d1 = sc.ni(),d2 = sc.ni();\n \t\tif(d1==d2) {\n \t\t\tco++;\n \t\t} else \n \t\t\tco=0;\n \t\tmax = Math.max(max, co);\n \t}\n \tif(max>=3)\n \t\tpw.print(\"Yes\");\n \telse \n \t\tpw.print(\"No\");\n \t\n\t}",
"int n = sc.ni();",
"n",
"sc.ni()",
"sc.ni",
"sc",
"int co = 0;",
"co",
"0",
"int max= 0;",
"max",
"0",
"while(n-->0){\n \t\tint d1 = sc.ni(),d2 = sc.ni();\n \t\tif(d1==d2) {\n \t\t\tco++;\n \t\t} else \n \t\t\tco=0;\n \t\tmax = Math.max(max, co);\n \t}",
"n-->0",
"n--",
"n",
"0",
"{\n \t\tint d1 = sc.ni(),d2 = sc.ni();\n \t\tif(d1==d2) {\n \t\t\tco++;\n \t\t} else \n \t\t\tco=0;\n \t\tmax = Math.max(max, co);\n \t}",
"int d1 = sc.ni()",
"d1",
"sc.ni()",
"sc.ni",
"sc",
"d2 = sc.ni();",
"d2",
"sc.ni()",
"sc.ni",
"sc",
"if(d1==d2) {\n \t\t\tco++;\n \t\t} else \n \t\t\tco=0;",
"d1==d2",
"d1",
"d2",
"{\n \t\t\tco++;\n \t\t}",
"co++",
"co",
"co=0",
"co",
"0",
"max = Math.max(max, co)",
"max",
"Math.max(max, co)",
"Math.max",
"Math",
"max",
"co",
"if(max>=3)\n \t\tpw.print(\"Yes\");\n \telse \n \t\tpw.print(\"No\");",
"max>=3",
"max",
"3",
"pw.print(\"Yes\")",
"pw.print",
"pw",
"\"Yes\"",
"pw.print(\"No\")",
"pw.print",
"pw",
"\"No\"",
"PrintWriter pw",
"pw",
"FastScanner sc",
"sc",
"static <T> void deb(T x,int o){\n System.out.print(x);\n if(o==0) {\n \t System.out.println();\n \t \n }\n }",
"deb",
"{\n System.out.print(x);\n if(o==0) {\n \t System.out.println();\n \t \n }\n }",
"System.out.print(x)",
"System.out.print",
"System.out",
"System",
"System.out",
"x",
"if(o==0) {\n \t System.out.println();\n \t \n }",
"o==0",
"o",
"0",
"{\n \t System.out.println();\n \t \n }",
"System.out.println()",
"System.out.println",
"System.out",
"System",
"System.out",
"T x",
"x",
"int o",
"o",
"static class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\t\n\t\tpublic String ne() {\n\t\t\twhile (!st.hasMoreElements())\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\tpublic String ne(int k) {\n\t\t\ttry {\n\t\t\t\treturn br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn \"Not able to read\";\n\t\t}\n\t\t\n\t\tint ni() {\n\t\t\treturn Integer.parseInt(ne());\n\t\t}\n\t\t\n\t\tlong nl() {\n\t\t\treturn Long.parseLong(ne());\n\t\t}\n\t\t\n\t\tdouble nd() {\n\t\t\treturn Double.parseDouble(ne());\n\t\t}\n\t\t\n\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(\"\")",
"public String ne() {\n\t\t\twhile (!st.hasMoreElements())\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}",
"ne",
"{\n\t\t\twhile (!st.hasMoreElements())\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.hasMoreElements())\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.hasMoreElements()",
"st.hasMoreElements()",
"st.hasMoreElements",
"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",
"public String ne(int k) {\n\t\t\ttry {\n\t\t\t\treturn br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn \"Not able to read\";\n\t\t}",
"ne",
"{\n\t\t\ttry {\n\t\t\t\treturn br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn \"Not able to read\";\n\t\t}",
"try {\n\t\t\t\treturn br.readLine();\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\treturn br.readLine();\n\t\t\t}",
"return br.readLine();",
"br.readLine()",
"br.readLine",
"br",
"return \"Not able to read\";",
"\"Not able to read\"",
"int k",
"k",
"int ni() {\n\t\t\treturn Integer.parseInt(ne());\n\t\t}",
"ni",
"{\n\t\t\treturn Integer.parseInt(ne());\n\t\t}",
"return Integer.parseInt(ne());",
"Integer.parseInt(ne())",
"Integer.parseInt",
"Integer",
"ne()",
"ne",
"long nl() {\n\t\t\treturn Long.parseLong(ne());\n\t\t}",
"nl",
"{\n\t\t\treturn Long.parseLong(ne());\n\t\t}",
"return Long.parseLong(ne());",
"Long.parseLong(ne())",
"Long.parseLong",
"Long",
"ne()",
"ne",
"double nd() {\n\t\t\treturn Double.parseDouble(ne());\n\t\t}",
"nd",
"{\n\t\t\treturn Double.parseDouble(ne());\n\t\t}",
"return Double.parseDouble(ne());",
"Double.parseDouble(ne())",
"Double.parseDouble",
"Double",
"ne()",
"ne",
"public class Main {\n\n public static void main(String args[] ) throws Exception {\n PrintWriter pw=new PrintWriter(System.out);\n FastScanner sc = new FastScanner();\n \n int t=1;\n //t = sc.ni();\n while(t-->0) {\n \tsolve(pw,sc);\n }\n \n pw.close();\n }\n \n private static void solve(PrintWriter pw, FastScanner sc) {\n \tint n = sc.ni();\n \tint co = 0;\n \tint max= 0;\n \twhile(n-->0){\n \t\tint d1 = sc.ni(),d2 = sc.ni();\n \t\tif(d1==d2) {\n \t\t\tco++;\n \t\t} else \n \t\t\tco=0;\n \t\tmax = Math.max(max, co);\n \t}\n \tif(max>=3)\n \t\tpw.print(\"Yes\");\n \telse \n \t\tpw.print(\"No\");\n \t\n\t}\n \n\n\tstatic <T> void deb(T x,int o){\n System.out.print(x);\n if(o==0) {\n \t System.out.println();\n \t \n }\n }\n \n \n static class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\t\n\t\tpublic String ne() {\n\t\t\twhile (!st.hasMoreElements())\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\tpublic String ne(int k) {\n\t\t\ttry {\n\t\t\t\treturn br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn \"Not able to read\";\n\t\t}\n\t\t\n\t\tint ni() {\n\t\t\treturn Integer.parseInt(ne());\n\t\t}\n\t\t\n\t\tlong nl() {\n\t\t\treturn Long.parseLong(ne());\n\t\t}\n\t\t\n\t\tdouble nd() {\n\t\t\treturn Double.parseDouble(ne());\n\t\t}\n\t\t\n\t \n\t}\n \n}",
"public class Main {\n\n public static void main(String args[] ) throws Exception {\n PrintWriter pw=new PrintWriter(System.out);\n FastScanner sc = new FastScanner();\n \n int t=1;\n //t = sc.ni();\n while(t-->0) {\n \tsolve(pw,sc);\n }\n \n pw.close();\n }\n \n private static void solve(PrintWriter pw, FastScanner sc) {\n \tint n = sc.ni();\n \tint co = 0;\n \tint max= 0;\n \twhile(n-->0){\n \t\tint d1 = sc.ni(),d2 = sc.ni();\n \t\tif(d1==d2) {\n \t\t\tco++;\n \t\t} else \n \t\t\tco=0;\n \t\tmax = Math.max(max, co);\n \t}\n \tif(max>=3)\n \t\tpw.print(\"Yes\");\n \telse \n \t\tpw.print(\"No\");\n \t\n\t}\n \n\n\tstatic <T> void deb(T x,int o){\n System.out.print(x);\n if(o==0) {\n \t System.out.println();\n \t \n }\n }\n \n \n static class FastScanner {\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(\"\");\n\t\t\n\t\tpublic String ne() {\n\t\t\twhile (!st.hasMoreElements())\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\tpublic String ne(int k) {\n\t\t\ttry {\n\t\t\t\treturn br.readLine();\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn \"Not able to read\";\n\t\t}\n\t\t\n\t\tint ni() {\n\t\t\treturn Integer.parseInt(ne());\n\t\t}\n\t\t\n\t\tlong nl() {\n\t\t\treturn Long.parseLong(ne());\n\t\t}\n\t\t\n\t\tdouble nd() {\n\t\t\treturn Double.parseDouble(ne());\n\t\t}\n\t\t\n\t \n\t}\n \n}",
"Main"
]
| import java.io.*;
import java.math.*;
import java.util.*;
import java.lang.*;
// import java.text.DecimalFormat;
// import java.text.DecimalFormatSymbols;
/*
*/
public class Main {
public static void main(String args[] ) throws Exception {
PrintWriter pw=new PrintWriter(System.out);
FastScanner sc = new FastScanner();
int t=1;
//t = sc.ni();
while(t-->0) {
solve(pw,sc);
}
pw.close();
}
private static void solve(PrintWriter pw, FastScanner sc) {
int n = sc.ni();
int co = 0;
int max= 0;
while(n-->0){
int d1 = sc.ni(),d2 = sc.ni();
if(d1==d2) {
co++;
} else
co=0;
max = Math.max(max, co);
}
if(max>=3)
pw.print("Yes");
else
pw.print("No");
}
static <T> void deb(T x,int o){
System.out.print(x);
if(o==0) {
System.out.println();
}
}
static class FastScanner {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st=new StringTokenizer("");
public String ne() {
while (!st.hasMoreElements())
try {
st=new StringTokenizer(br.readLine());
} catch (IOException e) {
e.printStackTrace();
}
return st.nextToken();
}
public String ne(int k) {
try {
return br.readLine();
} catch (IOException e) {
e.printStackTrace();
}
return "Not able to read";
}
int ni() {
return Integer.parseInt(ne());
}
long nl() {
return Long.parseLong(ne());
}
double nd() {
return Double.parseDouble(ne());
}
}
} |
[
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,
30,
40,
13,
30,
0,
13,
17,
14,
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
],
[
81,
8
],
[
81,
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
],
[
51,
52
],
[
46,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
35,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
61,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
11,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
9,
78
],
[
78,
79
],
[
0,
80
],
[
80,
81
],
[
80,
82
]
]
| [
"import java.util.*; \nimport java.lang.*; \n\n\npublic class Main{\n \n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n \n int cnt = 0;\n for(int i=0; i<N; i++){\n int a = scan.nextInt();\n int b = scan.nextInt();\n \n if(a==b){\n cnt++;\n }else{\n cnt=0;\n }\n \n if(cnt==3){\n System.out.println(\"Yes\");\n System.exit(0);\n }\n }\n \n System.out.println(\"No\");\n\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"public class Main{\n \n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n \n int cnt = 0;\n for(int i=0; i<N; i++){\n int a = scan.nextInt();\n int b = scan.nextInt();\n \n if(a==b){\n cnt++;\n }else{\n cnt=0;\n }\n \n if(cnt==3){\n System.out.println(\"Yes\");\n System.exit(0);\n }\n }\n \n System.out.println(\"No\");\n\n }\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n \n int cnt = 0;\n for(int i=0; i<N; i++){\n int a = scan.nextInt();\n int b = scan.nextInt();\n \n if(a==b){\n cnt++;\n }else{\n cnt=0;\n }\n \n if(cnt==3){\n System.out.println(\"Yes\");\n System.exit(0);\n }\n }\n \n System.out.println(\"No\");\n\n }",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n \n int cnt = 0;\n for(int i=0; i<N; i++){\n int a = scan.nextInt();\n int b = scan.nextInt();\n \n if(a==b){\n cnt++;\n }else{\n cnt=0;\n }\n \n if(cnt==3){\n System.out.println(\"Yes\");\n System.exit(0);\n }\n }\n \n System.out.println(\"No\");\n\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int N = scan.nextInt();",
"N",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int cnt = 0;",
"cnt",
"0",
"for(int i=0; i<N; i++){\n int a = scan.nextInt();\n int b = scan.nextInt();\n \n if(a==b){\n cnt++;\n }else{\n cnt=0;\n }\n \n if(cnt==3){\n System.out.println(\"Yes\");\n System.exit(0);\n }\n }",
"int i=0;",
"int i=0;",
"i",
"0",
"i<N",
"i",
"N",
"i++",
"i++",
"i",
"{\n int a = scan.nextInt();\n int b = scan.nextInt();\n \n if(a==b){\n cnt++;\n }else{\n cnt=0;\n }\n \n if(cnt==3){\n System.out.println(\"Yes\");\n System.exit(0);\n }\n }",
"{\n int a = scan.nextInt();\n int b = scan.nextInt();\n \n if(a==b){\n cnt++;\n }else{\n cnt=0;\n }\n \n if(cnt==3){\n System.out.println(\"Yes\");\n System.exit(0);\n }\n }",
"int a = scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b = scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if(a==b){\n cnt++;\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 System.out.println(\"Yes\");\n System.exit(0);\n }",
"cnt==3",
"cnt",
"3",
"{\n System.out.println(\"Yes\");\n System.exit(0);\n }",
"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 \n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n \n int cnt = 0;\n for(int i=0; i<N; i++){\n int a = scan.nextInt();\n int b = scan.nextInt();\n \n if(a==b){\n cnt++;\n }else{\n cnt=0;\n }\n \n if(cnt==3){\n System.out.println(\"Yes\");\n System.exit(0);\n }\n }\n \n System.out.println(\"No\");\n\n }\n}",
"public class Main{\n \n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n \n int N = scan.nextInt();\n \n int cnt = 0;\n for(int i=0; i<N; i++){\n int a = scan.nextInt();\n int b = scan.nextInt();\n \n if(a==b){\n cnt++;\n }else{\n cnt=0;\n }\n \n if(cnt==3){\n System.out.println(\"Yes\");\n System.exit(0);\n }\n }\n \n System.out.println(\"No\");\n\n }\n}",
"Main"
]
| import java.util.*;
import java.lang.*;
public class Main{
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
int N = scan.nextInt();
int cnt = 0;
for(int i=0; i<N; i++){
int a = scan.nextInt();
int b = scan.nextInt();
if(a==b){
cnt++;
}else{
cnt=0;
}
if(cnt==3){
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,
41,
13,
17,
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,
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,
13,
17,
30,
0,
13,
17,
3,
30,
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
],
[
107,
5
],
[
107,
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,
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
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
43,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
8,
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
],
[
76,
77
],
[
76,
78
],
[
71,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
71,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
8,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
95,
100
],
[
8,
101
],
[
101,
102
],
[
102,
103
],
[
6,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
]
| [
"\n\nimport 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\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tString ans = \"No\";\n\n\t\tint[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\tif(d1[i]==d2[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\n\t\tsc.close();\n\n\t}\n\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\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tString ans = \"No\";\n\n\t\tint[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\tif(d1[i]==d2[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\n\t\tsc.close();\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tString ans = \"No\";\n\n\t\tint[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\tif(d1[i]==d2[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\n\t\tsc.close();\n\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tString ans = \"No\";\n\n\t\tint[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\tif(d1[i]==d2[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\n\t\tsc.close();\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 count = 0;",
"count",
"0",
"String ans = \"No\";",
"ans",
"\"No\"",
"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\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",
"i",
"n",
"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 ; i++) {\n\t\t\tif(d1[i]==d2[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcount=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\tif(d1[i]==d2[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(d1[i]==d2[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}",
"if(d1[i]==d2[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcount=0;\n\t\t\t}",
"d1[i]==d2[i]",
"d1[i]",
"d1",
"i",
"d2[i]",
"d2",
"i",
"{\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"count++",
"count",
"if(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"count == 3",
"count",
"3",
"{\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"ans = \"Yes\"",
"ans",
"\"Yes\"",
"break;",
"{\n\t\t\t\tcount=0;\n\t\t\t}",
"count=0",
"count",
"0",
"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\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\t\tScanner sc = new Scanner(System.in);\n\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tString ans = \"No\";\n\n\t\tint[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\tif(d1[i]==d2[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\n\t\tsc.close();\n\n\t}\n\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\n\t\tint n = sc.nextInt();\n\t\tint count = 0;\n\t\tString ans = \"No\";\n\n\t\tint[] d1 = new int[n];\n\t\tint[] d2 = new int[n];\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\td1[i] = sc.nextInt();\n\t\t\td2[i] = sc.nextInt();\n\t\t}\n\n\t\tfor(int i=0 ; i<n ; i++) {\n\t\t\tif(d1[i]==d2[i]) {\n\t\t\t\tcount++;\n\t\t\t\tif(count == 3) {\n\t\t\t\t\tans = \"Yes\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}else {\n\t\t\t\tcount=0;\n\t\t\t}\n\t\t}\n\n\t\tSystem.out.println(ans);\n\n\n\t\tsc.close();\n\n\t}\n\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 count = 0;
String ans = "No";
int[] d1 = new int[n];
int[] d2 = new int[n];
for(int i=0 ; i<n ; i++) {
d1[i] = sc.nextInt();
d2[i] = sc.nextInt();
}
for(int i=0 ; i<n ; i++) {
if(d1[i]==d2[i]) {
count++;
if(count == 3) {
ans = "Yes";
break;
}
}else {
count=0;
}
}
System.out.println(ans);
sc.close();
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.