node_ids
sequencelengths 4
1.4k
| edge_index
sequencelengths 1
2.22k
| text
sequencelengths 4
1.4k
| source
stringlengths 14
427k
|
---|---|---|---|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
38,
30,
4,
18,
13,
30,
0,
13,
20,
42,
4,
18,
13,
30,
41,
13,
39,
4,
18,
13,
4,
18,
13,
4,
18,
13,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
17,
4,
13,
13,
23,
13,
12,
13,
30,
29,
4,
18,
18,
13,
17,
18,
13,
17,
23,
13,
12,
13,
30,
29,
4,
18,
4,
18,
18,
13,
17,
18,
13,
17,
4,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
21,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
30,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
34,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
34,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
57,
62
],
[
62,
63
],
[
62,
64
],
[
15,
65
],
[
65,
66
],
[
13,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
76,
77
],
[
76,
78
],
[
67,
79
],
[
79,
80
],
[
13,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
87,
92
],
[
92,
93
],
[
92,
94
],
[
85,
95
],
[
95,
96
],
[
95,
97
],
[
81,
98
],
[
98,
99
]
] | [
"import java.math.BigInteger;\nimport java.util.Arrays;\nimport java.util.Collections;\nimport java.util.Scanner;\n\nclass Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = null;\n\t\ttry {\n\t\t\ts = new Scanner(System.in);\n\n\t\t\twhile (s.hasNextInt()) {\n\t\t\t\tBigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() };\n\t\t\t\tArrays.sort(num, Collections.reverseOrder());\n\t\t\t\tSystem.out.println(gcd(num) + \" \" + lcm(num));\n\t\t\t}\n\n\t\t} finally {\n\t\t\ts.close();\n\t\t}\n\n\t}\n\n\tpublic static BigInteger gcd(BigInteger[] num) {\n\t\treturn num[0].gcd(num[1]);\n\t}\n\n\tprivate static BigInteger lcm(BigInteger[] num) {\n\t\treturn (num[0].multiply(num[1])).divide(gcd(num));\n\t}\n}",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = null;\n\t\ttry {\n\t\t\ts = new Scanner(System.in);\n\n\t\t\twhile (s.hasNextInt()) {\n\t\t\t\tBigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() };\n\t\t\t\tArrays.sort(num, Collections.reverseOrder());\n\t\t\t\tSystem.out.println(gcd(num) + \" \" + lcm(num));\n\t\t\t}\n\n\t\t} finally {\n\t\t\ts.close();\n\t\t}\n\n\t}\n\n\tpublic static BigInteger gcd(BigInteger[] num) {\n\t\treturn num[0].gcd(num[1]);\n\t}\n\n\tprivate static BigInteger lcm(BigInteger[] num) {\n\t\treturn (num[0].multiply(num[1])).divide(gcd(num));\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner s = null;\n\t\ttry {\n\t\t\ts = new Scanner(System.in);\n\n\t\t\twhile (s.hasNextInt()) {\n\t\t\t\tBigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() };\n\t\t\t\tArrays.sort(num, Collections.reverseOrder());\n\t\t\t\tSystem.out.println(gcd(num) + \" \" + lcm(num));\n\t\t\t}\n\n\t\t} finally {\n\t\t\ts.close();\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner s = null;\n\t\ttry {\n\t\t\ts = new Scanner(System.in);\n\n\t\t\twhile (s.hasNextInt()) {\n\t\t\t\tBigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() };\n\t\t\t\tArrays.sort(num, Collections.reverseOrder());\n\t\t\t\tSystem.out.println(gcd(num) + \" \" + lcm(num));\n\t\t\t}\n\n\t\t} finally {\n\t\t\ts.close();\n\t\t}\n\n\t}",
"Scanner s = null;",
"s",
"null",
"try {\n\t\t\ts = new Scanner(System.in);\n\n\t\t\twhile (s.hasNextInt()) {\n\t\t\t\tBigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() };\n\t\t\t\tArrays.sort(num, Collections.reverseOrder());\n\t\t\t\tSystem.out.println(gcd(num) + \" \" + lcm(num));\n\t\t\t}\n\n\t\t} finally {\n\t\t\ts.close();\n\t\t}",
"{\n\t\t\ts.close();\n\t\t}",
"s.close()",
"s.close",
"s",
"{\n\t\t\ts = new Scanner(System.in);\n\n\t\t\twhile (s.hasNextInt()) {\n\t\t\t\tBigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() };\n\t\t\t\tArrays.sort(num, Collections.reverseOrder());\n\t\t\t\tSystem.out.println(gcd(num) + \" \" + lcm(num));\n\t\t\t}\n\n\t\t}",
"s = new Scanner(System.in)",
"s",
"new Scanner(System.in)",
"while (s.hasNextInt()) {\n\t\t\t\tBigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() };\n\t\t\t\tArrays.sort(num, Collections.reverseOrder());\n\t\t\t\tSystem.out.println(gcd(num) + \" \" + lcm(num));\n\t\t\t}",
"s.hasNextInt()",
"s.hasNextInt",
"s",
"{\n\t\t\t\tBigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() };\n\t\t\t\tArrays.sort(num, Collections.reverseOrder());\n\t\t\t\tSystem.out.println(gcd(num) + \" \" + lcm(num));\n\t\t\t}",
"BigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() };",
"num",
"{ s.nextBigInteger(), s.nextBigInteger() }",
"s.nextBigInteger()",
"s.nextBigInteger",
"s",
"s.nextBigInteger()",
"s.nextBigInteger",
"s",
"Arrays.sort(num, Collections.reverseOrder())",
"Arrays.sort",
"Arrays",
"num",
"Collections.reverseOrder()",
"Collections.reverseOrder",
"Collections",
"System.out.println(gcd(num) + \" \" + lcm(num))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(num) + \" \" + lcm(num)",
"gcd(num) + \" \" + lcm(num)",
"gcd(num)",
"gcd",
"num",
"\" \"",
"lcm(num)",
"lcm",
"num",
"String[] args",
"args",
"public static BigInteger gcd(BigInteger[] num) {\n\t\treturn num[0].gcd(num[1]);\n\t}",
"gcd",
"{\n\t\treturn num[0].gcd(num[1]);\n\t}",
"return num[0].gcd(num[1]);",
"num[0].gcd(num[1])",
"num[0].gcd",
"num[0]",
"num",
"0",
"num[1]",
"num",
"1",
"BigInteger[] num",
"num",
"private static BigInteger lcm(BigInteger[] num) {\n\t\treturn (num[0].multiply(num[1])).divide(gcd(num));\n\t}",
"lcm",
"{\n\t\treturn (num[0].multiply(num[1])).divide(gcd(num));\n\t}",
"return (num[0].multiply(num[1])).divide(gcd(num));",
"(num[0].multiply(num[1])).divide(gcd(num))",
"(num[0].multiply(num[1])).divide",
"(num[0].multiply(num[1]))",
"num[0].multiply",
"num[0]",
"num",
"0",
"num[1]",
"num",
"1",
"gcd(num)",
"gcd",
"num",
"BigInteger[] num",
"num"
] | import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner s = null;
try {
s = new Scanner(System.in);
while (s.hasNextInt()) {
BigInteger[] num = { s.nextBigInteger(), s.nextBigInteger() };
Arrays.sort(num, Collections.reverseOrder());
System.out.println(gcd(num) + " " + lcm(num));
}
} finally {
s.close();
}
}
public static BigInteger gcd(BigInteger[] num) {
return num[0].gcd(num[1]);
}
private static BigInteger lcm(BigInteger[] num) {
return (num[0].multiply(num[1])).divide(gcd(num));
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
17,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
42,
17,
30,
14,
2,
2,
0,
13,
4,
18,
13,
17,
4,
18,
13,
3,
0,
13,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
4,
13,
13,
13,
0,
13,
4,
13,
13,
13,
13,
4,
18,
4,
18,
4,
18,
4,
18,
13,
13,
17,
13,
17,
4,
18,
18,
13,
13,
13,
12,
13,
30,
41,
13,
2,
13,
13,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
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
],
[
177,
11
],
[
177,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
12,
18
],
[
18,
19
],
[
177,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
23,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
33,
41
],
[
41,
42
],
[
33,
43
],
[
43,
44
],
[
33,
45
],
[
45,
46
],
[
33,
47
],
[
47,
48
],
[
33,
49
],
[
49,
50
],
[
33,
51
],
[
51,
52
],
[
51,
53
],
[
33,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
59,
65
],
[
58,
66
],
[
66,
67
],
[
67,
68
],
[
57,
69
],
[
56,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
56,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
56,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
86,
89
],
[
89,
90
],
[
89,
91
],
[
56,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
100,
102
],
[
96,
103
],
[
103,
104
],
[
103,
105
],
[
56,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
108,
111
],
[
56,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
114,
117
],
[
114,
118
],
[
56,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
125,
128
],
[
123,
129
],
[
121,
130
],
[
119,
131
],
[
33,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
132,
137
],
[
177,
138
],
[
138,
139
],
[
138,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
143,
145
],
[
140,
146
],
[
146,
147
],
[
147,
148
],
[
147,
149
],
[
146,
150
],
[
150,
151
],
[
146,
152
],
[
152,
153
],
[
153,
154
],
[
153,
155
],
[
153,
156
],
[
138,
157
],
[
157,
158
],
[
138,
159
],
[
159,
160
],
[
177,
161
],
[
161,
162
],
[
161,
163
],
[
163,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
165,
169
],
[
161,
170
],
[
170,
171
],
[
161,
172
],
[
172,
173
],
[
161,
174
],
[
174,
175
],
[
0,
176
],
[
176,
177
],
[
176,
178
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) {\n \n new Main().run();\n }\n\n public void run() {\n\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String line;\n String[] num;\n int a,b,t,gdc;\n long lcm;\n StringBuilder result = new StringBuilder();\n while(true) {\n\n if( ((line = br.readLine()) == null) || line.isEmpty() ) break;\n\n num = line.split(\" \");\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n if( a<b ) {\n t=a; a=b; b=t;\n }\n\n gdc = gdc(a, b);\n lcm = lcm(a, b, gdc);\n\n result.append(gdc).append(\" \").append(lcm).append(\"\\n\");\n }\n\n System.out.print(result);\n }\n catch( IOException e) {\n System.out.println(\"IOException!\");\n }\n }\n\n private int gdc(int x, int y) {\n int d = x%y;\n if( d == 0 ) return y;\n else return gdc(y, d);\n }\n\n private long lcm(long x, long y, int gdc) {\n return x * y / gdc;\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n public static void main(String[] args) {\n \n new Main().run();\n }\n\n public void run() {\n\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String line;\n String[] num;\n int a,b,t,gdc;\n long lcm;\n StringBuilder result = new StringBuilder();\n while(true) {\n\n if( ((line = br.readLine()) == null) || line.isEmpty() ) break;\n\n num = line.split(\" \");\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n if( a<b ) {\n t=a; a=b; b=t;\n }\n\n gdc = gdc(a, b);\n lcm = lcm(a, b, gdc);\n\n result.append(gdc).append(\" \").append(lcm).append(\"\\n\");\n }\n\n System.out.print(result);\n }\n catch( IOException e) {\n System.out.println(\"IOException!\");\n }\n }\n\n private int gdc(int x, int y) {\n int d = x%y;\n if( d == 0 ) return y;\n else return gdc(y, d);\n }\n\n private long lcm(long x, long y, int gdc) {\n return x * y / gdc;\n }\n}",
"Main",
"public static void main(String[] args) {\n \n new Main().run();\n }",
"main",
"{\n \n new Main().run();\n }",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"public void run() {\n\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String line;\n String[] num;\n int a,b,t,gdc;\n long lcm;\n StringBuilder result = new StringBuilder();\n while(true) {\n\n if( ((line = br.readLine()) == null) || line.isEmpty() ) break;\n\n num = line.split(\" \");\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n if( a<b ) {\n t=a; a=b; b=t;\n }\n\n gdc = gdc(a, b);\n lcm = lcm(a, b, gdc);\n\n result.append(gdc).append(\" \").append(lcm).append(\"\\n\");\n }\n\n System.out.print(result);\n }\n catch( IOException e) {\n System.out.println(\"IOException!\");\n }\n }",
"run",
"{\n\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String line;\n String[] num;\n int a,b,t,gdc;\n long lcm;\n StringBuilder result = new StringBuilder();\n while(true) {\n\n if( ((line = br.readLine()) == null) || line.isEmpty() ) break;\n\n num = line.split(\" \");\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n if( a<b ) {\n t=a; a=b; b=t;\n }\n\n gdc = gdc(a, b);\n lcm = lcm(a, b, gdc);\n\n result.append(gdc).append(\" \").append(lcm).append(\"\\n\");\n }\n\n System.out.print(result);\n }\n catch( IOException e) {\n System.out.println(\"IOException!\");\n }\n }",
"try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String line;\n String[] num;\n int a,b,t,gdc;\n long lcm;\n StringBuilder result = new StringBuilder();\n while(true) {\n\n if( ((line = br.readLine()) == null) || line.isEmpty() ) break;\n\n num = line.split(\" \");\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n if( a<b ) {\n t=a; a=b; b=t;\n }\n\n gdc = gdc(a, b);\n lcm = lcm(a, b, gdc);\n\n result.append(gdc).append(\" \").append(lcm).append(\"\\n\");\n }\n\n System.out.print(result);\n }\n catch( IOException e) {\n System.out.println(\"IOException!\");\n }",
"catch( IOException e) {\n System.out.println(\"IOException!\");\n }",
"IOException e",
"{\n System.out.println(\"IOException!\");\n }",
"System.out.println(\"IOException!\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"IOException!\"",
"{\n\n String line;\n String[] num;\n int a,b,t,gdc;\n long lcm;\n StringBuilder result = new StringBuilder();\n while(true) {\n\n if( ((line = br.readLine()) == null) || line.isEmpty() ) break;\n\n num = line.split(\" \");\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n if( a<b ) {\n t=a; a=b; b=t;\n }\n\n gdc = gdc(a, b);\n lcm = lcm(a, b, gdc);\n\n result.append(gdc).append(\" \").append(lcm).append(\"\\n\");\n }\n\n System.out.print(result);\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"new BufferedReader(new InputStreamReader(System.in))",
"String line;",
"line",
"String[] num;",
"num",
"int a",
"a",
"b",
"b",
"t",
"t",
"gdc;",
"gdc",
"long lcm;",
"lcm",
"StringBuilder result = new StringBuilder();",
"result",
"new StringBuilder()",
"while(true) {\n\n if( ((line = br.readLine()) == null) || line.isEmpty() ) break;\n\n num = line.split(\" \");\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n if( a<b ) {\n t=a; a=b; b=t;\n }\n\n gdc = gdc(a, b);\n lcm = lcm(a, b, gdc);\n\n result.append(gdc).append(\" \").append(lcm).append(\"\\n\");\n }",
"true",
"{\n\n if( ((line = br.readLine()) == null) || line.isEmpty() ) break;\n\n num = line.split(\" \");\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n if( a<b ) {\n t=a; a=b; b=t;\n }\n\n gdc = gdc(a, b);\n lcm = lcm(a, b, gdc);\n\n result.append(gdc).append(\" \").append(lcm).append(\"\\n\");\n }",
"if( ((line = br.readLine()) == null) || line.isEmpty() ) break;",
"((line = br.readLine()) == null) || line.isEmpty()",
"((line = br.readLine()) == null)",
"(line = br.readLine())",
"line",
"br.readLine()",
"br.readLine",
"br",
"null",
"line.isEmpty()",
"line.isEmpty",
"line",
"break;",
"num = line.split(\" \")",
"num",
"line.split(\" \")",
"line.split",
"line",
"\" \"",
"a = Integer.parseInt(num[0])",
"a",
"Integer.parseInt(num[0])",
"Integer.parseInt",
"Integer",
"num[0]",
"num",
"0",
"b = Integer.parseInt(num[1])",
"b",
"Integer.parseInt(num[1])",
"Integer.parseInt",
"Integer",
"num[1]",
"num",
"1",
"if( a<b ) {\n t=a; a=b; b=t;\n }",
"a<b",
"a",
"b",
"{\n t=a; a=b; b=t;\n }",
"t=a",
"t",
"a",
"a=b",
"a",
"b",
"b=t",
"b",
"t",
"gdc = gdc(a, b)",
"gdc",
"gdc(a, b)",
"gdc",
"a",
"b",
"lcm = lcm(a, b, gdc)",
"lcm",
"lcm(a, b, gdc)",
"lcm",
"a",
"b",
"gdc",
"result.append(gdc).append(\" \").append(lcm).append(\"\\n\")",
"result.append(gdc).append(\" \").append(lcm).append",
"result.append(gdc).append(\" \").append(lcm)",
"result.append(gdc).append(\" \").append",
"result.append(gdc).append(\" \")",
"result.append(gdc).append",
"result.append(gdc)",
"result.append",
"result",
"gdc",
"\" \"",
"lcm",
"\"\\n\"",
"System.out.print(result)",
"System.out.print",
"System.out",
"System",
"System.out",
"result",
"private int gdc(int x, int y) {\n int d = x%y;\n if( d == 0 ) return y;\n else return gdc(y, d);\n }",
"gdc",
"{\n int d = x%y;\n if( d == 0 ) return y;\n else return gdc(y, d);\n }",
"int d = x%y;",
"d",
"x%y",
"x",
"y",
"if( d == 0 ) return y;\n else return gdc(y, d);",
"d == 0",
"d",
"0",
"return y;",
"y",
"return gdc(y, d);",
"gdc(y, d)",
"gdc",
"y",
"d",
"int x",
"x",
"int y",
"y",
"private long lcm(long x, long y, int gdc) {\n return x * y / gdc;\n }",
"lcm",
"{\n return x * y / gdc;\n }",
"return x * y / gdc;",
"x * y / gdc",
"x * y",
"x",
"y",
"gdc",
"long x",
"x",
"long y",
"y",
"int gdc",
"gdc",
"public class Main {\n\n public static void main(String[] args) {\n \n new Main().run();\n }\n\n public void run() {\n\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String line;\n String[] num;\n int a,b,t,gdc;\n long lcm;\n StringBuilder result = new StringBuilder();\n while(true) {\n\n if( ((line = br.readLine()) == null) || line.isEmpty() ) break;\n\n num = line.split(\" \");\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n if( a<b ) {\n t=a; a=b; b=t;\n }\n\n gdc = gdc(a, b);\n lcm = lcm(a, b, gdc);\n\n result.append(gdc).append(\" \").append(lcm).append(\"\\n\");\n }\n\n System.out.print(result);\n }\n catch( IOException e) {\n System.out.println(\"IOException!\");\n }\n }\n\n private int gdc(int x, int y) {\n int d = x%y;\n if( d == 0 ) return y;\n else return gdc(y, d);\n }\n\n private long lcm(long x, long y, int gdc) {\n return x * y / gdc;\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n \n new Main().run();\n }\n\n public void run() {\n\n try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\n String line;\n String[] num;\n int a,b,t,gdc;\n long lcm;\n StringBuilder result = new StringBuilder();\n while(true) {\n\n if( ((line = br.readLine()) == null) || line.isEmpty() ) break;\n\n num = line.split(\" \");\n a = Integer.parseInt(num[0]);\n b = Integer.parseInt(num[1]);\n if( a<b ) {\n t=a; a=b; b=t;\n }\n\n gdc = gdc(a, b);\n lcm = lcm(a, b, gdc);\n\n result.append(gdc).append(\" \").append(lcm).append(\"\\n\");\n }\n\n System.out.print(result);\n }\n catch( IOException e) {\n System.out.println(\"IOException!\");\n }\n }\n\n private int gdc(int x, int y) {\n int d = x%y;\n if( d == 0 ) return y;\n else return gdc(y, d);\n }\n\n private long lcm(long x, long y, int gdc) {\n return x * y / gdc;\n }\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
new Main().run();
}
public void run() {
try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
String line;
String[] num;
int a,b,t,gdc;
long lcm;
StringBuilder result = new StringBuilder();
while(true) {
if( ((line = br.readLine()) == null) || line.isEmpty() ) break;
num = line.split(" ");
a = Integer.parseInt(num[0]);
b = Integer.parseInt(num[1]);
if( a<b ) {
t=a; a=b; b=t;
}
gdc = gdc(a, b);
lcm = lcm(a, b, gdc);
result.append(gdc).append(" ").append(lcm).append("\n");
}
System.out.print(result);
}
catch( IOException e) {
System.out.println("IOException!");
}
}
private int gdc(int x, int y) {
int d = x%y;
if( d == 0 ) return y;
else return gdc(y, d);
}
private long lcm(long x, long y, int gdc) {
return x * y / gdc;
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
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,
41,
13,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
13,
41,
13,
17,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
13,
40,
13,
29,
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
],
[
134,
11
],
[
134,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
24,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
31,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
43,
45
],
[
31,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
31,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
61,
64
],
[
60,
65
],
[
60,
66
],
[
66,
67
],
[
66,
68
],
[
66,
69
],
[
12,
70
],
[
70,
71
],
[
134,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
76,
81
],
[
81,
82
],
[
81,
83
],
[
81,
84
],
[
84,
85
],
[
84,
86
],
[
72,
87
],
[
87,
88
],
[
72,
89
],
[
89,
90
],
[
134,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
96,
100
],
[
93,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
104,
105
],
[
103,
106
],
[
103,
107
],
[
93,
108
],
[
108,
109
],
[
108,
110
],
[
93,
111
],
[
111,
112
],
[
111,
113
],
[
93,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
116,
118
],
[
115,
119
],
[
114,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
93,
127
],
[
127,
128
],
[
91,
129
],
[
129,
130
],
[
91,
131
],
[
131,
132
],
[
0,
133
],
[
133,
134
],
[
133,
135
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\twhile((str=br.readLine())!=null){\n\t\t\tString[] num=str.split(\" \");\n\t\t\tint a=Integer.parseInt(num[0]),\n\t\t\t\tb=Integer.parseInt(num[1]);\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a,int b){\n\t\treturn b==0 ? a : gcd(b,a%b);\n\t}\n\t\n\tpublic static int lcm(int a,int b){\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\t\tint back=max;\n\t\tint i=1;\n\t\twhile(back%min!=0){\n\t\t\tback=max*i++;\n\t\t\t//System.out.println(back);\n\t\t}\n\t\t\n\t\treturn back;\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",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\twhile((str=br.readLine())!=null){\n\t\t\tString[] num=str.split(\" \");\n\t\t\tint a=Integer.parseInt(num[0]),\n\t\t\t\tb=Integer.parseInt(num[1]);\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a,int b){\n\t\treturn b==0 ? a : gcd(b,a%b);\n\t}\n\t\n\tpublic static int lcm(int a,int b){\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\t\tint back=max;\n\t\tint i=1;\n\t\twhile(back%min!=0){\n\t\t\tback=max*i++;\n\t\t\t//System.out.println(back);\n\t\t}\n\t\t\n\t\treturn back;\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\twhile((str=br.readLine())!=null){\n\t\t\tString[] num=str.split(\" \");\n\t\t\tint a=Integer.parseInt(num[0]),\n\t\t\t\tb=Integer.parseInt(num[1]);\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t\n\t\t}\n\t}",
"main",
"{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\twhile((str=br.readLine())!=null){\n\t\t\tString[] num=str.split(\" \");\n\t\t\tint a=Integer.parseInt(num[0]),\n\t\t\t\tb=Integer.parseInt(num[1]);\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t\n\t\t}\n\t}",
"InputStreamReader is = new InputStreamReader(System.in);",
"is",
"new InputStreamReader(System.in)",
"BufferedReader br = new BufferedReader(is);",
"br",
"new BufferedReader(is)",
"String str;",
"str",
"while((str=br.readLine())!=null){\n\t\t\tString[] num=str.split(\" \");\n\t\t\tint a=Integer.parseInt(num[0]),\n\t\t\t\tb=Integer.parseInt(num[1]);\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t\n\t\t}",
"(str=br.readLine())!=null",
"(str=br.readLine())",
"str",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tString[] num=str.split(\" \");\n\t\t\tint a=Integer.parseInt(num[0]),\n\t\t\t\tb=Integer.parseInt(num[1]);\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t\n\t\t}",
"String[] num=str.split(\" \");",
"num",
"str.split(\" \")",
"str.split",
"str",
"\" \"",
"int a=Integer.parseInt(num[0])",
"a",
"Integer.parseInt(num[0])",
"Integer.parseInt",
"Integer",
"num[0]",
"num",
"0",
"b=Integer.parseInt(num[1]);",
"b",
"Integer.parseInt(num[1])",
"Integer.parseInt",
"Integer",
"num[1]",
"num",
"1",
"System.out.println(gcd(a,b)+\" \"+lcm(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a,b)",
"lcm",
"a",
"b",
"String[] args",
"args",
"public 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 int lcm(int a,int b){\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\t\tint back=max;\n\t\tint i=1;\n\t\twhile(back%min!=0){\n\t\t\tback=max*i++;\n\t\t\t//System.out.println(back);\n\t\t}\n\t\t\n\t\treturn back;\n\t}",
"lcm",
"{\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\t\tint back=max;\n\t\tint i=1;\n\t\twhile(back%min!=0){\n\t\t\tback=max*i++;\n\t\t\t//System.out.println(back);\n\t\t}\n\t\t\n\t\treturn back;\n\t}",
"int max=Math.max(a, b);",
"max",
"Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"int min=Math.min(a, b);",
"min",
"Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"int back=max;",
"back",
"max",
"int i=1;",
"i",
"1",
"while(back%min!=0){\n\t\t\tback=max*i++;\n\t\t\t//System.out.println(back);\n\t\t}",
"back%min!=0",
"back%min",
"back",
"min",
"0",
"{\n\t\t\tback=max*i++;\n\t\t\t//System.out.println(back);\n\t\t}",
"back=max*i++",
"back",
"max*i++",
"max",
"i++",
"i",
"return back;",
"back",
"int a",
"a",
"int b",
"b",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\twhile((str=br.readLine())!=null){\n\t\t\tString[] num=str.split(\" \");\n\t\t\tint a=Integer.parseInt(num[0]),\n\t\t\t\tb=Integer.parseInt(num[1]);\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a,int b){\n\t\treturn b==0 ? a : gcd(b,a%b);\n\t}\n\t\n\tpublic static int lcm(int a,int b){\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\t\tint back=max;\n\t\tint i=1;\n\t\twhile(back%min!=0){\n\t\t\tback=max*i++;\n\t\t\t//System.out.println(back);\n\t\t}\n\t\t\n\t\treturn back;\n\t}\n\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\twhile((str=br.readLine())!=null){\n\t\t\tString[] num=str.split(\" \");\n\t\t\tint a=Integer.parseInt(num[0]),\n\t\t\t\tb=Integer.parseInt(num[1]);\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a,int b){\n\t\treturn b==0 ? a : gcd(b,a%b);\n\t}\n\t\n\tpublic static int lcm(int a,int b){\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\t\tint back=max;\n\t\tint i=1;\n\t\twhile(back%min!=0){\n\t\t\tback=max*i++;\n\t\t\t//System.out.println(back);\n\t\t}\n\t\t\n\t\treturn back;\n\t}\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException{
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str;
while((str=br.readLine())!=null){
String[] num=str.split(" ");
int a=Integer.parseInt(num[0]),
b=Integer.parseInt(num[1]);
System.out.println(gcd(a,b)+" "+lcm(a,b));
}
}
public static int gcd(int a,int b){
return b==0 ? a : gcd(b,a%b);
}
public static int lcm(int a,int b){
int max=Math.max(a, b);
int min=Math.min(a, b);
int back=max;
int i=1;
while(back%min!=0){
back=max*i++;
//System.out.println(back);
}
return back;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
13,
0,
13,
4,
18,
13,
0,
13,
13,
42,
2,
2,
13,
13,
17,
30,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
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
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
30,
36
],
[
36,
37
],
[
36,
38
],
[
30,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
30,
44
],
[
44,
45
],
[
44,
46
],
[
30,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
47,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
58,
65
],
[
65,
66
],
[
65,
67
],
[
53,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
30,
73
],
[
73,
74
],
[
73,
75
],
[
30,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
30,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
89,
89
],
[
89,
90
],
[
89,
91
],
[
89,
92
],
[
6,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
] | [
"import java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a1, b1, r1, r2, temp, a2, b2;\n\n\t\twhile(scan.hasNext()){\n\t\t\ta1 = scan.nextInt();\n\t\t\ta2 = a1;\n\t\t\tb1 = scan.nextInt();\n\t\t\tb2 = b1;\n\t\t\twhile(a2 % b2 != 0){\n\t\t\t\tif(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}\n\t\t\t\ta2 = a2 % b2;\n\t\t\t}\n\t\t\tr1 = b2;\n\t\t\tr2 = (a1*b1) / r1;\n\t\t\tSystem.out.println(r1+\" \"+r2);\n\t\t}\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a1, b1, r1, r2, temp, a2, b2;\n\n\t\twhile(scan.hasNext()){\n\t\t\ta1 = scan.nextInt();\n\t\t\ta2 = a1;\n\t\t\tb1 = scan.nextInt();\n\t\t\tb2 = b1;\n\t\t\twhile(a2 % b2 != 0){\n\t\t\t\tif(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}\n\t\t\t\ta2 = a2 % b2;\n\t\t\t}\n\t\t\tr1 = b2;\n\t\t\tr2 = (a1*b1) / r1;\n\t\t\tSystem.out.println(r1+\" \"+r2);\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a1, b1, r1, r2, temp, a2, b2;\n\n\t\twhile(scan.hasNext()){\n\t\t\ta1 = scan.nextInt();\n\t\t\ta2 = a1;\n\t\t\tb1 = scan.nextInt();\n\t\t\tb2 = b1;\n\t\t\twhile(a2 % b2 != 0){\n\t\t\t\tif(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}\n\t\t\t\ta2 = a2 % b2;\n\t\t\t}\n\t\t\tr1 = b2;\n\t\t\tr2 = (a1*b1) / r1;\n\t\t\tSystem.out.println(r1+\" \"+r2);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a1, b1, r1, r2, temp, a2, b2;\n\n\t\twhile(scan.hasNext()){\n\t\t\ta1 = scan.nextInt();\n\t\t\ta2 = a1;\n\t\t\tb1 = scan.nextInt();\n\t\t\tb2 = b1;\n\t\t\twhile(a2 % b2 != 0){\n\t\t\t\tif(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}\n\t\t\t\ta2 = a2 % b2;\n\t\t\t}\n\t\t\tr1 = b2;\n\t\t\tr2 = (a1*b1) / r1;\n\t\t\tSystem.out.println(r1+\" \"+r2);\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"long a1",
"a1",
"b1",
"b1",
"r1",
"r1",
"r2",
"r2",
"temp",
"temp",
"a2",
"a2",
"b2;",
"b2",
"while(scan.hasNext()){\n\t\t\ta1 = scan.nextInt();\n\t\t\ta2 = a1;\n\t\t\tb1 = scan.nextInt();\n\t\t\tb2 = b1;\n\t\t\twhile(a2 % b2 != 0){\n\t\t\t\tif(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}\n\t\t\t\ta2 = a2 % b2;\n\t\t\t}\n\t\t\tr1 = b2;\n\t\t\tr2 = (a1*b1) / r1;\n\t\t\tSystem.out.println(r1+\" \"+r2);\n\t\t}",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n\t\t\ta1 = scan.nextInt();\n\t\t\ta2 = a1;\n\t\t\tb1 = scan.nextInt();\n\t\t\tb2 = b1;\n\t\t\twhile(a2 % b2 != 0){\n\t\t\t\tif(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}\n\t\t\t\ta2 = a2 % b2;\n\t\t\t}\n\t\t\tr1 = b2;\n\t\t\tr2 = (a1*b1) / r1;\n\t\t\tSystem.out.println(r1+\" \"+r2);\n\t\t}",
"a1 = scan.nextInt()",
"a1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"a2 = a1",
"a2",
"a1",
"b1 = scan.nextInt()",
"b1",
"scan.nextInt()",
"scan.nextInt",
"scan",
"b2 = b1",
"b2",
"b1",
"while(a2 % b2 != 0){\n\t\t\t\tif(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}\n\t\t\t\ta2 = a2 % b2;\n\t\t\t}",
"a2 % b2 != 0",
"a2 % b2",
"a2",
"b2",
"0",
"{\n\t\t\t\tif(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}\n\t\t\t\ta2 = a2 % b2;\n\t\t\t}",
"if(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}",
"a2 < b2",
"a2",
"b2",
"{\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}",
"temp = a2",
"temp",
"a2",
"a2 = b2",
"a2",
"b2",
"b2 = temp",
"b2",
"temp",
"a2 = a2 % b2",
"a2",
"a2 % b2",
"a2",
"b2",
"r1 = b2",
"r1",
"b2",
"r2 = (a1*b1) / r1",
"r2",
"(a1*b1) / r1",
"(a1*b1)",
"a1",
"b1",
"r1",
"System.out.println(r1+\" \"+r2)",
"System.out.println",
"System.out",
"System",
"System.out",
"r1+\" \"+r2",
"r1+\" \"+r2",
"r1",
"\" \"",
"r2",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a1, b1, r1, r2, temp, a2, b2;\n\n\t\twhile(scan.hasNext()){\n\t\t\ta1 = scan.nextInt();\n\t\t\ta2 = a1;\n\t\t\tb1 = scan.nextInt();\n\t\t\tb2 = b1;\n\t\t\twhile(a2 % b2 != 0){\n\t\t\t\tif(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}\n\t\t\t\ta2 = a2 % b2;\n\t\t\t}\n\t\t\tr1 = b2;\n\t\t\tr2 = (a1*b1) / r1;\n\t\t\tSystem.out.println(r1+\" \"+r2);\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a1, b1, r1, r2, temp, a2, b2;\n\n\t\twhile(scan.hasNext()){\n\t\t\ta1 = scan.nextInt();\n\t\t\ta2 = a1;\n\t\t\tb1 = scan.nextInt();\n\t\t\tb2 = b1;\n\t\t\twhile(a2 % b2 != 0){\n\t\t\t\tif(a2 < b2){\n\t\t\t\t\ttemp = a2;\n\t\t\t\t\ta2 = b2;\n\t\t\t\t\tb2 = temp;\n\t\t\t\t}\n\t\t\t\ta2 = a2 % b2;\n\t\t\t}\n\t\t\tr1 = b2;\n\t\t\tr2 = (a1*b1) / r1;\n\t\t\tSystem.out.println(r1+\" \"+r2);\n\t\t}\n\t}\n\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
long a1, b1, r1, r2, temp, a2, b2;
while(scan.hasNext()){
a1 = scan.nextInt();
a2 = a1;
b1 = scan.nextInt();
b2 = b1;
while(a2 % b2 != 0){
if(a2 < b2){
temp = a2;
a2 = b2;
b2 = temp;
}
a2 = a2 % b2;
}
r1 = b2;
r2 = (a1*b1) / r1;
System.out.println(r1+" "+r2);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
42,
2,
13,
17,
30,
41,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
29,
13,
29,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
2,
13,
13,
29,
2,
13,
4,
13,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
132,
14
],
[
132,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
24,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
31,
37
],
[
37,
38
],
[
37,
39
],
[
31,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
46,
47
],
[
31,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
54,
55
],
[
31,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
56,
61
],
[
62,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
63,
66
],
[
62,
67
],
[
62,
68
],
[
68,
69
],
[
68,
70
],
[
68,
71
],
[
15,
72
],
[
72,
73
],
[
132,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
86,
95
],
[
95,
96
],
[
95,
97
],
[
81,
98
],
[
98,
99
],
[
77,
100
],
[
100,
101
],
[
101,
102
],
[
101,
103
],
[
101,
104
],
[
74,
105
],
[
105,
106
],
[
74,
107
],
[
107,
108
],
[
132,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
114,
117
],
[
117,
118
],
[
117,
119
],
[
111,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
123,
125
],
[
123,
126
],
[
109,
127
],
[
127,
128
],
[
109,
129
],
[
129,
130
],
[
0,
131
],
[
131,
132
],
[
131,
133
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\n\npublic class Main\n{\n\n\t/**\n\t * @param args\n\t * @throws IOException \n\t * @throws NumberFormatException \n\t */\n\tpublic static void main(String[] args) throws NumberFormatException, IOException\n\t{\n\t\t// TODO Auto-generated method stub\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\n\t\twhile ((line = in.readLine()) != null)\n\t\t{\n\t\t\tline=line.trim();\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\tlong a = Integer.parseInt(st.nextToken());\n\t\t\tlong b = Integer.parseInt(st.nextToken());\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\n\t}\n\t\n\tpublic static long gcd(long a, long b)\n\t{\n\t\tif (a>=b) \n\t\t{\n\t\t\twhile (b!=0) \n\t\t\t{\n\t\t\t\tlong temp = b;\n\t\t\t\tb = a % b;\n\t\t\t\ta = temp;\n\t\t\t}\n\t\t\treturn a;\t\t\t\n\n\t\t}\n\t\telse return gcd(b,a);\n\t}\n\t\n\tpublic static long lcm(long a, long b)\n\t{\n\t\tlong multiple = Math.abs(a*b);\n\t\treturn multiple/gcd(a,b);\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main\n{\n\n\t/**\n\t * @param args\n\t * @throws IOException \n\t * @throws NumberFormatException \n\t */\n\tpublic static void main(String[] args) throws NumberFormatException, IOException\n\t{\n\t\t// TODO Auto-generated method stub\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\n\t\twhile ((line = in.readLine()) != null)\n\t\t{\n\t\t\tline=line.trim();\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\tlong a = Integer.parseInt(st.nextToken());\n\t\t\tlong b = Integer.parseInt(st.nextToken());\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\n\t}\n\t\n\tpublic static long gcd(long a, long b)\n\t{\n\t\tif (a>=b) \n\t\t{\n\t\t\twhile (b!=0) \n\t\t\t{\n\t\t\t\tlong temp = b;\n\t\t\t\tb = a % b;\n\t\t\t\ta = temp;\n\t\t\t}\n\t\t\treturn a;\t\t\t\n\n\t\t}\n\t\telse return gcd(b,a);\n\t}\n\t\n\tpublic static long lcm(long a, long b)\n\t{\n\t\tlong multiple = Math.abs(a*b);\n\t\treturn multiple/gcd(a,b);\n\t}\n\n}",
"Main",
"/**\n\t * @param args\n\t * @throws IOException \n\t * @throws NumberFormatException \n\t */\n\tpublic static void main(String[] args) throws NumberFormatException, IOException\n\t{\n\t\t// TODO Auto-generated method stub\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\n\t\twhile ((line = in.readLine()) != null)\n\t\t{\n\t\t\tline=line.trim();\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\tlong a = Integer.parseInt(st.nextToken());\n\t\t\tlong b = Integer.parseInt(st.nextToken());\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\n\t\twhile ((line = in.readLine()) != null)\n\t\t{\n\t\t\tline=line.trim();\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\tlong a = Integer.parseInt(st.nextToken());\n\t\t\tlong b = Integer.parseInt(st.nextToken());\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\n\t}",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"String line;",
"line",
"while ((line = in.readLine()) != null)\n\t\t{\n\t\t\tline=line.trim();\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\tlong a = Integer.parseInt(st.nextToken());\n\t\t\tlong b = Integer.parseInt(st.nextToken());\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}",
"(line = in.readLine()) != null",
"(line = in.readLine())",
"line",
"in.readLine()",
"in.readLine",
"in",
"null",
"{\n\t\t\tline=line.trim();\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\tlong a = Integer.parseInt(st.nextToken());\n\t\t\tlong b = Integer.parseInt(st.nextToken());\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}",
"line=line.trim()",
"line",
"line.trim()",
"line.trim",
"line",
"StringTokenizer st = new StringTokenizer(line);",
"st",
"new StringTokenizer(line)",
"long a = Integer.parseInt(st.nextToken());",
"a",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"long b = Integer.parseInt(st.nextToken());",
"b",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"System.out.println(gcd(a,b)+\" \"+lcm(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a,b)",
"lcm",
"a",
"b",
"String[] args",
"args",
"public static long gcd(long a, long b)\n\t{\n\t\tif (a>=b) \n\t\t{\n\t\t\twhile (b!=0) \n\t\t\t{\n\t\t\t\tlong temp = b;\n\t\t\t\tb = a % b;\n\t\t\t\ta = temp;\n\t\t\t}\n\t\t\treturn a;\t\t\t\n\n\t\t}\n\t\telse return gcd(b,a);\n\t}",
"gcd",
"{\n\t\tif (a>=b) \n\t\t{\n\t\t\twhile (b!=0) \n\t\t\t{\n\t\t\t\tlong temp = b;\n\t\t\t\tb = a % b;\n\t\t\t\ta = temp;\n\t\t\t}\n\t\t\treturn a;\t\t\t\n\n\t\t}\n\t\telse return gcd(b,a);\n\t}",
"if (a>=b) \n\t\t{\n\t\t\twhile (b!=0) \n\t\t\t{\n\t\t\t\tlong temp = b;\n\t\t\t\tb = a % b;\n\t\t\t\ta = temp;\n\t\t\t}\n\t\t\treturn a;\t\t\t\n\n\t\t}\n\t\telse return gcd(b,a);",
"a>=b",
"a",
"b",
"{\n\t\t\twhile (b!=0) \n\t\t\t{\n\t\t\t\tlong temp = b;\n\t\t\t\tb = a % b;\n\t\t\t\ta = temp;\n\t\t\t}\n\t\t\treturn a;\t\t\t\n\n\t\t}",
"while (b!=0) \n\t\t\t{\n\t\t\t\tlong temp = b;\n\t\t\t\tb = a % b;\n\t\t\t\ta = temp;\n\t\t\t}",
"b!=0",
"b",
"0",
"{\n\t\t\t\tlong temp = b;\n\t\t\t\tb = a % b;\n\t\t\t\ta = temp;\n\t\t\t}",
"long temp = b;",
"temp",
"b",
"b = a % b",
"b",
"a % b",
"a",
"b",
"a = temp",
"a",
"temp",
"return a;",
"a",
"return gcd(b,a);",
"gcd(b,a)",
"gcd",
"b",
"a",
"long a",
"a",
"long b",
"b",
"public static long lcm(long a, long b)\n\t{\n\t\tlong multiple = Math.abs(a*b);\n\t\treturn multiple/gcd(a,b);\n\t}",
"lcm",
"{\n\t\tlong multiple = Math.abs(a*b);\n\t\treturn multiple/gcd(a,b);\n\t}",
"long multiple = Math.abs(a*b);",
"multiple",
"Math.abs(a*b)",
"Math.abs",
"Math",
"a*b",
"a",
"b",
"return multiple/gcd(a,b);",
"multiple/gcd(a,b)",
"multiple",
"gcd(a,b)",
"gcd",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public class Main\n{\n\n\t/**\n\t * @param args\n\t * @throws IOException \n\t * @throws NumberFormatException \n\t */\n\tpublic static void main(String[] args) throws NumberFormatException, IOException\n\t{\n\t\t// TODO Auto-generated method stub\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\n\t\twhile ((line = in.readLine()) != null)\n\t\t{\n\t\t\tline=line.trim();\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\tlong a = Integer.parseInt(st.nextToken());\n\t\t\tlong b = Integer.parseInt(st.nextToken());\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\n\t}\n\t\n\tpublic static long gcd(long a, long b)\n\t{\n\t\tif (a>=b) \n\t\t{\n\t\t\twhile (b!=0) \n\t\t\t{\n\t\t\t\tlong temp = b;\n\t\t\t\tb = a % b;\n\t\t\t\ta = temp;\n\t\t\t}\n\t\t\treturn a;\t\t\t\n\n\t\t}\n\t\telse return gcd(b,a);\n\t}\n\t\n\tpublic static long lcm(long a, long b)\n\t{\n\t\tlong multiple = Math.abs(a*b);\n\t\treturn multiple/gcd(a,b);\n\t}\n\n}",
"public class Main\n{\n\n\t/**\n\t * @param args\n\t * @throws IOException \n\t * @throws NumberFormatException \n\t */\n\tpublic static void main(String[] args) throws NumberFormatException, IOException\n\t{\n\t\t// TODO Auto-generated method stub\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\n\t\twhile ((line = in.readLine()) != null)\n\t\t{\n\t\t\tline=line.trim();\n\t\t\tStringTokenizer st = new StringTokenizer(line);\n\t\t\tlong a = Integer.parseInt(st.nextToken());\n\t\t\tlong b = Integer.parseInt(st.nextToken());\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\n\t}\n\t\n\tpublic static long gcd(long a, long b)\n\t{\n\t\tif (a>=b) \n\t\t{\n\t\t\twhile (b!=0) \n\t\t\t{\n\t\t\t\tlong temp = b;\n\t\t\t\tb = a % b;\n\t\t\t\ta = temp;\n\t\t\t}\n\t\t\treturn a;\t\t\t\n\n\t\t}\n\t\telse return gcd(b,a);\n\t}\n\t\n\tpublic static long lcm(long a, long b)\n\t{\n\t\tlong multiple = Math.abs(a*b);\n\t\treturn multiple/gcd(a,b);\n\t}\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class Main
{
/**
* @param args
* @throws IOException
* @throws NumberFormatException
*/
public static void main(String[] args) throws NumberFormatException, IOException
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String line;
while ((line = in.readLine()) != null)
{
line=line.trim();
StringTokenizer st = new StringTokenizer(line);
long a = Integer.parseInt(st.nextToken());
long b = Integer.parseInt(st.nextToken());
System.out.println(gcd(a,b)+" "+lcm(a,b));
}
}
public static long gcd(long a, long b)
{
if (a>=b)
{
while (b!=0)
{
long temp = b;
b = a % b;
a = temp;
}
return a;
}
else return gcd(b,a);
}
public static long lcm(long a, long b)
{
long multiple = Math.abs(a*b);
return multiple/gcd(a,b);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
13,
41,
13,
41,
13,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
114,
5
],
[
114,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
24,
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
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
43,
50
],
[
50,
51
],
[
50,
52
],
[
43,
53
],
[
53,
54
],
[
53,
55
],
[
39,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
60,
62
],
[
56,
63
],
[
63,
64
],
[
63,
65
],
[
56,
66
],
[
66,
67
],
[
66,
68
],
[
28,
69
],
[
69,
70
],
[
28,
71
],
[
71,
72
],
[
28,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
73,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
79,
85
],
[
85,
86
],
[
85,
87
],
[
79,
88
],
[
88,
89
],
[
88,
90
],
[
28,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
28,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
104,
104
],
[
104,
105
],
[
104,
106
],
[
104,
107
],
[
8,
108
],
[
108,
109
],
[
109,
110
],
[
6,
111
],
[
111,
112
],
[
0,
113
],
[
113,
114
],
[
113,
115
]
] | [
"import java.util.Scanner;\n\n\npublic class Main{\n\tpublic static void main(String args[]){\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong num1,num2,gc1,gc2,lc1,lc2;\n\n\t\twhile(sc.hasNextInt()){\n\t\t\tnum1 = sc.nextInt();\n\t\t\tnum2 = sc.nextInt();\n\t\t\tif(num1 >= num2){\n\t\t\t\tgc1 = num1;gc2 = num2;\n\t\t\t\tlc1 = num1;lc2 = num2;\n\t\t\t}else{\n\t\t\t\tgc1 = num2;gc2 = num1;\n\t\t\t\tlc1 = num2;lc2 = num1;\n\t\t\t}\t\t\t\t\t\t//xx1?????§?????????xx2????°??????????????????£??\\???\n\t\t\tlong GCD,LCM;\n\t\t\twhile(gc1 % gc2 != 0){\n\t\t\t\tGCD = gc1 % gc2;\n\t\t\t\tgc1 = gc2;\n\t\t\t\tgc2 = GCD;\n\t\t\t}\n\t\t\tLCM = (lc1*lc2)/gc2;\n\t\t\tSystem.out.println(gc2 + \" \" + LCM);\n\t\t}\n\t\tsc.close();\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\tlong num1,num2,gc1,gc2,lc1,lc2;\n\n\t\twhile(sc.hasNextInt()){\n\t\t\tnum1 = sc.nextInt();\n\t\t\tnum2 = sc.nextInt();\n\t\t\tif(num1 >= num2){\n\t\t\t\tgc1 = num1;gc2 = num2;\n\t\t\t\tlc1 = num1;lc2 = num2;\n\t\t\t}else{\n\t\t\t\tgc1 = num2;gc2 = num1;\n\t\t\t\tlc1 = num2;lc2 = num1;\n\t\t\t}\t\t\t\t\t\t//xx1?????§?????????xx2????°??????????????????£??\\???\n\t\t\tlong GCD,LCM;\n\t\t\twhile(gc1 % gc2 != 0){\n\t\t\t\tGCD = gc1 % gc2;\n\t\t\t\tgc1 = gc2;\n\t\t\t\tgc2 = GCD;\n\t\t\t}\n\t\t\tLCM = (lc1*lc2)/gc2;\n\t\t\tSystem.out.println(gc2 + \" \" + LCM);\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\tlong num1,num2,gc1,gc2,lc1,lc2;\n\n\t\twhile(sc.hasNextInt()){\n\t\t\tnum1 = sc.nextInt();\n\t\t\tnum2 = sc.nextInt();\n\t\t\tif(num1 >= num2){\n\t\t\t\tgc1 = num1;gc2 = num2;\n\t\t\t\tlc1 = num1;lc2 = num2;\n\t\t\t}else{\n\t\t\t\tgc1 = num2;gc2 = num1;\n\t\t\t\tlc1 = num2;lc2 = num1;\n\t\t\t}\t\t\t\t\t\t//xx1?????§?????????xx2????°??????????????????£??\\???\n\t\t\tlong GCD,LCM;\n\t\t\twhile(gc1 % gc2 != 0){\n\t\t\t\tGCD = gc1 % gc2;\n\t\t\t\tgc1 = gc2;\n\t\t\t\tgc2 = GCD;\n\t\t\t}\n\t\t\tLCM = (lc1*lc2)/gc2;\n\t\t\tSystem.out.println(gc2 + \" \" + LCM);\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong num1,num2,gc1,gc2,lc1,lc2;\n\n\t\twhile(sc.hasNextInt()){\n\t\t\tnum1 = sc.nextInt();\n\t\t\tnum2 = sc.nextInt();\n\t\t\tif(num1 >= num2){\n\t\t\t\tgc1 = num1;gc2 = num2;\n\t\t\t\tlc1 = num1;lc2 = num2;\n\t\t\t}else{\n\t\t\t\tgc1 = num2;gc2 = num1;\n\t\t\t\tlc1 = num2;lc2 = num1;\n\t\t\t}\t\t\t\t\t\t//xx1?????§?????????xx2????°??????????????????£??\\???\n\t\t\tlong GCD,LCM;\n\t\t\twhile(gc1 % gc2 != 0){\n\t\t\t\tGCD = gc1 % gc2;\n\t\t\t\tgc1 = gc2;\n\t\t\t\tgc2 = GCD;\n\t\t\t}\n\t\t\tLCM = (lc1*lc2)/gc2;\n\t\t\tSystem.out.println(gc2 + \" \" + LCM);\n\t\t}\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long num1",
"num1",
"num2",
"num2",
"gc1",
"gc1",
"gc2",
"gc2",
"lc1",
"lc1",
"lc2;",
"lc2",
"while(sc.hasNextInt()){\n\t\t\tnum1 = sc.nextInt();\n\t\t\tnum2 = sc.nextInt();\n\t\t\tif(num1 >= num2){\n\t\t\t\tgc1 = num1;gc2 = num2;\n\t\t\t\tlc1 = num1;lc2 = num2;\n\t\t\t}else{\n\t\t\t\tgc1 = num2;gc2 = num1;\n\t\t\t\tlc1 = num2;lc2 = num1;\n\t\t\t}\t\t\t\t\t\t//xx1?????§?????????xx2????°??????????????????£??\\???\n\t\t\tlong GCD,LCM;\n\t\t\twhile(gc1 % gc2 != 0){\n\t\t\t\tGCD = gc1 % gc2;\n\t\t\t\tgc1 = gc2;\n\t\t\t\tgc2 = GCD;\n\t\t\t}\n\t\t\tLCM = (lc1*lc2)/gc2;\n\t\t\tSystem.out.println(gc2 + \" \" + LCM);\n\t\t}",
"sc.hasNextInt()",
"sc.hasNextInt",
"sc",
"{\n\t\t\tnum1 = sc.nextInt();\n\t\t\tnum2 = sc.nextInt();\n\t\t\tif(num1 >= num2){\n\t\t\t\tgc1 = num1;gc2 = num2;\n\t\t\t\tlc1 = num1;lc2 = num2;\n\t\t\t}else{\n\t\t\t\tgc1 = num2;gc2 = num1;\n\t\t\t\tlc1 = num2;lc2 = num1;\n\t\t\t}\t\t\t\t\t\t//xx1?????§?????????xx2????°??????????????????£??\\???\n\t\t\tlong GCD,LCM;\n\t\t\twhile(gc1 % gc2 != 0){\n\t\t\t\tGCD = gc1 % gc2;\n\t\t\t\tgc1 = gc2;\n\t\t\t\tgc2 = GCD;\n\t\t\t}\n\t\t\tLCM = (lc1*lc2)/gc2;\n\t\t\tSystem.out.println(gc2 + \" \" + LCM);\n\t\t}",
"num1 = sc.nextInt()",
"num1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"num2 = sc.nextInt()",
"num2",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(num1 >= num2){\n\t\t\t\tgc1 = num1;gc2 = num2;\n\t\t\t\tlc1 = num1;lc2 = num2;\n\t\t\t}else{\n\t\t\t\tgc1 = num2;gc2 = num1;\n\t\t\t\tlc1 = num2;lc2 = num1;\n\t\t\t}\t\t\t\t\t\t//xx1?????§?????????xx2????°??????????????????£??\\???",
"num1 >= num2",
"num1",
"num2",
"{\n\t\t\t\tgc1 = num1;gc2 = num2;\n\t\t\t\tlc1 = num1;lc2 = num2;\n\t\t\t}",
"gc1 = num1",
"gc1",
"num1",
"gc2 = num2",
"gc2",
"num2",
"lc1 = num1",
"lc1",
"num1",
"lc2 = num2",
"lc2",
"num2",
"{\n\t\t\t\tgc1 = num2;gc2 = num1;\n\t\t\t\tlc1 = num2;lc2 = num1;\n\t\t\t}",
"gc1 = num2",
"gc1",
"num2",
"gc2 = num1",
"gc2",
"num1",
"lc1 = num2",
"lc1",
"num2",
"lc2 = num1",
"lc2",
"num1",
"long GCD",
"GCD",
"LCM;",
"LCM",
"while(gc1 % gc2 != 0){\n\t\t\t\tGCD = gc1 % gc2;\n\t\t\t\tgc1 = gc2;\n\t\t\t\tgc2 = GCD;\n\t\t\t}",
"gc1 % gc2 != 0",
"gc1 % gc2",
"gc1",
"gc2",
"0",
"{\n\t\t\t\tGCD = gc1 % gc2;\n\t\t\t\tgc1 = gc2;\n\t\t\t\tgc2 = GCD;\n\t\t\t}",
"GCD = gc1 % gc2",
"GCD",
"gc1 % gc2",
"gc1",
"gc2",
"gc1 = gc2",
"gc1",
"gc2",
"gc2 = GCD",
"gc2",
"GCD",
"LCM = (lc1*lc2)/gc2",
"LCM",
"(lc1*lc2)/gc2",
"(lc1*lc2)",
"lc1",
"lc2",
"gc2",
"System.out.println(gc2 + \" \" + LCM)",
"System.out.println",
"System.out",
"System",
"System.out",
"gc2 + \" \" + LCM",
"gc2 + \" \" + LCM",
"gc2",
"\" \"",
"LCM",
"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\tlong num1,num2,gc1,gc2,lc1,lc2;\n\n\t\twhile(sc.hasNextInt()){\n\t\t\tnum1 = sc.nextInt();\n\t\t\tnum2 = sc.nextInt();\n\t\t\tif(num1 >= num2){\n\t\t\t\tgc1 = num1;gc2 = num2;\n\t\t\t\tlc1 = num1;lc2 = num2;\n\t\t\t}else{\n\t\t\t\tgc1 = num2;gc2 = num1;\n\t\t\t\tlc1 = num2;lc2 = num1;\n\t\t\t}\t\t\t\t\t\t//xx1?????§?????????xx2????°??????????????????£??\\???\n\t\t\tlong GCD,LCM;\n\t\t\twhile(gc1 % gc2 != 0){\n\t\t\t\tGCD = gc1 % gc2;\n\t\t\t\tgc1 = gc2;\n\t\t\t\tgc2 = GCD;\n\t\t\t}\n\t\t\tLCM = (lc1*lc2)/gc2;\n\t\t\tSystem.out.println(gc2 + \" \" + LCM);\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\tlong num1,num2,gc1,gc2,lc1,lc2;\n\n\t\twhile(sc.hasNextInt()){\n\t\t\tnum1 = sc.nextInt();\n\t\t\tnum2 = sc.nextInt();\n\t\t\tif(num1 >= num2){\n\t\t\t\tgc1 = num1;gc2 = num2;\n\t\t\t\tlc1 = num1;lc2 = num2;\n\t\t\t}else{\n\t\t\t\tgc1 = num2;gc2 = num1;\n\t\t\t\tlc1 = num2;lc2 = num1;\n\t\t\t}\t\t\t\t\t\t//xx1?????§?????????xx2????°??????????????????£??\\???\n\t\t\tlong GCD,LCM;\n\t\t\twhile(gc1 % gc2 != 0){\n\t\t\t\tGCD = gc1 % gc2;\n\t\t\t\tgc1 = gc2;\n\t\t\t\tgc2 = GCD;\n\t\t\t}\n\t\t\tLCM = (lc1*lc2)/gc2;\n\t\t\tSystem.out.println(gc2 + \" \" + LCM);\n\t\t}\n\t\tsc.close();\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String args[]){
Scanner sc = new Scanner(System.in);
long num1,num2,gc1,gc2,lc1,lc2;
while(sc.hasNextInt()){
num1 = sc.nextInt();
num2 = sc.nextInt();
if(num1 >= num2){
gc1 = num1;gc2 = num2;
lc1 = num1;lc2 = num2;
}else{
gc1 = num2;gc2 = num1;
lc1 = num2;lc2 = num1;
} //xx1?????§?????????xx2????°??????????????????£??\???
long GCD,LCM;
while(gc1 % gc2 != 0){
GCD = gc1 % gc2;
gc1 = gc2;
gc2 = GCD;
}
LCM = (lc1*lc2)/gc2;
System.out.println(gc2 + " " + LCM);
}
sc.close();
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
4,
13,
13,
13,
17,
4,
18,
18,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
41,
13,
0,
13,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
41,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
13,
41,
13,
2,
2,
13,
13,
13,
29,
13,
23,
13,
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
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
33,
36
],
[
32,
37
],
[
16,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
38,
43
],
[
43,
44
],
[
43,
45
],
[
43,
46
],
[
6,
47
],
[
47,
48
],
[
113,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
59,
61
],
[
56,
62
],
[
62,
63
],
[
62,
64
],
[
56,
65
],
[
65,
66
],
[
65,
67
],
[
51,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
72,
81
],
[
81,
82
],
[
81,
83
],
[
51,
84
],
[
84,
85
],
[
49,
86
],
[
86,
87
],
[
49,
88
],
[
88,
89
],
[
113,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
95,
97
],
[
95,
98
],
[
92,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
92,
106
],
[
106,
107
],
[
90,
108
],
[
108,
109
],
[
90,
110
],
[
110,
111
],
[
0,
112
],
[
112,
113
],
[
112,
114
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\t/**\n\t * ???????????\\????????£?????´??° a, b ?????\\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨\n\t * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????\n\t * \n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong b = sc.nextLong();\n\t\t\tSystem.out.print(greatestcommondivisor(a, b) + \" \" );\n\t\t\tSystem.out.println(leastcommonmultiple(a, b));\n\t\t}\n\n\t}\n\n\tpublic static long greatestcommondivisor(long a, long b) {\n\t\tif(a > b) {\n long tmp;\n tmp = a;\n a = b;\n b = tmp;\n }\n\n while(a != 0) {\n long tmp = a;\n a = b%a;\n b = tmp;\n }\n\n return b;\n\t}\n\n\tpublic static long leastcommonmultiple(long a, long b) {\n\t\t// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨\n\t\t// AB=GL???????????????????????????????????§???????????????\n\t\tlong c = greatestcommondivisor(a, b);\n\t\tlong d = a * b / c;\n\t\treturn d;\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t/**\n\t * ???????????\\????????£?????´??° a, b ?????\\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨\n\t * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????\n\t * \n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong b = sc.nextLong();\n\t\t\tSystem.out.print(greatestcommondivisor(a, b) + \" \" );\n\t\t\tSystem.out.println(leastcommonmultiple(a, b));\n\t\t}\n\n\t}\n\n\tpublic static long greatestcommondivisor(long a, long b) {\n\t\tif(a > b) {\n long tmp;\n tmp = a;\n a = b;\n b = tmp;\n }\n\n while(a != 0) {\n long tmp = a;\n a = b%a;\n b = tmp;\n }\n\n return b;\n\t}\n\n\tpublic static long leastcommonmultiple(long a, long b) {\n\t\t// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨\n\t\t// AB=GL???????????????????????????????????§???????????????\n\t\tlong c = greatestcommondivisor(a, b);\n\t\tlong d = a * b / c;\n\t\treturn d;\n\n\t}\n\n}",
"Main",
"/**\n\t * ???????????\\????????£?????´??° a, b ?????\\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨\n\t * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????\n\t * \n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong b = sc.nextLong();\n\t\t\tSystem.out.print(greatestcommondivisor(a, b) + \" \" );\n\t\t\tSystem.out.println(leastcommonmultiple(a, b));\n\t\t}\n\n\t}",
"main",
"{\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong b = sc.nextLong();\n\t\t\tSystem.out.print(greatestcommondivisor(a, b) + \" \" );\n\t\t\tSystem.out.println(leastcommonmultiple(a, b));\n\t\t}\n\n\t}",
"@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (sc.hasNext()) {\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong b = sc.nextLong();\n\t\t\tSystem.out.print(greatestcommondivisor(a, b) + \" \" );\n\t\t\tSystem.out.println(leastcommonmultiple(a, b));\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong b = sc.nextLong();\n\t\t\tSystem.out.print(greatestcommondivisor(a, b) + \" \" );\n\t\t\tSystem.out.println(leastcommonmultiple(a, b));\n\t\t}",
"long a = sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long b = sc.nextLong();",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"System.out.print(greatestcommondivisor(a, b) + \" \" )",
"System.out.print",
"System.out",
"System",
"System.out",
"greatestcommondivisor(a, b) + \" \"",
"greatestcommondivisor(a, b)",
"greatestcommondivisor",
"a",
"b",
"\" \"",
"System.out.println(leastcommonmultiple(a, b))",
"System.out.println",
"System.out",
"System",
"System.out",
"leastcommonmultiple(a, b)",
"leastcommonmultiple",
"a",
"b",
"String[] args",
"args",
"public static long greatestcommondivisor(long a, long b) {\n\t\tif(a > b) {\n long tmp;\n tmp = a;\n a = b;\n b = tmp;\n }\n\n while(a != 0) {\n long tmp = a;\n a = b%a;\n b = tmp;\n }\n\n return b;\n\t}",
"greatestcommondivisor",
"{\n\t\tif(a > b) {\n long tmp;\n tmp = a;\n a = b;\n b = tmp;\n }\n\n while(a != 0) {\n long tmp = a;\n a = b%a;\n b = tmp;\n }\n\n return b;\n\t}",
"if(a > b) {\n long tmp;\n tmp = a;\n a = b;\n b = tmp;\n }",
"a > b",
"a",
"b",
"{\n long tmp;\n tmp = a;\n a = b;\n b = tmp;\n }",
"long tmp;",
"tmp",
"tmp = a",
"tmp",
"a",
"a = b",
"a",
"b",
"b = tmp",
"b",
"tmp",
"while(a != 0) {\n long tmp = a;\n a = b%a;\n b = tmp;\n }",
"a != 0",
"a",
"0",
"{\n long tmp = a;\n a = b%a;\n b = tmp;\n }",
"long tmp = a;",
"tmp",
"a",
"a = b%a",
"a",
"b%a",
"b",
"a",
"b = tmp",
"b",
"tmp",
"return b;",
"b",
"long a",
"a",
"long b",
"b",
"public static long leastcommonmultiple(long a, long b) {\n\t\t// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨\n\t\t// AB=GL???????????????????????????????????§???????????????\n\t\tlong c = greatestcommondivisor(a, b);\n\t\tlong d = a * b / c;\n\t\treturn d;\n\n\t}",
"leastcommonmultiple",
"{\n\t\t// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨\n\t\t// AB=GL???????????????????????????????????§???????????????\n\t\tlong c = greatestcommondivisor(a, b);\n\t\tlong d = a * b / c;\n\t\treturn d;\n\n\t}",
"long c = greatestcommondivisor(a, b);",
"c",
"greatestcommondivisor(a, b)",
"greatestcommondivisor",
"a",
"b",
"long d = a * b / c;",
"d",
"a * b / c",
"a * b",
"a",
"b",
"c",
"return d;",
"d",
"long a",
"a",
"long b",
"b",
"public class Main {\n\t/**\n\t * ???????????\\????????£?????´??° a, b ?????\\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨\n\t * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????\n\t * \n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong b = sc.nextLong();\n\t\t\tSystem.out.print(greatestcommondivisor(a, b) + \" \" );\n\t\t\tSystem.out.println(leastcommonmultiple(a, b));\n\t\t}\n\n\t}\n\n\tpublic static long greatestcommondivisor(long a, long b) {\n\t\tif(a > b) {\n long tmp;\n tmp = a;\n a = b;\n b = tmp;\n }\n\n while(a != 0) {\n long tmp = a;\n a = b%a;\n b = tmp;\n }\n\n return b;\n\t}\n\n\tpublic static long leastcommonmultiple(long a, long b) {\n\t\t// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨\n\t\t// AB=GL???????????????????????????????????§???????????????\n\t\tlong c = greatestcommondivisor(a, b);\n\t\tlong d = a * b / c;\n\t\treturn d;\n\n\t}\n\n}",
"public class Main {\n\t/**\n\t * ???????????\\????????£?????´??° a, b ?????\\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨\n\t * b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????\n\t * \n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t@SuppressWarnings(\"resource\")\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong b = sc.nextLong();\n\t\t\tSystem.out.print(greatestcommondivisor(a, b) + \" \" );\n\t\t\tSystem.out.println(leastcommonmultiple(a, b));\n\t\t}\n\n\t}\n\n\tpublic static long greatestcommondivisor(long a, long b) {\n\t\tif(a > b) {\n long tmp;\n tmp = a;\n a = b;\n b = tmp;\n }\n\n while(a != 0) {\n long tmp = a;\n a = b%a;\n b = tmp;\n }\n\n return b;\n\t}\n\n\tpublic static long leastcommonmultiple(long a, long b) {\n\t\t// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨\n\t\t// AB=GL???????????????????????????????????§???????????????\n\t\tlong c = greatestcommondivisor(a, b);\n\t\tlong d = a * b / c;\n\t\treturn d;\n\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
/**
* ???????????\????????£?????´??° a, b ?????\???????????¨??????a ??¨ b ????????§??¬?´???°??¨????°???¬?????°???????????????????????????????????°????????????????????????????????? ????????????a ??¨
* b ???????°???¬?????°??? 20 ???????¶??????????????????¨????????????
*
* @param args
*/
public static void main(String[] args) {
@SuppressWarnings("resource")
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
long a = sc.nextLong();
long b = sc.nextLong();
System.out.print(greatestcommondivisor(a, b) + " " );
System.out.println(leastcommonmultiple(a, b));
}
}
public static long greatestcommondivisor(long a, long b) {
if(a > b) {
long tmp;
tmp = a;
a = b;
b = tmp;
}
while(a != 0) {
long tmp = a;
a = b%a;
b = tmp;
}
return b;
}
public static long leastcommonmultiple(long a, long b) {
// ?????° A , B ????????§??¬?´???°??? G ????°???¬?????°??? L ??¨????????¨
// AB=GL???????????????????????????????????§???????????????
long c = greatestcommondivisor(a, b);
long d = a * b / c;
return d;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
13,
30,
41,
13,
0,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
4,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
111,
5
],
[
111,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
8,
24
],
[
24,
25
],
[
8,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
30,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
30,
41
],
[
41,
42
],
[
41,
43
],
[
30,
44
],
[
44,
45
],
[
44,
46
],
[
30,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
54,
56
],
[
51,
57
],
[
57,
58
],
[
57,
59
],
[
51,
60
],
[
60,
61
],
[
60,
62
],
[
30,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
65,
68
],
[
30,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
30,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
82,
82
],
[
82,
83
],
[
82,
84
],
[
82,
85
],
[
6,
86
],
[
86,
87
],
[
111,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
91,
97
],
[
97,
98
],
[
90,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
100,
103
],
[
103,
104
],
[
103,
105
],
[
88,
106
],
[
106,
107
],
[
88,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
] | [
"import java.util.*;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b, c, GCD, LCM, a_base, b_base;\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\ta_base = a;\n\t\t\tb_base = b;\n\t\t\tif (a < b) {\n\t\t\t\tlong sub;\n\t\t\t\tsub = a;\n\t\t\t\ta = b;\n\t\t\t\tb = sub;\n\t\t\t}\n\t\t\tGCD = gcd(a, b);\n\t\t\tLCM = (a_base * b_base) / GCD;\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}\n\t}\n\tstatic long gcd(long a, long b) {\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcd(b, a % b);\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\tlong a, b, c, GCD, LCM, a_base, b_base;\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\ta_base = a;\n\t\t\tb_base = b;\n\t\t\tif (a < b) {\n\t\t\t\tlong sub;\n\t\t\t\tsub = a;\n\t\t\t\ta = b;\n\t\t\t\tb = sub;\n\t\t\t}\n\t\t\tGCD = gcd(a, b);\n\t\t\tLCM = (a_base * b_base) / GCD;\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}\n\t}\n\tstatic long gcd(long a, long b) {\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcd(b, a % b);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b, c, GCD, LCM, a_base, b_base;\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\ta_base = a;\n\t\t\tb_base = b;\n\t\t\tif (a < b) {\n\t\t\t\tlong sub;\n\t\t\t\tsub = a;\n\t\t\t\ta = b;\n\t\t\t\tb = sub;\n\t\t\t}\n\t\t\tGCD = gcd(a, b);\n\t\t\tLCM = (a_base * b_base) / GCD;\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b, c, GCD, LCM, a_base, b_base;\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\ta_base = a;\n\t\t\tb_base = b;\n\t\t\tif (a < b) {\n\t\t\t\tlong sub;\n\t\t\t\tsub = a;\n\t\t\t\ta = b;\n\t\t\t\tb = sub;\n\t\t\t}\n\t\t\tGCD = gcd(a, b);\n\t\t\tLCM = (a_base * b_base) / GCD;\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long a",
"a",
"b",
"b",
"c",
"c",
"GCD",
"GCD",
"LCM",
"LCM",
"a_base",
"a_base",
"b_base;",
"b_base",
"while (sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\ta_base = a;\n\t\t\tb_base = b;\n\t\t\tif (a < b) {\n\t\t\t\tlong sub;\n\t\t\t\tsub = a;\n\t\t\t\ta = b;\n\t\t\t\tb = sub;\n\t\t\t}\n\t\t\tGCD = gcd(a, b);\n\t\t\tLCM = (a_base * b_base) / GCD;\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\ta_base = a;\n\t\t\tb_base = b;\n\t\t\tif (a < b) {\n\t\t\t\tlong sub;\n\t\t\t\tsub = a;\n\t\t\t\ta = b;\n\t\t\t\tb = sub;\n\t\t\t}\n\t\t\tGCD = gcd(a, b);\n\t\t\tLCM = (a_base * b_base) / GCD;\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}",
"a = sc.nextLong()",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"b = sc.nextLong()",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"a_base = a",
"a_base",
"a",
"b_base = b",
"b_base",
"b",
"if (a < b) {\n\t\t\t\tlong sub;\n\t\t\t\tsub = a;\n\t\t\t\ta = b;\n\t\t\t\tb = sub;\n\t\t\t}",
"a < b",
"a",
"b",
"{\n\t\t\t\tlong sub;\n\t\t\t\tsub = a;\n\t\t\t\ta = b;\n\t\t\t\tb = sub;\n\t\t\t}",
"long sub;",
"sub",
"sub = a",
"sub",
"a",
"a = b",
"a",
"b",
"b = sub",
"b",
"sub",
"GCD = gcd(a, b)",
"GCD",
"gcd(a, b)",
"gcd",
"a",
"b",
"LCM = (a_base * b_base) / GCD",
"LCM",
"(a_base * b_base) / GCD",
"(a_base * b_base)",
"a_base",
"b_base",
"GCD",
"System.out.println(GCD + \" \" + LCM)",
"System.out.println",
"System.out",
"System",
"System.out",
"GCD + \" \" + LCM",
"GCD + \" \" + LCM",
"GCD",
"\" \"",
"LCM",
"String[] args",
"args",
"static long gcd(long a, long b) {\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcd(b, a % b);\n\t}",
"gcd",
"{\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcd(b, a % b);\n\t}",
"if (a % b == 0)\n\t\t\treturn b;",
"a % b == 0",
"a % b",
"a",
"b",
"0",
"return b;",
"b",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b, c, GCD, LCM, a_base, b_base;\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\ta_base = a;\n\t\t\tb_base = b;\n\t\t\tif (a < b) {\n\t\t\t\tlong sub;\n\t\t\t\tsub = a;\n\t\t\t\ta = b;\n\t\t\t\tb = sub;\n\t\t\t}\n\t\t\tGCD = gcd(a, b);\n\t\t\tLCM = (a_base * b_base) / GCD;\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}\n\t}\n\tstatic long gcd(long a, long b) {\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcd(b, a % b);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b, c, GCD, LCM, a_base, b_base;\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\ta_base = a;\n\t\t\tb_base = b;\n\t\t\tif (a < b) {\n\t\t\t\tlong sub;\n\t\t\t\tsub = a;\n\t\t\t\ta = b;\n\t\t\t\tb = sub;\n\t\t\t}\n\t\t\tGCD = gcd(a, b);\n\t\t\tLCM = (a_base * b_base) / GCD;\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}\n\t}\n\tstatic long gcd(long a, long b) {\n\t\tif (a % b == 0)\n\t\t\treturn b;\n\t\treturn gcd(b, a % b);\n\t}\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
long a, b, c, GCD, LCM, a_base, b_base;
while (sc.hasNext()) {
a = sc.nextLong();
b = sc.nextLong();
a_base = a;
b_base = b;
if (a < b) {
long sub;
sub = a;
a = b;
b = sub;
}
GCD = gcd(a, b);
LCM = (a_base * b_base) / GCD;
System.out.println(GCD + " " + LCM);
}
}
static long gcd(long a, long b) {
if (a % b == 0)
return b;
return gcd(b, a % b);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
20,
28,
13,
13,
30,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
42,
2,
17,
13,
30,
41,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
2,
18,
13,
13,
18,
13,
13,
13,
23,
13,
6,
13,
41,
13,
41,
13,
12,
13,
30,
0,
13,
13,
0,
13,
13,
23,
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
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
34,
37
],
[
38,
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
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
56,
58
],
[
53,
59
],
[
59,
60
],
[
59,
61
],
[
53,
62
],
[
62,
63
],
[
62,
64
],
[
38,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
71,
71
],
[
71,
72
],
[
71,
73
],
[
71,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
79,
81
],
[
74,
82
],
[
6,
83
],
[
83,
84
],
[
4,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
85,
89
],
[
89,
90
],
[
85,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
97,
99
],
[
91,
100
],
[
100,
101
],
[
91,
102
],
[
102,
103
]
] | [
"\nimport java.util.Scanner;\n\nclass Main{\n\tstatic class Pair{\n\t\tpublic long x, y;\n\t\tPair( long xx, long yy ){ x=xx; y=yy; }\n\t}\n\tpublic static void main(String[]av){\n\t\tScanner sc = new Scanner( System.in );\n\t\tjava.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();\n\t\twhile( sc.hasNextInt() )\t{\n\t\t\tlong x = sc.nextInt();\n\t\t\tlong y = sc.nextInt();\n\t\t\tlist.add( new Pair( Math.max(x,y), Math.min(x,y)));\n\t\t}\n\t\tfor ( Pair p : list ){\n\t\t\tlong x = p.x;\n\t\t\tlong y = p.y;\n\t\t\tdo{\n\t\t\t\tlong\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t}while( 0 < y );\n\t\t\tSystem.out.println( x + \" \" + p.x*p.y/x );\n\t\t}\n\t}\n}\n\t\t\t\t",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tstatic class Pair{\n\t\tpublic long x, y;\n\t\tPair( long xx, long yy ){ x=xx; y=yy; }\n\t}\n\tpublic static void main(String[]av){\n\t\tScanner sc = new Scanner( System.in );\n\t\tjava.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();\n\t\twhile( sc.hasNextInt() )\t{\n\t\t\tlong x = sc.nextInt();\n\t\t\tlong y = sc.nextInt();\n\t\t\tlist.add( new Pair( Math.max(x,y), Math.min(x,y)));\n\t\t}\n\t\tfor ( Pair p : list ){\n\t\t\tlong x = p.x;\n\t\t\tlong y = p.y;\n\t\t\tdo{\n\t\t\t\tlong\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t}while( 0 < y );\n\t\t\tSystem.out.println( x + \" \" + p.x*p.y/x );\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[]av){\n\t\tScanner sc = new Scanner( System.in );\n\t\tjava.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();\n\t\twhile( sc.hasNextInt() )\t{\n\t\t\tlong x = sc.nextInt();\n\t\t\tlong y = sc.nextInt();\n\t\t\tlist.add( new Pair( Math.max(x,y), Math.min(x,y)));\n\t\t}\n\t\tfor ( Pair p : list ){\n\t\t\tlong x = p.x;\n\t\t\tlong y = p.y;\n\t\t\tdo{\n\t\t\t\tlong\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t}while( 0 < y );\n\t\t\tSystem.out.println( x + \" \" + p.x*p.y/x );\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner( System.in );\n\t\tjava.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();\n\t\twhile( sc.hasNextInt() )\t{\n\t\t\tlong x = sc.nextInt();\n\t\t\tlong y = sc.nextInt();\n\t\t\tlist.add( new Pair( Math.max(x,y), Math.min(x,y)));\n\t\t}\n\t\tfor ( Pair p : list ){\n\t\t\tlong x = p.x;\n\t\t\tlong y = p.y;\n\t\t\tdo{\n\t\t\t\tlong\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t}while( 0 < y );\n\t\t\tSystem.out.println( x + \" \" + p.x*p.y/x );\n\t\t}\n\t}",
"Scanner sc = new Scanner( System.in );",
"sc",
"new Scanner( System.in )",
"java.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();",
"list",
"new java.util.ArrayList<Pair>()",
"while( sc.hasNextInt() )\t{\n\t\t\tlong x = sc.nextInt();\n\t\t\tlong y = sc.nextInt();\n\t\t\tlist.add( new Pair( Math.max(x,y), Math.min(x,y)));\n\t\t}",
"sc.hasNextInt()",
"sc.hasNextInt",
"sc",
"{\n\t\t\tlong x = sc.nextInt();\n\t\t\tlong y = sc.nextInt();\n\t\t\tlist.add( new Pair( Math.max(x,y), Math.min(x,y)));\n\t\t}",
"long x = sc.nextInt();",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"long y = sc.nextInt();",
"y",
"sc.nextInt()",
"sc.nextInt",
"sc",
"list.add( new Pair( Math.max(x,y), Math.min(x,y)))",
"list.add",
"list",
"new Pair( Math.max(x,y), Math.min(x,y))",
"for ( Pair p : list ){\n\t\t\tlong x = p.x;\n\t\t\tlong y = p.y;\n\t\t\tdo{\n\t\t\t\tlong\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t}while( 0 < y );\n\t\t\tSystem.out.println( x + \" \" + p.x*p.y/x );\n\t\t}",
"Pair p",
"list",
"{\n\t\t\tlong x = p.x;\n\t\t\tlong y = p.y;\n\t\t\tdo{\n\t\t\t\tlong\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t}while( 0 < y );\n\t\t\tSystem.out.println( x + \" \" + p.x*p.y/x );\n\t\t}",
"{\n\t\t\tlong x = p.x;\n\t\t\tlong y = p.y;\n\t\t\tdo{\n\t\t\t\tlong\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t}while( 0 < y );\n\t\t\tSystem.out.println( x + \" \" + p.x*p.y/x );\n\t\t}",
"long x = p.x;",
"x",
"p.x",
"p",
"p.x",
"long y = p.y;",
"y",
"p.y",
"p",
"p.y",
"do{\n\t\t\t\tlong\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t}while( 0 < y );",
"0 < y",
"0",
"y",
"{\n\t\t\t\tlong\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t}",
"long\tz = x % y;",
"z",
"x % y",
"x",
"y",
"x = y",
"x",
"y",
"y = z",
"y",
"z",
"System.out.println( x + \" \" + p.x*p.y/x )",
"System.out.println",
"System.out",
"System",
"System.out",
"x + \" \" + p.x*p.y/x",
"x + \" \" + p.x*p.y/x",
"x",
"\" \"",
"p.x*p.y/x",
"p.x*p.y",
"p.x",
"p",
"p.x",
"p.y",
"p",
"p.y",
"x",
"String[]av",
"av",
"static class Pair{\n\t\tpublic long x, y;\n\t\tPair( long xx, long yy ){ x=xx; y=yy; }\n\t}",
"Pair",
"public long x",
"x",
"y;",
"y",
"Pair( long xx, long yy ){ x=xx; y=yy; }",
"Pair",
"{ x=xx; y=yy; }",
"x=xx",
"x",
"xx",
"y=yy",
"y",
"yy",
"long xx",
"xx",
"long yy",
"yy"
] |
import java.util.Scanner;
class Main{
static class Pair{
public long x, y;
Pair( long xx, long yy ){ x=xx; y=yy; }
}
public static void main(String[]av){
Scanner sc = new Scanner( System.in );
java.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();
while( sc.hasNextInt() ) {
long x = sc.nextInt();
long y = sc.nextInt();
list.add( new Pair( Math.max(x,y), Math.min(x,y)));
}
for ( Pair p : list ){
long x = p.x;
long y = p.y;
do{
long z = x % y;
x = y;
y = z;
}while( 0 < y );
System.out.println( x + " " + p.x*p.y/x );
}
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
2,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
76,
5
],
[
76,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
29,
32
],
[
16,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
39,
39
],
[
39,
40
],
[
39,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
6,
47
],
[
47,
48
],
[
76,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
55,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
51,
69
],
[
69,
70
],
[
49,
71
],
[
71,
72
],
[
49,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
]
] | [
"import java.util.Scanner;\n\n\npublic class Main {\n public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \twhile(input.hasNextInt()){\n \t\tint a = input.nextInt();\n \t\tint b = input.nextInt();\n \t\tint gcd_num = gcd(a,b);\n \t\tSystem.out.println(gcd_num+\" \"+(a/gcd_num)*b);\n \t}\n }\n \n public static int gcd(int x,int y){\n \tint r;\n while((r = x % y) != 0) // yで割り切れるまでループ\n {\n x = y;\n y = r;\n }\n return y;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \twhile(input.hasNextInt()){\n \t\tint a = input.nextInt();\n \t\tint b = input.nextInt();\n \t\tint gcd_num = gcd(a,b);\n \t\tSystem.out.println(gcd_num+\" \"+(a/gcd_num)*b);\n \t}\n }\n \n public static int gcd(int x,int y){\n \tint r;\n while((r = x % y) != 0) // yで割り切れるまでループ\n {\n x = y;\n y = r;\n }\n return y;\n }\n}",
"Main",
"public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \twhile(input.hasNextInt()){\n \t\tint a = input.nextInt();\n \t\tint b = input.nextInt();\n \t\tint gcd_num = gcd(a,b);\n \t\tSystem.out.println(gcd_num+\" \"+(a/gcd_num)*b);\n \t}\n }",
"main",
"{\n \tScanner input = new Scanner(System.in);\n \twhile(input.hasNextInt()){\n \t\tint a = input.nextInt();\n \t\tint b = input.nextInt();\n \t\tint gcd_num = gcd(a,b);\n \t\tSystem.out.println(gcd_num+\" \"+(a/gcd_num)*b);\n \t}\n }",
"Scanner input = new Scanner(System.in);",
"input",
"new Scanner(System.in)",
"while(input.hasNextInt()){\n \t\tint a = input.nextInt();\n \t\tint b = input.nextInt();\n \t\tint gcd_num = gcd(a,b);\n \t\tSystem.out.println(gcd_num+\" \"+(a/gcd_num)*b);\n \t}",
"input.hasNextInt()",
"input.hasNextInt",
"input",
"{\n \t\tint a = input.nextInt();\n \t\tint b = input.nextInt();\n \t\tint gcd_num = gcd(a,b);\n \t\tSystem.out.println(gcd_num+\" \"+(a/gcd_num)*b);\n \t}",
"int a = input.nextInt();",
"a",
"input.nextInt()",
"input.nextInt",
"input",
"int b = input.nextInt();",
"b",
"input.nextInt()",
"input.nextInt",
"input",
"int gcd_num = gcd(a,b);",
"gcd_num",
"gcd(a,b)",
"gcd",
"a",
"b",
"System.out.println(gcd_num+\" \"+(a/gcd_num)*b)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd_num+\" \"+(a/gcd_num)*b",
"gcd_num+\" \"+(a/gcd_num)*b",
"gcd_num",
"\" \"",
"(a/gcd_num)*b",
"(a/gcd_num)",
"a",
"gcd_num",
"b",
"String[] args",
"args",
"public static int gcd(int x,int y){\n \tint r;\n while((r = x % y) != 0) // yで割り切れるまでループ\n {\n x = y;\n y = r;\n }\n return y;\n }",
"gcd",
"{\n \tint r;\n while((r = x % y) != 0) // yで割り切れるまでループ\n {\n x = y;\n y = r;\n }\n return y;\n }",
"int r;",
"r",
"while((r = x % y) != 0) // yで割り切れるまでループ\n {\n x = y;\n y = r;\n }",
"(r = x % y) != 0",
"(r = x % y)",
"r",
"x % y",
"x",
"y",
"0",
"{\n x = y;\n y = r;\n }",
"x = y",
"x",
"y",
"y = r",
"y",
"r",
"return y;",
"y",
"int x",
"x",
"int y",
"y",
"public class Main {\n public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \twhile(input.hasNextInt()){\n \t\tint a = input.nextInt();\n \t\tint b = input.nextInt();\n \t\tint gcd_num = gcd(a,b);\n \t\tSystem.out.println(gcd_num+\" \"+(a/gcd_num)*b);\n \t}\n }\n \n public static int gcd(int x,int y){\n \tint r;\n while((r = x % y) != 0) // yで割り切れるまでループ\n {\n x = y;\n y = r;\n }\n return y;\n }\n}",
"public class Main {\n public static void main(String[] args){\n \tScanner input = new Scanner(System.in);\n \twhile(input.hasNextInt()){\n \t\tint a = input.nextInt();\n \t\tint b = input.nextInt();\n \t\tint gcd_num = gcd(a,b);\n \t\tSystem.out.println(gcd_num+\" \"+(a/gcd_num)*b);\n \t}\n }\n \n public static int gcd(int x,int y){\n \tint r;\n while((r = x % y) != 0) // yで割り切れるまでループ\n {\n x = y;\n y = r;\n }\n return y;\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner input = new Scanner(System.in);
while(input.hasNextInt()){
int a = input.nextInt();
int b = input.nextInt();
int gcd_num = gcd(a,b);
System.out.println(gcd_num+" "+(a/gcd_num)*b);
}
}
public static int gcd(int x,int y){
int r;
while((r = x % y) != 0) // yで割り切れるまでループ
{
x = y;
y = r;
}
return y;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
42,
2,
2,
13,
17,
40,
4,
18,
17,
13,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
13,
13,
13,
41,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
0,
13,
4,
18,
13,
4,
18,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
41,
13,
40,
17,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
135,
5
],
[
135,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
16,
19
],
[
12,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
26,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
36,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
48,
50
],
[
36,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
56,
58
],
[
36,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
61,
64
],
[
36,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
36,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
72,
77
],
[
78,
78
],
[
78,
79
],
[
78,
80
],
[
78,
81
],
[
36,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
20,
87
],
[
87,
88
],
[
88,
89
],
[
6,
90
],
[
90,
91
],
[
135,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
103,
104
],
[
103,
105
],
[
99,
106
],
[
106,
107
],
[
106,
108
],
[
94,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
94,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
117,
118
],
[
117,
119
],
[
114,
120
],
[
113,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
125,
126
],
[
125,
127
],
[
94,
128
],
[
128,
129
],
[
92,
130
],
[
130,
131
],
[
92,
132
],
[
132,
133
],
[
0,
134
],
[
134,
135
],
[
134,
136
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n try {\n String inputData = scan.nextLine();\n while (inputData != null && !\"\".equals(inputData)) {\n String[] inputDataSP = inputData.split(\" \");\n long a = Long.parseLong(inputDataSP[0]);\n long b = Long.parseLong(inputDataSP[1]);\n long gcd = gcd(a, b);\n long lcm = (a * b) / gcd;\n System.out.println(gcd + \" \" + lcm);\n inputData = scan.nextLine();\n }\n scan.close();\n } catch (Exception e) {\n System.exit(0);\n }\n }\n\n private static long gcd(long a, long b) {\n if (a < b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n long mod = -1;\n while ((mod = a % b) != 0) {\n a = b;\n b = mod;\n }\n return b;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n try {\n String inputData = scan.nextLine();\n while (inputData != null && !\"\".equals(inputData)) {\n String[] inputDataSP = inputData.split(\" \");\n long a = Long.parseLong(inputDataSP[0]);\n long b = Long.parseLong(inputDataSP[1]);\n long gcd = gcd(a, b);\n long lcm = (a * b) / gcd;\n System.out.println(gcd + \" \" + lcm);\n inputData = scan.nextLine();\n }\n scan.close();\n } catch (Exception e) {\n System.exit(0);\n }\n }\n\n private static long gcd(long a, long b) {\n if (a < b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n long mod = -1;\n while ((mod = a % b) != 0) {\n a = b;\n b = mod;\n }\n return b;\n }\n}",
"Main",
"public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n try {\n String inputData = scan.nextLine();\n while (inputData != null && !\"\".equals(inputData)) {\n String[] inputDataSP = inputData.split(\" \");\n long a = Long.parseLong(inputDataSP[0]);\n long b = Long.parseLong(inputDataSP[1]);\n long gcd = gcd(a, b);\n long lcm = (a * b) / gcd;\n System.out.println(gcd + \" \" + lcm);\n inputData = scan.nextLine();\n }\n scan.close();\n } catch (Exception e) {\n System.exit(0);\n }\n }",
"main",
"{\n Scanner scan = new Scanner(System.in);\n try {\n String inputData = scan.nextLine();\n while (inputData != null && !\"\".equals(inputData)) {\n String[] inputDataSP = inputData.split(\" \");\n long a = Long.parseLong(inputDataSP[0]);\n long b = Long.parseLong(inputDataSP[1]);\n long gcd = gcd(a, b);\n long lcm = (a * b) / gcd;\n System.out.println(gcd + \" \" + lcm);\n inputData = scan.nextLine();\n }\n scan.close();\n } catch (Exception e) {\n System.exit(0);\n }\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"try {\n String inputData = scan.nextLine();\n while (inputData != null && !\"\".equals(inputData)) {\n String[] inputDataSP = inputData.split(\" \");\n long a = Long.parseLong(inputDataSP[0]);\n long b = Long.parseLong(inputDataSP[1]);\n long gcd = gcd(a, b);\n long lcm = (a * b) / gcd;\n System.out.println(gcd + \" \" + lcm);\n inputData = scan.nextLine();\n }\n scan.close();\n } catch (Exception e) {\n System.exit(0);\n }",
"catch (Exception e) {\n System.exit(0);\n }",
"Exception e",
"{\n System.exit(0);\n }",
"System.exit(0)",
"System.exit",
"System",
"0",
"{\n String inputData = scan.nextLine();\n while (inputData != null && !\"\".equals(inputData)) {\n String[] inputDataSP = inputData.split(\" \");\n long a = Long.parseLong(inputDataSP[0]);\n long b = Long.parseLong(inputDataSP[1]);\n long gcd = gcd(a, b);\n long lcm = (a * b) / gcd;\n System.out.println(gcd + \" \" + lcm);\n inputData = scan.nextLine();\n }\n scan.close();\n }",
"String inputData = scan.nextLine();",
"inputData",
"scan.nextLine()",
"scan.nextLine",
"scan",
"while (inputData != null && !\"\".equals(inputData)) {\n String[] inputDataSP = inputData.split(\" \");\n long a = Long.parseLong(inputDataSP[0]);\n long b = Long.parseLong(inputDataSP[1]);\n long gcd = gcd(a, b);\n long lcm = (a * b) / gcd;\n System.out.println(gcd + \" \" + lcm);\n inputData = scan.nextLine();\n }",
"inputData != null && !\"\".equals(inputData)",
"inputData != null",
"inputData",
"null",
"!\"\".equals(inputData)",
"\"\".equals(inputData)",
"\"\".equals",
"\"\"",
"inputData",
"{\n String[] inputDataSP = inputData.split(\" \");\n long a = Long.parseLong(inputDataSP[0]);\n long b = Long.parseLong(inputDataSP[1]);\n long gcd = gcd(a, b);\n long lcm = (a * b) / gcd;\n System.out.println(gcd + \" \" + lcm);\n inputData = scan.nextLine();\n }",
"String[] inputDataSP = inputData.split(\" \");",
"inputDataSP",
"inputData.split(\" \")",
"inputData.split",
"inputData",
"\" \"",
"long a = Long.parseLong(inputDataSP[0]);",
"a",
"Long.parseLong(inputDataSP[0])",
"Long.parseLong",
"Long",
"inputDataSP[0]",
"inputDataSP",
"0",
"long b = Long.parseLong(inputDataSP[1]);",
"b",
"Long.parseLong(inputDataSP[1])",
"Long.parseLong",
"Long",
"inputDataSP[1]",
"inputDataSP",
"1",
"long gcd = gcd(a, b);",
"gcd",
"gcd(a, b)",
"gcd",
"a",
"b",
"long lcm = (a * b) / gcd;",
"lcm",
"(a * b) / gcd",
"(a * b)",
"a",
"b",
"gcd",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"inputData = scan.nextLine()",
"inputData",
"scan.nextLine()",
"scan.nextLine",
"scan",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"private static long gcd(long a, long b) {\n if (a < b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n long mod = -1;\n while ((mod = a % b) != 0) {\n a = b;\n b = mod;\n }\n return b;\n }",
"gcd",
"{\n if (a < b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n long mod = -1;\n while ((mod = a % b) != 0) {\n a = b;\n b = mod;\n }\n return b;\n }",
"if (a < b) {\n long tmp = a;\n a = b;\n b = tmp;\n }",
"a < b",
"a",
"b",
"{\n long tmp = a;\n a = b;\n b = tmp;\n }",
"long tmp = a;",
"tmp",
"a",
"a = b",
"a",
"b",
"b = tmp",
"b",
"tmp",
"long mod = -1;",
"mod",
"-1",
"1",
"while ((mod = a % b) != 0) {\n a = b;\n b = mod;\n }",
"(mod = a % b) != 0",
"(mod = a % b)",
"mod",
"a % b",
"a",
"b",
"0",
"{\n a = b;\n b = mod;\n }",
"a = b",
"a",
"b",
"b = mod",
"b",
"mod",
"return b;",
"b",
"long a",
"a",
"long b",
"b",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n try {\n String inputData = scan.nextLine();\n while (inputData != null && !\"\".equals(inputData)) {\n String[] inputDataSP = inputData.split(\" \");\n long a = Long.parseLong(inputDataSP[0]);\n long b = Long.parseLong(inputDataSP[1]);\n long gcd = gcd(a, b);\n long lcm = (a * b) / gcd;\n System.out.println(gcd + \" \" + lcm);\n inputData = scan.nextLine();\n }\n scan.close();\n } catch (Exception e) {\n System.exit(0);\n }\n }\n\n private static long gcd(long a, long b) {\n if (a < b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n long mod = -1;\n while ((mod = a % b) != 0) {\n a = b;\n b = mod;\n }\n return b;\n }\n}",
"public class Main {\n\n public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n try {\n String inputData = scan.nextLine();\n while (inputData != null && !\"\".equals(inputData)) {\n String[] inputDataSP = inputData.split(\" \");\n long a = Long.parseLong(inputDataSP[0]);\n long b = Long.parseLong(inputDataSP[1]);\n long gcd = gcd(a, b);\n long lcm = (a * b) / gcd;\n System.out.println(gcd + \" \" + lcm);\n inputData = scan.nextLine();\n }\n scan.close();\n } catch (Exception e) {\n System.exit(0);\n }\n }\n\n private static long gcd(long a, long b) {\n if (a < b) {\n long tmp = a;\n a = b;\n b = tmp;\n }\n long mod = -1;\n while ((mod = a % b) != 0) {\n a = b;\n b = mod;\n }\n return b;\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
try {
String inputData = scan.nextLine();
while (inputData != null && !"".equals(inputData)) {
String[] inputDataSP = inputData.split(" ");
long a = Long.parseLong(inputDataSP[0]);
long b = Long.parseLong(inputDataSP[1]);
long gcd = gcd(a, b);
long lcm = (a * b) / gcd;
System.out.println(gcd + " " + lcm);
inputData = scan.nextLine();
}
scan.close();
} catch (Exception e) {
System.exit(0);
}
}
private static long gcd(long a, long b) {
if (a < b) {
long tmp = a;
a = b;
b = tmp;
}
long mod = -1;
while ((mod = a % b) != 0) {
a = b;
b = mod;
}
return b;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
2,
13,
13,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
99,
5
],
[
99,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
34,
37
],
[
33,
38
],
[
33,
39
],
[
39,
40
],
[
39,
41
],
[
39,
42
],
[
6,
43
],
[
43,
44
],
[
99,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
50,
54
],
[
47,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
57,
61
],
[
47,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
64,
66
],
[
47,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
47,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
74,
77
],
[
45,
78
],
[
78,
79
],
[
45,
80
],
[
80,
81
],
[
99,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
90,
92
],
[
90,
93
],
[
82,
94
],
[
94,
95
],
[
82,
96
],
[
96,
97
],
[
0,
98
],
[
98,
99
],
[
98,
100
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tprivate static long gcd(int a,int b){\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\n\t\tint amari=max%min;\n\t\tif(amari==0)return min;\n\t\treturn gcd(min,amari);\n\t}\n\n\tprivate static int lcm(long a,long b){\n\t\treturn (int) (a*b/gcd((int)a,(int)b));\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tprivate static long gcd(int a,int b){\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\n\t\tint amari=max%min;\n\t\tif(amari==0)return min;\n\t\treturn gcd(min,amari);\n\t}\n\n\tprivate static int lcm(long a,long b){\n\t\treturn (int) (a*b/gcd((int)a,(int)b));\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}",
"int a=sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b=sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(gcd(a,b)+\" \"+lcm(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a,b)",
"lcm",
"a",
"b",
"String[] args",
"args",
"private static long gcd(int a,int b){\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\n\t\tint amari=max%min;\n\t\tif(amari==0)return min;\n\t\treturn gcd(min,amari);\n\t}",
"gcd",
"{\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\n\t\tint amari=max%min;\n\t\tif(amari==0)return min;\n\t\treturn gcd(min,amari);\n\t}",
"int max=Math.max(a, b);",
"max",
"Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"int min=Math.min(a, b);",
"min",
"Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"int amari=max%min;",
"amari",
"max%min",
"max",
"min",
"if(amari==0)return min;",
"amari==0",
"amari",
"0",
"return min;",
"min",
"return gcd(min,amari);",
"gcd(min,amari)",
"gcd",
"min",
"amari",
"int a",
"a",
"int b",
"b",
"private static int lcm(long a,long b){\n\t\treturn (int) (a*b/gcd((int)a,(int)b));\n\t}",
"lcm",
"{\n\t\treturn (int) (a*b/gcd((int)a,(int)b));\n\t}",
"return (int) (a*b/gcd((int)a,(int)b));",
"(int) (a*b/gcd((int)a,(int)b))",
"a*b",
"a",
"b",
"gcd((int)a,(int)b)",
"gcd",
"(int)a",
"(int)b",
"long a",
"a",
"long b",
"b",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tprivate static long gcd(int a,int b){\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\n\t\tint amari=max%min;\n\t\tif(amari==0)return min;\n\t\treturn gcd(min,amari);\n\t}\n\n\tprivate static int lcm(long a,long b){\n\t\treturn (int) (a*b/gcd((int)a,(int)b));\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tprivate static long gcd(int a,int b){\n\t\tint max=Math.max(a, b);\n\t\tint min=Math.min(a, b);\n\n\t\tint amari=max%min;\n\t\tif(amari==0)return min;\n\t\treturn gcd(min,amari);\n\t}\n\n\tprivate static int lcm(long a,long b){\n\t\treturn (int) (a*b/gcd((int)a,(int)b));\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
while(sc.hasNext()){
int a=sc.nextInt();
int b=sc.nextInt();
System.out.println(gcd(a,b)+" "+lcm(a,b));
}
}
private static long gcd(int a,int b){
int max=Math.max(a, b);
int min=Math.min(a, b);
int amari=max%min;
if(amari==0)return min;
return gcd(min,amari);
}
private static int lcm(long a,long b){
return (int) (a*b/gcd((int)a,(int)b));
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
17,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
41,
13,
13,
41,
13,
13,
42,
2,
13,
13,
30,
14,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
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
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
27,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
27,
38
],
[
38,
39
],
[
38,
40
],
[
27,
41
],
[
41,
42
],
[
41,
43
],
[
27,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
27,
61
],
[
61,
62
],
[
61,
63
],
[
27,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
27,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
77,
77
],
[
77,
78
],
[
77,
79
],
[
77,
80
],
[
6,
81
],
[
81,
82
],
[
0,
83
],
[
83,
84
],
[
83,
85
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner s = new Scanner(System.in);\n\t\tint max,min;\n\t\tint a,b;\n\t\t\n\tint counter = 0;\n\t\twhile(s.hasNext()){\n\t\t\t\n\t\t\ta = s.nextInt();\n\t\t\tb = s.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\twhile(x!=y){\n\t\t\t\tif(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmin = x;\n\t\t\tmax = (int)((long)a * b / min);\n\t\t\tSystem.out.println(max+\" \"+min);\n\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\t// TODO ?????????????????????????????????????????????\n\t\tScanner s = new Scanner(System.in);\n\t\tint max,min;\n\t\tint a,b;\n\t\t\n\tint counter = 0;\n\t\twhile(s.hasNext()){\n\t\t\t\n\t\t\ta = s.nextInt();\n\t\t\tb = s.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\twhile(x!=y){\n\t\t\t\tif(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmin = x;\n\t\t\tmax = (int)((long)a * b / min);\n\t\t\tSystem.out.println(max+\" \"+min);\n\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner s = new Scanner(System.in);\n\t\tint max,min;\n\t\tint a,b;\n\t\t\n\tint counter = 0;\n\t\twhile(s.hasNext()){\n\t\t\t\n\t\t\ta = s.nextInt();\n\t\t\tb = s.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\twhile(x!=y){\n\t\t\t\tif(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmin = x;\n\t\t\tmax = (int)((long)a * b / min);\n\t\t\tSystem.out.println(max+\" \"+min);\n\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner s = new Scanner(System.in);\n\t\tint max,min;\n\t\tint a,b;\n\t\t\n\tint counter = 0;\n\t\twhile(s.hasNext()){\n\t\t\t\n\t\t\ta = s.nextInt();\n\t\t\tb = s.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\twhile(x!=y){\n\t\t\t\tif(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmin = x;\n\t\t\tmax = (int)((long)a * b / min);\n\t\t\tSystem.out.println(max+\" \"+min);\n\n\t\t}\n\t}",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"int max",
"max",
"min;",
"min",
"int a",
"a",
"b;",
"b",
"int counter = 0;",
"counter",
"0",
"while(s.hasNext()){\n\t\t\t\n\t\t\ta = s.nextInt();\n\t\t\tb = s.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\twhile(x!=y){\n\t\t\t\tif(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmin = x;\n\t\t\tmax = (int)((long)a * b / min);\n\t\t\tSystem.out.println(max+\" \"+min);\n\n\t\t}",
"s.hasNext()",
"s.hasNext",
"s",
"{\n\t\t\t\n\t\t\ta = s.nextInt();\n\t\t\tb = s.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\twhile(x!=y){\n\t\t\t\tif(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmin = x;\n\t\t\tmax = (int)((long)a * b / min);\n\t\t\tSystem.out.println(max+\" \"+min);\n\n\t\t}",
"a = s.nextInt()",
"a",
"s.nextInt()",
"s.nextInt",
"s",
"b = s.nextInt()",
"b",
"s.nextInt()",
"s.nextInt",
"s",
"int x = a;",
"x",
"a",
"int y = b;",
"y",
"b",
"while(x!=y){\n\t\t\t\tif(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}\n\t\t\t}",
"x!=y",
"x",
"y",
"{\n\t\t\t\tif(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}\n\t\t\t}",
"if(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}",
"x>y",
"x",
"y",
"{\n\t\t\t\t\ty += b;\n\t\t\t\t}",
"y += b",
"y",
"b",
"{\n\t\t\t\t\tx += a;\n\t\t\t\t}",
"x += a",
"x",
"a",
"min = x",
"min",
"x",
"max = (int)((long)a * b / min)",
"max",
"(int)((long)a * b / min)",
"(long)a * b",
"(long)a",
"b",
"min",
"System.out.println(max+\" \"+min)",
"System.out.println",
"System.out",
"System",
"System.out",
"max+\" \"+min",
"max+\" \"+min",
"max",
"\" \"",
"min",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner s = new Scanner(System.in);\n\t\tint max,min;\n\t\tint a,b;\n\t\t\n\tint counter = 0;\n\t\twhile(s.hasNext()){\n\t\t\t\n\t\t\ta = s.nextInt();\n\t\t\tb = s.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\twhile(x!=y){\n\t\t\t\tif(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmin = x;\n\t\t\tmax = (int)((long)a * b / min);\n\t\t\tSystem.out.println(max+\" \"+min);\n\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tScanner s = new Scanner(System.in);\n\t\tint max,min;\n\t\tint a,b;\n\t\t\n\tint counter = 0;\n\t\twhile(s.hasNext()){\n\t\t\t\n\t\t\ta = s.nextInt();\n\t\t\tb = s.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\twhile(x!=y){\n\t\t\t\tif(x>y){\n\t\t\t\t\ty += b;\n\t\t\t\t}else{\n\t\t\t\t\tx += a;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmin = x;\n\t\t\tmax = (int)((long)a * b / min);\n\t\t\tSystem.out.println(max+\" \"+min);\n\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner s = new Scanner(System.in);
int max,min;
int a,b;
int counter = 0;
while(s.hasNext()){
a = s.nextInt();
b = s.nextInt();
int x = a;
int y = b;
while(x!=y){
if(x>y){
y += b;
}else{
x += a;
}
}
min = x;
max = (int)((long)a * b / min);
System.out.println(max+" "+min);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
2,
13,
17,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
17,
13,
41,
13,
4,
18,
13,
4,
18,
13,
2,
13,
17,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
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
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
14,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
27,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
36,
40
],
[
14,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
49,
51
],
[
14,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
58,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
59,
62
],
[
58,
63
],
[
58,
64
],
[
64,
65
],
[
64,
66
],
[
64,
67
],
[
6,
68
],
[
68,
69
],
[
107,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
72,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
80,
83
],
[
83,
84
],
[
83,
85
],
[
70,
86
],
[
86,
87
],
[
70,
88
],
[
88,
89
],
[
107,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
98,
99
],
[
98,
100
],
[
98,
101
],
[
90,
102
],
[
102,
103
],
[
90,
104
],
[
104,
105
],
[
0,
106
],
[
106,
107
],
[
106,
108
]
] | [
"import java.io.*;\npublic class Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString s = r.readLine();\n\t\t\tif(s == null) break;\n\t\t\tint i = s.indexOf(\" \");\n\t\t\tlong a = Long.valueOf(s.substring(0, i));\n\t\t\tlong b = Long.valueOf(s.substring(i+1));\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\tprivate static long gcd(long a, long b) {\n\t\tif(b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}\n\tprivate static long lcm(long a, long b) {\n\t\treturn b * a / gcd(a, b);\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString s = r.readLine();\n\t\t\tif(s == null) break;\n\t\t\tint i = s.indexOf(\" \");\n\t\t\tlong a = Long.valueOf(s.substring(0, i));\n\t\t\tlong b = Long.valueOf(s.substring(i+1));\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\tprivate static long gcd(long a, long b) {\n\t\tif(b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}\n\tprivate static long lcm(long a, long b) {\n\t\treturn b * a / gcd(a, b);\n\t}\n}",
"Main",
"public static void main(String args[]) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString s = r.readLine();\n\t\t\tif(s == null) break;\n\t\t\tint i = s.indexOf(\" \");\n\t\t\tlong a = Long.valueOf(s.substring(0, i));\n\t\t\tlong b = Long.valueOf(s.substring(i+1));\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString s = r.readLine();\n\t\t\tif(s == null) break;\n\t\t\tint i = s.indexOf(\" \");\n\t\t\tlong a = Long.valueOf(s.substring(0, i));\n\t\t\tlong b = Long.valueOf(s.substring(i+1));\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}",
"BufferedReader r = new BufferedReader(new InputStreamReader(System.in));",
"r",
"new BufferedReader(new InputStreamReader(System.in))",
"while(true){\n\t\t\tString s = r.readLine();\n\t\t\tif(s == null) break;\n\t\t\tint i = s.indexOf(\" \");\n\t\t\tlong a = Long.valueOf(s.substring(0, i));\n\t\t\tlong b = Long.valueOf(s.substring(i+1));\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}",
"true",
"{\n\t\t\tString s = r.readLine();\n\t\t\tif(s == null) break;\n\t\t\tint i = s.indexOf(\" \");\n\t\t\tlong a = Long.valueOf(s.substring(0, i));\n\t\t\tlong b = Long.valueOf(s.substring(i+1));\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}",
"String s = r.readLine();",
"s",
"r.readLine()",
"r.readLine",
"r",
"if(s == null) break;",
"s == null",
"s",
"null",
"break;",
"int i = s.indexOf(\" \");",
"i",
"s.indexOf(\" \")",
"s.indexOf",
"s",
"\" \"",
"long a = Long.valueOf(s.substring(0, i));",
"a",
"Long.valueOf(s.substring(0, i))",
"Long.valueOf",
"Long",
"s.substring(0, i)",
"s.substring",
"s",
"0",
"i",
"long b = Long.valueOf(s.substring(i+1));",
"b",
"Long.valueOf(s.substring(i+1))",
"Long.valueOf",
"Long",
"s.substring(i+1)",
"s.substring",
"s",
"i+1",
"i",
"1",
"System.out.println(gcd(a, b) + \" \" + lcm(a, b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a, b) + \" \" + lcm(a, b)",
"gcd(a, b) + \" \" + lcm(a, b)",
"gcd(a, b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a, b)",
"lcm",
"a",
"b",
"String args[]",
"args",
"private static long gcd(long a, long b) {\n\t\tif(b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}",
"gcd",
"{\n\t\tif(b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}",
"if(b == 0) return a;",
"b == 0",
"b",
"0",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"private static long lcm(long a, long b) {\n\t\treturn b * a / gcd(a, b);\n\t}",
"lcm",
"{\n\t\treturn b * a / gcd(a, b);\n\t}",
"return b * a / gcd(a, b);",
"b * a / gcd(a, b)",
"b * a",
"b",
"a",
"gcd(a, b)",
"gcd",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public class Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString s = r.readLine();\n\t\t\tif(s == null) break;\n\t\t\tint i = s.indexOf(\" \");\n\t\t\tlong a = Long.valueOf(s.substring(0, i));\n\t\t\tlong b = Long.valueOf(s.substring(i+1));\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\tprivate static long gcd(long a, long b) {\n\t\tif(b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}\n\tprivate static long lcm(long a, long b) {\n\t\treturn b * a / gcd(a, b);\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]) throws IOException {\n\t\tBufferedReader r = new BufferedReader(new InputStreamReader(System.in));\n\t\twhile(true){\n\t\t\tString s = r.readLine();\n\t\t\tif(s == null) break;\n\t\t\tint i = s.indexOf(\" \");\n\t\t\tlong a = Long.valueOf(s.substring(0, i));\n\t\t\tlong b = Long.valueOf(s.substring(i+1));\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\tprivate static long gcd(long a, long b) {\n\t\tif(b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}\n\tprivate static long lcm(long a, long b) {\n\t\treturn b * a / gcd(a, b);\n\t}\n}",
"Main"
] | import java.io.*;
public class Main {
public static void main(String args[]) throws IOException {
BufferedReader r = new BufferedReader(new InputStreamReader(System.in));
while(true){
String s = r.readLine();
if(s == null) break;
int i = s.indexOf(" ");
long a = Long.valueOf(s.substring(0, i));
long b = Long.valueOf(s.substring(i+1));
System.out.println(gcd(a, b) + " " + lcm(a, b));
}
}
private static long gcd(long a, long b) {
if(b == 0) return a;
return gcd(b, a % b);
}
private static long lcm(long a, long b) {
return b * a / gcd(a, b);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
20,
41,
13,
20,
4,
18,
18,
13,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
4,
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
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
17,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
24,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
31,
38
],
[
38,
39
],
[
38,
40
],
[
31,
41
],
[
41,
42
],
[
41,
43
],
[
31,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
50,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
50,
55
],
[
50,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
15,
66
],
[
66,
67
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\n\nclass Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString st;\n\n\t\twhile ((st = br.readLine()) != null) {\n\n\t\t\tString[] str = st.split(\" \");\n\n\t\t\tBigInteger a = new BigInteger(str[0]);\n\n\t\t\tBigInteger b = new BigInteger(str[1]);\n\n\t\t\tSystem.out.println(a.gcd(b) + \" \" + a.multiply(b).divide(a.gcd(b)));\n\n\t\t}\n\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",
"class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString st;\n\n\t\twhile ((st = br.readLine()) != null) {\n\n\t\t\tString[] str = st.split(\" \");\n\n\t\t\tBigInteger a = new BigInteger(str[0]);\n\n\t\t\tBigInteger b = new BigInteger(str[1]);\n\n\t\t\tSystem.out.println(a.gcd(b) + \" \" + a.multiply(b).divide(a.gcd(b)));\n\n\t\t}\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString st;\n\n\t\twhile ((st = br.readLine()) != null) {\n\n\t\t\tString[] str = st.split(\" \");\n\n\t\t\tBigInteger a = new BigInteger(str[0]);\n\n\t\t\tBigInteger b = new BigInteger(str[1]);\n\n\t\t\tSystem.out.println(a.gcd(b) + \" \" + a.multiply(b).divide(a.gcd(b)));\n\n\t\t}\n\n\t}",
"main",
"{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\n\t\tString st;\n\n\t\twhile ((st = br.readLine()) != null) {\n\n\t\t\tString[] str = st.split(\" \");\n\n\t\t\tBigInteger a = new BigInteger(str[0]);\n\n\t\t\tBigInteger b = new BigInteger(str[1]);\n\n\t\t\tSystem.out.println(a.gcd(b) + \" \" + a.multiply(b).divide(a.gcd(b)));\n\n\t\t}\n\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String st;",
"st",
"while ((st = br.readLine()) != null) {\n\n\t\t\tString[] str = st.split(\" \");\n\n\t\t\tBigInteger a = new BigInteger(str[0]);\n\n\t\t\tBigInteger b = new BigInteger(str[1]);\n\n\t\t\tSystem.out.println(a.gcd(b) + \" \" + a.multiply(b).divide(a.gcd(b)));\n\n\t\t}",
"(st = br.readLine()) != null",
"(st = br.readLine())",
"st",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\n\t\t\tString[] str = st.split(\" \");\n\n\t\t\tBigInteger a = new BigInteger(str[0]);\n\n\t\t\tBigInteger b = new BigInteger(str[1]);\n\n\t\t\tSystem.out.println(a.gcd(b) + \" \" + a.multiply(b).divide(a.gcd(b)));\n\n\t\t}",
"String[] str = st.split(\" \");",
"str",
"st.split(\" \")",
"st.split",
"st",
"\" \"",
"BigInteger a = new BigInteger(str[0]);",
"a",
"new BigInteger(str[0])",
"BigInteger b = new BigInteger(str[1]);",
"b",
"new BigInteger(str[1])",
"System.out.println(a.gcd(b) + \" \" + a.multiply(b).divide(a.gcd(b)))",
"System.out.println",
"System.out",
"System",
"System.out",
"a.gcd(b) + \" \" + a.multiply(b).divide(a.gcd(b))",
"a.gcd(b) + \" \" + a.multiply(b).divide(a.gcd(b))",
"a.gcd(b)",
"a.gcd",
"a",
"b",
"\" \"",
"a.multiply(b).divide(a.gcd(b))",
"a.multiply(b).divide",
"a.multiply(b)",
"a.multiply",
"a",
"b",
"a.gcd(b)",
"a.gcd",
"a",
"b",
"String[] args",
"args"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String st;
while ((st = br.readLine()) != null) {
String[] str = st.split(" ");
BigInteger a = new BigInteger(str[0]);
BigInteger b = new BigInteger(str[1]);
System.out.println(a.gcd(b) + " " + a.multiply(b).divide(a.gcd(b)));
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
17,
41,
13,
17,
11,
1,
17,
30,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
0,
13,
13,
3,
41,
13,
17,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
95,
5
],
[
95,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
29,
33
],
[
16,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
36,
39
],
[
36,
40
],
[
16,
41
],
[
41,
42
],
[
41,
43
],
[
16,
44
],
[
44,
45
],
[
44,
46
],
[
16,
47
],
[
47,
48
],
[
47,
49
],
[
47,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
51,
57
],
[
57,
58
],
[
57,
59
],
[
51,
60
],
[
60,
61
],
[
60,
62
],
[
51,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
16,
72
],
[
72,
73
],
[
72,
74
],
[
16,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
16,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
88,
88
],
[
88,
89
],
[
88,
90
],
[
88,
91
],
[
6,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong a = scan.nextLong();\n\t\t\tlong b = scan.nextLong();\n\t\t\t\n\t\t\tlong max = Math.max(a, b);\n\t\t\tlong min = Math.min(a, b);\n\t\t\t\n\t\t\tlong yakusu = 0;\n\t\t\tlong cal = 0;\n\t\t\t\n\t\t\tfor(;true;){\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlong baisu = 0;\n\t\t\tbaisu = a * b / yakusu;\n\t\t\t\n\t\t\tSystem.out.println(yakusu+\" \"+baisu);\n\t\t}\t\t\t\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong a = scan.nextLong();\n\t\t\tlong b = scan.nextLong();\n\t\t\t\n\t\t\tlong max = Math.max(a, b);\n\t\t\tlong min = Math.min(a, b);\n\t\t\t\n\t\t\tlong yakusu = 0;\n\t\t\tlong cal = 0;\n\t\t\t\n\t\t\tfor(;true;){\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlong baisu = 0;\n\t\t\tbaisu = a * b / yakusu;\n\t\t\t\n\t\t\tSystem.out.println(yakusu+\" \"+baisu);\n\t\t}\t\t\t\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong a = scan.nextLong();\n\t\t\tlong b = scan.nextLong();\n\t\t\t\n\t\t\tlong max = Math.max(a, b);\n\t\t\tlong min = Math.min(a, b);\n\t\t\t\n\t\t\tlong yakusu = 0;\n\t\t\tlong cal = 0;\n\t\t\t\n\t\t\tfor(;true;){\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlong baisu = 0;\n\t\t\tbaisu = a * b / yakusu;\n\t\t\t\n\t\t\tSystem.out.println(yakusu+\" \"+baisu);\n\t\t}\t\t\t\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong a = scan.nextLong();\n\t\t\tlong b = scan.nextLong();\n\t\t\t\n\t\t\tlong max = Math.max(a, b);\n\t\t\tlong min = Math.min(a, b);\n\t\t\t\n\t\t\tlong yakusu = 0;\n\t\t\tlong cal = 0;\n\t\t\t\n\t\t\tfor(;true;){\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlong baisu = 0;\n\t\t\tbaisu = a * b / yakusu;\n\t\t\t\n\t\t\tSystem.out.println(yakusu+\" \"+baisu);\n\t\t}\t\t\t\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"while(scan.hasNext()){\n\t\t\tlong a = scan.nextLong();\n\t\t\tlong b = scan.nextLong();\n\t\t\t\n\t\t\tlong max = Math.max(a, b);\n\t\t\tlong min = Math.min(a, b);\n\t\t\t\n\t\t\tlong yakusu = 0;\n\t\t\tlong cal = 0;\n\t\t\t\n\t\t\tfor(;true;){\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlong baisu = 0;\n\t\t\tbaisu = a * b / yakusu;\n\t\t\t\n\t\t\tSystem.out.println(yakusu+\" \"+baisu);\n\t\t}",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n\t\t\tlong a = scan.nextLong();\n\t\t\tlong b = scan.nextLong();\n\t\t\t\n\t\t\tlong max = Math.max(a, b);\n\t\t\tlong min = Math.min(a, b);\n\t\t\t\n\t\t\tlong yakusu = 0;\n\t\t\tlong cal = 0;\n\t\t\t\n\t\t\tfor(;true;){\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlong baisu = 0;\n\t\t\tbaisu = a * b / yakusu;\n\t\t\t\n\t\t\tSystem.out.println(yakusu+\" \"+baisu);\n\t\t}",
"long a = scan.nextLong();",
"a",
"scan.nextLong()",
"scan.nextLong",
"scan",
"long b = scan.nextLong();",
"b",
"scan.nextLong()",
"scan.nextLong",
"scan",
"long max = Math.max(a, b);",
"max",
"Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"long min = Math.min(a, b);",
"min",
"Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"long yakusu = 0;",
"yakusu",
"0",
"long cal = 0;",
"cal",
"0",
"for(;true;){\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
";",
"true",
"{\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"cal = max % min",
"cal",
"max % min",
"max",
"min",
"max = min",
"max",
"min",
"min = cal",
"min",
"cal",
"if(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"min==0",
"min",
"0",
"{ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"yakusu = max",
"yakusu",
"max",
"break;",
"long baisu = 0;",
"baisu",
"0",
"baisu = a * b / yakusu",
"baisu",
"a * b / yakusu",
"a * b",
"a",
"b",
"yakusu",
"System.out.println(yakusu+\" \"+baisu)",
"System.out.println",
"System.out",
"System",
"System.out",
"yakusu+\" \"+baisu",
"yakusu+\" \"+baisu",
"yakusu",
"\" \"",
"baisu",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong a = scan.nextLong();\n\t\t\tlong b = scan.nextLong();\n\t\t\t\n\t\t\tlong max = Math.max(a, b);\n\t\t\tlong min = Math.min(a, b);\n\t\t\t\n\t\t\tlong yakusu = 0;\n\t\t\tlong cal = 0;\n\t\t\t\n\t\t\tfor(;true;){\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlong baisu = 0;\n\t\t\tbaisu = a * b / yakusu;\n\t\t\t\n\t\t\tSystem.out.println(yakusu+\" \"+baisu);\n\t\t}\t\t\t\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong a = scan.nextLong();\n\t\t\tlong b = scan.nextLong();\n\t\t\t\n\t\t\tlong max = Math.max(a, b);\n\t\t\tlong min = Math.min(a, b);\n\t\t\t\n\t\t\tlong yakusu = 0;\n\t\t\tlong cal = 0;\n\t\t\t\n\t\t\tfor(;true;){\n\t\t\t\tcal = max % min;\n\t\t\t\tmax = min;\n\t\t\t\tmin = cal;\n\t\t\t\t\n\t\t\t\tif(min==0){ \n\t\t\t\t\tyakusu = max;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tlong baisu = 0;\n\t\t\tbaisu = a * b / yakusu;\n\t\t\t\n\t\t\tSystem.out.println(yakusu+\" \"+baisu);\n\t\t}\t\t\t\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args){
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
long a = scan.nextLong();
long b = scan.nextLong();
long max = Math.max(a, b);
long min = Math.min(a, b);
long yakusu = 0;
long cal = 0;
for(;true;){
cal = max % min;
max = min;
min = cal;
if(min==0){
yakusu = max;
break;
}
}
long baisu = 0;
baisu = a * b / yakusu;
System.out.println(yakusu+" "+baisu);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
41,
13,
13,
41,
13,
17,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
41,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
2,
2,
2,
13,
17,
2,
2,
13,
13,
13,
17,
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
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
30,
31
],
[
30,
32
],
[
19,
33
],
[
33,
34
],
[
33,
35
],
[
19,
36
],
[
36,
37
],
[
36,
38
],
[
19,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
47,
49
],
[
43,
50
],
[
50,
51
],
[
50,
52
],
[
19,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
57,
66
],
[
66,
67
],
[
66,
68
],
[
19,
69
],
[
69,
70
],
[
69,
71
],
[
19,
72
],
[
72,
73
],
[
72,
74
],
[
76,
75
],
[
79,
76
],
[
76,
77
],
[
76,
78
],
[
79,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
76,
84
],
[
8,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
6,
91
],
[
91,
92
]
] | [
"import java.util.*;\n\nclass Main {\n public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n String out = \"\";\n while (scanner.hasNext()) {\n long m = scanner.nextLong();\n long n = scanner.nextLong();\n long orgm = m;\n long orgn = n;\n long gcd = 0;\n if (n > m) {\n long temp = m;\n m = n;\n n = temp;\n }\n while (n != 0) {\n long temp = n;\n n = m % n;\n m = temp;\n }\n gcd = m;\n out += gcd + \" \" + (orgm * orgn) / gcd + \"\\n\";\n }\n System.out.print(out);\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n String out = \"\";\n while (scanner.hasNext()) {\n long m = scanner.nextLong();\n long n = scanner.nextLong();\n long orgm = m;\n long orgn = n;\n long gcd = 0;\n if (n > m) {\n long temp = m;\n m = n;\n n = temp;\n }\n while (n != 0) {\n long temp = n;\n n = m % n;\n m = temp;\n }\n gcd = m;\n out += gcd + \" \" + (orgm * orgn) / gcd + \"\\n\";\n }\n System.out.print(out);\n }\n}",
"Main",
"public static void main (String[] args) {\n Scanner scanner = new Scanner(System.in);\n String out = \"\";\n while (scanner.hasNext()) {\n long m = scanner.nextLong();\n long n = scanner.nextLong();\n long orgm = m;\n long orgn = n;\n long gcd = 0;\n if (n > m) {\n long temp = m;\n m = n;\n n = temp;\n }\n while (n != 0) {\n long temp = n;\n n = m % n;\n m = temp;\n }\n gcd = m;\n out += gcd + \" \" + (orgm * orgn) / gcd + \"\\n\";\n }\n System.out.print(out);\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n String out = \"\";\n while (scanner.hasNext()) {\n long m = scanner.nextLong();\n long n = scanner.nextLong();\n long orgm = m;\n long orgn = n;\n long gcd = 0;\n if (n > m) {\n long temp = m;\n m = n;\n n = temp;\n }\n while (n != 0) {\n long temp = n;\n n = m % n;\n m = temp;\n }\n gcd = m;\n out += gcd + \" \" + (orgm * orgn) / gcd + \"\\n\";\n }\n System.out.print(out);\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"String out = \"\";",
"out",
"\"\"",
"while (scanner.hasNext()) {\n long m = scanner.nextLong();\n long n = scanner.nextLong();\n long orgm = m;\n long orgn = n;\n long gcd = 0;\n if (n > m) {\n long temp = m;\n m = n;\n n = temp;\n }\n while (n != 0) {\n long temp = n;\n n = m % n;\n m = temp;\n }\n gcd = m;\n out += gcd + \" \" + (orgm * orgn) / gcd + \"\\n\";\n }",
"scanner.hasNext()",
"scanner.hasNext",
"scanner",
"{\n long m = scanner.nextLong();\n long n = scanner.nextLong();\n long orgm = m;\n long orgn = n;\n long gcd = 0;\n if (n > m) {\n long temp = m;\n m = n;\n n = temp;\n }\n while (n != 0) {\n long temp = n;\n n = m % n;\n m = temp;\n }\n gcd = m;\n out += gcd + \" \" + (orgm * orgn) / gcd + \"\\n\";\n }",
"long m = scanner.nextLong();",
"m",
"scanner.nextLong()",
"scanner.nextLong",
"scanner",
"long n = scanner.nextLong();",
"n",
"scanner.nextLong()",
"scanner.nextLong",
"scanner",
"long orgm = m;",
"orgm",
"m",
"long orgn = n;",
"orgn",
"n",
"long gcd = 0;",
"gcd",
"0",
"if (n > m) {\n long temp = m;\n m = n;\n n = temp;\n }",
"n > m",
"n",
"m",
"{\n long temp = m;\n m = n;\n n = temp;\n }",
"long temp = m;",
"temp",
"m",
"m = n",
"m",
"n",
"n = temp",
"n",
"temp",
"while (n != 0) {\n long temp = n;\n n = m % n;\n m = temp;\n }",
"n != 0",
"n",
"0",
"{\n long temp = n;\n n = m % n;\n m = temp;\n }",
"long temp = n;",
"temp",
"n",
"n = m % n",
"n",
"m % n",
"m",
"n",
"m = temp",
"m",
"temp",
"gcd = m",
"gcd",
"m",
"out += gcd + \" \" + (orgm * orgn) / gcd + \"\\n\"",
"out",
"gcd + \" \" + (orgm * orgn) / gcd + \"\\n\"",
"(orgm * orgn) / gcd",
"gcd + \" \" + (orgm * orgn) / gcd + \"\\n\"",
"gcd",
"\" \"",
"(orgm * orgn) / gcd",
"(orgm * orgn)",
"orgm",
"orgn",
"gcd",
"\"\\n\"",
"System.out.print(out)",
"System.out.print",
"System.out",
"System",
"System.out",
"out",
"String[] args",
"args"
] | import java.util.*;
class Main {
public static void main (String[] args) {
Scanner scanner = new Scanner(System.in);
String out = "";
while (scanner.hasNext()) {
long m = scanner.nextLong();
long n = scanner.nextLong();
long orgm = m;
long orgn = n;
long gcd = 0;
if (n > m) {
long temp = m;
m = n;
n = temp;
}
while (n != 0) {
long temp = n;
n = m % n;
m = temp;
}
gcd = m;
out += gcd + " " + (orgm * orgn) / gcd + "\n";
}
System.out.print(out);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
4,
18,
13,
17,
4,
18,
13,
17,
0,
13,
4,
18,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
124,
17
],
[
124,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
20,
28
],
[
28,
29
],
[
20,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
31,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
38,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
61,
64
],
[
60,
65
],
[
57,
66
],
[
66,
67
],
[
67,
68
],
[
38,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
75,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
76,
79
],
[
75,
80
],
[
75,
81
],
[
81,
82
],
[
81,
83
],
[
81,
84
],
[
18,
85
],
[
85,
86
],
[
124,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
89,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
87,
103
],
[
103,
104
],
[
87,
105
],
[
105,
106
],
[
124,
107
],
[
107,
108
],
[
107,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
115,
116
],
[
115,
117
],
[
115,
118
],
[
107,
119
],
[
119,
120
],
[
107,
121
],
[
121,
122
],
[
0,
123
],
[
123,
124
],
[
123,
125
]
] | [
"//package com.daimens.algorithm.june;\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.InputStreamReader;\nimport java.util.StringTokenizer;\n\n/**\n * \n * @author DemonSong\n * \n * 5.GCD and LCM\n * \n * GCD and LCM Time Limit : 1 sec, Memory Limit : 65536 KB Japanese\n * version is here GCD and LCM Write a program which computes the\n * greatest common divisor (GCD) and the least common multiple (LCM) of\n * given a and b.\n * \n * Input Input consists of several data sets. Each data set contains a\n * and b separated by a single space in a line. The input terminates\n * with EOF.\n * \n * Constraints 0 < a, b ??? 2,000,000,000 LCM(a, b) ??? 2,000,000,000 The\n * number of data sets ??? 50 Output For each data set, print GCD and LCM\n * separated by a single space in a line.\n * \n * Sample Input 8 6 50000000 30000000 Output for the Sample Input 2 24\n * 10000000 150000000\n * \n *\n */\npublic class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }\n\t\n\tprivate static long gcd(long a, long b){\n\t\tif (b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}\n\t\n\tprivate static long lcm(long a, long b) {\n\t\treturn a * b / gcd(a, b);\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStream;",
"InputStream",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }\n\t\n\tprivate static long gcd(long a, long b){\n\t\tif (b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}\n\t\n\tprivate static long lcm(long a, long b) {\n\t\treturn a * b / gcd(a, b);\n\t}\n\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"long a",
"a",
"b;",
"b",
"while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }",
"(str=br.readLine()) != null",
"(str=br.readLine())",
"str",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }",
"a = Long.parseLong(str.substring(0, str.indexOf(\" \")))",
"a",
"Long.parseLong(str.substring(0, str.indexOf(\" \")))",
"Long.parseLong",
"Long",
"str.substring(0, str.indexOf(\" \"))",
"str.substring",
"str",
"0",
"str.indexOf(\" \")",
"str.indexOf",
"str",
"\" \"",
"b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()))",
"b",
"Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()))",
"Long.parseLong",
"Long",
"str.substring(str.indexOf(\" \")+1, str.length())",
"str.substring",
"str",
"str.indexOf(\" \")+1",
"str.indexOf(\" \")",
"str.indexOf",
"str",
"\" \"",
"1",
"str.length()",
"str.length",
"str",
"System.out.println(gcd(a, b) + \" \" + lcm(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a, b) + \" \" + lcm(a,b)",
"gcd(a, b) + \" \" + lcm(a,b)",
"gcd(a, b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a,b)",
"lcm",
"a",
"b",
"String[] args",
"args",
"private static long gcd(long a, long b){\n\t\tif (b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}",
"gcd",
"{\n\t\tif (b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}",
"if (b == 0) return a;",
"b == 0",
"b",
"0",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"private 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 class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }\n\t\n\tprivate static long gcd(long a, long b){\n\t\tif (b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}\n\t\n\tprivate static long lcm(long a, long b) {\n\t\treturn a * b / gcd(a, b);\n\t}\n\n}",
"public class Main{\n\n\tpublic static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }\n\t\n\tprivate static long gcd(long a, long b){\n\t\tif (b == 0) return a;\n\t\treturn gcd(b, a % b);\n\t}\n\t\n\tprivate static long lcm(long a, long b) {\n\t\treturn a * b / gcd(a, b);\n\t}\n\n}",
"Main"
] | //package com.daimens.algorithm.june;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
/**
*
* @author DemonSong
*
* 5.GCD and LCM
*
* GCD and LCM Time Limit : 1 sec, Memory Limit : 65536 KB Japanese
* version is here GCD and LCM Write a program which computes the
* greatest common divisor (GCD) and the least common multiple (LCM) of
* given a and b.
*
* Input Input consists of several data sets. Each data set contains a
* and b separated by a single space in a line. The input terminates
* with EOF.
*
* Constraints 0 < a, b ??? 2,000,000,000 LCM(a, b) ??? 2,000,000,000 The
* number of data sets ??? 50 Output For each data set, print GCD and LCM
* separated by a single space in a line.
*
* Sample Input 8 6 50000000 30000000 Output for the Sample Input 2 24
* 10000000 150000000
*
*
*/
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
long a,b;
while((str=br.readLine()) != null){
a = Long.parseLong(str.substring(0, str.indexOf(" ")));
b = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
System.out.println(gcd(a, b) + " " + lcm(a,b));
}
}
private static long gcd(long a, long b){
if (b == 0) return a;
return gcd(b, a % b);
}
private static long lcm(long a, long b) {
return a * b / gcd(a, b);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
13,
14,
2,
13,
17,
30,
29,
13,
29,
4,
13,
13,
13,
23,
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
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
29,
34
],
[
26,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
40,
41
],
[
40,
42
],
[
26,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
48,
50
],
[
26,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
53,
56
],
[
26,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
26,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
64,
69
],
[
70,
70
],
[
70,
71
],
[
70,
72
],
[
70,
73
],
[
6,
74
],
[
74,
75
],
[
101,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
78,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
92,
95
],
[
76,
96
],
[
96,
97
],
[
76,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
] | [
"import java.util.Scanner;\npublic class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tlong a, b, lcm, gcd;\n\tString[] input;\n\twhile (scan.hasNext()){\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t gcd = solveGCD(a, b);\n\t lcm = a * b / gcd;\n\t System.out.println(gcd + \" \" + lcm);\n\t}\n }\n static long solveGCD (long a, long b) {\n\tlong gcd = a % b;\n\tif (gcd == 0) {\n\t return b;\n\t}\n\treturn solveGCD(b, gcd);\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tlong a, b, lcm, gcd;\n\tString[] input;\n\twhile (scan.hasNext()){\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t gcd = solveGCD(a, b);\n\t lcm = a * b / gcd;\n\t System.out.println(gcd + \" \" + lcm);\n\t}\n }\n static long solveGCD (long a, long b) {\n\tlong gcd = a % b;\n\tif (gcd == 0) {\n\t return b;\n\t}\n\treturn solveGCD(b, gcd);\n }\n}",
"Main",
"public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tlong a, b, lcm, gcd;\n\tString[] input;\n\twhile (scan.hasNext()){\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t gcd = solveGCD(a, b);\n\t lcm = a * b / gcd;\n\t System.out.println(gcd + \" \" + lcm);\n\t}\n }",
"main",
"{\n\tScanner scan = new Scanner(System.in);\n\tlong a, b, lcm, gcd;\n\tString[] input;\n\twhile (scan.hasNext()){\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t gcd = solveGCD(a, b);\n\t lcm = a * b / gcd;\n\t System.out.println(gcd + \" \" + lcm);\n\t}\n }",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"long a",
"a",
"b",
"b",
"lcm",
"lcm",
"gcd;",
"gcd",
"String[] input;",
"input",
"while (scan.hasNext()){\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t gcd = solveGCD(a, b);\n\t lcm = a * b / gcd;\n\t System.out.println(gcd + \" \" + lcm);\n\t}",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t gcd = solveGCD(a, b);\n\t lcm = a * b / gcd;\n\t System.out.println(gcd + \" \" + lcm);\n\t}",
"input = scan.nextLine().split(\" \")",
"input",
"scan.nextLine().split(\" \")",
"scan.nextLine().split",
"scan.nextLine()",
"scan.nextLine",
"scan",
"\" \"",
"a = Integer.parseInt(input[0])",
"a",
"Integer.parseInt(input[0])",
"Integer.parseInt",
"Integer",
"input[0]",
"input",
"0",
"b = Integer.parseInt(input[1])",
"b",
"Integer.parseInt(input[1])",
"Integer.parseInt",
"Integer",
"input[1]",
"input",
"1",
"gcd = solveGCD(a, b)",
"gcd",
"solveGCD(a, b)",
"solveGCD",
"a",
"b",
"lcm = a * b / gcd",
"lcm",
"a * b / gcd",
"a * b",
"a",
"b",
"gcd",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"String[] args",
"args",
"static long solveGCD (long a, long b) {\n\tlong gcd = a % b;\n\tif (gcd == 0) {\n\t return b;\n\t}\n\treturn solveGCD(b, gcd);\n }",
"solveGCD",
"{\n\tlong gcd = a % b;\n\tif (gcd == 0) {\n\t return b;\n\t}\n\treturn solveGCD(b, gcd);\n }",
"long gcd = a % b;",
"gcd",
"a % b",
"a",
"b",
"if (gcd == 0) {\n\t return b;\n\t}",
"gcd == 0",
"gcd",
"0",
"{\n\t return b;\n\t}",
"return b;",
"b",
"return solveGCD(b, gcd);",
"solveGCD(b, gcd)",
"solveGCD",
"b",
"gcd",
"long a",
"a",
"long b",
"b",
"public class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tlong a, b, lcm, gcd;\n\tString[] input;\n\twhile (scan.hasNext()){\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t gcd = solveGCD(a, b);\n\t lcm = a * b / gcd;\n\t System.out.println(gcd + \" \" + lcm);\n\t}\n }\n static long solveGCD (long a, long b) {\n\tlong gcd = a % b;\n\tif (gcd == 0) {\n\t return b;\n\t}\n\treturn solveGCD(b, gcd);\n }\n}",
"public class Main {\n public static void main (String[] args) {\n\tScanner scan = new Scanner(System.in);\n\tlong a, b, lcm, gcd;\n\tString[] input;\n\twhile (scan.hasNext()){\n\t input = scan.nextLine().split(\" \");\n\t a = Integer.parseInt(input[0]);\n\t b = Integer.parseInt(input[1]);\n\t gcd = solveGCD(a, b);\n\t lcm = a * b / gcd;\n\t System.out.println(gcd + \" \" + lcm);\n\t}\n }\n static long solveGCD (long a, long b) {\n\tlong gcd = a % b;\n\tif (gcd == 0) {\n\t return b;\n\t}\n\treturn solveGCD(b, gcd);\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main (String[] args) {
Scanner scan = new Scanner(System.in);
long a, b, lcm, gcd;
String[] input;
while (scan.hasNext()){
input = scan.nextLine().split(" ");
a = Integer.parseInt(input[0]);
b = Integer.parseInt(input[1]);
gcd = solveGCD(a, b);
lcm = a * b / gcd;
System.out.println(gcd + " " + lcm);
}
}
static long solveGCD (long a, long b) {
long gcd = a % b;
if (gcd == 0) {
return b;
}
return solveGCD(b, gcd);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
12,
13,
30,
14,
2,
13,
13,
30,
29,
13,
14,
2,
13,
13,
30,
29,
4,
13,
13,
2,
13,
13,
30,
29,
4,
13,
13,
2,
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,
20,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
104,
5
],
[
104,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
16,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
38,
41
],
[
37,
42
],
[
37,
43
],
[
43,
44
],
[
43,
45
],
[
43,
46
],
[
104,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
50,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
57,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
63,
66
],
[
66,
67
],
[
66,
68
],
[
57,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
71,
74
],
[
74,
75
],
[
74,
76
],
[
47,
77
],
[
77,
78
],
[
47,
79
],
[
79,
80
],
[
104,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
89,
91
],
[
89,
92
],
[
81,
93
],
[
93,
94
],
[
81,
95
],
[
95,
96
],
[
104,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
97,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tprivate Main() {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong a,b;\n\t\twhile(in.hasNext()){\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tpublic long gcd(long a, long b) {\n\t\tif(a==b){\n\t\t\treturn a;\n\t\t} else if(a>b) {\n\t\t\treturn gcd(b,a-b);\n\t\t} else {\n\t\t\treturn gcd(a,b-a);\n\t\t}\n\t}\n\n\tpublic long lcm(long a, long b) {\n\t\treturn a*b/gcd(a,b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tprivate Main() {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong a,b;\n\t\twhile(in.hasNext()){\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tpublic long gcd(long a, long b) {\n\t\tif(a==b){\n\t\t\treturn a;\n\t\t} else if(a>b) {\n\t\t\treturn gcd(b,a-b);\n\t\t} else {\n\t\t\treturn gcd(a,b-a);\n\t\t}\n\t}\n\n\tpublic long lcm(long a, long b) {\n\t\treturn a*b/gcd(a,b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n}",
"Main",
"private Main() {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong a,b;\n\t\twhile(in.hasNext()){\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}",
"Main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tlong a,b;\n\t\twhile(in.hasNext()){\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"long a",
"a",
"b;",
"b",
"while(in.hasNext()){\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}",
"in.hasNext()",
"in.hasNext",
"in",
"{\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}",
"a = in.nextInt()",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"b = in.nextInt()",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"System.out.println(gcd(a,b)+\" \"+lcm(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a,b)",
"lcm",
"a",
"b",
"public long gcd(long a, long b) {\n\t\tif(a==b){\n\t\t\treturn a;\n\t\t} else if(a>b) {\n\t\t\treturn gcd(b,a-b);\n\t\t} else {\n\t\t\treturn gcd(a,b-a);\n\t\t}\n\t}",
"gcd",
"{\n\t\tif(a==b){\n\t\t\treturn a;\n\t\t} else if(a>b) {\n\t\t\treturn gcd(b,a-b);\n\t\t} else {\n\t\t\treturn gcd(a,b-a);\n\t\t}\n\t}",
"if(a==b){\n\t\t\treturn a;\n\t\t} else if(a>b) {\n\t\t\treturn gcd(b,a-b);\n\t\t} else {\n\t\t\treturn gcd(a,b-a);\n\t\t}",
"a==b",
"a",
"b",
"{\n\t\t\treturn a;\n\t\t}",
"return a;",
"a",
"if(a>b) {\n\t\t\treturn gcd(b,a-b);\n\t\t} else {\n\t\t\treturn gcd(a,b-a);\n\t\t}",
"a>b",
"a",
"b",
"{\n\t\t\treturn gcd(b,a-b);\n\t\t}",
"return gcd(b,a-b);",
"gcd(b,a-b)",
"gcd",
"b",
"a-b",
"a",
"b",
"{\n\t\t\treturn gcd(a,b-a);\n\t\t}",
"return gcd(a,b-a);",
"gcd(a,b-a)",
"gcd",
"a",
"b-a",
"b",
"a",
"long a",
"a",
"long b",
"b",
"public 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 main(String[] args) {\n\t\tnew Main();\n\t}",
"main",
"{\n\t\tnew Main();\n\t}",
"new Main()",
"String[] args",
"args",
"public class Main {\n\n\tprivate Main() {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong a,b;\n\t\twhile(in.hasNext()){\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tpublic long gcd(long a, long b) {\n\t\tif(a==b){\n\t\t\treturn a;\n\t\t} else if(a>b) {\n\t\t\treturn gcd(b,a-b);\n\t\t} else {\n\t\t\treturn gcd(a,b-a);\n\t\t}\n\t}\n\n\tpublic long lcm(long a, long b) {\n\t\treturn a*b/gcd(a,b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n}",
"public class Main {\n\n\tprivate Main() {\n\t\tScanner in = new Scanner(System.in);\n\t\tlong a,b;\n\t\twhile(in.hasNext()){\n\t\t\ta = in.nextInt();\n\t\t\tb = in.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\n\tpublic long gcd(long a, long b) {\n\t\tif(a==b){\n\t\t\treturn a;\n\t\t} else if(a>b) {\n\t\t\treturn gcd(b,a-b);\n\t\t} else {\n\t\t\treturn gcd(a,b-a);\n\t\t}\n\t}\n\n\tpublic long lcm(long a, long b) {\n\t\treturn a*b/gcd(a,b);\n\t}\n\n\tpublic static void main(String[] args) {\n\t\tnew Main();\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
private Main() {
Scanner in = new Scanner(System.in);
long a,b;
while(in.hasNext()){
a = in.nextInt();
b = in.nextInt();
System.out.println(gcd(a,b)+" "+lcm(a,b));
}
}
public long gcd(long a, long b) {
if(a==b){
return a;
} else if(a>b) {
return gcd(b,a-b);
} else {
return gcd(a,b-a);
}
}
public long lcm(long a, long b) {
return a*b/gcd(a,b);
}
public static void main(String[] args) {
new Main();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
20,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
4,
18,
13,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
17,
4,
13,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
23,
13,
12,
13,
30,
41,
13,
2,
13,
13,
42,
2,
13,
17,
30,
0,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
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
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
127,
14
],
[
127,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
20,
22
],
[
17,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
24,
30
],
[
23,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
31,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
31,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
42,
47
],
[
48,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
60,
62
],
[
48,
63
],
[
48,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
66,
69
],
[
69,
70
],
[
69,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
75,
76
],
[
75,
77
],
[
15,
78
],
[
78,
79
],
[
127,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
96,
98
],
[
92,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
101,
103
],
[
82,
104
],
[
104,
105
],
[
80,
106
],
[
106,
107
],
[
80,
108
],
[
108,
109
],
[
127,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
118,
120
],
[
118,
121
],
[
110,
122
],
[
122,
123
],
[
110,
124
],
[
124,
125
],
[
0,
126
],
[
126,
127
],
[
126,
128
]
] | [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n String str;\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));\n while ((str = bReader.readLine()) != null) {\n String[] editedStr = str.split(\" \");\n Arrays.sort(editedStr);\n System.out.println(FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])));\n }\n }\n\n public static long FindGCD(long a, long b){\n long r = a % b;\n while (r > 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }\n\n public static long FindLCM(long a, long b) {\n return (a * b) / FindGCD(a, b);\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n String str;\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));\n while ((str = bReader.readLine()) != null) {\n String[] editedStr = str.split(\" \");\n Arrays.sort(editedStr);\n System.out.println(FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])));\n }\n }\n\n public static long FindGCD(long a, long b){\n long r = a % b;\n while (r > 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }\n\n public static long FindLCM(long a, long b) {\n return (a * b) / FindGCD(a, b);\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n String str;\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));\n while ((str = bReader.readLine()) != null) {\n String[] editedStr = str.split(\" \");\n Arrays.sort(editedStr);\n System.out.println(FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])));\n }\n }",
"main",
"{\n String str;\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));\n while ((str = bReader.readLine()) != null) {\n String[] editedStr = str.split(\" \");\n Arrays.sort(editedStr);\n System.out.println(FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])));\n }\n }",
"String str;",
"str",
"BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));",
"bReader",
"new BufferedReader(new InputStreamReader(System.in))",
"while ((str = bReader.readLine()) != null) {\n String[] editedStr = str.split(\" \");\n Arrays.sort(editedStr);\n System.out.println(FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])));\n }",
"(str = bReader.readLine()) != null",
"(str = bReader.readLine())",
"str",
"bReader.readLine()",
"bReader.readLine",
"bReader",
"null",
"{\n String[] editedStr = str.split(\" \");\n Arrays.sort(editedStr);\n System.out.println(FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])));\n }",
"String[] editedStr = str.split(\" \");",
"editedStr",
"str.split(\" \")",
"str.split",
"str",
"\" \"",
"Arrays.sort(editedStr)",
"Arrays.sort",
"Arrays",
"editedStr",
"System.out.println(FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])))",
"System.out.println",
"System.out",
"System",
"System.out",
"FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1]))",
"FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1]))",
"FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1]))",
"FindGCD",
"Long.parseLong(editedStr[0])",
"Long.parseLong",
"Long",
"editedStr[0]",
"editedStr",
"0",
"Long.parseLong(editedStr[1])",
"Long.parseLong",
"Long",
"editedStr[1]",
"editedStr",
"1",
"\" \"",
"FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1]))",
"FindLCM",
"Long.parseLong(editedStr[0])",
"Long.parseLong",
"Long",
"editedStr[0]",
"editedStr",
"0",
"Long.parseLong(editedStr[1])",
"Long.parseLong",
"Long",
"editedStr[1]",
"editedStr",
"1",
"String[] args",
"args",
"public static long FindGCD(long a, long b){\n long r = a % b;\n while (r > 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }",
"FindGCD",
"{\n long r = a % b;\n while (r > 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }",
"long r = a % b;",
"r",
"a % b",
"a",
"b",
"while (r > 0) {\n a = b;\n b = r;\n r = a % b;\n }",
"r > 0",
"r",
"0",
"{\n a = b;\n b = r;\n r = a % b;\n }",
"a = b",
"a",
"b",
"b = r",
"b",
"r",
"r = a % b",
"r",
"a % b",
"a",
"b",
"return b;",
"b",
"long a",
"a",
"long b",
"b",
"public static long FindLCM(long a, long b) {\n return (a * b) / FindGCD(a, b);\n }",
"FindLCM",
"{\n return (a * b) / FindGCD(a, b);\n }",
"return (a * b) / FindGCD(a, b);",
"(a * b) / FindGCD(a, b)",
"(a * b)",
"a",
"b",
"FindGCD(a, b)",
"FindGCD",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n String str;\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));\n while ((str = bReader.readLine()) != null) {\n String[] editedStr = str.split(\" \");\n Arrays.sort(editedStr);\n System.out.println(FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])));\n }\n }\n\n public static long FindGCD(long a, long b){\n long r = a % b;\n while (r > 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }\n\n public static long FindLCM(long a, long b) {\n return (a * b) / FindGCD(a, b);\n }\n}",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n String str;\n BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));\n while ((str = bReader.readLine()) != null) {\n String[] editedStr = str.split(\" \");\n Arrays.sort(editedStr);\n System.out.println(FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + \" \" + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])));\n }\n }\n\n public static long FindGCD(long a, long b){\n long r = a % b;\n while (r > 0) {\n a = b;\n b = r;\n r = a % b;\n }\n return b;\n }\n\n public static long FindLCM(long a, long b) {\n return (a * b) / FindGCD(a, b);\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
public static void main(String[] args) throws IOException {
String str;
BufferedReader bReader = new BufferedReader(new InputStreamReader(System.in));
while ((str = bReader.readLine()) != null) {
String[] editedStr = str.split(" ");
Arrays.sort(editedStr);
System.out.println(FindGCD(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])) + " " + FindLCM(Long.parseLong(editedStr[0]), Long.parseLong(editedStr[1])));
}
}
public static long FindGCD(long a, long b){
long r = a % b;
while (r > 0) {
a = b;
b = r;
r = a % b;
}
return b;
}
public static long FindLCM(long a, long b) {
return (a * b) / FindGCD(a, b);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
2,
13,
13,
13,
12,
13,
30,
4,
18,
20,
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
],
[
104,
11
],
[
104,
12
],
[
12,
13
],
[
12,
14
],
[
104,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
17,
20
],
[
20,
21
],
[
17,
22
],
[
22,
23
],
[
17,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
17,
28
],
[
28,
29
],
[
17,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
30,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
45,
46
],
[
45,
47
],
[
34,
48
],
[
48,
49
],
[
48,
50
],
[
34,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
59,
61
],
[
55,
62
],
[
62,
63
],
[
62,
64
],
[
34,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
69,
75
],
[
75,
76
],
[
75,
77
],
[
69,
78
],
[
78,
79
],
[
78,
80
],
[
34,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
81,
86
],
[
87,
87
],
[
87,
88
],
[
87,
89
],
[
87,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
104,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
95,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
] | [
"\nimport java.util.*;\nimport java.lang.*;\nimport java.math.*;\n\npublic class Main {\n\t\n\tScanner sc = new Scanner(System.in);\n\t\n\tvoid run() {\n\t\t\n\t\tlong x,y,z;\n\t\tlong first,second;\n\t\tlong tmp;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tfirst = sc.nextLong();\n\t\t\tsecond = sc.nextLong();\n\t\t\t\n\t\t\tx = first;\n\t\t\ty = second;\n\t\t\t\n\t\t\tif (x<y) {\n\t\t\t\ttmp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t} while (z!=0);\n\t\t\t\n\t\t\tSystem.out.println(x + \" \" + first * second / x );\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tnew Main().run();\n\t\t\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main {\n\t\n\tScanner sc = new Scanner(System.in);\n\t\n\tvoid run() {\n\t\t\n\t\tlong x,y,z;\n\t\tlong first,second;\n\t\tlong tmp;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tfirst = sc.nextLong();\n\t\t\tsecond = sc.nextLong();\n\t\t\t\n\t\t\tx = first;\n\t\t\ty = second;\n\t\t\t\n\t\t\tif (x<y) {\n\t\t\t\ttmp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t} while (z!=0);\n\t\t\t\n\t\t\tSystem.out.println(x + \" \" + first * second / x );\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tnew Main().run();\n\t\t\n\t}\n}",
"Main",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"void run() {\n\t\t\n\t\tlong x,y,z;\n\t\tlong first,second;\n\t\tlong tmp;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tfirst = sc.nextLong();\n\t\t\tsecond = sc.nextLong();\n\t\t\t\n\t\t\tx = first;\n\t\t\ty = second;\n\t\t\t\n\t\t\tif (x<y) {\n\t\t\t\ttmp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t} while (z!=0);\n\t\t\t\n\t\t\tSystem.out.println(x + \" \" + first * second / x );\n\t\t\t\n\t\t}\n\t\t\n\t}",
"run",
"{\n\t\t\n\t\tlong x,y,z;\n\t\tlong first,second;\n\t\tlong tmp;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tfirst = sc.nextLong();\n\t\t\tsecond = sc.nextLong();\n\t\t\t\n\t\t\tx = first;\n\t\t\ty = second;\n\t\t\t\n\t\t\tif (x<y) {\n\t\t\t\ttmp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t} while (z!=0);\n\t\t\t\n\t\t\tSystem.out.println(x + \" \" + first * second / x );\n\t\t\t\n\t\t}\n\t\t\n\t}",
"long x",
"x",
"y",
"y",
"z;",
"z",
"long first",
"first",
"second;",
"second",
"long tmp;",
"tmp",
"while (sc.hasNext()) {\n\t\t\t\n\t\t\tfirst = sc.nextLong();\n\t\t\tsecond = sc.nextLong();\n\t\t\t\n\t\t\tx = first;\n\t\t\ty = second;\n\t\t\t\n\t\t\tif (x<y) {\n\t\t\t\ttmp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t} while (z!=0);\n\t\t\t\n\t\t\tSystem.out.println(x + \" \" + first * second / x );\n\t\t\t\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\t\n\t\t\tfirst = sc.nextLong();\n\t\t\tsecond = sc.nextLong();\n\t\t\t\n\t\t\tx = first;\n\t\t\ty = second;\n\t\t\t\n\t\t\tif (x<y) {\n\t\t\t\ttmp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t} while (z!=0);\n\t\t\t\n\t\t\tSystem.out.println(x + \" \" + first * second / x );\n\t\t\t\n\t\t}",
"first = sc.nextLong()",
"first",
"sc.nextLong()",
"sc.nextLong",
"sc",
"second = sc.nextLong()",
"second",
"sc.nextLong()",
"sc.nextLong",
"sc",
"x = first",
"x",
"first",
"y = second",
"y",
"second",
"if (x<y) {\n\t\t\t\ttmp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = tmp;\n\t\t\t}",
"x<y",
"x",
"y",
"{\n\t\t\t\ttmp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = tmp;\n\t\t\t}",
"tmp = x",
"tmp",
"x",
"x = y",
"x",
"y",
"y = tmp",
"y",
"tmp",
"do {\n\t\t\t\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t} while (z!=0);",
"z!=0",
"z",
"0",
"{\n\t\t\t\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t}",
"z = x % y",
"z",
"x % y",
"x",
"y",
"x = y",
"x",
"y",
"y = z",
"y",
"z",
"System.out.println(x + \" \" + first * second / x )",
"System.out.println",
"System.out",
"System",
"System.out",
"x + \" \" + first * second / x",
"x + \" \" + first * second / x",
"x",
"\" \"",
"first * second / x",
"first * second",
"first",
"second",
"x",
"public static void main(String[] args) {\n\t\t\n\t\tnew Main().run();\n\t\t\n\t}",
"main",
"{\n\t\t\n\t\tnew Main().run();\n\t\t\n\t}",
"new Main().run()",
"new Main().run",
"new Main()",
"String[] args",
"args",
"public class Main {\n\t\n\tScanner sc = new Scanner(System.in);\n\t\n\tvoid run() {\n\t\t\n\t\tlong x,y,z;\n\t\tlong first,second;\n\t\tlong tmp;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tfirst = sc.nextLong();\n\t\t\tsecond = sc.nextLong();\n\t\t\t\n\t\t\tx = first;\n\t\t\ty = second;\n\t\t\t\n\t\t\tif (x<y) {\n\t\t\t\ttmp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t} while (z!=0);\n\t\t\t\n\t\t\tSystem.out.println(x + \" \" + first * second / x );\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tnew Main().run();\n\t\t\n\t}\n}",
"public class Main {\n\t\n\tScanner sc = new Scanner(System.in);\n\t\n\tvoid run() {\n\t\t\n\t\tlong x,y,z;\n\t\tlong first,second;\n\t\tlong tmp;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\t\n\t\t\tfirst = sc.nextLong();\n\t\t\tsecond = sc.nextLong();\n\t\t\t\n\t\t\tx = first;\n\t\t\ty = second;\n\t\t\t\n\t\t\tif (x<y) {\n\t\t\t\ttmp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = tmp;\n\t\t\t}\n\t\t\t\n\t\t\tdo {\n\t\t\t\tz = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = z;\n\t\t\t} while (z!=0);\n\t\t\t\n\t\t\tSystem.out.println(x + \" \" + first * second / x );\n\t\t\t\n\t\t}\n\t\t\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\tnew Main().run();\n\t\t\n\t}\n}",
"Main"
] |
import java.util.*;
import java.lang.*;
import java.math.*;
public class Main {
Scanner sc = new Scanner(System.in);
void run() {
long x,y,z;
long first,second;
long tmp;
while (sc.hasNext()) {
first = sc.nextLong();
second = sc.nextLong();
x = first;
y = second;
if (x<y) {
tmp = x;
x = y;
y = tmp;
}
do {
z = x % y;
x = y;
y = z;
} while (z!=0);
System.out.println(x + " " + first * second / x );
}
}
public static void main(String[] args) {
new Main().run();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
0,
13,
4,
13,
13,
13,
0,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
0,
13,
4,
13,
13,
13,
29,
2,
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
],
[
117,
11
],
[
117,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
14,
22
],
[
22,
23
],
[
14,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
25,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
38,
43
],
[
32,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
49,
54
],
[
32,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
57,
60
],
[
32,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
63,
66
],
[
32,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
73,
73
],
[
73,
74
],
[
73,
75
],
[
73,
76
],
[
12,
77
],
[
77,
78
],
[
117,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
89,
92
],
[
92,
93
],
[
92,
94
],
[
79,
95
],
[
95,
96
],
[
79,
97
],
[
97,
98
],
[
117,
99
],
[
99,
100
],
[
99,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
104,
106
],
[
104,
107
],
[
101,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
99,
112
],
[
112,
113
],
[
99,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\npublic class Main\n{\n\tpublic static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s;\n\t\tint gcd, lcm;\n\t\twhile((s=br.readLine())!=null)\n\t\t{\n\t\t\tint a = Integer.parseInt(s.split(\" \")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\" \")[1]);\n\n\t\t\tgcd = gcd(a,b);\n\t\t\tlcm = lcm(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b)\n\t{\n\t\tif(b==0) return a;\n\t\telse return gcd(b, a%b);\n\t}\n\n \tpublic static int lcm(int a, int b)\n\t{\n\t\t// a * b = gcd * lcm\n\t\tb /= gcd(a,b);\n\t\treturn a * b;\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"public class Main\n{\n\tpublic static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s;\n\t\tint gcd, lcm;\n\t\twhile((s=br.readLine())!=null)\n\t\t{\n\t\t\tint a = Integer.parseInt(s.split(\" \")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\" \")[1]);\n\n\t\t\tgcd = gcd(a,b);\n\t\t\tlcm = lcm(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b)\n\t{\n\t\tif(b==0) return a;\n\t\telse return gcd(b, a%b);\n\t}\n\n \tpublic static int lcm(int a, int b)\n\t{\n\t\t// a * b = gcd * lcm\n\t\tb /= gcd(a,b);\n\t\treturn a * b;\n\t}\n}",
"Main",
"public static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s;\n\t\tint gcd, lcm;\n\t\twhile((s=br.readLine())!=null)\n\t\t{\n\t\t\tint a = Integer.parseInt(s.split(\" \")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\" \")[1]);\n\n\t\t\tgcd = gcd(a,b);\n\t\t\tlcm = lcm(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s;\n\t\tint gcd, lcm;\n\t\twhile((s=br.readLine())!=null)\n\t\t{\n\t\t\tint a = Integer.parseInt(s.split(\" \")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\" \")[1]);\n\n\t\t\tgcd = gcd(a,b);\n\t\t\tlcm = lcm(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String s;",
"s",
"int gcd",
"gcd",
"lcm;",
"lcm",
"while((s=br.readLine())!=null)\n\t\t{\n\t\t\tint a = Integer.parseInt(s.split(\" \")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\" \")[1]);\n\n\t\t\tgcd = gcd(a,b);\n\t\t\tlcm = lcm(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}",
"(s=br.readLine())!=null",
"(s=br.readLine())",
"s",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tint a = Integer.parseInt(s.split(\" \")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\" \")[1]);\n\n\t\t\tgcd = gcd(a,b);\n\t\t\tlcm = lcm(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}",
"int a = Integer.parseInt(s.split(\" \")[0]);",
"a",
"Integer.parseInt(s.split(\" \")[0])",
"Integer.parseInt",
"Integer",
"s.split(\" \")[0]",
"s.split(\" \")",
"s.split",
"s",
"\" \"",
"0",
"int b = Integer.parseInt(s.split(\" \")[1]);",
"b",
"Integer.parseInt(s.split(\" \")[1])",
"Integer.parseInt",
"Integer",
"s.split(\" \")[1]",
"s.split(\" \")",
"s.split",
"s",
"\" \"",
"1",
"gcd = gcd(a,b)",
"gcd",
"gcd(a,b)",
"gcd",
"a",
"b",
"lcm = lcm(a,b)",
"lcm",
"lcm(a,b)",
"lcm",
"a",
"b",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"String[] arg",
"arg",
"public static int gcd(int a, int b)\n\t{\n\t\tif(b==0) return a;\n\t\telse return gcd(b, a%b);\n\t}",
"gcd",
"{\n\t\tif(b==0) return a;\n\t\telse return gcd(b, a%b);\n\t}",
"if(b==0) return a;\n\t\telse return gcd(b, a%b);",
"b==0",
"b",
"0",
"return a;",
"a",
"return gcd(b, a%b);",
"gcd(b, a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public static int lcm(int a, int b)\n\t{\n\t\t// a * b = gcd * lcm\n\t\tb /= gcd(a,b);\n\t\treturn a * b;\n\t}",
"lcm",
"{\n\t\t// a * b = gcd * lcm\n\t\tb /= gcd(a,b);\n\t\treturn a * b;\n\t}",
"b /= gcd(a,b)",
"b",
"gcd(a,b)",
"gcd",
"a",
"b",
"return a * b;",
"a * b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public class Main\n{\n\tpublic static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s;\n\t\tint gcd, lcm;\n\t\twhile((s=br.readLine())!=null)\n\t\t{\n\t\t\tint a = Integer.parseInt(s.split(\" \")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\" \")[1]);\n\n\t\t\tgcd = gcd(a,b);\n\t\t\tlcm = lcm(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b)\n\t{\n\t\tif(b==0) return a;\n\t\telse return gcd(b, a%b);\n\t}\n\n \tpublic static int lcm(int a, int b)\n\t{\n\t\t// a * b = gcd * lcm\n\t\tb /= gcd(a,b);\n\t\treturn a * b;\n\t}\n}",
"public class Main\n{\n\tpublic static void main(String[] arg) throws IOException\n\t{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tString s;\n\t\tint gcd, lcm;\n\t\twhile((s=br.readLine())!=null)\n\t\t{\n\t\t\tint a = Integer.parseInt(s.split(\" \")[0]);\n\t\t\tint b = Integer.parseInt(s.split(\" \")[1]);\n\n\t\t\tgcd = gcd(a,b);\n\t\t\tlcm = lcm(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b)\n\t{\n\t\tif(b==0) return a;\n\t\telse return gcd(b, a%b);\n\t}\n\n \tpublic static int lcm(int a, int b)\n\t{\n\t\t// a * b = gcd * lcm\n\t\tb /= gcd(a,b);\n\t\treturn a * b;\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
public class Main
{
public static void main(String[] arg) throws IOException
{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String s;
int gcd, lcm;
while((s=br.readLine())!=null)
{
int a = Integer.parseInt(s.split(" ")[0]);
int b = Integer.parseInt(s.split(" ")[1]);
gcd = gcd(a,b);
lcm = lcm(a,b);
System.out.println(gcd + " " + lcm);
}
}
public static int gcd(int a, int b)
{
if(b==0) return a;
else return gcd(b, a%b);
}
public static int lcm(int a, int b)
{
// a * b = gcd * lcm
b /= gcd(a,b);
return a * b;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
13,
41,
13,
4,
18,
13,
41,
13,
13,
41,
13,
14,
2,
13,
13,
30,
11,
1,
30,
30,
14,
2,
2,
13,
13,
17,
30,
3,
0,
13,
13,
14,
2,
2,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
30,
11,
1,
0,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
13,
17,
30,
3,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
14,
2,
13,
13,
30,
11,
1,
30,
30,
14,
2,
2,
13,
13,
17,
30,
3,
0,
13,
13,
14,
2,
2,
13,
13,
17,
30,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
30,
11,
1,
0,
13,
2,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
13,
17,
30,
3,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
30,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
203,
5
],
[
203,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
16,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
16,
30
],
[
30,
31
],
[
30,
32
],
[
16,
33
],
[
33,
34
],
[
16,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
43,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
45,
49
],
[
44,
50
],
[
50,
51
],
[
43,
52
],
[
52,
53
],
[
52,
54
],
[
39,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
68,
68
],
[
68,
69
],
[
68,
70
],
[
68,
71
],
[
55,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
73,
80
],
[
80,
81
],
[
80,
82
],
[
73,
83
],
[
83,
84
],
[
84,
85
],
[
73,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
89,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
88,
100
],
[
100,
101
],
[
72,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
108,
108
],
[
108,
109
],
[
108,
110
],
[
108,
111
],
[
35,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
120,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
121,
127
],
[
127,
128
],
[
120,
129
],
[
129,
130
],
[
129,
131
],
[
116,
132
],
[
132,
133
],
[
133,
134
],
[
134,
135
],
[
134,
136
],
[
133,
137
],
[
132,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
141,
142
],
[
141,
143
],
[
139,
144
],
[
145,
145
],
[
145,
146
],
[
145,
147
],
[
145,
148
],
[
132,
149
],
[
149,
150
],
[
150,
151
],
[
151,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
154,
156
],
[
150,
157
],
[
157,
158
],
[
157,
159
],
[
150,
160
],
[
160,
161
],
[
161,
162
],
[
150,
163
],
[
164,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
166,
172
],
[
172,
173
],
[
173,
174
],
[
173,
175
],
[
172,
176
],
[
165,
177
],
[
177,
178
],
[
149,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
179,
184
],
[
185,
185
],
[
185,
186
],
[
185,
187
],
[
185,
188
],
[
112,
189
],
[
189,
190
],
[
190,
191
],
[
191,
192
],
[
192,
193
],
[
192,
194
],
[
190,
195
],
[
196,
196
],
[
196,
197
],
[
196,
198
],
[
196,
199
],
[
6,
200
],
[
200,
201
],
[
0,
202
],
[
202,
203
],
[
202,
204
]
] | [
"import java.util.*;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner (System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong a1 = a;\n\t\t\tlong b = sc.nextLong();\n\t\t\tlong b1 = b;\n\t\t\tlong i;\n\t\t\tif(a > b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}\n\t\t\t\tif(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(a < b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}\n\t\t}\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\t\twhile(sc.hasNext()){\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong a1 = a;\n\t\t\tlong b = sc.nextLong();\n\t\t\tlong b1 = b;\n\t\t\tlong i;\n\t\t\tif(a > b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}\n\t\t\t\tif(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(a < b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}\n\t\t}\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner (System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong a1 = a;\n\t\t\tlong b = sc.nextLong();\n\t\t\tlong b1 = b;\n\t\t\tlong i;\n\t\t\tif(a > b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}\n\t\t\t\tif(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(a < b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner (System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong a1 = a;\n\t\t\tlong b = sc.nextLong();\n\t\t\tlong b1 = b;\n\t\t\tlong i;\n\t\t\tif(a > b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}\n\t\t\t\tif(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(a < b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}\n\t\t}\n\t}",
"Scanner sc = new Scanner (System.in);",
"sc",
"new Scanner (System.in)",
"while(sc.hasNext()){\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong a1 = a;\n\t\t\tlong b = sc.nextLong();\n\t\t\tlong b1 = b;\n\t\t\tlong i;\n\t\t\tif(a > b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}\n\t\t\t\tif(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(a < b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong a1 = a;\n\t\t\tlong b = sc.nextLong();\n\t\t\tlong b1 = b;\n\t\t\tlong i;\n\t\t\tif(a > b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}\n\t\t\t\tif(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(a < b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}\n\t\t}",
"long a = sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long a1 = a;",
"a1",
"a",
"long b = sc.nextLong();",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long b1 = b;",
"b1",
"b",
"long i;",
"i",
"if(a > b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}\n\t\t\t\tif(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(a < b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}",
"a > b",
"a",
"b",
"{\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}\n\t\t\t\tif(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}\n\t\t\t}",
"for(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}",
";",
"{\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}",
"{\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}",
"if(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"a1 % b == 0",
"a1 % b",
"a1",
"b",
"0",
"{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"break;",
"a1 += a",
"a1",
"a",
"if(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}",
"a % b == 0",
"a % b",
"a",
"b",
"0",
"{\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}",
"System.out.println(b + \" \" + a1 )",
"System.out.println",
"System.out",
"System",
"System.out",
"b + \" \" + a1",
"b + \" \" + a1",
"b",
"\" \"",
"a1",
"{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}",
"for(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"i = b / 2;",
"i = b / 2",
"i",
"b / 2",
"b",
"2",
"i > 0",
"i",
"0",
"i--",
"i--",
"i",
"{\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"if(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"a % i == 0 && b % i == 0",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"b % i == 0",
"b % i",
"b",
"i",
"0",
"{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"break;",
"System.out.println(i + \" \" + a1 )",
"System.out.println",
"System.out",
"System",
"System.out",
"i + \" \" + a1",
"i + \" \" + a1",
"i",
"\" \"",
"a1",
"if(a < b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}",
"a < b",
"a",
"b",
"{\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}",
"for(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}",
";",
"{\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}",
"{\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}",
"if(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"b1 % a == 0",
"b1 % a",
"b1",
"a",
"0",
"{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"break;",
"b1 += b",
"b1",
"b",
"if(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}",
"b % a == 0",
"b % a",
"b",
"a",
"0",
"{\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}",
"System.out.println(a + \" \" + b1 )",
"System.out.println",
"System.out",
"System",
"System.out",
"a + \" \" + b1",
"a + \" \" + b1",
"a",
"\" \"",
"b1",
"{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}",
"for(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"i = a / 2;",
"i = a / 2",
"i",
"a / 2",
"a",
"2",
"i > 0",
"i",
"0",
"i--",
"i--",
"i",
"{\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"if(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"a % i == 0 && b % i == 0",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"b % i == 0",
"b % i",
"b",
"i",
"0",
"{\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}",
"break;",
"System.out.println(i + \" \" + b1 )",
"System.out.println",
"System.out",
"System",
"System.out",
"i + \" \" + b1",
"i + \" \" + b1",
"i",
"\" \"",
"b1",
"{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}",
"System.out.println(b + \" \" + b1 )",
"System.out.println",
"System.out",
"System",
"System.out",
"b + \" \" + b1",
"b + \" \" + b1",
"b",
"\" \"",
"b1",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner (System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong a1 = a;\n\t\t\tlong b = sc.nextLong();\n\t\t\tlong b1 = b;\n\t\t\tlong i;\n\t\t\tif(a > b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}\n\t\t\t\tif(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(a < b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner (System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tlong a = sc.nextLong();\n\t\t\tlong a1 = a;\n\t\t\tlong b = sc.nextLong();\n\t\t\tlong b1 = b;\n\t\t\tlong i;\n\t\t\tif(a > b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(a1 % b == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\ta1 += a;\n\t\t\t\t}\n\t\t\t\tif(a % b == 0){\n\t\t\t\t\tSystem.out.println(b + \" \" + a1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = b / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + a1 );\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if(a < b){\n\t\t\t\tfor(;;){\n\t\t\t\t\tif(b1 % a == 0){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tb1 += b;\n\t\t\t\t}\n\t\t\t\tif(b % a == 0){\n\t\t\t\t\tSystem.out.println(a + \" \" + b1 );\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tfor(i = a / 2; i > 0; i--){\n\t\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(i + \" \" + b1 );\n\t\t\t\t}\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\tSystem.out.println(b + \" \" + b1 );\n\t\t\t}\n\t\t}\n\t}\n\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner (System.in);
while(sc.hasNext()){
long a = sc.nextLong();
long a1 = a;
long b = sc.nextLong();
long b1 = b;
long i;
if(a > b){
for(;;){
if(a1 % b == 0){
break;
}
a1 += a;
}
if(a % b == 0){
System.out.println(b + " " + a1 );
}
else{
for(i = b / 2; i > 0; i--){
if(a % i == 0 && b % i == 0){
break;
}
}
System.out.println(i + " " + a1 );
}
}
else if(a < b){
for(;;){
if(b1 % a == 0){
break;
}
b1 += b;
}
if(b % a == 0){
System.out.println(a + " " + b1 );
}
else{
for(i = a / 2; i > 0; i--){
if(a % i == 0 && b % i == 0){
break;
}
}
System.out.println(i + " " + b1 );
}
}
else{
System.out.println(b + " " + b1 );
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
17,
13,
2,
2,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
72,
5
],
[
72,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
32,
36
],
[
19,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
37,
43
],
[
37,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
6,
49
],
[
49,
50
],
[
72,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
54,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
61,
64
],
[
64,
65
],
[
64,
66
],
[
51,
67
],
[
67,
68
],
[
51,
69
],
[
69,
70
],
[
0,
71
],
[
71,
72
],
[
71,
73
]
] | [
"import java.util.Scanner;\npublic class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMain me = new Main();\n\t\twhile(in.hasNext()){\n\t\t\tlong a = in.nextInt(),b = in.nextInt();\n\t\t\tlong gcd = me.GCD(a,b);\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd,a*b/gcd);\n\t\t\t\n\t\t}\n\t}\n\tprivate long GCD(long a,long b){\n\t\tif(b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn GCD(b,a%b);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMain me = new Main();\n\t\twhile(in.hasNext()){\n\t\t\tlong a = in.nextInt(),b = in.nextInt();\n\t\t\tlong gcd = me.GCD(a,b);\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd,a*b/gcd);\n\t\t\t\n\t\t}\n\t}\n\tprivate long GCD(long a,long b){\n\t\tif(b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn GCD(b,a%b);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMain me = new Main();\n\t\twhile(in.hasNext()){\n\t\t\tlong a = in.nextInt(),b = in.nextInt();\n\t\t\tlong gcd = me.GCD(a,b);\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd,a*b/gcd);\n\t\t\t\n\t\t}\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\tMain me = new Main();\n\t\twhile(in.hasNext()){\n\t\t\tlong a = in.nextInt(),b = in.nextInt();\n\t\t\tlong gcd = me.GCD(a,b);\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd,a*b/gcd);\n\t\t\t\n\t\t}\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"Main me = new Main();",
"me",
"new Main()",
"while(in.hasNext()){\n\t\t\tlong a = in.nextInt(),b = in.nextInt();\n\t\t\tlong gcd = me.GCD(a,b);\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd,a*b/gcd);\n\t\t\t\n\t\t}",
"in.hasNext()",
"in.hasNext",
"in",
"{\n\t\t\tlong a = in.nextInt(),b = in.nextInt();\n\t\t\tlong gcd = me.GCD(a,b);\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd,a*b/gcd);\n\t\t\t\n\t\t}",
"long a = in.nextInt()",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"b = in.nextInt();",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"long gcd = me.GCD(a,b);",
"gcd",
"me.GCD(a,b)",
"me.GCD",
"me",
"a",
"b",
"System.out.printf(\"%d %d\\n\",gcd,a*b/gcd)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d %d\\n\"",
"gcd",
"a*b/gcd",
"a*b",
"a",
"b",
"gcd",
"String[] args",
"args",
"private long GCD(long a,long b){\n\t\tif(b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn GCD(b,a%b);\n\t}",
"GCD",
"{\n\t\tif(b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn GCD(b,a%b);\n\t}",
"if(b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn GCD(b,a%b);",
"b == 0",
"b",
"0",
"return a;",
"a",
"return GCD(b,a%b);",
"GCD(b,a%b)",
"GCD",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMain me = new Main();\n\t\twhile(in.hasNext()){\n\t\t\tlong a = in.nextInt(),b = in.nextInt();\n\t\t\tlong gcd = me.GCD(a,b);\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd,a*b/gcd);\n\t\t\t\n\t\t}\n\t}\n\tprivate long GCD(long a,long b){\n\t\tif(b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn GCD(b,a%b);\n\t}\n}",
"public class Main {\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner in = new Scanner(System.in);\n\t\tMain me = new Main();\n\t\twhile(in.hasNext()){\n\t\t\tlong a = in.nextInt(),b = in.nextInt();\n\t\t\tlong gcd = me.GCD(a,b);\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd,a*b/gcd);\n\t\t\t\n\t\t}\n\t}\n\tprivate long GCD(long a,long b){\n\t\tif(b == 0)\n\t\t\treturn a;\n\t\telse\n\t\t\treturn GCD(b,a%b);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
Main me = new Main();
while(in.hasNext()){
long a = in.nextInt(),b = in.nextInt();
long gcd = me.GCD(a,b);
System.out.printf("%d %d\n",gcd,a*b/gcd);
}
}
private long GCD(long a,long b){
if(b == 0)
return a;
else
return GCD(b,a%b);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
41,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
41,
13,
13,
41,
13,
13,
41,
13,
17,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
29,
13,
23,
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
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
29,
32
],
[
16,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
16,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
46,
46
],
[
46,
47
],
[
46,
48
],
[
46,
49
],
[
6,
50
],
[
50,
51
],
[
4,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
58,
60
],
[
54,
61
],
[
61,
62
],
[
61,
63
],
[
54,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
65,
71
],
[
64,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
76,
78
],
[
54,
79
],
[
79,
80
],
[
52,
81
],
[
81,
82
],
[
52,
83
],
[
83,
84
]
] | [
"import java.util.Scanner;\nclass Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(sc.hasNextLong()){\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=GCD(a,b);\n long d=a*b/c;\n System.out.println(c+\" \"+d);\n \n }\n }\n public static long GCD(long a,long b){\n long c=a;\n long d=b;\n long r=0;\n while( (r = c % d) != 0 ) {\n c = d;\n d = r;\n }\n return d;\n }\n }\n ",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(sc.hasNextLong()){\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=GCD(a,b);\n long d=a*b/c;\n System.out.println(c+\" \"+d);\n \n }\n }\n public static long GCD(long a,long b){\n long c=a;\n long d=b;\n long r=0;\n while( (r = c % d) != 0 ) {\n c = d;\n d = r;\n }\n return d;\n }\n }",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n while(sc.hasNextLong()){\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=GCD(a,b);\n long d=a*b/c;\n System.out.println(c+\" \"+d);\n \n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n while(sc.hasNextLong()){\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=GCD(a,b);\n long d=a*b/c;\n System.out.println(c+\" \"+d);\n \n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNextLong()){\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=GCD(a,b);\n long d=a*b/c;\n System.out.println(c+\" \"+d);\n \n }",
"sc.hasNextLong()",
"sc.hasNextLong",
"sc",
"{\n long a=sc.nextLong();\n long b=sc.nextLong();\n long c=GCD(a,b);\n long d=a*b/c;\n System.out.println(c+\" \"+d);\n \n }",
"long a=sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long b=sc.nextLong();",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long c=GCD(a,b);",
"c",
"GCD(a,b)",
"GCD",
"a",
"b",
"long d=a*b/c;",
"d",
"a*b/c",
"a*b",
"a",
"b",
"c",
"System.out.println(c+\" \"+d)",
"System.out.println",
"System.out",
"System",
"System.out",
"c+\" \"+d",
"c+\" \"+d",
"c",
"\" \"",
"d",
"String[] args",
"args",
"public static long GCD(long a,long b){\n long c=a;\n long d=b;\n long r=0;\n while( (r = c % d) != 0 ) {\n c = d;\n d = r;\n }\n return d;\n }",
"GCD",
"{\n long c=a;\n long d=b;\n long r=0;\n while( (r = c % d) != 0 ) {\n c = d;\n d = r;\n }\n return d;\n }",
"long c=a;",
"c",
"a",
"long d=b;",
"d",
"b",
"long r=0;",
"r",
"0",
"while( (r = c % d) != 0 ) {\n c = d;\n d = r;\n }",
"(r = c % d) != 0",
"(r = c % d)",
"r",
"c % d",
"c",
"d",
"0",
"{\n c = d;\n d = r;\n }",
"c = d",
"c",
"d",
"d = r",
"d",
"r",
"return d;",
"d",
"long a",
"a",
"long b",
"b"
] | import java.util.Scanner;
class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
while(sc.hasNextLong()){
long a=sc.nextLong();
long b=sc.nextLong();
long c=GCD(a,b);
long d=a*b/c;
System.out.println(c+" "+d);
}
}
public static long GCD(long a,long b){
long c=a;
long d=b;
long r=0;
while( (r = c % d) != 0 ) {
c = d;
d = r;
}
return d;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
41,
13,
41,
13,
41,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
42,
17,
30,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
3,
0,
13,
13,
0,
13,
13,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
108,
5
],
[
108,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
24,
27
],
[
16,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
16,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
16,
39
],
[
39,
40
],
[
16,
41
],
[
41,
42
],
[
16,
43
],
[
43,
44
],
[
16,
45
],
[
45,
46
],
[
16,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
47,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
16,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
77,
78
],
[
67,
79
],
[
79,
80
],
[
79,
81
],
[
67,
82
],
[
82,
83
],
[
82,
84
],
[
16,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
16,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
98,
98
],
[
98,
99
],
[
98,
100
],
[
98,
101
],
[
8,
102
],
[
102,
103
],
[
103,
104
],
[
6,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile(scan.hasNext()) {\n\t //??\\???1\n\t String num1 = scan.next();\n\t\t \tlong int1 = Long.parseLong(num1);\n\t\t \t//??\\???2\n\t\t String num2 = scan.next();\n\t\t long int2 = Long.parseLong(num2);\n\n\t\t /*??? ?????????????????????????????? ???\n\t\t ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???\n\t\t (1) a ??? b ??§???????????????????????? r ?????\\????????????\n\t\t (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????\n\t\t (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????\n\t\t */\n\t\t long a;\n\t\t long b;\n\t\t long r;\n\t\t long lcm;\n\t\t //a?????????\n\t\t if(int1 > int2){\n\t\t \ta = int1;\n\t\t \tb = int2;\n\t\t }else{\n\t\t \tb = int1;\n\t\t \ta = int2;\n\t\t }\n\t\t while(true){\n\t\t \tr = a%b;\n\t\t \tif(r==0){\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \ta = b;\n\t\t \tb = r;\n\t\t }\n\n\t\t //LCM = A*B???GCD\n\t\t lcm = int1 * int2 / b;\n\t\t System.out.println(b+ \" \" + lcm);\n\t }\n\n\t\t scan.close();\n\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile(scan.hasNext()) {\n\t //??\\???1\n\t String num1 = scan.next();\n\t\t \tlong int1 = Long.parseLong(num1);\n\t\t \t//??\\???2\n\t\t String num2 = scan.next();\n\t\t long int2 = Long.parseLong(num2);\n\n\t\t /*??? ?????????????????????????????? ???\n\t\t ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???\n\t\t (1) a ??? b ??§???????????????????????? r ?????\\????????????\n\t\t (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????\n\t\t (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????\n\t\t */\n\t\t long a;\n\t\t long b;\n\t\t long r;\n\t\t long lcm;\n\t\t //a?????????\n\t\t if(int1 > int2){\n\t\t \ta = int1;\n\t\t \tb = int2;\n\t\t }else{\n\t\t \tb = int1;\n\t\t \ta = int2;\n\t\t }\n\t\t while(true){\n\t\t \tr = a%b;\n\t\t \tif(r==0){\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \ta = b;\n\t\t \tb = r;\n\t\t }\n\n\t\t //LCM = A*B???GCD\n\t\t lcm = int1 * int2 / b;\n\t\t System.out.println(b+ \" \" + lcm);\n\t }\n\n\t\t scan.close();\n\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile(scan.hasNext()) {\n\t //??\\???1\n\t String num1 = scan.next();\n\t\t \tlong int1 = Long.parseLong(num1);\n\t\t \t//??\\???2\n\t\t String num2 = scan.next();\n\t\t long int2 = Long.parseLong(num2);\n\n\t\t /*??? ?????????????????????????????? ???\n\t\t ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???\n\t\t (1) a ??? b ??§???????????????????????? r ?????\\????????????\n\t\t (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????\n\t\t (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????\n\t\t */\n\t\t long a;\n\t\t long b;\n\t\t long r;\n\t\t long lcm;\n\t\t //a?????????\n\t\t if(int1 > int2){\n\t\t \ta = int1;\n\t\t \tb = int2;\n\t\t }else{\n\t\t \tb = int1;\n\t\t \ta = int2;\n\t\t }\n\t\t while(true){\n\t\t \tr = a%b;\n\t\t \tif(r==0){\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \ta = b;\n\t\t \tb = r;\n\t\t }\n\n\t\t //LCM = A*B???GCD\n\t\t lcm = int1 * int2 / b;\n\t\t System.out.println(b+ \" \" + lcm);\n\t }\n\n\t\t scan.close();\n\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile(scan.hasNext()) {\n\t //??\\???1\n\t String num1 = scan.next();\n\t\t \tlong int1 = Long.parseLong(num1);\n\t\t \t//??\\???2\n\t\t String num2 = scan.next();\n\t\t long int2 = Long.parseLong(num2);\n\n\t\t /*??? ?????????????????????????????? ???\n\t\t ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???\n\t\t (1) a ??? b ??§???????????????????????? r ?????\\????????????\n\t\t (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????\n\t\t (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????\n\t\t */\n\t\t long a;\n\t\t long b;\n\t\t long r;\n\t\t long lcm;\n\t\t //a?????????\n\t\t if(int1 > int2){\n\t\t \ta = int1;\n\t\t \tb = int2;\n\t\t }else{\n\t\t \tb = int1;\n\t\t \ta = int2;\n\t\t }\n\t\t while(true){\n\t\t \tr = a%b;\n\t\t \tif(r==0){\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \ta = b;\n\t\t \tb = r;\n\t\t }\n\n\t\t //LCM = A*B???GCD\n\t\t lcm = int1 * int2 / b;\n\t\t System.out.println(b+ \" \" + lcm);\n\t }\n\n\t\t scan.close();\n\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"while(scan.hasNext()) {\n\t //??\\???1\n\t String num1 = scan.next();\n\t\t \tlong int1 = Long.parseLong(num1);\n\t\t \t//??\\???2\n\t\t String num2 = scan.next();\n\t\t long int2 = Long.parseLong(num2);\n\n\t\t /*??? ?????????????????????????????? ???\n\t\t ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???\n\t\t (1) a ??? b ??§???????????????????????? r ?????\\????????????\n\t\t (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????\n\t\t (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????\n\t\t */\n\t\t long a;\n\t\t long b;\n\t\t long r;\n\t\t long lcm;\n\t\t //a?????????\n\t\t if(int1 > int2){\n\t\t \ta = int1;\n\t\t \tb = int2;\n\t\t }else{\n\t\t \tb = int1;\n\t\t \ta = int2;\n\t\t }\n\t\t while(true){\n\t\t \tr = a%b;\n\t\t \tif(r==0){\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \ta = b;\n\t\t \tb = r;\n\t\t }\n\n\t\t //LCM = A*B???GCD\n\t\t lcm = int1 * int2 / b;\n\t\t System.out.println(b+ \" \" + lcm);\n\t }",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n\t //??\\???1\n\t String num1 = scan.next();\n\t\t \tlong int1 = Long.parseLong(num1);\n\t\t \t//??\\???2\n\t\t String num2 = scan.next();\n\t\t long int2 = Long.parseLong(num2);\n\n\t\t /*??? ?????????????????????????????? ???\n\t\t ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???\n\t\t (1) a ??? b ??§???????????????????????? r ?????\\????????????\n\t\t (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????\n\t\t (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????\n\t\t */\n\t\t long a;\n\t\t long b;\n\t\t long r;\n\t\t long lcm;\n\t\t //a?????????\n\t\t if(int1 > int2){\n\t\t \ta = int1;\n\t\t \tb = int2;\n\t\t }else{\n\t\t \tb = int1;\n\t\t \ta = int2;\n\t\t }\n\t\t while(true){\n\t\t \tr = a%b;\n\t\t \tif(r==0){\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \ta = b;\n\t\t \tb = r;\n\t\t }\n\n\t\t //LCM = A*B???GCD\n\t\t lcm = int1 * int2 / b;\n\t\t System.out.println(b+ \" \" + lcm);\n\t }",
"String num1 = scan.next();",
"num1",
"scan.next()",
"scan.next",
"scan",
"long int1 = Long.parseLong(num1);",
"int1",
"Long.parseLong(num1)",
"Long.parseLong",
"Long",
"num1",
"String num2 = scan.next();",
"num2",
"scan.next()",
"scan.next",
"scan",
"long int2 = Long.parseLong(num2);",
"int2",
"Long.parseLong(num2)",
"Long.parseLong",
"Long",
"num2",
"long a;",
"a",
"long b;",
"b",
"long r;",
"r",
"long lcm;",
"lcm",
"if(int1 > int2){\n\t\t \ta = int1;\n\t\t \tb = int2;\n\t\t }else{\n\t\t \tb = int1;\n\t\t \ta = int2;\n\t\t }",
"int1 > int2",
"int1",
"int2",
"{\n\t\t \ta = int1;\n\t\t \tb = int2;\n\t\t }",
"a = int1",
"a",
"int1",
"b = int2",
"b",
"int2",
"{\n\t\t \tb = int1;\n\t\t \ta = int2;\n\t\t }",
"b = int1",
"b",
"int1",
"a = int2",
"a",
"int2",
"while(true){\n\t\t \tr = a%b;\n\t\t \tif(r==0){\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \ta = b;\n\t\t \tb = r;\n\t\t }",
"true",
"{\n\t\t \tr = a%b;\n\t\t \tif(r==0){\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \ta = b;\n\t\t \tb = r;\n\t\t }",
"r = a%b",
"r",
"a%b",
"a",
"b",
"if(r==0){\n\t\t \t\tbreak;\n\t\t \t}",
"r==0",
"r",
"0",
"{\n\t\t \t\tbreak;\n\t\t \t}",
"break;",
"a = b",
"a",
"b",
"b = r",
"b",
"r",
"lcm = int1 * int2 / b",
"lcm",
"int1 * int2 / b",
"int1 * int2",
"int1",
"int2",
"b",
"System.out.println(b+ \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"b+ \" \" + lcm",
"b+ \" \" + lcm",
"b",
"\" \"",
"lcm",
"scan.close()",
"scan.close",
"scan",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile(scan.hasNext()) {\n\t //??\\???1\n\t String num1 = scan.next();\n\t\t \tlong int1 = Long.parseLong(num1);\n\t\t \t//??\\???2\n\t\t String num2 = scan.next();\n\t\t long int2 = Long.parseLong(num2);\n\n\t\t /*??? ?????????????????????????????? ???\n\t\t ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???\n\t\t (1) a ??? b ??§???????????????????????? r ?????\\????????????\n\t\t (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????\n\t\t (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????\n\t\t */\n\t\t long a;\n\t\t long b;\n\t\t long r;\n\t\t long lcm;\n\t\t //a?????????\n\t\t if(int1 > int2){\n\t\t \ta = int1;\n\t\t \tb = int2;\n\t\t }else{\n\t\t \tb = int1;\n\t\t \ta = int2;\n\t\t }\n\t\t while(true){\n\t\t \tr = a%b;\n\t\t \tif(r==0){\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \ta = b;\n\t\t \tb = r;\n\t\t }\n\n\t\t //LCM = A*B???GCD\n\t\t lcm = int1 * int2 / b;\n\t\t System.out.println(b+ \" \" + lcm);\n\t }\n\n\t\t scan.close();\n\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\n\t\tScanner scan = new Scanner(System.in);\n\n\t\twhile(scan.hasNext()) {\n\t //??\\???1\n\t String num1 = scan.next();\n\t\t \tlong int1 = Long.parseLong(num1);\n\t\t \t//??\\???2\n\t\t String num2 = scan.next();\n\t\t long int2 = Long.parseLong(num2);\n\n\t\t /*??? ?????????????????????????????? ???\n\t\t ????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???\n\t\t (1) a ??? b ??§???????????????????????? r ?????\\????????????\n\t\t (2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????\n\t\t (3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????\n\t\t */\n\t\t long a;\n\t\t long b;\n\t\t long r;\n\t\t long lcm;\n\t\t //a?????????\n\t\t if(int1 > int2){\n\t\t \ta = int1;\n\t\t \tb = int2;\n\t\t }else{\n\t\t \tb = int1;\n\t\t \ta = int2;\n\t\t }\n\t\t while(true){\n\t\t \tr = a%b;\n\t\t \tif(r==0){\n\t\t \t\tbreak;\n\t\t \t}\n\t\t \ta = b;\n\t\t \tb = r;\n\t\t }\n\n\t\t //LCM = A*B???GCD\n\t\t lcm = int1 * int2 / b;\n\t\t System.out.println(b+ \" \" + lcm);\n\t }\n\n\t\t scan.close();\n\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
Scanner scan = new Scanner(System.in);
while(scan.hasNext()) {
//??\???1
String num1 = scan.next();
long int1 = Long.parseLong(num1);
//??\???2
String num2 = scan.next();
long int2 = Long.parseLong(num2);
/*??? ?????????????????????????????? ???
????????¢?????´???????????????2???????????¶??°???????±???¨??????????????§?????????????????? a, b ??¨?????????( a >= b > 0 )???
(1) a ??? b ??§???????????????????????? r ?????\????????????
(2) r ??? 0 ?????? b ????????§??¬?´???°??§?????????????????????????????????
(3) ????????§????????¨????????°a = b?????°b = r ??¨?????? (1) ???????????????????????????
*/
long a;
long b;
long r;
long lcm;
//a?????????
if(int1 > int2){
a = int1;
b = int2;
}else{
b = int1;
a = int2;
}
while(true){
r = a%b;
if(r==0){
break;
}
a = b;
b = r;
}
//LCM = A*B???GCD
lcm = int1 * int2 / b;
System.out.println(b+ " " + lcm);
}
scan.close();
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
13,
41,
13,
13,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
29,
2,
2,
13,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
108,
5
],
[
108,
6
],
[
6,
7
],
[
6,
8
],
[
108,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
34,
37
],
[
33,
38
],
[
33,
39
],
[
39,
40
],
[
39,
41
],
[
39,
42
],
[
9,
43
],
[
43,
44
],
[
108,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
51,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
47,
65
],
[
65,
66
],
[
45,
67
],
[
67,
68
],
[
45,
69
],
[
69,
70
],
[
108,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
73,
76
],
[
76,
77
],
[
76,
78
],
[
73,
79
],
[
79,
80
],
[
79,
81
],
[
73,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
86,
88
],
[
83,
89
],
[
82,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
94,
95
],
[
94,
96
],
[
73,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
71,
103
],
[
103,
104
],
[
71,
105
],
[
105,
106
],
[
0,
107
],
[
107,
108
],
[
107,
109
]
] | [
"import java.util.*;\n\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\t//最大公約数gcdを求める\n\tstatic int gcd (int a, int b) {\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}\n\n\t//最小公倍数lcmを求める\n\tstatic long lcm (int a, int b) {\n\t\tint temp;\n\t\tlong c = a;\n\t\tlong d = b;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn (c*d)/b;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\t//最大公約数gcdを求める\n\tstatic int gcd (int a, int b) {\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}\n\n\t//最小公倍数lcmを求める\n\tstatic long lcm (int a, int b) {\n\t\tint temp;\n\t\tlong c = a;\n\t\tlong d = b;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn (c*d)/b;\n\t}\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"public static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}",
"main",
"{\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}",
"while (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(gcd(a,b)+\" \"+lcm(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a,b)",
"lcm",
"a",
"b",
"String[] args",
"args",
"//最大公約数gcdを求める\n\tstatic int gcd (int a, int b) {\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}",
"gcd",
"{\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}",
"int temp;",
"temp",
"while((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}",
"(temp = a%b)!=0",
"(temp = a%b)",
"temp",
"a%b",
"a",
"b",
"0",
"{\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}",
"a = b",
"a",
"b",
"b = temp",
"b",
"temp",
"return b;",
"b",
"int a",
"a",
"int b",
"b",
"//最小公倍数lcmを求める\n\tstatic long lcm (int a, int b) {\n\t\tint temp;\n\t\tlong c = a;\n\t\tlong d = b;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn (c*d)/b;\n\t}",
"lcm",
"{\n\t\tint temp;\n\t\tlong c = a;\n\t\tlong d = b;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn (c*d)/b;\n\t}",
"int temp;",
"temp",
"long c = a;",
"c",
"a",
"long d = b;",
"d",
"b",
"while((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}",
"(temp = a%b)!=0",
"(temp = a%b)",
"temp",
"a%b",
"a",
"b",
"0",
"{\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}",
"a = b",
"a",
"b",
"b = temp",
"b",
"temp",
"return (c*d)/b;",
"(c*d)/b",
"(c*d)",
"c",
"d",
"b",
"int a",
"a",
"int b",
"b",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\t//最大公約数gcdを求める\n\tstatic int gcd (int a, int b) {\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}\n\n\t//最小公倍数lcmを求める\n\tstatic long lcm (int a, int b) {\n\t\tint temp;\n\t\tlong c = a;\n\t\tlong d = b;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn (c*d)/b;\n\t}\n}",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tpublic static void main(String[] args) {\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t}\n\t//最大公約数gcdを求める\n\tstatic int gcd (int a, int b) {\n\t\tint temp;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn b;\n\t}\n\n\t//最小公倍数lcmを求める\n\tstatic long lcm (int a, int b) {\n\t\tint temp;\n\t\tlong c = a;\n\t\tlong d = b;\n\t\twhile((temp = a%b)!=0) {\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn (c*d)/b;\n\t}\n}",
"Main"
] | import java.util.*;
public class Main {
static Scanner sc = new Scanner(System.in);
public static void main(String[] args) {
while (sc.hasNext()) {
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(gcd(a,b)+" "+lcm(a,b));
}
}
//最大公約数gcdを求める
static int gcd (int a, int b) {
int temp;
while((temp = a%b)!=0) {
a = b;
b = temp;
}
return b;
}
//最小公倍数lcmを求める
static long lcm (int a, int b) {
int temp;
long c = a;
long d = b;
while((temp = a%b)!=0) {
a = b;
b = temp;
}
return (c*d)/b;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
8,
2,
13,
13,
13,
13,
41,
13,
8,
2,
13,
13,
13,
13,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
105,
5
],
[
105,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
16,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
31,
36
],
[
37,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
38,
41
],
[
37,
42
],
[
37,
43
],
[
43,
44
],
[
43,
45
],
[
43,
46
],
[
8,
47
],
[
47,
48
],
[
48,
49
],
[
6,
50
],
[
50,
51
],
[
105,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
60,
61
],
[
60,
62
],
[
60,
63
],
[
52,
64
],
[
64,
65
],
[
52,
66
],
[
66,
67
],
[
105,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
73,
78
],
[
70,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
81,
86
],
[
70,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
91,
92
],
[
87,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
68,
100
],
[
100,
101
],
[
68,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
] | [
"import java.util.Scanner;\n\n\npublic class Main{\n\t\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b;\n\t\twhile(sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\tSystem.out.println(LCM(a, b) + \" \" + GCD(a, b));\n\t\t}\n\t\tsc.close();\n\t}\n\t\n\tstatic long GCD(long a, long b) {\n\t\treturn a * b / LCM(a, b);\n\t}\n\t\n\tstatic long LCM(long a, long b) {\n\t\tlong n0 = (a >= b) ? a: b;\n\t\tlong n1 = (a >= b) ? b: a;\n\t\t\n\t\tif(n1 == 0) return n0;\n\t\telse return LCM(n1, n0 % n1);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\t\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b;\n\t\twhile(sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\tSystem.out.println(LCM(a, b) + \" \" + GCD(a, b));\n\t\t}\n\t\tsc.close();\n\t}\n\t\n\tstatic long GCD(long a, long b) {\n\t\treturn a * b / LCM(a, b);\n\t}\n\t\n\tstatic long LCM(long a, long b) {\n\t\tlong n0 = (a >= b) ? a: b;\n\t\tlong n1 = (a >= b) ? b: a;\n\t\t\n\t\tif(n1 == 0) return n0;\n\t\telse return LCM(n1, n0 % n1);\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b;\n\t\twhile(sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\tSystem.out.println(LCM(a, b) + \" \" + GCD(a, b));\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b;\n\t\twhile(sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\tSystem.out.println(LCM(a, b) + \" \" + GCD(a, b));\n\t\t}\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"long a",
"a",
"b;",
"b",
"while(sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\tSystem.out.println(LCM(a, b) + \" \" + GCD(a, b));\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\tSystem.out.println(LCM(a, b) + \" \" + GCD(a, b));\n\t\t}",
"a = sc.nextLong()",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"b = sc.nextLong()",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"System.out.println(LCM(a, b) + \" \" + GCD(a, b))",
"System.out.println",
"System.out",
"System",
"System.out",
"LCM(a, b) + \" \" + GCD(a, b)",
"LCM(a, b) + \" \" + GCD(a, b)",
"LCM(a, b)",
"LCM",
"a",
"b",
"\" \"",
"GCD(a, b)",
"GCD",
"a",
"b",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"static long GCD(long a, long b) {\n\t\treturn a * b / LCM(a, b);\n\t}",
"GCD",
"{\n\t\treturn a * b / LCM(a, b);\n\t}",
"return a * b / LCM(a, b);",
"a * b / LCM(a, b)",
"a * b",
"a",
"b",
"LCM(a, b)",
"LCM",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static long LCM(long a, long b) {\n\t\tlong n0 = (a >= b) ? a: b;\n\t\tlong n1 = (a >= b) ? b: a;\n\t\t\n\t\tif(n1 == 0) return n0;\n\t\telse return LCM(n1, n0 % n1);\n\t}",
"LCM",
"{\n\t\tlong n0 = (a >= b) ? a: b;\n\t\tlong n1 = (a >= b) ? b: a;\n\t\t\n\t\tif(n1 == 0) return n0;\n\t\telse return LCM(n1, n0 % n1);\n\t}",
"long n0 = (a >= b) ? a: b;",
"n0",
"(a >= b) ? a: b",
"(a >= b)",
"a",
"b",
"a",
"b",
"long n1 = (a >= b) ? b: a;",
"n1",
"(a >= b) ? b: a",
"(a >= b)",
"a",
"b",
"b",
"a",
"if(n1 == 0) return n0;\n\t\telse return LCM(n1, n0 % n1);",
"n1 == 0",
"n1",
"0",
"return n0;",
"n0",
"return LCM(n1, n0 % n1);",
"LCM(n1, n0 % n1)",
"LCM",
"n1",
"n0 % n1",
"n0",
"n1",
"long a",
"a",
"long b",
"b",
"public class Main{\n\t\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b;\n\t\twhile(sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\tSystem.out.println(LCM(a, b) + \" \" + GCD(a, b));\n\t\t}\n\t\tsc.close();\n\t}\n\t\n\tstatic long GCD(long a, long b) {\n\t\treturn a * b / LCM(a, b);\n\t}\n\t\n\tstatic long LCM(long a, long b) {\n\t\tlong n0 = (a >= b) ? a: b;\n\t\tlong n1 = (a >= b) ? b: a;\n\t\t\n\t\tif(n1 == 0) return n0;\n\t\telse return LCM(n1, n0 % n1);\n\t}\n}",
"public class Main{\n\t\n\tpublic static void main(String[] args){\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tlong a, b;\n\t\twhile(sc.hasNext()) {\n\t\t\ta = sc.nextLong();\n\t\t\tb = sc.nextLong();\n\t\t\tSystem.out.println(LCM(a, b) + \" \" + GCD(a, b));\n\t\t}\n\t\tsc.close();\n\t}\n\t\n\tstatic long GCD(long a, long b) {\n\t\treturn a * b / LCM(a, b);\n\t}\n\t\n\tstatic long LCM(long a, long b) {\n\t\tlong n0 = (a >= b) ? a: b;\n\t\tlong n1 = (a >= b) ? b: a;\n\t\t\n\t\tif(n1 == 0) return n0;\n\t\telse return LCM(n1, n0 % n1);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
long a, b;
while(sc.hasNext()) {
a = sc.nextLong();
b = sc.nextLong();
System.out.println(LCM(a, b) + " " + GCD(a, b));
}
sc.close();
}
static long GCD(long a, long b) {
return a * b / LCM(a, b);
}
static long LCM(long a, long b) {
long n0 = (a >= b) ? a: b;
long n1 = (a >= b) ? b: a;
if(n1 == 0) return n0;
else return LCM(n1, n0 % n1);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
13,
30,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
30,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
2,
2,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
101,
8
],
[
101,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
11,
19
],
[
19,
20
],
[
19,
21
],
[
11,
22
],
[
22,
23
],
[
22,
24
],
[
11,
25
],
[
25,
26
],
[
25,
27
],
[
11,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
28,
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
],
[
43,
45
],
[
32,
46
],
[
46,
47
],
[
46,
48
],
[
32,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
58,
62
],
[
62,
63
],
[
62,
64
],
[
58,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
54,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
32,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
76,
81
],
[
32,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
82,
87
],
[
32,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
88,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
9,
98
],
[
98,
99
],
[
0,
100
],
[
100,
101
],
[
100,
102
]
] | [
"import java.util.*;\nimport java.math.*;\n\npublic class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x;\n int y;\n\n int a = 0;\n int b = 0;\n int c = 0;\n \n while(sc.hasNext()){\n \n x = sc.nextInt();\n y = sc.nextInt();\n\n a = x;\n b = y;\n\n while(a != b){\n if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }\n }\n System.out.print(a);\n System.out.print(\" \");\n System.out.println((x/a)*y); \n }\n }\n}",
"import java.util.*;",
"util.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x;\n int y;\n\n int a = 0;\n int b = 0;\n int c = 0;\n \n while(sc.hasNext()){\n \n x = sc.nextInt();\n y = sc.nextInt();\n\n a = x;\n b = y;\n\n while(a != b){\n if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }\n }\n System.out.print(a);\n System.out.print(\" \");\n System.out.println((x/a)*y); \n }\n }\n}",
"Main",
"public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x;\n int y;\n\n int a = 0;\n int b = 0;\n int c = 0;\n \n while(sc.hasNext()){\n \n x = sc.nextInt();\n y = sc.nextInt();\n\n a = x;\n b = y;\n\n while(a != b){\n if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }\n }\n System.out.print(a);\n System.out.print(\" \");\n System.out.println((x/a)*y); \n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n\n int x;\n int y;\n\n int a = 0;\n int b = 0;\n int c = 0;\n \n while(sc.hasNext()){\n \n x = sc.nextInt();\n y = sc.nextInt();\n\n a = x;\n b = y;\n\n while(a != b){\n if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }\n }\n System.out.print(a);\n System.out.print(\" \");\n System.out.println((x/a)*y); \n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int x;",
"x",
"int y;",
"y",
"int a = 0;",
"a",
"0",
"int b = 0;",
"b",
"0",
"int c = 0;",
"c",
"0",
"while(sc.hasNext()){\n \n x = sc.nextInt();\n y = sc.nextInt();\n\n a = x;\n b = y;\n\n while(a != b){\n if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }\n }\n System.out.print(a);\n System.out.print(\" \");\n System.out.println((x/a)*y); \n }",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n \n x = sc.nextInt();\n y = sc.nextInt();\n\n a = x;\n b = y;\n\n while(a != b){\n if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }\n }\n System.out.print(a);\n System.out.print(\" \");\n System.out.println((x/a)*y); \n }",
"x = sc.nextInt()",
"x",
"sc.nextInt()",
"sc.nextInt",
"sc",
"y = sc.nextInt()",
"y",
"sc.nextInt()",
"sc.nextInt",
"sc",
"a = x",
"a",
"x",
"b = y",
"b",
"y",
"while(a != b){\n if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }\n }",
"a != b",
"a",
"b",
"{\n if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }\n }",
"if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }",
"a >= b",
"a",
"b",
"{\n c = a;\n a = b;\n b = c - b;\n }",
"c = a",
"c",
"a",
"a = b",
"a",
"b",
"b = c - b",
"b",
"c - b",
"c",
"b",
"{\n b = b - a;\n }",
"b = b - a",
"b",
"b - a",
"b",
"a",
"System.out.print(a)",
"System.out.print",
"System.out",
"System",
"System.out",
"a",
"System.out.print(\" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"\" \"",
"System.out.println((x/a)*y)",
"System.out.println",
"System.out",
"System",
"System.out",
"(x/a)*y",
"(x/a)",
"x",
"a",
"y",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x;\n int y;\n\n int a = 0;\n int b = 0;\n int c = 0;\n \n while(sc.hasNext()){\n \n x = sc.nextInt();\n y = sc.nextInt();\n\n a = x;\n b = y;\n\n while(a != b){\n if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }\n }\n System.out.print(a);\n System.out.print(\" \");\n System.out.println((x/a)*y); \n }\n }\n}",
"public class Main {\n public static void main(String[] args){\n Scanner sc = new Scanner(System.in);\n\n int x;\n int y;\n\n int a = 0;\n int b = 0;\n int c = 0;\n \n while(sc.hasNext()){\n \n x = sc.nextInt();\n y = sc.nextInt();\n\n a = x;\n b = y;\n\n while(a != b){\n if(a >= b){\n c = a;\n a = b;\n b = c - b;\n }else{\n b = b - a;\n }\n }\n System.out.print(a);\n System.out.print(\" \");\n System.out.println((x/a)*y); \n }\n }\n}",
"Main"
] | import java.util.*;
import java.math.*;
public class Main {
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
int x;
int y;
int a = 0;
int b = 0;
int c = 0;
while(sc.hasNext()){
x = sc.nextInt();
y = sc.nextInt();
a = x;
b = y;
while(a != b){
if(a >= b){
c = a;
a = b;
b = c - b;
}else{
b = b - a;
}
}
System.out.print(a);
System.out.print(" ");
System.out.println((x/a)*y);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
2,
13,
13,
13,
23,
13,
12,
13,
30,
42,
2,
13,
17,
30,
41,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
75,
5
],
[
75,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
29,
32
],
[
16,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
39,
39
],
[
39,
40
],
[
39,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
6,
47
],
[
47,
48
],
[
75,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
56,
62
],
[
62,
63
],
[
62,
64
],
[
56,
65
],
[
65,
66
],
[
65,
67
],
[
51,
68
],
[
68,
69
],
[
49,
70
],
[
70,
71
],
[
49,
72
],
[
72,
73
],
[
0,
74
],
[
74,
75
],
[
74,
76
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tlong a = sc.nextInt();\n\t\t\tlong b = sc.nextInt();\n\t\t\tlong gcd = gcd(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + (a*b/gcd));\n\t\t}\n\t\t\n\t}\n\tpublic static long gcd(long a,long b) {\n\t\twhile(b!=0) {\n\t\t\tlong r = a%b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tlong a = sc.nextInt();\n\t\t\tlong b = sc.nextInt();\n\t\t\tlong gcd = gcd(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + (a*b/gcd));\n\t\t}\n\t\t\n\t}\n\tpublic static long gcd(long a,long b) {\n\t\twhile(b!=0) {\n\t\t\tlong r = a%b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tlong a = sc.nextInt();\n\t\t\tlong b = sc.nextInt();\n\t\t\tlong gcd = gcd(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + (a*b/gcd));\n\t\t}\n\t\t\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tlong a = sc.nextInt();\n\t\t\tlong b = sc.nextInt();\n\t\t\tlong gcd = gcd(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + (a*b/gcd));\n\t\t}\n\t\t\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()) {\n\t\t\tlong a = sc.nextInt();\n\t\t\tlong b = sc.nextInt();\n\t\t\tlong gcd = gcd(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + (a*b/gcd));\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tlong a = sc.nextInt();\n\t\t\tlong b = sc.nextInt();\n\t\t\tlong gcd = gcd(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + (a*b/gcd));\n\t\t}",
"long a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"long b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"long gcd = gcd(a,b);",
"gcd",
"gcd(a,b)",
"gcd",
"a",
"b",
"System.out.println(gcd + \" \" + (a*b/gcd))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + (a*b/gcd)",
"gcd + \" \" + (a*b/gcd)",
"gcd",
"\" \"",
"(a*b/gcd)",
"a*b",
"a",
"b",
"gcd",
"String[] args",
"args",
"public static long gcd(long a,long b) {\n\t\twhile(b!=0) {\n\t\t\tlong r = a%b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}",
"gcd",
"{\n\t\twhile(b!=0) {\n\t\t\tlong r = a%b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}",
"while(b!=0) {\n\t\t\tlong r = a%b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}",
"b!=0",
"b",
"0",
"{\n\t\t\tlong r = a%b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}",
"long r = a%b;",
"r",
"a%b",
"a",
"b",
"a = b",
"a",
"b",
"b = r",
"b",
"r",
"return a;",
"a",
"long a",
"a",
"long b",
"b",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tlong a = sc.nextInt();\n\t\t\tlong b = sc.nextInt();\n\t\t\tlong gcd = gcd(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + (a*b/gcd));\n\t\t}\n\t\t\n\t}\n\tpublic static long gcd(long a,long b) {\n\t\twhile(b!=0) {\n\t\t\tlong r = a%b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tlong a = sc.nextInt();\n\t\t\tlong b = sc.nextInt();\n\t\t\tlong gcd = gcd(a,b);\n\t\t\tSystem.out.println(gcd + \" \" + (a*b/gcd));\n\t\t}\n\t\t\n\t}\n\tpublic static long gcd(long a,long b) {\n\t\twhile(b!=0) {\n\t\t\tlong r = a%b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
long a = sc.nextInt();
long b = sc.nextInt();
long gcd = gcd(a,b);
System.out.println(gcd + " " + (a*b/gcd));
}
}
public static long gcd(long a,long b) {
while(b!=0) {
long r = a%b;
a = b;
b = r;
}
return a;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
42,
17,
30,
41,
13,
2,
13,
13,
14,
2,
13,
17,
30,
3,
0,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
13,
13,
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
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
8,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
18,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
22,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
22,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
43,
45
],
[
40,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
40,
52
],
[
52,
53
],
[
52,
54
],
[
40,
55
],
[
55,
56
],
[
55,
57
],
[
22,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
64,
64
],
[
64,
65
],
[
64,
66
],
[
64,
67
],
[
67,
68
],
[
67,
69
],
[
6,
70
],
[
70,
71
],
[
0,
72
],
[
72,
73
],
[
72,
74
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tdouble firstinput;\n\t\tdouble secondinput;\n\t\tdouble product;\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile(scanner.hasNext()){\n\t\t\tfirstinput = scanner.nextDouble();\n\t\t\tsecondinput = scanner.nextDouble();\n\t\t\tproduct = firstinput * secondinput;\n\t\t\twhile(true){\n\t\t\t\tdouble tmpdouble = firstinput % secondinput;\n\t\t\t\tif(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfirstinput = secondinput;\n\t\t\t\tsecondinput = tmpdouble;\n\t\t\t}\n\t\t\tSystem.out.println((int)secondinput + \" \" + (int)(product / secondinput));\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\tdouble firstinput;\n\t\tdouble secondinput;\n\t\tdouble product;\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile(scanner.hasNext()){\n\t\t\tfirstinput = scanner.nextDouble();\n\t\t\tsecondinput = scanner.nextDouble();\n\t\t\tproduct = firstinput * secondinput;\n\t\t\twhile(true){\n\t\t\t\tdouble tmpdouble = firstinput % secondinput;\n\t\t\t\tif(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfirstinput = secondinput;\n\t\t\t\tsecondinput = tmpdouble;\n\t\t\t}\n\t\t\tSystem.out.println((int)secondinput + \" \" + (int)(product / secondinput));\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tdouble firstinput;\n\t\tdouble secondinput;\n\t\tdouble product;\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile(scanner.hasNext()){\n\t\t\tfirstinput = scanner.nextDouble();\n\t\t\tsecondinput = scanner.nextDouble();\n\t\t\tproduct = firstinput * secondinput;\n\t\t\twhile(true){\n\t\t\t\tdouble tmpdouble = firstinput % secondinput;\n\t\t\t\tif(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfirstinput = secondinput;\n\t\t\t\tsecondinput = tmpdouble;\n\t\t\t}\n\t\t\tSystem.out.println((int)secondinput + \" \" + (int)(product / secondinput));\n\t\t}\n\t}",
"main",
"{\n\t\tdouble firstinput;\n\t\tdouble secondinput;\n\t\tdouble product;\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile(scanner.hasNext()){\n\t\t\tfirstinput = scanner.nextDouble();\n\t\t\tsecondinput = scanner.nextDouble();\n\t\t\tproduct = firstinput * secondinput;\n\t\t\twhile(true){\n\t\t\t\tdouble tmpdouble = firstinput % secondinput;\n\t\t\t\tif(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfirstinput = secondinput;\n\t\t\t\tsecondinput = tmpdouble;\n\t\t\t}\n\t\t\tSystem.out.println((int)secondinput + \" \" + (int)(product / secondinput));\n\t\t}\n\t}",
"double firstinput;",
"firstinput",
"double secondinput;",
"secondinput",
"double product;",
"product",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"while(scanner.hasNext()){\n\t\t\tfirstinput = scanner.nextDouble();\n\t\t\tsecondinput = scanner.nextDouble();\n\t\t\tproduct = firstinput * secondinput;\n\t\t\twhile(true){\n\t\t\t\tdouble tmpdouble = firstinput % secondinput;\n\t\t\t\tif(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfirstinput = secondinput;\n\t\t\t\tsecondinput = tmpdouble;\n\t\t\t}\n\t\t\tSystem.out.println((int)secondinput + \" \" + (int)(product / secondinput));\n\t\t}",
"scanner.hasNext()",
"scanner.hasNext",
"scanner",
"{\n\t\t\tfirstinput = scanner.nextDouble();\n\t\t\tsecondinput = scanner.nextDouble();\n\t\t\tproduct = firstinput * secondinput;\n\t\t\twhile(true){\n\t\t\t\tdouble tmpdouble = firstinput % secondinput;\n\t\t\t\tif(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfirstinput = secondinput;\n\t\t\t\tsecondinput = tmpdouble;\n\t\t\t}\n\t\t\tSystem.out.println((int)secondinput + \" \" + (int)(product / secondinput));\n\t\t}",
"firstinput = scanner.nextDouble()",
"firstinput",
"scanner.nextDouble()",
"scanner.nextDouble",
"scanner",
"secondinput = scanner.nextDouble()",
"secondinput",
"scanner.nextDouble()",
"scanner.nextDouble",
"scanner",
"product = firstinput * secondinput",
"product",
"firstinput * secondinput",
"firstinput",
"secondinput",
"while(true){\n\t\t\t\tdouble tmpdouble = firstinput % secondinput;\n\t\t\t\tif(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfirstinput = secondinput;\n\t\t\t\tsecondinput = tmpdouble;\n\t\t\t}",
"true",
"{\n\t\t\t\tdouble tmpdouble = firstinput % secondinput;\n\t\t\t\tif(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfirstinput = secondinput;\n\t\t\t\tsecondinput = tmpdouble;\n\t\t\t}",
"double tmpdouble = firstinput % secondinput;",
"tmpdouble",
"firstinput % secondinput",
"firstinput",
"secondinput",
"if(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"tmpdouble == 0",
"tmpdouble",
"0",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"firstinput = secondinput",
"firstinput",
"secondinput",
"secondinput = tmpdouble",
"secondinput",
"tmpdouble",
"System.out.println((int)secondinput + \" \" + (int)(product / secondinput))",
"System.out.println",
"System.out",
"System",
"System.out",
"(int)secondinput + \" \" + (int)(product / secondinput)",
"(int)secondinput + \" \" + (int)(product / secondinput)",
"(int)secondinput",
"\" \"",
"(int)(product / secondinput)",
"product",
"secondinput",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tdouble firstinput;\n\t\tdouble secondinput;\n\t\tdouble product;\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile(scanner.hasNext()){\n\t\t\tfirstinput = scanner.nextDouble();\n\t\t\tsecondinput = scanner.nextDouble();\n\t\t\tproduct = firstinput * secondinput;\n\t\t\twhile(true){\n\t\t\t\tdouble tmpdouble = firstinput % secondinput;\n\t\t\t\tif(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfirstinput = secondinput;\n\t\t\t\tsecondinput = tmpdouble;\n\t\t\t}\n\t\t\tSystem.out.println((int)secondinput + \" \" + (int)(product / secondinput));\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tdouble firstinput;\n\t\tdouble secondinput;\n\t\tdouble product;\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile(scanner.hasNext()){\n\t\t\tfirstinput = scanner.nextDouble();\n\t\t\tsecondinput = scanner.nextDouble();\n\t\t\tproduct = firstinput * secondinput;\n\t\t\twhile(true){\n\t\t\t\tdouble tmpdouble = firstinput % secondinput;\n\t\t\t\tif(tmpdouble == 0){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tfirstinput = secondinput;\n\t\t\t\tsecondinput = tmpdouble;\n\t\t\t}\n\t\t\tSystem.out.println((int)secondinput + \" \" + (int)(product / secondinput));\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
double firstinput;
double secondinput;
double product;
Scanner scanner = new Scanner(System.in);
while(scanner.hasNext()){
firstinput = scanner.nextDouble();
secondinput = scanner.nextDouble();
product = firstinput * secondinput;
while(true){
double tmpdouble = firstinput % secondinput;
if(tmpdouble == 0){
break;
}
firstinput = secondinput;
secondinput = tmpdouble;
}
System.out.println((int)secondinput + " " + (int)(product / secondinput));
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
20,
41,
13,
20,
4,
18,
18,
13,
13,
2,
2,
4,
18,
13,
13,
17,
2,
2,
4,
18,
13,
4,
18,
13,
4,
18,
4,
18,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
55,
8
],
[
55,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
23,
25
],
[
19,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
26,
31
],
[
32,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
32,
37
],
[
32,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
39,
43
],
[
43,
44
],
[
44,
45
],
[
38,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
9,
52
],
[
52,
53
],
[
0,
54
],
[
54,
55
],
[
54,
56
]
] | [
"import java.math.BigInteger;\nimport java.util.Scanner;\n\npublic class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tBigInteger a = new BigInteger(scan.next());\n\t\t\tBigInteger b = new BigInteger(scan.next());\n\t\t\tSystem.out.println(a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());\n\t\t}\n\t}\n\n}",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tBigInteger a = new BigInteger(scan.next());\n\t\t\tBigInteger b = new BigInteger(scan.next());\n\t\t\tSystem.out.println(a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());\n\t\t}\n\t}\n\n}",
"Main",
"/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tBigInteger a = new BigInteger(scan.next());\n\t\t\tBigInteger b = new BigInteger(scan.next());\n\t\t\tSystem.out.println(a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tBigInteger a = new BigInteger(scan.next());\n\t\t\tBigInteger b = new BigInteger(scan.next());\n\t\t\tSystem.out.println(a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"while(scan.hasNext()){\n\t\t\tBigInteger a = new BigInteger(scan.next());\n\t\t\tBigInteger b = new BigInteger(scan.next());\n\t\t\tSystem.out.println(a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());\n\t\t}",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n\t\t\tBigInteger a = new BigInteger(scan.next());\n\t\t\tBigInteger b = new BigInteger(scan.next());\n\t\t\tSystem.out.println(a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());\n\t\t}",
"BigInteger a = new BigInteger(scan.next());",
"a",
"new BigInteger(scan.next())",
"BigInteger b = new BigInteger(scan.next());",
"b",
"new BigInteger(scan.next())",
"System.out.println(a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue())",
"System.out.println",
"System.out",
"System",
"System.out",
"a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue()",
"a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue()",
"a.gcd(b)",
"a.gcd",
"a",
"b",
"\" \"",
"(long)a.intValue()*b.intValue()/a.gcd(b).intValue()",
"(long)a.intValue()*b.intValue()",
"(long)a.intValue()",
"a.intValue",
"a",
"b.intValue()",
"b.intValue",
"b",
"a.gcd(b).intValue()",
"a.gcd(b).intValue",
"a.gcd(b)",
"a.gcd",
"a",
"b",
"String[] args",
"args",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tBigInteger a = new BigInteger(scan.next());\n\t\t\tBigInteger b = new BigInteger(scan.next());\n\t\t\tSystem.out.println(a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());\n\t\t}\n\t}\n\n}",
"public class Main {\n\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\t// TODO 自動生成されたメソッド・スタブ\n\n\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tBigInteger a = new BigInteger(scan.next());\n\t\t\tBigInteger b = new BigInteger(scan.next());\n\t\t\tSystem.out.println(a.gcd(b)+\" \"+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());\n\t\t}\n\t}\n\n}",
"Main"
] | import java.math.BigInteger;
import java.util.Scanner;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
BigInteger a = new BigInteger(scan.next());
BigInteger b = new BigInteger(scan.next());
System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());
}
}
} |
[
7,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
41,
13,
17,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
13,
13,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
13,
29,
2,
2,
13,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
109,
2
],
[
109,
3
],
[
3,
4
],
[
3,
5
],
[
5,
6
],
[
6,
7
],
[
6,
8
],
[
5,
9
],
[
9,
10
],
[
9,
11
],
[
5,
12
],
[
12,
13
],
[
12,
14
],
[
5,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
37,
40
],
[
36,
41
],
[
36,
42
],
[
42,
43
],
[
42,
44
],
[
42,
45
],
[
3,
46
],
[
46,
47
],
[
109,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
55,
59
],
[
50,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
62,
65
],
[
62,
66
],
[
50,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
74,
76
],
[
71,
77
],
[
77,
78
],
[
77,
79
],
[
71,
80
],
[
80,
81
],
[
80,
82
],
[
50,
83
],
[
83,
84
],
[
48,
85
],
[
85,
86
],
[
48,
87
],
[
87,
88
],
[
109,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
94,
96
],
[
94,
97
],
[
91,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
99,
103
],
[
89,
104
],
[
104,
105
],
[
89,
106
],
[
106,
107
],
[
0,
108
],
[
108,
109
],
[
108,
110
]
] | [
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\tint a = 1;\n\t\tint b = 1;\n\t\twhile ( sc.hasNext() ) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tSystem.out.println( gcd(a, b) + \" \" + lcm(a, b) );\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b) {\n\t\tint r;\n\t\tint max = Math.max(a, b);\n\t\tint mini = Math.min(a, b);\n\t\tdo {\n\t\t\tr = max % mini; // max = q*mini + r , mini > r\n\t\t\tmax = mini;\n\t\t\tmini = r;\n\t\t} while (r != 0);\n\t\treturn max;\n\t}\n\n\tpublic static int lcm(int a, int b) {\n\t\tint d = gcd(a, b);\n\t\treturn a/d * b;\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\tint a = 1;\n\t\tint b = 1;\n\t\twhile ( sc.hasNext() ) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tSystem.out.println( gcd(a, b) + \" \" + lcm(a, b) );\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b) {\n\t\tint r;\n\t\tint max = Math.max(a, b);\n\t\tint mini = Math.min(a, b);\n\t\tdo {\n\t\t\tr = max % mini; // max = q*mini + r , mini > r\n\t\t\tmax = mini;\n\t\t\tmini = r;\n\t\t} while (r != 0);\n\t\treturn max;\n\t}\n\n\tpublic static int lcm(int a, int b) {\n\t\tint d = gcd(a, b);\n\t\treturn a/d * b;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\tint a = 1;\n\t\tint b = 1;\n\t\twhile ( sc.hasNext() ) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tSystem.out.println( gcd(a, b) + \" \" + lcm(a, b) );\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO ?????????????????????????????????????????????\n\t\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\tint a = 1;\n\t\tint b = 1;\n\t\twhile ( sc.hasNext() ) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tSystem.out.println( gcd(a, b) + \" \" + lcm(a, b) );\n\t\t}\n\t}",
"java.util.Scanner sc = new java.util.Scanner(System.in);",
"sc",
"new java.util.Scanner(System.in)",
"int a = 1;",
"a",
"1",
"int b = 1;",
"b",
"1",
"while ( sc.hasNext() ) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tSystem.out.println( gcd(a, b) + \" \" + lcm(a, b) );\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tSystem.out.println( gcd(a, b) + \" \" + lcm(a, b) );\n\t\t}",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println( gcd(a, b) + \" \" + lcm(a, b) )",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a, b) + \" \" + lcm(a, b)",
"gcd(a, b) + \" \" + lcm(a, b)",
"gcd(a, b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a, b)",
"lcm",
"a",
"b",
"String[] args",
"args",
"public static int gcd(int a, int b) {\n\t\tint r;\n\t\tint max = Math.max(a, b);\n\t\tint mini = Math.min(a, b);\n\t\tdo {\n\t\t\tr = max % mini; // max = q*mini + r , mini > r\n\t\t\tmax = mini;\n\t\t\tmini = r;\n\t\t} while (r != 0);\n\t\treturn max;\n\t}",
"gcd",
"{\n\t\tint r;\n\t\tint max = Math.max(a, b);\n\t\tint mini = Math.min(a, b);\n\t\tdo {\n\t\t\tr = max % mini; // max = q*mini + r , mini > r\n\t\t\tmax = mini;\n\t\t\tmini = r;\n\t\t} while (r != 0);\n\t\treturn max;\n\t}",
"int r;",
"r",
"int max = Math.max(a, b);",
"max",
"Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"int mini = Math.min(a, b);",
"mini",
"Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"do {\n\t\t\tr = max % mini; // max = q*mini + r , mini > r\n\t\t\tmax = mini;\n\t\t\tmini = r;\n\t\t} while (r != 0);",
"r != 0",
"r",
"0",
"{\n\t\t\tr = max % mini; // max = q*mini + r , mini > r\n\t\t\tmax = mini;\n\t\t\tmini = r;\n\t\t}",
"r = max % mini",
"r",
"max % mini",
"max",
"mini",
"max = mini",
"max",
"mini",
"mini = r",
"mini",
"r",
"return max;",
"max",
"int a",
"a",
"int b",
"b",
"public static int lcm(int a, int b) {\n\t\tint d = gcd(a, b);\n\t\treturn a/d * b;\n\t}",
"lcm",
"{\n\t\tint d = gcd(a, b);\n\t\treturn a/d * b;\n\t}",
"int d = gcd(a, b);",
"d",
"gcd(a, b)",
"gcd",
"a",
"b",
"return a/d * b;",
"a/d * b",
"a/d",
"a",
"d",
"b",
"int a",
"a",
"int b",
"b",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\tint a = 1;\n\t\tint b = 1;\n\t\twhile ( sc.hasNext() ) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tSystem.out.println( gcd(a, b) + \" \" + lcm(a, b) );\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b) {\n\t\tint r;\n\t\tint max = Math.max(a, b);\n\t\tint mini = Math.min(a, b);\n\t\tdo {\n\t\t\tr = max % mini; // max = q*mini + r , mini > r\n\t\t\tmax = mini;\n\t\t\tmini = r;\n\t\t} while (r != 0);\n\t\treturn max;\n\t}\n\n\tpublic static int lcm(int a, int b) {\n\t\tint d = gcd(a, b);\n\t\treturn a/d * b;\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO ?????????????????????????????????????????????\n\t\tjava.util.Scanner sc = new java.util.Scanner(System.in);\n\t\tint a = 1;\n\t\tint b = 1;\n\t\twhile ( sc.hasNext() ) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tSystem.out.println( gcd(a, b) + \" \" + lcm(a, b) );\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b) {\n\t\tint r;\n\t\tint max = Math.max(a, b);\n\t\tint mini = Math.min(a, b);\n\t\tdo {\n\t\t\tr = max % mini; // max = q*mini + r , mini > r\n\t\t\tmax = mini;\n\t\t\tmini = r;\n\t\t} while (r != 0);\n\t\treturn max;\n\t}\n\n\tpublic static int lcm(int a, int b) {\n\t\tint d = gcd(a, b);\n\t\treturn a/d * b;\n\t}\n}",
"Main"
] | public class Main {
public static void main(String[] args) {
// TODO ?????????????????????????????????????????????
java.util.Scanner sc = new java.util.Scanner(System.in);
int a = 1;
int b = 1;
while ( sc.hasNext() ) {
a = sc.nextInt();
b = sc.nextInt();
System.out.println( gcd(a, b) + " " + lcm(a, b) );
}
}
public static int gcd(int a, int b) {
int r;
int max = Math.max(a, b);
int mini = Math.min(a, b);
do {
r = max % mini; // max = q*mini + r , mini > r
max = mini;
mini = r;
} while (r != 0);
return max;
}
public static int lcm(int a, int b) {
int d = gcd(a, b);
return a/d * b;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
41,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
13,
2,
13,
17,
1,
0,
13,
13,
30,
30,
14,
2,
2,
13,
13,
17,
30,
29,
13,
29,
40,
17,
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,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
106,
5
],
[
106,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
29,
32
],
[
16,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
35,
38
],
[
16,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
39,
44
],
[
45,
45
],
[
45,
46
],
[
45,
47
],
[
45,
48
],
[
6,
49
],
[
49,
50
],
[
106,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
59,
60
],
[
59,
61
],
[
54,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
54,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
68,
74
],
[
74,
75
],
[
75,
76
],
[
53,
77
],
[
77,
78
],
[
78,
79
],
[
51,
80
],
[
80,
81
],
[
51,
82
],
[
82,
83
],
[
106,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
88,
90
],
[
87,
91
],
[
91,
92
],
[
92,
93
],
[
86,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
95,
98
],
[
98,
99
],
[
98,
100
],
[
84,
101
],
[
101,
102
],
[
84,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] | [
"import java.util.Scanner;\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(s.hasNext()) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint g = lcm(a,b);\n\t\t\tint l = gcd(a,b);\n\t\t\tSystem.out.println(l + \" \" + g);\n\t\t}\n\t\t\n\t}\n\tstatic int lcm(int a, int b) {\n\t\tfor(int i = b; i <= 2000000000; i += b) {\n\t\t\tif(i % a == 0) {\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n\tstatic int gcd(int a, int b) {\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(s.hasNext()) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint g = lcm(a,b);\n\t\t\tint l = gcd(a,b);\n\t\t\tSystem.out.println(l + \" \" + g);\n\t\t}\n\t\t\n\t}\n\tstatic int lcm(int a, int b) {\n\t\tfor(int i = b; i <= 2000000000; i += b) {\n\t\t\tif(i % a == 0) {\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n\tstatic int gcd(int a, int b) {\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(s.hasNext()) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint g = lcm(a,b);\n\t\t\tint l = gcd(a,b);\n\t\t\tSystem.out.println(l + \" \" + g);\n\t\t}\n\t\t\n\t}",
"main",
"{\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(s.hasNext()) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint g = lcm(a,b);\n\t\t\tint l = gcd(a,b);\n\t\t\tSystem.out.println(l + \" \" + g);\n\t\t}\n\t\t\n\t}",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"while(s.hasNext()) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint g = lcm(a,b);\n\t\t\tint l = gcd(a,b);\n\t\t\tSystem.out.println(l + \" \" + g);\n\t\t}",
"s.hasNext()",
"s.hasNext",
"s",
"{\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint g = lcm(a,b);\n\t\t\tint l = gcd(a,b);\n\t\t\tSystem.out.println(l + \" \" + g);\n\t\t}",
"int a = s.nextInt();",
"a",
"s.nextInt()",
"s.nextInt",
"s",
"int b = s.nextInt();",
"b",
"s.nextInt()",
"s.nextInt",
"s",
"int g = lcm(a,b);",
"g",
"lcm(a,b)",
"lcm",
"a",
"b",
"int l = gcd(a,b);",
"l",
"gcd(a,b)",
"gcd",
"a",
"b",
"System.out.println(l + \" \" + g)",
"System.out.println",
"System.out",
"System",
"System.out",
"l + \" \" + g",
"l + \" \" + g",
"l",
"\" \"",
"g",
"String[] args",
"args",
"static int lcm(int a, int b) {\n\t\tfor(int i = b; i <= 2000000000; i += b) {\n\t\t\tif(i % a == 0) {\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"lcm",
"{\n\t\tfor(int i = b; i <= 2000000000; i += b) {\n\t\t\tif(i % a == 0) {\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"for(int i = b; i <= 2000000000; i += b) {\n\t\t\tif(i % a == 0) {\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}",
"int i = b;",
"int i = b;",
"i",
"b",
"i <= 2000000000",
"i",
"2000000000",
"i += b",
"i += b",
"i",
"b",
"{\n\t\t\tif(i % a == 0) {\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif(i % a == 0) {\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}",
"if(i % a == 0) {\n\n\t\t\t\treturn i;\n\t\t\t}",
"i % a == 0",
"i % a",
"i",
"a",
"0",
"{\n\n\t\t\t\treturn i;\n\t\t\t}",
"return i;",
"i",
"return -1;",
"-1",
"1",
"int a",
"a",
"int b",
"b",
"static int gcd(int a, int b) {\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}",
"gcd",
"{\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}",
"if(b == 0) {\n\t\t\treturn a;\n\t\t}",
"b == 0",
"b",
"0",
"{\n\t\t\treturn a;\n\t\t}",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(s.hasNext()) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint g = lcm(a,b);\n\t\t\tint l = gcd(a,b);\n\t\t\tSystem.out.println(l + \" \" + g);\n\t\t}\n\t\t\n\t}\n\tstatic int lcm(int a, int b) {\n\t\tfor(int i = b; i <= 2000000000; i += b) {\n\t\t\tif(i % a == 0) {\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n\tstatic int gcd(int a, int b) {\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\twhile(s.hasNext()) {\n\t\t\tint a = s.nextInt();\n\t\t\tint b = s.nextInt();\n\t\t\t\n\t\t\tint g = lcm(a,b);\n\t\t\tint l = gcd(a,b);\n\t\t\tSystem.out.println(l + \" \" + g);\n\t\t}\n\t\t\n\t}\n\tstatic int lcm(int a, int b) {\n\t\tfor(int i = b; i <= 2000000000; i += b) {\n\t\t\tif(i % a == 0) {\n\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}\n\tstatic int gcd(int a, int b) {\n\t\tif(b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
while(s.hasNext()) {
int a = s.nextInt();
int b = s.nextInt();
int g = lcm(a,b);
int l = gcd(a,b);
System.out.println(l + " " + g);
}
}
static int lcm(int a, int b) {
for(int i = b; i <= 2000000000; i += b) {
if(i % a == 0) {
return i;
}
}
return -1;
}
static int gcd(int a, int b) {
if(b == 0) {
return a;
}
return gcd(b, a % b);
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
17,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
13,
41,
13,
17,
41,
13,
14,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
13,
17,
30,
0,
13,
2,
13,
13,
3,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
14,
2,
13,
17,
30,
0,
13,
13,
30,
0,
13,
4,
13,
13,
2,
13,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
138,
5
],
[
138,
6
],
[
6,
7
],
[
6,
8
],
[
138,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
30,
35
],
[
36,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
37,
40
],
[
36,
41
],
[
36,
42
],
[
42,
43
],
[
42,
44
],
[
42,
45
],
[
9,
46
],
[
46,
47
],
[
138,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
53,
57
],
[
50,
58
],
[
58,
59
],
[
58,
60
],
[
50,
61
],
[
61,
62
],
[
50,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
63,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
50,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
75,
80
],
[
80,
81
],
[
80,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
75,
86
],
[
87,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
90,
94
],
[
89,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
99,
101
],
[
96,
102
],
[
50,
103
],
[
103,
104
],
[
48,
105
],
[
105,
106
],
[
48,
107
],
[
107,
108
],
[
138,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
111,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
114,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
125,
126
],
[
125,
127
],
[
125,
128
],
[
128,
129
],
[
128,
130
],
[
111,
131
],
[
131,
132
],
[
109,
133
],
[
133,
134
],
[
109,
135
],
[
135,
136
],
[
0,
137
],
[
137,
138
],
[
137,
139
]
] | [
"import java.util.Scanner;\n\npublic class Main{\nstatic int LONGEST=2000000000;\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner sc= new Scanner(System.in);\n\t\t//System.out.print(\"Input -> \");\n\t\twhile(sc.hasNext()){\n\t\t\tlong a =sc.nextLong();\n\t\t\tlong b =sc.nextInt();\n\t\t\t\n\t\t\t//System.out.println(\"input=\"+a+\" \"+b);\n\t\t\t//System.out.println(\"LCM=\"+LCM(a,b)+\" \"+\"GCD=\"+GCD(a,b));\n\t\t\tSystem.out.println(GCD(a,b)+\" \"+LCM(a,b));\n\t\t\t//System.out.print(\"Next Input -> \");\n\t\t}\n\t}\n\t\n\tpublic static long LCM(long a,long b){\n\t\tlong max=Math.max(a, b),ans=0;\n\t\tlong min;\n\t\t\n\t\tif(max==a){\n\t\t\tmin=b;\n\t\t}else{\n\t\t\tmin=a;\n\t\t}\n\t\tfor(long i=1;i<=LONGEST;i++){\n\t\t\tif((max*i)%min==0){\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}\n\t\n\tpublic static long GCD(long a,long b){\n\t\tlong gcd;\n\t\tif(b==0){\n\t\t\tgcd=a;\n\t\t}else{\n\t\t\tgcd=GCD(b,a%b);\n\t\t}\n\t\treturn gcd;\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\nstatic int LONGEST=2000000000;\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner sc= new Scanner(System.in);\n\t\t//System.out.print(\"Input -> \");\n\t\twhile(sc.hasNext()){\n\t\t\tlong a =sc.nextLong();\n\t\t\tlong b =sc.nextInt();\n\t\t\t\n\t\t\t//System.out.println(\"input=\"+a+\" \"+b);\n\t\t\t//System.out.println(\"LCM=\"+LCM(a,b)+\" \"+\"GCD=\"+GCD(a,b));\n\t\t\tSystem.out.println(GCD(a,b)+\" \"+LCM(a,b));\n\t\t\t//System.out.print(\"Next Input -> \");\n\t\t}\n\t}\n\t\n\tpublic static long LCM(long a,long b){\n\t\tlong max=Math.max(a, b),ans=0;\n\t\tlong min;\n\t\t\n\t\tif(max==a){\n\t\t\tmin=b;\n\t\t}else{\n\t\t\tmin=a;\n\t\t}\n\t\tfor(long i=1;i<=LONGEST;i++){\n\t\t\tif((max*i)%min==0){\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}\n\t\n\tpublic static long GCD(long a,long b){\n\t\tlong gcd;\n\t\tif(b==0){\n\t\t\tgcd=a;\n\t\t}else{\n\t\t\tgcd=GCD(b,a%b);\n\t\t}\n\t\treturn gcd;\n\t}\n\n}",
"Main",
"static int LONGEST=2000000000;",
"LONGEST",
"2000000000",
"/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner sc= new Scanner(System.in);\n\t\t//System.out.print(\"Input -> \");\n\t\twhile(sc.hasNext()){\n\t\t\tlong a =sc.nextLong();\n\t\t\tlong b =sc.nextInt();\n\t\t\t\n\t\t\t//System.out.println(\"input=\"+a+\" \"+b);\n\t\t\t//System.out.println(\"LCM=\"+LCM(a,b)+\" \"+\"GCD=\"+GCD(a,b));\n\t\t\tSystem.out.println(GCD(a,b)+\" \"+LCM(a,b));\n\t\t\t//System.out.print(\"Next Input -> \");\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc= new Scanner(System.in);\n\t\t//System.out.print(\"Input -> \");\n\t\twhile(sc.hasNext()){\n\t\t\tlong a =sc.nextLong();\n\t\t\tlong b =sc.nextInt();\n\t\t\t\n\t\t\t//System.out.println(\"input=\"+a+\" \"+b);\n\t\t\t//System.out.println(\"LCM=\"+LCM(a,b)+\" \"+\"GCD=\"+GCD(a,b));\n\t\t\tSystem.out.println(GCD(a,b)+\" \"+LCM(a,b));\n\t\t\t//System.out.print(\"Next Input -> \");\n\t\t}\n\t}",
"Scanner sc= new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()){\n\t\t\tlong a =sc.nextLong();\n\t\t\tlong b =sc.nextInt();\n\t\t\t\n\t\t\t//System.out.println(\"input=\"+a+\" \"+b);\n\t\t\t//System.out.println(\"LCM=\"+LCM(a,b)+\" \"+\"GCD=\"+GCD(a,b));\n\t\t\tSystem.out.println(GCD(a,b)+\" \"+LCM(a,b));\n\t\t\t//System.out.print(\"Next Input -> \");\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tlong a =sc.nextLong();\n\t\t\tlong b =sc.nextInt();\n\t\t\t\n\t\t\t//System.out.println(\"input=\"+a+\" \"+b);\n\t\t\t//System.out.println(\"LCM=\"+LCM(a,b)+\" \"+\"GCD=\"+GCD(a,b));\n\t\t\tSystem.out.println(GCD(a,b)+\" \"+LCM(a,b));\n\t\t\t//System.out.print(\"Next Input -> \");\n\t\t}",
"long a =sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long b =sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(GCD(a,b)+\" \"+LCM(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"GCD(a,b)+\" \"+LCM(a,b)",
"GCD(a,b)+\" \"+LCM(a,b)",
"GCD(a,b)",
"GCD",
"a",
"b",
"\" \"",
"LCM(a,b)",
"LCM",
"a",
"b",
"String[] args",
"args",
"public static long LCM(long a,long b){\n\t\tlong max=Math.max(a, b),ans=0;\n\t\tlong min;\n\t\t\n\t\tif(max==a){\n\t\t\tmin=b;\n\t\t}else{\n\t\t\tmin=a;\n\t\t}\n\t\tfor(long i=1;i<=LONGEST;i++){\n\t\t\tif((max*i)%min==0){\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}",
"LCM",
"{\n\t\tlong max=Math.max(a, b),ans=0;\n\t\tlong min;\n\t\t\n\t\tif(max==a){\n\t\t\tmin=b;\n\t\t}else{\n\t\t\tmin=a;\n\t\t}\n\t\tfor(long i=1;i<=LONGEST;i++){\n\t\t\tif((max*i)%min==0){\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}",
"long max=Math.max(a, b)",
"max",
"Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"ans=0;",
"ans",
"0",
"long min;",
"min",
"if(max==a){\n\t\t\tmin=b;\n\t\t}else{\n\t\t\tmin=a;\n\t\t}",
"max==a",
"max",
"a",
"{\n\t\t\tmin=b;\n\t\t}",
"min=b",
"min",
"b",
"{\n\t\t\tmin=a;\n\t\t}",
"min=a",
"min",
"a",
"for(long i=1;i<=LONGEST;i++){\n\t\t\tif((max*i)%min==0){\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}\n\t\t}",
"long i=1;",
"long i=1;",
"i",
"1",
"i<=LONGEST",
"i",
"LONGEST",
"i++",
"i++",
"i",
"{\n\t\t\tif((max*i)%min==0){\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}\n\t\t}",
"{\n\t\t\tif((max*i)%min==0){\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}\n\t\t}",
"if((max*i)%min==0){\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}",
"(max*i)%min==0",
"(max*i)%min",
"(max*i)",
"max",
"i",
"min",
"0",
"{\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}",
"ans=max*i",
"ans",
"max*i",
"max",
"i",
"break;",
"return ans;",
"ans",
"long a",
"a",
"long b",
"b",
"public static long GCD(long a,long b){\n\t\tlong gcd;\n\t\tif(b==0){\n\t\t\tgcd=a;\n\t\t}else{\n\t\t\tgcd=GCD(b,a%b);\n\t\t}\n\t\treturn gcd;\n\t}",
"GCD",
"{\n\t\tlong gcd;\n\t\tif(b==0){\n\t\t\tgcd=a;\n\t\t}else{\n\t\t\tgcd=GCD(b,a%b);\n\t\t}\n\t\treturn gcd;\n\t}",
"long gcd;",
"gcd",
"if(b==0){\n\t\t\tgcd=a;\n\t\t}else{\n\t\t\tgcd=GCD(b,a%b);\n\t\t}",
"b==0",
"b",
"0",
"{\n\t\t\tgcd=a;\n\t\t}",
"gcd=a",
"gcd",
"a",
"{\n\t\t\tgcd=GCD(b,a%b);\n\t\t}",
"gcd=GCD(b,a%b)",
"gcd",
"GCD(b,a%b)",
"GCD",
"b",
"a%b",
"a",
"b",
"return gcd;",
"gcd",
"long a",
"a",
"long b",
"b",
"public class Main{\nstatic int LONGEST=2000000000;\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner sc= new Scanner(System.in);\n\t\t//System.out.print(\"Input -> \");\n\t\twhile(sc.hasNext()){\n\t\t\tlong a =sc.nextLong();\n\t\t\tlong b =sc.nextInt();\n\t\t\t\n\t\t\t//System.out.println(\"input=\"+a+\" \"+b);\n\t\t\t//System.out.println(\"LCM=\"+LCM(a,b)+\" \"+\"GCD=\"+GCD(a,b));\n\t\t\tSystem.out.println(GCD(a,b)+\" \"+LCM(a,b));\n\t\t\t//System.out.print(\"Next Input -> \");\n\t\t}\n\t}\n\t\n\tpublic static long LCM(long a,long b){\n\t\tlong max=Math.max(a, b),ans=0;\n\t\tlong min;\n\t\t\n\t\tif(max==a){\n\t\t\tmin=b;\n\t\t}else{\n\t\t\tmin=a;\n\t\t}\n\t\tfor(long i=1;i<=LONGEST;i++){\n\t\t\tif((max*i)%min==0){\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}\n\t\n\tpublic static long GCD(long a,long b){\n\t\tlong gcd;\n\t\tif(b==0){\n\t\t\tgcd=a;\n\t\t}else{\n\t\t\tgcd=GCD(b,a%b);\n\t\t}\n\t\treturn gcd;\n\t}\n\n}",
"public class Main{\nstatic int LONGEST=2000000000;\n\t/**\n\t * @param args\n\t */\n\tpublic static void main(String[] args) {\n\t\tScanner sc= new Scanner(System.in);\n\t\t//System.out.print(\"Input -> \");\n\t\twhile(sc.hasNext()){\n\t\t\tlong a =sc.nextLong();\n\t\t\tlong b =sc.nextInt();\n\t\t\t\n\t\t\t//System.out.println(\"input=\"+a+\" \"+b);\n\t\t\t//System.out.println(\"LCM=\"+LCM(a,b)+\" \"+\"GCD=\"+GCD(a,b));\n\t\t\tSystem.out.println(GCD(a,b)+\" \"+LCM(a,b));\n\t\t\t//System.out.print(\"Next Input -> \");\n\t\t}\n\t}\n\t\n\tpublic static long LCM(long a,long b){\n\t\tlong max=Math.max(a, b),ans=0;\n\t\tlong min;\n\t\t\n\t\tif(max==a){\n\t\t\tmin=b;\n\t\t}else{\n\t\t\tmin=a;\n\t\t}\n\t\tfor(long i=1;i<=LONGEST;i++){\n\t\t\tif((max*i)%min==0){\n\t\t\t\tans=max*i;\n\t\t\t\t break;\n\t\t\t}\n\t\t}\n\t\treturn ans;\n\t}\n\t\n\tpublic static long GCD(long a,long b){\n\t\tlong gcd;\n\t\tif(b==0){\n\t\t\tgcd=a;\n\t\t}else{\n\t\t\tgcd=GCD(b,a%b);\n\t\t}\n\t\treturn gcd;\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main{
static int LONGEST=2000000000;
/**
* @param args
*/
public static void main(String[] args) {
Scanner sc= new Scanner(System.in);
//System.out.print("Input -> ");
while(sc.hasNext()){
long a =sc.nextLong();
long b =sc.nextInt();
//System.out.println("input="+a+" "+b);
//System.out.println("LCM="+LCM(a,b)+" "+"GCD="+GCD(a,b));
System.out.println(GCD(a,b)+" "+LCM(a,b));
//System.out.print("Next Input -> ");
}
}
public static long LCM(long a,long b){
long max=Math.max(a, b),ans=0;
long min;
if(max==a){
min=b;
}else{
min=a;
}
for(long i=1;i<=LONGEST;i++){
if((max*i)%min==0){
ans=max*i;
break;
}
}
return ans;
}
public static long GCD(long a,long b){
long gcd;
if(b==0){
gcd=a;
}else{
gcd=GCD(b,a%b);
}
return gcd;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
17,
41,
13,
20,
17,
17,
0,
18,
18,
13,
17,
17,
4,
18,
13,
0,
18,
18,
13,
17,
17,
4,
18,
13,
0,
18,
18,
13,
17,
17,
18,
18,
13,
17,
17,
0,
18,
18,
13,
17,
17,
18,
18,
13,
17,
17,
42,
2,
13,
17,
30,
0,
13,
2,
18,
18,
13,
17,
17,
18,
18,
13,
17,
17,
0,
18,
18,
13,
17,
17,
18,
18,
13,
17,
17,
0,
18,
18,
13,
17,
17,
13,
4,
18,
18,
13,
13,
2,
2,
18,
18,
13,
17,
17,
17,
2,
2,
18,
18,
13,
17,
17,
18,
18,
13,
17,
17,
18,
18,
13,
17,
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
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
20,
22
],
[
16,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
25,
31
],
[
31,
32
],
[
32,
33
],
[
16,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
35,
39
],
[
34,
40
],
[
40,
41
],
[
41,
42
],
[
16,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
43,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
16,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
54,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
16,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
72,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
69,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
83,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
69,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
94,
100
],
[
16,
101
],
[
101,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
107,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
107,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
115,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
121,
125
],
[
114,
126
],
[
126,
127
],
[
127,
128
],
[
127,
129
],
[
126,
130
],
[
6,
131
],
[
131,
132
]
] | [
"import java.util.Scanner;\n\nclass Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong i = 1;\n\t\t\tlong[][] gcdlcm = new long[2][2];\n\t\t\tgcdlcm[0][0] = scan.nextLong();\n\t\t\tgcdlcm[0][1] = scan.nextLong();\n\t\t\tgcdlcm[1][0] = gcdlcm[0][0];\n\t\t\tgcdlcm[1][1] = gcdlcm[0][1];\n\t\t\t\n\t\t\twhile(i != 0){\n\t\t\t\ti = gcdlcm[0][0] % gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][0] = gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][1] = i;\n\t\t\t}\n\t\t\tSystem.out.println(gcdlcm[0][0]+ \" \" + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong i = 1;\n\t\t\tlong[][] gcdlcm = new long[2][2];\n\t\t\tgcdlcm[0][0] = scan.nextLong();\n\t\t\tgcdlcm[0][1] = scan.nextLong();\n\t\t\tgcdlcm[1][0] = gcdlcm[0][0];\n\t\t\tgcdlcm[1][1] = gcdlcm[0][1];\n\t\t\t\n\t\t\twhile(i != 0){\n\t\t\t\ti = gcdlcm[0][0] % gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][0] = gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][1] = i;\n\t\t\t}\n\t\t\tSystem.out.println(gcdlcm[0][0]+ \" \" + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong i = 1;\n\t\t\tlong[][] gcdlcm = new long[2][2];\n\t\t\tgcdlcm[0][0] = scan.nextLong();\n\t\t\tgcdlcm[0][1] = scan.nextLong();\n\t\t\tgcdlcm[1][0] = gcdlcm[0][0];\n\t\t\tgcdlcm[1][1] = gcdlcm[0][1];\n\t\t\t\n\t\t\twhile(i != 0){\n\t\t\t\ti = gcdlcm[0][0] % gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][0] = gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][1] = i;\n\t\t\t}\n\t\t\tSystem.out.println(gcdlcm[0][0]+ \" \" + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\twhile(scan.hasNext()){\n\t\t\tlong i = 1;\n\t\t\tlong[][] gcdlcm = new long[2][2];\n\t\t\tgcdlcm[0][0] = scan.nextLong();\n\t\t\tgcdlcm[0][1] = scan.nextLong();\n\t\t\tgcdlcm[1][0] = gcdlcm[0][0];\n\t\t\tgcdlcm[1][1] = gcdlcm[0][1];\n\t\t\t\n\t\t\twhile(i != 0){\n\t\t\t\ti = gcdlcm[0][0] % gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][0] = gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][1] = i;\n\t\t\t}\n\t\t\tSystem.out.println(gcdlcm[0][0]+ \" \" + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"while(scan.hasNext()){\n\t\t\tlong i = 1;\n\t\t\tlong[][] gcdlcm = new long[2][2];\n\t\t\tgcdlcm[0][0] = scan.nextLong();\n\t\t\tgcdlcm[0][1] = scan.nextLong();\n\t\t\tgcdlcm[1][0] = gcdlcm[0][0];\n\t\t\tgcdlcm[1][1] = gcdlcm[0][1];\n\t\t\t\n\t\t\twhile(i != 0){\n\t\t\t\ti = gcdlcm[0][0] % gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][0] = gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][1] = i;\n\t\t\t}\n\t\t\tSystem.out.println(gcdlcm[0][0]+ \" \" + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));\n\t\t}",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n\t\t\tlong i = 1;\n\t\t\tlong[][] gcdlcm = new long[2][2];\n\t\t\tgcdlcm[0][0] = scan.nextLong();\n\t\t\tgcdlcm[0][1] = scan.nextLong();\n\t\t\tgcdlcm[1][0] = gcdlcm[0][0];\n\t\t\tgcdlcm[1][1] = gcdlcm[0][1];\n\t\t\t\n\t\t\twhile(i != 0){\n\t\t\t\ti = gcdlcm[0][0] % gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][0] = gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][1] = i;\n\t\t\t}\n\t\t\tSystem.out.println(gcdlcm[0][0]+ \" \" + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));\n\t\t}",
"long i = 1;",
"i",
"1",
"long[][] gcdlcm = new long[2][2];",
"gcdlcm",
"new long[2][2]",
"2",
"2",
"gcdlcm[0][0] = scan.nextLong()",
"gcdlcm[0][0]",
"gcdlcm[0]",
"gcdlcm",
"0",
"0",
"scan.nextLong()",
"scan.nextLong",
"scan",
"gcdlcm[0][1] = scan.nextLong()",
"gcdlcm[0][1]",
"gcdlcm[0]",
"gcdlcm",
"0",
"1",
"scan.nextLong()",
"scan.nextLong",
"scan",
"gcdlcm[1][0] = gcdlcm[0][0]",
"gcdlcm[1][0]",
"gcdlcm[1]",
"gcdlcm",
"1",
"0",
"gcdlcm[0][0]",
"gcdlcm[0]",
"gcdlcm",
"0",
"0",
"gcdlcm[1][1] = gcdlcm[0][1]",
"gcdlcm[1][1]",
"gcdlcm[1]",
"gcdlcm",
"1",
"1",
"gcdlcm[0][1]",
"gcdlcm[0]",
"gcdlcm",
"0",
"1",
"while(i != 0){\n\t\t\t\ti = gcdlcm[0][0] % gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][0] = gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][1] = i;\n\t\t\t}",
"i != 0",
"i",
"0",
"{\n\t\t\t\ti = gcdlcm[0][0] % gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][0] = gcdlcm[0][1];\n\t\t\t\tgcdlcm[0][1] = i;\n\t\t\t}",
"i = gcdlcm[0][0] % gcdlcm[0][1]",
"i",
"gcdlcm[0][0] % gcdlcm[0][1]",
"gcdlcm[0][0]",
"gcdlcm[0]",
"gcdlcm",
"0",
"0",
"gcdlcm[0][1]",
"gcdlcm[0]",
"gcdlcm",
"0",
"1",
"gcdlcm[0][0] = gcdlcm[0][1]",
"gcdlcm[0][0]",
"gcdlcm[0]",
"gcdlcm",
"0",
"0",
"gcdlcm[0][1]",
"gcdlcm[0]",
"gcdlcm",
"0",
"1",
"gcdlcm[0][1] = i",
"gcdlcm[0][1]",
"gcdlcm[0]",
"gcdlcm",
"0",
"1",
"i",
"System.out.println(gcdlcm[0][0]+ \" \" + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcdlcm[0][0]+ \" \" + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0])",
"gcdlcm[0][0]+ \" \" + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0])",
"gcdlcm[0][0]",
"gcdlcm[0]",
"gcdlcm",
"0",
"0",
"\" \"",
"(gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0])",
"gcdlcm[1][0] * gcdlcm[1][1]",
"gcdlcm[1][0]",
"gcdlcm[1]",
"gcdlcm",
"1",
"0",
"gcdlcm[1][1]",
"gcdlcm[1]",
"gcdlcm",
"1",
"1",
"gcdlcm[0][0]",
"gcdlcm[0]",
"gcdlcm",
"0",
"0",
"String[] args",
"args"
] | import java.util.Scanner;
class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
while(scan.hasNext()){
long i = 1;
long[][] gcdlcm = new long[2][2];
gcdlcm[0][0] = scan.nextLong();
gcdlcm[0][1] = scan.nextLong();
gcdlcm[1][0] = gcdlcm[0][0];
gcdlcm[1][1] = gcdlcm[0][1];
while(i != 0){
i = gcdlcm[0][0] % gcdlcm[0][1];
gcdlcm[0][0] = gcdlcm[0][1];
gcdlcm[0][1] = i;
}
System.out.println(gcdlcm[0][0]+ " " + (gcdlcm[1][0] * gcdlcm[1][1] / gcdlcm[0][0]));
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
4,
18,
13,
17,
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,
4,
18,
13,
18,
13,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
18,
13,
17,
18,
13,
17,
17,
4,
13,
18,
13,
17,
18,
13,
17,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
17,
42,
17,
30,
0,
13,
2,
13,
13,
14,
2,
13,
17,
30,
3,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
13,
41,
13,
13,
42,
2,
13,
17,
30,
14,
2,
13,
13,
30,
29,
13,
14,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
29,
17,
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
],
[
180,
11
],
[
180,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
18,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
25,
30
],
[
22,
31
],
[
31,
32
],
[
31,
33
],
[
34,
35
],
[
34,
36
],
[
22,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
37,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
37,
47
],
[
47,
48
],
[
48,
49
],
[
37,
50
],
[
51,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
59,
61
],
[
22,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
68,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
74,
75
],
[
74,
76
],
[
68,
77
],
[
68,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
78,
83
],
[
83,
84
],
[
83,
85
],
[
12,
86
],
[
86,
87
],
[
180,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
95,
96
],
[
90,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
99,
103
],
[
90,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
106,
110
],
[
90,
111
],
[
111,
112
],
[
111,
113
],
[
90,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
116,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
116,
128
],
[
128,
129
],
[
128,
130
],
[
116,
131
],
[
131,
132
],
[
131,
133
],
[
90,
134
],
[
134,
135
],
[
88,
136
],
[
136,
137
],
[
88,
138
],
[
138,
139
],
[
180,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
142,
146
],
[
146,
147
],
[
146,
148
],
[
142,
149
],
[
149,
150
],
[
150,
151
],
[
150,
152
],
[
149,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
155,
157
],
[
154,
158
],
[
158,
159
],
[
159,
160
],
[
153,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
161,
169
],
[
169,
170
],
[
170,
171
],
[
170,
172
],
[
142,
173
],
[
173,
174
],
[
140,
175
],
[
175,
176
],
[
140,
177
],
[
177,
178
],
[
0,
179
],
[
179,
180
],
[
179,
181
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main\n{\n public static void main(String[] args) throws NumberFormatException, IOException\n {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n while (input.ready())\n {\n String[] dataStr = input.readLine().split(\" \");\n int[] dataInt = new int[dataStr.length];\n for (int i = 0; i < dataStr.length; i++)\n {\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }\n System.out.println(getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1]));\n }\n }\n\n public static int getGCD(int num1, int num2)\n {\n if (num1 == num2)\n return num1;\n\n int a = Math.max(num1, num2);\n int b = Math.min(num1, num2);\n int c = 1;\n\n while (true)\n {\n c = a % b;\n if(c == 0) {\n break;\n }\n a = b;\n b = c;\n }\n return b;\n }\n\n public static int getLCM(int a, int b)\n {\n int productA = a;\n int productB = b;\n while (productA <= 2000000000)\n {\n if (productA == productB)\n {\n return productA;\n }\n if (productA < productB)\n {\n productA += a;\n }\n else\n {\n productB += b;\n }\n }\n return 0;\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main\n{\n public static void main(String[] args) throws NumberFormatException, IOException\n {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n while (input.ready())\n {\n String[] dataStr = input.readLine().split(\" \");\n int[] dataInt = new int[dataStr.length];\n for (int i = 0; i < dataStr.length; i++)\n {\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }\n System.out.println(getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1]));\n }\n }\n\n public static int getGCD(int num1, int num2)\n {\n if (num1 == num2)\n return num1;\n\n int a = Math.max(num1, num2);\n int b = Math.min(num1, num2);\n int c = 1;\n\n while (true)\n {\n c = a % b;\n if(c == 0) {\n break;\n }\n a = b;\n b = c;\n }\n return b;\n }\n\n public static int getLCM(int a, int b)\n {\n int productA = a;\n int productB = b;\n while (productA <= 2000000000)\n {\n if (productA == productB)\n {\n return productA;\n }\n if (productA < productB)\n {\n productA += a;\n }\n else\n {\n productB += b;\n }\n }\n return 0;\n }\n}",
"Main",
"public static void main(String[] args) throws NumberFormatException, IOException\n {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n while (input.ready())\n {\n String[] dataStr = input.readLine().split(\" \");\n int[] dataInt = new int[dataStr.length];\n for (int i = 0; i < dataStr.length; i++)\n {\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }\n System.out.println(getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1]));\n }\n }",
"main",
"{\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n while (input.ready())\n {\n String[] dataStr = input.readLine().split(\" \");\n int[] dataInt = new int[dataStr.length];\n for (int i = 0; i < dataStr.length; i++)\n {\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }\n System.out.println(getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1]));\n }\n }",
"BufferedReader input = new BufferedReader(new InputStreamReader(System.in));",
"input",
"new BufferedReader(new InputStreamReader(System.in))",
"while (input.ready())\n {\n String[] dataStr = input.readLine().split(\" \");\n int[] dataInt = new int[dataStr.length];\n for (int i = 0; i < dataStr.length; i++)\n {\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }\n System.out.println(getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1]));\n }",
"input.ready()",
"input.ready",
"input",
"{\n String[] dataStr = input.readLine().split(\" \");\n int[] dataInt = new int[dataStr.length];\n for (int i = 0; i < dataStr.length; i++)\n {\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }\n System.out.println(getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1]));\n }",
"String[] dataStr = input.readLine().split(\" \");",
"dataStr",
"input.readLine().split(\" \")",
"input.readLine().split",
"input.readLine()",
"input.readLine",
"input",
"\" \"",
"int[] dataInt = new int[dataStr.length];",
"dataInt",
"new int[dataStr.length]",
"dataStr.length",
"dataStr",
"dataStr.length",
"for (int i = 0; i < dataStr.length; i++)\n {\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < dataStr.length",
"i",
"dataStr.length",
"dataStr",
"dataStr.length",
"i++",
"i++",
"i",
"{\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }",
"{\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }",
"dataInt[i] = Integer.valueOf(dataStr[i])",
"dataInt[i]",
"dataInt",
"i",
"Integer.valueOf(dataStr[i])",
"Integer.valueOf",
"Integer",
"dataStr[i]",
"dataStr",
"i",
"System.out.println(getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1]))",
"System.out.println",
"System.out",
"System",
"System.out",
"getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1])",
"getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1])",
"getGCD(dataInt[0], dataInt[1])",
"getGCD",
"dataInt[0]",
"dataInt",
"0",
"dataInt[1]",
"dataInt",
"1",
"\" \"",
"getLCM(dataInt[0], dataInt[1])",
"getLCM",
"dataInt[0]",
"dataInt",
"0",
"dataInt[1]",
"dataInt",
"1",
"String[] args",
"args",
"public static int getGCD(int num1, int num2)\n {\n if (num1 == num2)\n return num1;\n\n int a = Math.max(num1, num2);\n int b = Math.min(num1, num2);\n int c = 1;\n\n while (true)\n {\n c = a % b;\n if(c == 0) {\n break;\n }\n a = b;\n b = c;\n }\n return b;\n }",
"getGCD",
"{\n if (num1 == num2)\n return num1;\n\n int a = Math.max(num1, num2);\n int b = Math.min(num1, num2);\n int c = 1;\n\n while (true)\n {\n c = a % b;\n if(c == 0) {\n break;\n }\n a = b;\n b = c;\n }\n return b;\n }",
"if (num1 == num2)\n return num1;",
"num1 == num2",
"num1",
"num2",
"return num1;",
"num1",
"int a = Math.max(num1, num2);",
"a",
"Math.max(num1, num2)",
"Math.max",
"Math",
"num1",
"num2",
"int b = Math.min(num1, num2);",
"b",
"Math.min(num1, num2)",
"Math.min",
"Math",
"num1",
"num2",
"int c = 1;",
"c",
"1",
"while (true)\n {\n c = a % b;\n if(c == 0) {\n break;\n }\n a = b;\n b = c;\n }",
"true",
"{\n c = a % b;\n if(c == 0) {\n break;\n }\n a = b;\n b = c;\n }",
"c = a % b",
"c",
"a % b",
"a",
"b",
"if(c == 0) {\n break;\n }",
"c == 0",
"c",
"0",
"{\n break;\n }",
"break;",
"a = b",
"a",
"b",
"b = c",
"b",
"c",
"return b;",
"b",
"int num1",
"num1",
"int num2",
"num2",
"public static int getLCM(int a, int b)\n {\n int productA = a;\n int productB = b;\n while (productA <= 2000000000)\n {\n if (productA == productB)\n {\n return productA;\n }\n if (productA < productB)\n {\n productA += a;\n }\n else\n {\n productB += b;\n }\n }\n return 0;\n }",
"getLCM",
"{\n int productA = a;\n int productB = b;\n while (productA <= 2000000000)\n {\n if (productA == productB)\n {\n return productA;\n }\n if (productA < productB)\n {\n productA += a;\n }\n else\n {\n productB += b;\n }\n }\n return 0;\n }",
"int productA = a;",
"productA",
"a",
"int productB = b;",
"productB",
"b",
"while (productA <= 2000000000)\n {\n if (productA == productB)\n {\n return productA;\n }\n if (productA < productB)\n {\n productA += a;\n }\n else\n {\n productB += b;\n }\n }",
"productA <= 2000000000",
"productA",
"2000000000",
"{\n if (productA == productB)\n {\n return productA;\n }\n if (productA < productB)\n {\n productA += a;\n }\n else\n {\n productB += b;\n }\n }",
"if (productA == productB)\n {\n return productA;\n }",
"productA == productB",
"productA",
"productB",
"{\n return productA;\n }",
"return productA;",
"productA",
"if (productA < productB)\n {\n productA += a;\n }\n else\n {\n productB += b;\n }",
"productA < productB",
"productA",
"productB",
"{\n productA += a;\n }",
"productA += a",
"productA",
"a",
"{\n productB += b;\n }",
"productB += b",
"productB",
"b",
"return 0;",
"0",
"int a",
"a",
"int b",
"b",
"public class Main\n{\n public static void main(String[] args) throws NumberFormatException, IOException\n {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n while (input.ready())\n {\n String[] dataStr = input.readLine().split(\" \");\n int[] dataInt = new int[dataStr.length];\n for (int i = 0; i < dataStr.length; i++)\n {\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }\n System.out.println(getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1]));\n }\n }\n\n public static int getGCD(int num1, int num2)\n {\n if (num1 == num2)\n return num1;\n\n int a = Math.max(num1, num2);\n int b = Math.min(num1, num2);\n int c = 1;\n\n while (true)\n {\n c = a % b;\n if(c == 0) {\n break;\n }\n a = b;\n b = c;\n }\n return b;\n }\n\n public static int getLCM(int a, int b)\n {\n int productA = a;\n int productB = b;\n while (productA <= 2000000000)\n {\n if (productA == productB)\n {\n return productA;\n }\n if (productA < productB)\n {\n productA += a;\n }\n else\n {\n productB += b;\n }\n }\n return 0;\n }\n}",
"public class Main\n{\n public static void main(String[] args) throws NumberFormatException, IOException\n {\n BufferedReader input = new BufferedReader(new InputStreamReader(System.in));\n\n while (input.ready())\n {\n String[] dataStr = input.readLine().split(\" \");\n int[] dataInt = new int[dataStr.length];\n for (int i = 0; i < dataStr.length; i++)\n {\n dataInt[i] = Integer.valueOf(dataStr[i]);\n }\n System.out.println(getGCD(dataInt[0], dataInt[1]) + \" \" + getLCM(dataInt[0], dataInt[1]));\n }\n }\n\n public static int getGCD(int num1, int num2)\n {\n if (num1 == num2)\n return num1;\n\n int a = Math.max(num1, num2);\n int b = Math.min(num1, num2);\n int c = 1;\n\n while (true)\n {\n c = a % b;\n if(c == 0) {\n break;\n }\n a = b;\n b = c;\n }\n return b;\n }\n\n public static int getLCM(int a, int b)\n {\n int productA = a;\n int productB = b;\n while (productA <= 2000000000)\n {\n if (productA == productB)\n {\n return productA;\n }\n if (productA < productB)\n {\n productA += a;\n }\n else\n {\n productB += b;\n }\n }\n return 0;\n }\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main
{
public static void main(String[] args) throws NumberFormatException, IOException
{
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
while (input.ready())
{
String[] dataStr = input.readLine().split(" ");
int[] dataInt = new int[dataStr.length];
for (int i = 0; i < dataStr.length; i++)
{
dataInt[i] = Integer.valueOf(dataStr[i]);
}
System.out.println(getGCD(dataInt[0], dataInt[1]) + " " + getLCM(dataInt[0], dataInt[1]));
}
}
public static int getGCD(int num1, int num2)
{
if (num1 == num2)
return num1;
int a = Math.max(num1, num2);
int b = Math.min(num1, num2);
int c = 1;
while (true)
{
c = a % b;
if(c == 0) {
break;
}
a = b;
b = c;
}
return b;
}
public static int getLCM(int a, int b)
{
int productA = a;
int productB = b;
while (productA <= 2000000000)
{
if (productA == productB)
{
return productA;
}
if (productA < productB)
{
productA += a;
}
else
{
productB += b;
}
}
return 0;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
13,
13,
0,
13,
4,
18,
13,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
93,
5
],
[
93,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
8,
11
],
[
11,
12
],
[
8,
13
],
[
13,
14
],
[
8,
15
],
[
15,
16
],
[
15,
17
],
[
8,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
18,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
22,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
35,
39
],
[
22,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
42,
46
],
[
22,
47
],
[
47,
48
],
[
47,
49
],
[
22,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
50,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
57,
60
],
[
56,
61
],
[
56,
62
],
[
62,
63
],
[
63,
64
],
[
63,
65
],
[
62,
66
],
[
66,
67
],
[
66,
68
],
[
66,
69
],
[
6,
70
],
[
70,
71
],
[
93,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
79,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
82,
85
],
[
85,
86
],
[
85,
87
],
[
72,
88
],
[
88,
89
],
[
72,
90
],
[
90,
91
],
[
0,
92
],
[
92,
93
],
[
92,
94
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tlong n, m, k;\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile (in.hasNext()) {\n\t\t\tn = in.nextInt();\n\t\t\tm = in.nextInt();\n\n\t\t\tk=Math.max(n, m);\n\t\t\tm=Math.min(n, m);\n\t\t\tn=k;\n\t\t\t\t\n\t\t\tSystem.out.println(gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m));\n\t\t}\n\t}\n\n\tprivate static long gcd(long n,long m){\n\n\t\tif(m==0) return n;\n\t\telse return gcd(m, n%m);\n\t\t\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tlong n, m, k;\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile (in.hasNext()) {\n\t\t\tn = in.nextInt();\n\t\t\tm = in.nextInt();\n\n\t\t\tk=Math.max(n, m);\n\t\t\tm=Math.min(n, m);\n\t\t\tn=k;\n\t\t\t\t\n\t\t\tSystem.out.println(gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m));\n\t\t}\n\t}\n\n\tprivate static long gcd(long n,long m){\n\n\t\tif(m==0) return n;\n\t\telse return gcd(m, n%m);\n\t\t\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\tlong n, m, k;\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile (in.hasNext()) {\n\t\t\tn = in.nextInt();\n\t\t\tm = in.nextInt();\n\n\t\t\tk=Math.max(n, m);\n\t\t\tm=Math.min(n, m);\n\t\t\tn=k;\n\t\t\t\t\n\t\t\tSystem.out.println(gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m));\n\t\t}\n\t}",
"main",
"{\n\t\tlong n, m, k;\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile (in.hasNext()) {\n\t\t\tn = in.nextInt();\n\t\t\tm = in.nextInt();\n\n\t\t\tk=Math.max(n, m);\n\t\t\tm=Math.min(n, m);\n\t\t\tn=k;\n\t\t\t\t\n\t\t\tSystem.out.println(gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m));\n\t\t}\n\t}",
"long n",
"n",
"m",
"m",
"k;",
"k",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"while (in.hasNext()) {\n\t\t\tn = in.nextInt();\n\t\t\tm = in.nextInt();\n\n\t\t\tk=Math.max(n, m);\n\t\t\tm=Math.min(n, m);\n\t\t\tn=k;\n\t\t\t\t\n\t\t\tSystem.out.println(gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m));\n\t\t}",
"in.hasNext()",
"in.hasNext",
"in",
"{\n\t\t\tn = in.nextInt();\n\t\t\tm = in.nextInt();\n\n\t\t\tk=Math.max(n, m);\n\t\t\tm=Math.min(n, m);\n\t\t\tn=k;\n\t\t\t\t\n\t\t\tSystem.out.println(gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m));\n\t\t}",
"n = in.nextInt()",
"n",
"in.nextInt()",
"in.nextInt",
"in",
"m = in.nextInt()",
"m",
"in.nextInt()",
"in.nextInt",
"in",
"k=Math.max(n, m)",
"k",
"Math.max(n, m)",
"Math.max",
"Math",
"n",
"m",
"m=Math.min(n, m)",
"m",
"Math.min(n, m)",
"Math.min",
"Math",
"n",
"m",
"n=k",
"n",
"k",
"System.out.println(gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m)",
"gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m)",
"gcd(n, m)",
"gcd",
"n",
"m",
"\" \"",
"(n * m) / gcd(n, m)",
"(n * m)",
"n",
"m",
"gcd(n, m)",
"gcd",
"n",
"m",
"String[] args",
"args",
"private static long gcd(long n,long m){\n\n\t\tif(m==0) return n;\n\t\telse return gcd(m, n%m);\n\t\t\n\t}",
"gcd",
"{\n\n\t\tif(m==0) return n;\n\t\telse return gcd(m, n%m);\n\t\t\n\t}",
"if(m==0) return n;\n\t\telse return gcd(m, n%m);",
"m==0",
"m",
"0",
"return n;",
"n",
"return gcd(m, n%m);",
"gcd(m, n%m)",
"gcd",
"m",
"n%m",
"n",
"m",
"long n",
"n",
"long m",
"m",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tlong n, m, k;\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile (in.hasNext()) {\n\t\t\tn = in.nextInt();\n\t\t\tm = in.nextInt();\n\n\t\t\tk=Math.max(n, m);\n\t\t\tm=Math.min(n, m);\n\t\t\tn=k;\n\t\t\t\t\n\t\t\tSystem.out.println(gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m));\n\t\t}\n\t}\n\n\tprivate static long gcd(long n,long m){\n\n\t\tif(m==0) return n;\n\t\telse return gcd(m, n%m);\n\t\t\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tlong n, m, k;\n\n\t\tScanner in = new Scanner(System.in);\n\n\t\twhile (in.hasNext()) {\n\t\t\tn = in.nextInt();\n\t\t\tm = in.nextInt();\n\n\t\t\tk=Math.max(n, m);\n\t\t\tm=Math.min(n, m);\n\t\t\tn=k;\n\t\t\t\t\n\t\t\tSystem.out.println(gcd(n, m) + \" \"\n\t\t\t\t\t+ (n * m) / gcd(n, m));\n\t\t}\n\t}\n\n\tprivate static long gcd(long n,long m){\n\n\t\tif(m==0) return n;\n\t\telse return gcd(m, n%m);\n\t\t\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
long n, m, k;
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
n = in.nextInt();
m = in.nextInt();
k=Math.max(n, m);
m=Math.min(n, m);
n=k;
System.out.println(gcd(n, m) + " "
+ (n * m) / gcd(n, m));
}
}
private static long gcd(long n,long m){
if(m==0) return n;
else return gcd(m, n%m);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
38,
5,
13,
30,
4,
18,
13,
17,
30,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
14,
2,
13,
13,
0,
13,
4,
13,
13,
13,
0,
13,
4,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
41,
13,
14,
2,
2,
13,
13,
17,
30,
0,
13,
4,
13,
13,
2,
13,
13,
29,
13,
29,
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
],
[
134,
11
],
[
134,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
14,
19
],
[
19,
20
],
[
14,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
14,
25
],
[
25,
26
],
[
14,
27
],
[
27,
28
],
[
27,
29
],
[
14,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
30,
38
],
[
38,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
47,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
56,
59
],
[
59,
60
],
[
59,
61
],
[
47,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
64,
67
],
[
67,
68
],
[
67,
69
],
[
47,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
76,
79
],
[
70,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
82,
85
],
[
47,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
47,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
93,
98
],
[
99,
99
],
[
99,
100
],
[
99,
101
],
[
99,
102
],
[
12,
103
],
[
103,
104
],
[
134,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
107,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
111,
115
],
[
110,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
119,
122
],
[
122,
123
],
[
122,
124
],
[
110,
125
],
[
125,
126
],
[
107,
127
],
[
127,
128
],
[
105,
129
],
[
129,
130
],
[
105,
131
],
[
131,
132
],
[
0,
133
],
[
133,
134
],
[
133,
135
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n/**\n * Created by Reopard on 2014/05/06.\n */\npublic class Main {\n public static void main(String args[]) {\n long a, b, gcd, lcm;\n String line;\n String number[];\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n while((line = reader.readLine()) != null){\n number = line.split(\" \");\n a = Long.parseLong(number[0]);\n b = Long.parseLong(number[1]);\n if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);\n lcm = a*b/gcd;\n System.out.println(gcd + \" \" + lcm);\n }\n }catch(IOException e){\n System.exit(0);\n }\n }\n\n static long GCD(long a, long b){\n long tmp;\n if(a%b != 0){\n tmp = GCD(b, a%b);\n }else return b;\n return tmp;\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n public static void main(String args[]) {\n long a, b, gcd, lcm;\n String line;\n String number[];\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n while((line = reader.readLine()) != null){\n number = line.split(\" \");\n a = Long.parseLong(number[0]);\n b = Long.parseLong(number[1]);\n if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);\n lcm = a*b/gcd;\n System.out.println(gcd + \" \" + lcm);\n }\n }catch(IOException e){\n System.exit(0);\n }\n }\n\n static long GCD(long a, long b){\n long tmp;\n if(a%b != 0){\n tmp = GCD(b, a%b);\n }else return b;\n return tmp;\n }\n}",
"Main",
"public static void main(String args[]) {\n long a, b, gcd, lcm;\n String line;\n String number[];\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n while((line = reader.readLine()) != null){\n number = line.split(\" \");\n a = Long.parseLong(number[0]);\n b = Long.parseLong(number[1]);\n if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);\n lcm = a*b/gcd;\n System.out.println(gcd + \" \" + lcm);\n }\n }catch(IOException e){\n System.exit(0);\n }\n }",
"main",
"{\n long a, b, gcd, lcm;\n String line;\n String number[];\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n while((line = reader.readLine()) != null){\n number = line.split(\" \");\n a = Long.parseLong(number[0]);\n b = Long.parseLong(number[1]);\n if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);\n lcm = a*b/gcd;\n System.out.println(gcd + \" \" + lcm);\n }\n }catch(IOException e){\n System.exit(0);\n }\n }",
"long a",
"a",
"b",
"b",
"gcd",
"gcd",
"lcm;",
"lcm",
"String line;",
"line",
"String number[];",
"number",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"try{\n while((line = reader.readLine()) != null){\n number = line.split(\" \");\n a = Long.parseLong(number[0]);\n b = Long.parseLong(number[1]);\n if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);\n lcm = a*b/gcd;\n System.out.println(gcd + \" \" + lcm);\n }\n }catch(IOException e){\n System.exit(0);\n }",
"catch(IOException e){\n System.exit(0);\n }",
"IOException e",
"{\n System.exit(0);\n }",
"System.exit(0)",
"System.exit",
"System",
"0",
"{\n while((line = reader.readLine()) != null){\n number = line.split(\" \");\n a = Long.parseLong(number[0]);\n b = Long.parseLong(number[1]);\n if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);\n lcm = a*b/gcd;\n System.out.println(gcd + \" \" + lcm);\n }\n }",
"while((line = reader.readLine()) != null){\n number = line.split(\" \");\n a = Long.parseLong(number[0]);\n b = Long.parseLong(number[1]);\n if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);\n lcm = a*b/gcd;\n System.out.println(gcd + \" \" + lcm);\n }",
"(line = reader.readLine()) != null",
"(line = reader.readLine())",
"line",
"reader.readLine()",
"reader.readLine",
"reader",
"null",
"{\n number = line.split(\" \");\n a = Long.parseLong(number[0]);\n b = Long.parseLong(number[1]);\n if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);\n lcm = a*b/gcd;\n System.out.println(gcd + \" \" + lcm);\n }",
"number = line.split(\" \")",
"number",
"line.split(\" \")",
"line.split",
"line",
"\" \"",
"a = Long.parseLong(number[0])",
"a",
"Long.parseLong(number[0])",
"Long.parseLong",
"Long",
"number[0]",
"number",
"0",
"b = Long.parseLong(number[1])",
"b",
"Long.parseLong(number[1])",
"Long.parseLong",
"Long",
"number[1]",
"number",
"1",
"if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);",
"a > b",
"a",
"b",
"gcd = GCD(a, b)",
"gcd",
"GCD(a, b)",
"GCD",
"a",
"b",
"gcd = GCD(b, a)",
"gcd",
"GCD(b, a)",
"GCD",
"b",
"a",
"lcm = a*b/gcd",
"lcm",
"a*b/gcd",
"a*b",
"a",
"b",
"gcd",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"String args[]",
"args",
"static long GCD(long a, long b){\n long tmp;\n if(a%b != 0){\n tmp = GCD(b, a%b);\n }else return b;\n return tmp;\n }",
"GCD",
"{\n long tmp;\n if(a%b != 0){\n tmp = GCD(b, a%b);\n }else return b;\n return tmp;\n }",
"long tmp;",
"tmp",
"if(a%b != 0){\n tmp = GCD(b, a%b);\n }else return b;",
"a%b != 0",
"a%b",
"a",
"b",
"0",
"{\n tmp = GCD(b, a%b);\n }",
"tmp = GCD(b, a%b)",
"tmp",
"GCD(b, a%b)",
"GCD",
"b",
"a%b",
"a",
"b",
"return b;",
"b",
"return tmp;",
"tmp",
"long a",
"a",
"long b",
"b",
"public class Main {\n public static void main(String args[]) {\n long a, b, gcd, lcm;\n String line;\n String number[];\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n while((line = reader.readLine()) != null){\n number = line.split(\" \");\n a = Long.parseLong(number[0]);\n b = Long.parseLong(number[1]);\n if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);\n lcm = a*b/gcd;\n System.out.println(gcd + \" \" + lcm);\n }\n }catch(IOException e){\n System.exit(0);\n }\n }\n\n static long GCD(long a, long b){\n long tmp;\n if(a%b != 0){\n tmp = GCD(b, a%b);\n }else return b;\n return tmp;\n }\n}",
"public class Main {\n public static void main(String args[]) {\n long a, b, gcd, lcm;\n String line;\n String number[];\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n try{\n while((line = reader.readLine()) != null){\n number = line.split(\" \");\n a = Long.parseLong(number[0]);\n b = Long.parseLong(number[1]);\n if(a > b) gcd = GCD(a, b);\n else gcd = GCD(b, a);\n lcm = a*b/gcd;\n System.out.println(gcd + \" \" + lcm);\n }\n }catch(IOException e){\n System.exit(0);\n }\n }\n\n static long GCD(long a, long b){\n long tmp;\n if(a%b != 0){\n tmp = GCD(b, a%b);\n }else return b;\n return tmp;\n }\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
/**
* Created by Reopard on 2014/05/06.
*/
public class Main {
public static void main(String args[]) {
long a, b, gcd, lcm;
String line;
String number[];
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
try{
while((line = reader.readLine()) != null){
number = line.split(" ");
a = Long.parseLong(number[0]);
b = Long.parseLong(number[1]);
if(a > b) gcd = GCD(a, b);
else gcd = GCD(b, a);
lcm = a*b/gcd;
System.out.println(gcd + " " + lcm);
}
}catch(IOException e){
System.exit(0);
}
}
static long GCD(long a, long b){
long tmp;
if(a%b != 0){
tmp = GCD(b, a%b);
}else return b;
return tmp;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
14,
2,
18,
13,
13,
17,
30,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
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,
2,
2,
13,
4,
13,
13,
13,
13,
23,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
21,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
28,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
47,
49
],
[
41,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
55,
57
],
[
41,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
58,
63
],
[
64,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
65,
68
],
[
64,
69
],
[
64,
70
],
[
70,
71
],
[
70,
72
],
[
70,
73
],
[
12,
74
],
[
74,
75
],
[
10,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
80,
85
],
[
85,
86
],
[
85,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
76,
91
],
[
91,
92
],
[
76,
93
],
[
93,
94
],
[
10,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
102,
105
],
[
99,
106
],
[
95,
107
],
[
107,
108
],
[
95,
109
],
[
109,
110
]
] | [
"/* package whatever; // don't place package name! */\n\nimport java.util.*;\nimport java.lang.*;\nimport java.io.*;\n\n/* Name of the class has to be \"Main\" only if the class is public. */\nclass Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tBufferedReader br = new BufferedReader( new InputStreamReader(System.in) );\n\t\tString stdin;\n\t\twhile( (stdin=br.readLine()) != null )\n\t\t{\n\t\t\tString params[] = stdin.split( \" \" );\n\t\t\tif( params.length >= 2 )\n\t\t\t{\n\t\t\t\tint a = Integer.parseInt( params[0] );\n\t\t\t\tint b = Integer.parseInt( params[1] );\n\t\t\t\tSystem.out.println( gcd(a,b) + \" \" + lcm(a,b) );\n\t\t\t}\n\t\t}\n\t}\n\t\n\tpublic static int gcd( int a, int b )\n\t{\n\t\treturn (b==0)? a : gcd(b,a%b);\n\t}\n\tpublic static int lcm( int a, int b )\n\t{\n\t\treturn a / gcd(a,b) * b;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.io.*;",
"io.*",
"java",
"class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tBufferedReader br = new BufferedReader( new InputStreamReader(System.in) );\n\t\tString stdin;\n\t\twhile( (stdin=br.readLine()) != null )\n\t\t{\n\t\t\tString params[] = stdin.split( \" \" );\n\t\t\tif( params.length >= 2 )\n\t\t\t{\n\t\t\t\tint a = Integer.parseInt( params[0] );\n\t\t\t\tint b = Integer.parseInt( params[1] );\n\t\t\t\tSystem.out.println( gcd(a,b) + \" \" + lcm(a,b) );\n\t\t\t}\n\t\t}\n\t}\n\t\n\tpublic static int gcd( int a, int b )\n\t{\n\t\treturn (b==0)? a : gcd(b,a%b);\n\t}\n\tpublic static int lcm( int a, int b )\n\t{\n\t\treturn a / gcd(a,b) * b;\n\t}\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n\t\tBufferedReader br = new BufferedReader( new InputStreamReader(System.in) );\n\t\tString stdin;\n\t\twhile( (stdin=br.readLine()) != null )\n\t\t{\n\t\t\tString params[] = stdin.split( \" \" );\n\t\t\tif( params.length >= 2 )\n\t\t\t{\n\t\t\t\tint a = Integer.parseInt( params[0] );\n\t\t\t\tint b = Integer.parseInt( params[1] );\n\t\t\t\tSystem.out.println( gcd(a,b) + \" \" + lcm(a,b) );\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader( new InputStreamReader(System.in) );\n\t\tString stdin;\n\t\twhile( (stdin=br.readLine()) != null )\n\t\t{\n\t\t\tString params[] = stdin.split( \" \" );\n\t\t\tif( params.length >= 2 )\n\t\t\t{\n\t\t\t\tint a = Integer.parseInt( params[0] );\n\t\t\t\tint b = Integer.parseInt( params[1] );\n\t\t\t\tSystem.out.println( gcd(a,b) + \" \" + lcm(a,b) );\n\t\t\t}\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader( new InputStreamReader(System.in) );",
"br",
"new BufferedReader( new InputStreamReader(System.in) )",
"String stdin;",
"stdin",
"while( (stdin=br.readLine()) != null )\n\t\t{\n\t\t\tString params[] = stdin.split( \" \" );\n\t\t\tif( params.length >= 2 )\n\t\t\t{\n\t\t\t\tint a = Integer.parseInt( params[0] );\n\t\t\t\tint b = Integer.parseInt( params[1] );\n\t\t\t\tSystem.out.println( gcd(a,b) + \" \" + lcm(a,b) );\n\t\t\t}\n\t\t}",
"(stdin=br.readLine()) != null",
"(stdin=br.readLine())",
"stdin",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tString params[] = stdin.split( \" \" );\n\t\t\tif( params.length >= 2 )\n\t\t\t{\n\t\t\t\tint a = Integer.parseInt( params[0] );\n\t\t\t\tint b = Integer.parseInt( params[1] );\n\t\t\t\tSystem.out.println( gcd(a,b) + \" \" + lcm(a,b) );\n\t\t\t}\n\t\t}",
"String params[] = stdin.split( \" \" );",
"params",
"stdin.split( \" \" )",
"stdin.split",
"stdin",
"\" \"",
"if( params.length >= 2 )\n\t\t\t{\n\t\t\t\tint a = Integer.parseInt( params[0] );\n\t\t\t\tint b = Integer.parseInt( params[1] );\n\t\t\t\tSystem.out.println( gcd(a,b) + \" \" + lcm(a,b) );\n\t\t\t}",
"params.length >= 2",
"params.length",
"params",
"params.length",
"2",
"{\n\t\t\t\tint a = Integer.parseInt( params[0] );\n\t\t\t\tint b = Integer.parseInt( params[1] );\n\t\t\t\tSystem.out.println( gcd(a,b) + \" \" + lcm(a,b) );\n\t\t\t}",
"int a = Integer.parseInt( params[0] );",
"a",
"Integer.parseInt( params[0] )",
"Integer.parseInt",
"Integer",
"params[0]",
"params",
"0",
"int b = Integer.parseInt( params[1] );",
"b",
"Integer.parseInt( params[1] )",
"Integer.parseInt",
"Integer",
"params[1]",
"params",
"1",
"System.out.println( gcd(a,b) + \" \" + lcm(a,b) )",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a,b) + \" \" + lcm(a,b)",
"gcd(a,b) + \" \" + lcm(a,b)",
"gcd(a,b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a,b)",
"lcm",
"a",
"b",
"String[] args",
"args",
"public static int gcd( int a, int b )\n\t{\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 int lcm( int a, int b )\n\t{\n\t\treturn a / gcd(a,b) * b;\n\t}",
"lcm",
"{\n\t\treturn a / gcd(a,b) * b;\n\t}",
"return a / gcd(a,b) * b;",
"a / gcd(a,b) * b",
"a / gcd(a,b)",
"a",
"gcd(a,b)",
"gcd",
"a",
"b",
"b",
"int a",
"a",
"int b",
"b"
] | /* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
BufferedReader br = new BufferedReader( new InputStreamReader(System.in) );
String stdin;
while( (stdin=br.readLine()) != null )
{
String params[] = stdin.split( " " );
if( params.length >= 2 )
{
int a = Integer.parseInt( params[0] );
int b = Integer.parseInt( params[1] );
System.out.println( gcd(a,b) + " " + lcm(a,b) );
}
}
}
public static int gcd( int a, int b )
{
return (b==0)? a : gcd(b,a%b);
}
public static int lcm( int a, int b )
{
return a / gcd(a,b) * b;
}
} |
[
7,
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,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
13,
41,
13,
2,
13,
2,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
29,
4,
18,
13,
12,
13,
30,
42,
40,
4,
18,
13,
30,
0,
13,
20,
29,
4,
18,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
12,
13,
30,
29,
4,
18,
13,
4,
13,
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
],
[
160,
23
],
[
160,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
30,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
34,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
49,
53
],
[
47,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
54,
58
],
[
34,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
34,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
72,
72
],
[
72,
73
],
[
72,
74
],
[
72,
75
],
[
24,
76
],
[
76,
77
],
[
160,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
81,
87
],
[
87,
88
],
[
88,
89
],
[
80,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
91,
94
],
[
94,
95
],
[
94,
96
],
[
78,
97
],
[
97,
98
],
[
78,
99
],
[
99,
100
],
[
160,
101
],
[
101,
102
],
[
101,
103
],
[
103,
104
],
[
103,
105
],
[
101,
106
],
[
106,
107
],
[
106,
108
],
[
101,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
101,
116
],
[
116,
117
],
[
116,
118
],
[
118,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
119,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
118,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
101,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
139,
140
],
[
101,
141
],
[
141,
142
],
[
141,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
146,
147
],
[
145,
148
],
[
148,
149
],
[
101,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
154,
157
],
[
157,
158
],
[
0,
159
],
[
159,
160
],
[
159,
161
]
] | [
"\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.io.Reader;\nimport java.util.ArrayList;\nimport java.util.Scanner;\nimport java.util.StringTokenizer;\n\n/**\n * @author Lin\n * @version 1.0\n * @date 2020/8/5 15:43\n */\npublic class Main\n{\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNext())\n\t\t{\n\t\t\tlong n = scanner.nextLong();\n\t\t\tlong m = scanner.nextLong();\n\n\t\t\tlong gcd = gcd(Math.max(n, m), Math.min(m, n));\n\t\t\tlong lcm = n * (m / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n\n\tprivate static long gcd(long n, long m)\n\t{\n\t\tif (n%m == 0)\n\t\t{\n\t\t\treturn m;\n\t\t}\n\t\treturn gcd(m, n % m);\n\t}\n\n\tstatic class Reader {\n\t\tstatic BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\tstatic StringTokenizer tokenizer = new StringTokenizer(\"\");\n\t\tstatic String nextLine() throws IOException\n\t\t{// 读取下一行字符串\n\t\t\treturn reader.readLine();\n\t\t}\n\t\tstatic String next() throws IOException {// 读取下一个字符串\n\t\t\twhile (!tokenizer.hasMoreTokens()) {\n\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t\tstatic int nextInt() throws IOException {// 读取下一个int型数值\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tstatic long nextLong() throws IOException {// 读取下一个int型数值\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tstatic double nextDouble() throws IOException {// 读取下一个double型数值\n\t\t\treturn Double.parseDouble(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.io.Reader;",
"Reader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"public class Main\n{\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNext())\n\t\t{\n\t\t\tlong n = scanner.nextLong();\n\t\t\tlong m = scanner.nextLong();\n\n\t\t\tlong gcd = gcd(Math.max(n, m), Math.min(m, n));\n\t\t\tlong lcm = n * (m / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n\n\tprivate static long gcd(long n, long m)\n\t{\n\t\tif (n%m == 0)\n\t\t{\n\t\t\treturn m;\n\t\t}\n\t\treturn gcd(m, n % m);\n\t}\n\n\tstatic class Reader {\n\t\tstatic BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\tstatic StringTokenizer tokenizer = new StringTokenizer(\"\");\n\t\tstatic String nextLine() throws IOException\n\t\t{// 读取下一行字符串\n\t\t\treturn reader.readLine();\n\t\t}\n\t\tstatic String next() throws IOException {// 读取下一个字符串\n\t\t\twhile (!tokenizer.hasMoreTokens()) {\n\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t\tstatic int nextInt() throws IOException {// 读取下一个int型数值\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tstatic long nextLong() throws IOException {// 读取下一个int型数值\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tstatic double nextDouble() throws IOException {// 读取下一个double型数值\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNext())\n\t\t{\n\t\t\tlong n = scanner.nextLong();\n\t\t\tlong m = scanner.nextLong();\n\n\t\t\tlong gcd = gcd(Math.max(n, m), Math.min(m, n));\n\t\t\tlong lcm = n * (m / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNext())\n\t\t{\n\t\t\tlong n = scanner.nextLong();\n\t\t\tlong m = scanner.nextLong();\n\n\t\t\tlong gcd = gcd(Math.max(n, m), Math.min(m, n));\n\t\t\tlong lcm = n * (m / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"while (scanner.hasNext())\n\t\t{\n\t\t\tlong n = scanner.nextLong();\n\t\t\tlong m = scanner.nextLong();\n\n\t\t\tlong gcd = gcd(Math.max(n, m), Math.min(m, n));\n\t\t\tlong lcm = n * (m / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}",
"scanner.hasNext()",
"scanner.hasNext",
"scanner",
"{\n\t\t\tlong n = scanner.nextLong();\n\t\t\tlong m = scanner.nextLong();\n\n\t\t\tlong gcd = gcd(Math.max(n, m), Math.min(m, n));\n\t\t\tlong lcm = n * (m / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}",
"long n = scanner.nextLong();",
"n",
"scanner.nextLong()",
"scanner.nextLong",
"scanner",
"long m = scanner.nextLong();",
"m",
"scanner.nextLong()",
"scanner.nextLong",
"scanner",
"long gcd = gcd(Math.max(n, m), Math.min(m, n));",
"gcd",
"gcd(Math.max(n, m), Math.min(m, n))",
"gcd",
"Math.max(n, m)",
"Math.max",
"Math",
"n",
"m",
"Math.min(m, n)",
"Math.min",
"Math",
"m",
"n",
"long lcm = n * (m / gcd);",
"lcm",
"n * (m / gcd)",
"n",
"(m / gcd)",
"m",
"gcd",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"String[] args",
"args",
"private static long gcd(long n, long m)\n\t{\n\t\tif (n%m == 0)\n\t\t{\n\t\t\treturn m;\n\t\t}\n\t\treturn gcd(m, n % m);\n\t}",
"gcd",
"{\n\t\tif (n%m == 0)\n\t\t{\n\t\t\treturn m;\n\t\t}\n\t\treturn gcd(m, n % m);\n\t}",
"if (n%m == 0)\n\t\t{\n\t\t\treturn m;\n\t\t}",
"n%m == 0",
"n%m",
"n",
"m",
"0",
"{\n\t\t\treturn m;\n\t\t}",
"return m;",
"m",
"return gcd(m, n % m);",
"gcd(m, n % m)",
"gcd",
"m",
"n % m",
"n",
"m",
"long n",
"n",
"long m",
"m",
"static class Reader {\n\t\tstatic BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\tstatic StringTokenizer tokenizer = new StringTokenizer(\"\");\n\t\tstatic String nextLine() throws IOException\n\t\t{// 读取下一行字符串\n\t\t\treturn reader.readLine();\n\t\t}\n\t\tstatic String next() throws IOException {// 读取下一个字符串\n\t\t\twhile (!tokenizer.hasMoreTokens()) {\n\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t\tstatic int nextInt() throws IOException {// 读取下一个int型数值\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tstatic long nextLong() throws IOException {// 读取下一个int型数值\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tstatic double nextDouble() throws IOException {// 读取下一个double型数值\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}",
"Reader",
"static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"static StringTokenizer tokenizer = new StringTokenizer(\"\");",
"tokenizer",
"new StringTokenizer(\"\")",
"static String nextLine() throws IOException\n\t\t{// 读取下一行字符串\n\t\t\treturn reader.readLine();\n\t\t}",
"nextLine",
"{// 读取下一行字符串\n\t\t\treturn reader.readLine();\n\t\t}",
"return reader.readLine();",
"reader.readLine()",
"reader.readLine",
"reader",
"static String next() throws IOException {// 读取下一个字符串\n\t\t\twhile (!tokenizer.hasMoreTokens()) {\n\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}",
"next",
"{// 读取下一个字符串\n\t\t\twhile (!tokenizer.hasMoreTokens()) {\n\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}",
"while (!tokenizer.hasMoreTokens()) {\n\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t}",
"!tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens()",
"tokenizer.hasMoreTokens",
"tokenizer",
"{\n\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t}",
"tokenizer = new StringTokenizer(reader.readLine())",
"tokenizer",
"new StringTokenizer(reader.readLine())",
"return tokenizer.nextToken();",
"tokenizer.nextToken()",
"tokenizer.nextToken",
"tokenizer",
"static int nextInt() throws IOException {// 读取下一个int型数值\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"nextInt",
"{// 读取下一个int型数值\n\t\t\treturn Integer.parseInt(next());\n\t\t}",
"return Integer.parseInt(next());",
"Integer.parseInt(next())",
"Integer.parseInt",
"Integer",
"next()",
"next",
"static long nextLong() throws IOException {// 读取下一个int型数值\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"nextLong",
"{// 读取下一个int型数值\n\t\t\treturn Long.parseLong(next());\n\t\t}",
"return Long.parseLong(next());",
"Long.parseLong(next())",
"Long.parseLong",
"Long",
"next()",
"next",
"static double nextDouble() throws IOException {// 读取下一个double型数值\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"nextDouble",
"{// 读取下一个double型数值\n\t\t\treturn Double.parseDouble(next());\n\t\t}",
"return Double.parseDouble(next());",
"Double.parseDouble(next())",
"Double.parseDouble",
"Double",
"next()",
"next",
"public class Main\n{\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNext())\n\t\t{\n\t\t\tlong n = scanner.nextLong();\n\t\t\tlong m = scanner.nextLong();\n\n\t\t\tlong gcd = gcd(Math.max(n, m), Math.min(m, n));\n\t\t\tlong lcm = n * (m / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n\n\tprivate static long gcd(long n, long m)\n\t{\n\t\tif (n%m == 0)\n\t\t{\n\t\t\treturn m;\n\t\t}\n\t\treturn gcd(m, n % m);\n\t}\n\n\tstatic class Reader {\n\t\tstatic BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\tstatic StringTokenizer tokenizer = new StringTokenizer(\"\");\n\t\tstatic String nextLine() throws IOException\n\t\t{// 读取下一行字符串\n\t\t\treturn reader.readLine();\n\t\t}\n\t\tstatic String next() throws IOException {// 读取下一个字符串\n\t\t\twhile (!tokenizer.hasMoreTokens()) {\n\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t\tstatic int nextInt() throws IOException {// 读取下一个int型数值\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tstatic long nextLong() throws IOException {// 读取下一个int型数值\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tstatic double nextDouble() throws IOException {// 读取下一个double型数值\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n}",
"public class Main\n{\n\n\tpublic static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\n\t\twhile (scanner.hasNext())\n\t\t{\n\t\t\tlong n = scanner.nextLong();\n\t\t\tlong m = scanner.nextLong();\n\n\t\t\tlong gcd = gcd(Math.max(n, m), Math.min(m, n));\n\t\t\tlong lcm = n * (m / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n\n\tprivate static long gcd(long n, long m)\n\t{\n\t\tif (n%m == 0)\n\t\t{\n\t\t\treturn m;\n\t\t}\n\t\treturn gcd(m, n % m);\n\t}\n\n\tstatic class Reader {\n\t\tstatic BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\tstatic StringTokenizer tokenizer = new StringTokenizer(\"\");\n\t\tstatic String nextLine() throws IOException\n\t\t{// 读取下一行字符串\n\t\t\treturn reader.readLine();\n\t\t}\n\t\tstatic String next() throws IOException {// 读取下一个字符串\n\t\t\twhile (!tokenizer.hasMoreTokens()) {\n\t\t\t\ttokenizer = new StringTokenizer(reader.readLine());\n\t\t\t}\n\t\t\treturn tokenizer.nextToken();\n\t\t}\n\n\t\tstatic int nextInt() throws IOException {// 读取下一个int型数值\n\t\t\treturn Integer.parseInt(next());\n\t\t}\n\t\tstatic long nextLong() throws IOException {// 读取下一个int型数值\n\t\t\treturn Long.parseLong(next());\n\t\t}\n\t\tstatic double nextDouble() throws IOException {// 读取下一个double型数值\n\t\t\treturn Double.parseDouble(next());\n\t\t}\n\t}\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.StringTokenizer;
/**
* @author Lin
* @version 1.0
* @date 2020/8/5 15:43
*/
public class Main
{
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext())
{
long n = scanner.nextLong();
long m = scanner.nextLong();
long gcd = gcd(Math.max(n, m), Math.min(m, n));
long lcm = n * (m / gcd);
System.out.println(gcd + " " + lcm);
}
}
private static long gcd(long n, long m)
{
if (n%m == 0)
{
return m;
}
return gcd(m, n % m);
}
static class Reader {
static BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
static StringTokenizer tokenizer = new StringTokenizer("");
static String nextLine() throws IOException
{// 读取下一行字符串
return reader.readLine();
}
static String next() throws IOException {// 读取下一个字符串
while (!tokenizer.hasMoreTokens()) {
tokenizer = new StringTokenizer(reader.readLine());
}
return tokenizer.nextToken();
}
static int nextInt() throws IOException {// 读取下一个int型数值
return Integer.parseInt(next());
}
static long nextLong() throws IOException {// 读取下一个int型数值
return Long.parseLong(next());
}
static double nextDouble() throws IOException {// 读取下一个double型数值
return Double.parseDouble(next());
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
4,
18,
13,
17,
4,
18,
13,
17,
0,
13,
4,
18,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
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,
2,
2,
13,
13,
4,
13,
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
],
[
117,
11
],
[
117,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
14,
22
],
[
22,
23
],
[
14,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
25,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
38,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
32,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
54,
59
],
[
51,
60
],
[
60,
61
],
[
61,
62
],
[
32,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
69,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
70,
73
],
[
69,
74
],
[
69,
75
],
[
75,
76
],
[
75,
77
],
[
75,
78
],
[
12,
79
],
[
79,
80
],
[
117,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
85,
90
],
[
90,
91
],
[
90,
92
],
[
90,
93
],
[
93,
94
],
[
93,
95
],
[
81,
96
],
[
96,
97
],
[
81,
98
],
[
98,
99
],
[
117,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
108,
110
],
[
108,
111
],
[
100,
112
],
[
112,
113
],
[
100,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
] | [
"/*\n * @author Raj Sharma\n * Date 20160306\n */\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n \npublic class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }\n \n static long gcd(long a,long b){\n return b == 0 ? a : gcd(b,a%b);\n }\n \n static long lcm(long a, long b){\n return b*a/gcd(a,b);\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }\n \n static long gcd(long a,long b){\n return b == 0 ? a : gcd(b,a%b);\n }\n \n static long lcm(long a, long b){\n return b*a/gcd(a,b);\n }\n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"long a",
"a",
"b;",
"b",
"while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }",
"(str=br.readLine()) != null",
"(str=br.readLine())",
"str",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }",
"a = Long.parseLong(str.substring(0, str.indexOf(\" \")))",
"a",
"Long.parseLong(str.substring(0, str.indexOf(\" \")))",
"Long.parseLong",
"Long",
"str.substring(0, str.indexOf(\" \"))",
"str.substring",
"str",
"0",
"str.indexOf(\" \")",
"str.indexOf",
"str",
"\" \"",
"b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()))",
"b",
"Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()))",
"Long.parseLong",
"Long",
"str.substring(str.indexOf(\" \")+1, str.length())",
"str.substring",
"str",
"str.indexOf(\" \")+1",
"str.indexOf(\" \")",
"str.indexOf",
"str",
"\" \"",
"1",
"str.length()",
"str.length",
"str",
"System.out.println(gcd(a, b) + \" \" + lcm(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a, b) + \" \" + lcm(a,b)",
"gcd(a, b) + \" \" + lcm(a,b)",
"gcd(a, b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a,b)",
"lcm",
"a",
"b",
"String[] args",
"args",
"static long gcd(long a,long b){\n return b == 0 ? a : gcd(b,a%b);\n }",
"gcd",
"{\n return b == 0 ? a : gcd(b,a%b);\n }",
"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 long lcm(long a, long b){\n return b*a/gcd(a,b);\n }",
"lcm",
"{\n return b*a/gcd(a,b);\n }",
"return b*a/gcd(a,b);",
"b*a/gcd(a,b)",
"b*a",
"b",
"a",
"gcd(a,b)",
"gcd",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }\n \n static long gcd(long a,long b){\n return b == 0 ? a : gcd(b,a%b);\n }\n \n static long lcm(long a, long b){\n return b*a/gcd(a,b);\n }\n}",
"public class Main{\n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n String str;\n long a,b;\n \n \n while((str=br.readLine()) != null){\n a = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n b = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n \n System.out.println(gcd(a, b) + \" \" + lcm(a,b));\n \n }\n }\n \n static long gcd(long a,long b){\n return b == 0 ? a : gcd(b,a%b);\n }\n \n static long lcm(long a, long b){\n return b*a/gcd(a,b);\n }\n}",
"Main"
] | /*
* @author Raj Sharma
* Date 20160306
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
long a,b;
while((str=br.readLine()) != null){
a = Long.parseLong(str.substring(0, str.indexOf(" ")));
b = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
System.out.println(gcd(a, b) + " " + lcm(a,b));
}
}
static long gcd(long a,long b){
return b == 0 ? a : gcd(b,a%b);
}
static long lcm(long a, long b){
return b*a/gcd(a,b);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
41,
13,
13,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
41,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
41,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
12,
13,
30,
41,
13,
20,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
92,
5
],
[
92,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
16,
30
],
[
30,
31
],
[
30,
32
],
[
16,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
41,
43
],
[
37,
44
],
[
44,
45
],
[
44,
46
],
[
16,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
51,
57
],
[
57,
58
],
[
57,
59
],
[
51,
60
],
[
60,
61
],
[
60,
62
],
[
16,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
16,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
76,
76
],
[
76,
77
],
[
76,
78
],
[
76,
79
],
[
92,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
80,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
] | [
"\nimport java.util.*;\npublic class Main {\n\n\tpublic void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(sc.hasNext()){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\tif(x < y){\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\t//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ\n\t\t\twhile(y != 0){\n\t\t\t\tint temp = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\tlong lcm = (long)a * b / x;\n\t\t\tSystem.out.println(x + \" \" + lcm);\n\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\n\t}\n\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n\tpublic void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(sc.hasNext()){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\tif(x < y){\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\t//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ\n\t\t\twhile(y != 0){\n\t\t\t\tint temp = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\tlong lcm = (long)a * b / x;\n\t\t\tSystem.out.println(x + \" \" + lcm);\n\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\n\t}\n\n}",
"Main",
"public void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(sc.hasNext()){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\tif(x < y){\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\t//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ\n\t\t\twhile(y != 0){\n\t\t\t\tint temp = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\tlong lcm = (long)a * b / x;\n\t\t\tSystem.out.println(x + \" \" + lcm);\n\n\t\t}\n\t}",
"doIt",
"{\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(sc.hasNext()){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\tif(x < y){\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\t//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ\n\t\t\twhile(y != 0){\n\t\t\t\tint temp = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\tlong lcm = (long)a * b / x;\n\t\t\tSystem.out.println(x + \" \" + lcm);\n\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\tif(x < y){\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\t//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ\n\t\t\twhile(y != 0){\n\t\t\t\tint temp = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\tlong lcm = (long)a * b / x;\n\t\t\tSystem.out.println(x + \" \" + lcm);\n\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\tif(x < y){\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\t//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ\n\t\t\twhile(y != 0){\n\t\t\t\tint temp = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\tlong lcm = (long)a * b / x;\n\t\t\tSystem.out.println(x + \" \" + lcm);\n\n\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int x = a;",
"x",
"a",
"int y = b;",
"y",
"b",
"if(x < y){\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}",
"x < y",
"x",
"y",
"{\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}",
"int temp = x;",
"temp",
"x",
"x = y",
"x",
"y",
"y = temp",
"y",
"temp",
"while(y != 0){\n\t\t\t\tint temp = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}",
"y != 0",
"y",
"0",
"{\n\t\t\t\tint temp = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}",
"int temp = x % y;",
"temp",
"x % y",
"x",
"y",
"x = y",
"x",
"y",
"y = temp",
"y",
"temp",
"long lcm = (long)a * b / x;",
"lcm",
"(long)a * b / x",
"(long)a * b",
"(long)a",
"b",
"x",
"System.out.println(x + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"x + \" \" + lcm",
"x + \" \" + lcm",
"x",
"\" \"",
"lcm",
"public static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\n\t}",
"main",
"{\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\n\t}",
"Main obj = new Main();",
"obj",
"new Main()",
"obj.doIt()",
"obj.doIt",
"obj",
"String[] args",
"args",
"public class Main {\n\n\tpublic void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(sc.hasNext()){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\tif(x < y){\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\t//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ\n\t\t\twhile(y != 0){\n\t\t\t\tint temp = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\tlong lcm = (long)a * b / x;\n\t\t\tSystem.out.println(x + \" \" + lcm);\n\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\n\t}\n\n}",
"public class Main {\n\n\tpublic void doIt(){\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile(sc.hasNext()){\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint x = a;\n\t\t\tint y = b;\n\t\t\tif(x < y){\n\t\t\t\tint temp = x;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\t//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ\n\t\t\twhile(y != 0){\n\t\t\t\tint temp = x % y;\n\t\t\t\tx = y;\n\t\t\t\ty = temp;\n\t\t\t}\n\t\t\tlong lcm = (long)a * b / x;\n\t\t\tSystem.out.println(x + \" \" + lcm);\n\n\t\t}\n\t}\n\tpublic static void main(String[] args) {\n\t\tMain obj = new Main();\n\t\tobj.doIt();\n\n\t}\n\n}",
"Main"
] |
import java.util.*;
public class Main {
public void doIt(){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int a = sc.nextInt();
int b = sc.nextInt();
int x = a;
int y = b;
if(x < y){
int temp = x;
x = y;
y = temp;
}
//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ
while(y != 0){
int temp = x % y;
x = y;
y = temp;
}
long lcm = (long)a * b / x;
System.out.println(x + " " + lcm);
}
}
public static void main(String[] args) {
Main obj = new Main();
obj.doIt();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
20,
41,
13,
41,
13,
20,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
4,
13,
13,
2,
13,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
16,
21
],
[
21,
22
],
[
21,
23
],
[
21,
24
],
[
24,
25
],
[
24,
26
],
[
12,
27
],
[
27,
28
],
[
12,
29
],
[
29,
30
],
[
10,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
31,
38
],
[
38,
39
],
[
31,
40
],
[
40,
41
],
[
10,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
44,
49
],
[
49,
50
],
[
44,
51
],
[
51,
52
],
[
51,
53
],
[
44,
54
],
[
54,
55
],
[
44,
56
],
[
56,
57
],
[
56,
58
],
[
44,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
64,
65
],
[
65,
66
],
[
61,
67
],
[
60,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
71,
74
],
[
68,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
77,
80
],
[
80,
81
],
[
80,
82
],
[
68,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
68,
91
],
[
91,
92
],
[
91,
93
],
[
93,
94
],
[
93,
95
],
[
93,
96
],
[
68,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
103,
103
],
[
103,
104
],
[
103,
105
],
[
103,
106
],
[
106,
107
],
[
106,
108
],
[
106,
109
],
[
109,
110
],
[
109,
111
],
[
42,
112
],
[
112,
113
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.io.IOException;\n\nclass Main {\n\n static long gcd(long a, long b) {\n return b == 0 ? a : gcd(b, a%b);\n }\n\n static long lcm(long t, long ab) {\n return ab / t;\n }\n\n public static void main(String[] args) throws IOException {\n long a, b, t;\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n String str;\n String[] array = new String[2];\n while ((str = buf.readLine()) != null) {\n array = str.split(\" \");\n a = Long.parseLong(array[0]);\n b = Long.parseLong(array[1]);\n t = gcd(a, b);\n System.out.println(t + \" \" + lcm(t, a*b));\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"class Main {\n\n static long gcd(long a, long b) {\n return b == 0 ? a : gcd(b, a%b);\n }\n\n static long lcm(long t, long ab) {\n return ab / t;\n }\n\n public static void main(String[] args) throws IOException {\n long a, b, t;\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n String str;\n String[] array = new String[2];\n while ((str = buf.readLine()) != null) {\n array = str.split(\" \");\n a = Long.parseLong(array[0]);\n b = Long.parseLong(array[1]);\n t = gcd(a, b);\n System.out.println(t + \" \" + lcm(t, a*b));\n }\n }\n}",
"Main",
"static long gcd(long a, long b) {\n return b == 0 ? a : gcd(b, a%b);\n }",
"gcd",
"{\n return b == 0 ? a : gcd(b, a%b);\n }",
"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 long lcm(long t, long ab) {\n return ab / t;\n }",
"lcm",
"{\n return ab / t;\n }",
"return ab / t;",
"ab / t",
"ab",
"t",
"long t",
"t",
"long ab",
"ab",
"public static void main(String[] args) throws IOException {\n long a, b, t;\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n String str;\n String[] array = new String[2];\n while ((str = buf.readLine()) != null) {\n array = str.split(\" \");\n a = Long.parseLong(array[0]);\n b = Long.parseLong(array[1]);\n t = gcd(a, b);\n System.out.println(t + \" \" + lcm(t, a*b));\n }\n }",
"main",
"{\n long a, b, t;\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n String str;\n String[] array = new String[2];\n while ((str = buf.readLine()) != null) {\n array = str.split(\" \");\n a = Long.parseLong(array[0]);\n b = Long.parseLong(array[1]);\n t = gcd(a, b);\n System.out.println(t + \" \" + lcm(t, a*b));\n }\n }",
"long a",
"a",
"b",
"b",
"t;",
"t",
"BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));",
"buf",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"String[] array = new String[2];",
"array",
"new String[2]",
"2",
"while ((str = buf.readLine()) != null) {\n array = str.split(\" \");\n a = Long.parseLong(array[0]);\n b = Long.parseLong(array[1]);\n t = gcd(a, b);\n System.out.println(t + \" \" + lcm(t, a*b));\n }",
"(str = buf.readLine()) != null",
"(str = buf.readLine())",
"str",
"buf.readLine()",
"buf.readLine",
"buf",
"null",
"{\n array = str.split(\" \");\n a = Long.parseLong(array[0]);\n b = Long.parseLong(array[1]);\n t = gcd(a, b);\n System.out.println(t + \" \" + lcm(t, a*b));\n }",
"array = str.split(\" \")",
"array",
"str.split(\" \")",
"str.split",
"str",
"\" \"",
"a = Long.parseLong(array[0])",
"a",
"Long.parseLong(array[0])",
"Long.parseLong",
"Long",
"array[0]",
"array",
"0",
"b = Long.parseLong(array[1])",
"b",
"Long.parseLong(array[1])",
"Long.parseLong",
"Long",
"array[1]",
"array",
"1",
"t = gcd(a, b)",
"t",
"gcd(a, b)",
"gcd",
"a",
"b",
"System.out.println(t + \" \" + lcm(t, a*b))",
"System.out.println",
"System.out",
"System",
"System.out",
"t + \" \" + lcm(t, a*b)",
"t + \" \" + lcm(t, a*b)",
"t",
"\" \"",
"lcm(t, a*b)",
"lcm",
"t",
"a*b",
"a",
"b",
"String[] args",
"args"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
class Main {
static long gcd(long a, long b) {
return b == 0 ? a : gcd(b, a%b);
}
static long lcm(long t, long ab) {
return ab / t;
}
public static void main(String[] args) throws IOException {
long a, b, t;
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
String str;
String[] array = new String[2];
while ((str = buf.readLine()) != null) {
array = str.split(" ");
a = Long.parseLong(array[0]);
b = Long.parseLong(array[1]);
t = gcd(a, b);
System.out.println(t + " " + lcm(t, a*b));
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
4,
13,
13,
2,
13,
13,
30,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
4,
13,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
41,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
15,
18
],
[
18,
19
],
[
18,
20
],
[
9,
21
],
[
21,
22
],
[
22,
23
],
[
6,
24
],
[
24,
25
],
[
6,
26
],
[
26,
27
],
[
4,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
35,
38
],
[
32,
39
],
[
28,
40
],
[
40,
41
],
[
28,
42
],
[
42,
43
],
[
4,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
54,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
67,
70
],
[
54,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
73,
75
],
[
73,
76
],
[
54,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
77,
82
],
[
83,
83
],
[
83,
84
],
[
83,
85
],
[
83,
86
],
[
44,
87
],
[
87,
88
]
] | [
"import java.util.Scanner;\n\nclass Main {\n public static int calcGCD(int a, int b) {\n if(b > 0) {\n return calcGCD(b, a % b); \n } \n else {\n return a;\n }\n }\n \n public static int calcLCM(int a, int b) {\n return ((a / calcGCD(a, b)) * b);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(sc.hasNext()) { \n int a = sc.nextInt();\n int b = sc.nextInt();\n int gcd = calcGCD(a, b); \n int lcm = calcLCM(a, b);\n System.out.println(gcd + \" \" + lcm);\n } \n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n public static int calcGCD(int a, int b) {\n if(b > 0) {\n return calcGCD(b, a % b); \n } \n else {\n return a;\n }\n }\n \n public static int calcLCM(int a, int b) {\n return ((a / calcGCD(a, b)) * b);\n }\n\n public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(sc.hasNext()) { \n int a = sc.nextInt();\n int b = sc.nextInt();\n int gcd = calcGCD(a, b); \n int lcm = calcLCM(a, b);\n System.out.println(gcd + \" \" + lcm);\n } \n }\n}",
"Main",
"public static int calcGCD(int a, int b) {\n if(b > 0) {\n return calcGCD(b, a % b); \n } \n else {\n return a;\n }\n }",
"calcGCD",
"{\n if(b > 0) {\n return calcGCD(b, a % b); \n } \n else {\n return a;\n }\n }",
"if(b > 0) {\n return calcGCD(b, a % b); \n } \n else {\n return a;\n }",
"b > 0",
"b",
"0",
"{\n return calcGCD(b, a % b); \n }",
"return calcGCD(b, a % b);",
"calcGCD(b, a % b)",
"calcGCD",
"b",
"a % b",
"a",
"b",
"{\n return a;\n }",
"return a;",
"a",
"int a",
"a",
"int b",
"b",
"public static int calcLCM(int a, int b) {\n return ((a / calcGCD(a, b)) * b);\n }",
"calcLCM",
"{\n return ((a / calcGCD(a, b)) * b);\n }",
"return ((a / calcGCD(a, b)) * b);",
"((a / calcGCD(a, b)) * b)",
"(a / calcGCD(a, b))",
"a",
"calcGCD(a, b)",
"calcGCD",
"a",
"b",
"b",
"int a",
"a",
"int b",
"b",
"public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n while(sc.hasNext()) { \n int a = sc.nextInt();\n int b = sc.nextInt();\n int gcd = calcGCD(a, b); \n int lcm = calcLCM(a, b);\n System.out.println(gcd + \" \" + lcm);\n } \n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n while(sc.hasNext()) { \n int a = sc.nextInt();\n int b = sc.nextInt();\n int gcd = calcGCD(a, b); \n int lcm = calcLCM(a, b);\n System.out.println(gcd + \" \" + lcm);\n } \n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()) { \n int a = sc.nextInt();\n int b = sc.nextInt();\n int gcd = calcGCD(a, b); \n int lcm = calcLCM(a, b);\n System.out.println(gcd + \" \" + lcm);\n }",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{ \n int a = sc.nextInt();\n int b = sc.nextInt();\n int gcd = calcGCD(a, b); \n int lcm = calcLCM(a, b);\n System.out.println(gcd + \" \" + lcm);\n }",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int gcd = calcGCD(a, b);",
"gcd",
"calcGCD(a, b)",
"calcGCD",
"a",
"b",
"int lcm = calcLCM(a, b);",
"lcm",
"calcLCM(a, b)",
"calcLCM",
"a",
"b",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"String[] args",
"args"
] | import java.util.Scanner;
class Main {
public static int calcGCD(int a, int b) {
if(b > 0) {
return calcGCD(b, a % b);
}
else {
return a;
}
}
public static int calcLCM(int a, int b) {
return ((a / calcGCD(a, b)) * b);
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int a = sc.nextInt();
int b = sc.nextInt();
int gcd = calcGCD(a, b);
int lcm = calcLCM(a, b);
System.out.println(gcd + " " + lcm);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
17,
30,
41,
13,
20,
41,
13,
4,
18,
13,
42,
2,
13,
17,
30,
41,
13,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
42,
2,
13,
13,
30,
14,
2,
13,
13,
30,
0,
13,
2,
13,
13,
30,
0,
13,
2,
13,
13,
41,
13,
2,
2,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
0,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
110,
5
],
[
110,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
13,
16
],
[
9,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
33,
36
],
[
33,
37
],
[
30,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
43,
45
],
[
30,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
30,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
54,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
66,
68
],
[
59,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
72,
74
],
[
30,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
82,
83
],
[
82,
84
],
[
78,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
88,
89
],
[
88,
90
],
[
77,
91
],
[
30,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
98,
98
],
[
98,
99
],
[
98,
100
],
[
98,
101
],
[
30,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
6,
107
],
[
107,
108
],
[
0,
109
],
[
109,
110
],
[
109,
111
]
] | [
"import java.io.*;\n//import java.math.BigDecimal;\n//import java.lang.reflect.Array;\n//import java.util.Arrays;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\t\t\tString line = br.readLine();\n\t\t\tdo {\n\t\t\t\tString[] in = line.split(\" \", 0);\n\t\t\t\t//???????????????????¨????\n\t\t\t\tint a = Integer.parseInt(in[0]);\n\t\t\t\tint b = Integer.parseInt(in[1]);\n\t\t\t\twhile (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;\n\t\t\t\tSystem.out.println(a + \" \" + out2);\n\t\t\t\t//???????????§??????\n\t\t\t\tline = br.readLine();\n\t\t\t} while (line != null);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t}\n\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\t\t\tString line = br.readLine();\n\t\t\tdo {\n\t\t\t\tString[] in = line.split(\" \", 0);\n\t\t\t\t//???????????????????¨????\n\t\t\t\tint a = Integer.parseInt(in[0]);\n\t\t\t\tint b = Integer.parseInt(in[1]);\n\t\t\t\twhile (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;\n\t\t\t\tSystem.out.println(a + \" \" + out2);\n\t\t\t\t//???????????§??????\n\t\t\t\tline = br.readLine();\n\t\t\t} while (line != null);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t}\n\n}",
"Main",
"public static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\t\t\tString line = br.readLine();\n\t\t\tdo {\n\t\t\t\tString[] in = line.split(\" \", 0);\n\t\t\t\t//???????????????????¨????\n\t\t\t\tint a = Integer.parseInt(in[0]);\n\t\t\t\tint b = Integer.parseInt(in[1]);\n\t\t\t\twhile (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;\n\t\t\t\tSystem.out.println(a + \" \" + out2);\n\t\t\t\t//???????????§??????\n\t\t\t\tline = br.readLine();\n\t\t\t} while (line != null);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\t\t\tString line = br.readLine();\n\t\t\tdo {\n\t\t\t\tString[] in = line.split(\" \", 0);\n\t\t\t\t//???????????????????¨????\n\t\t\t\tint a = Integer.parseInt(in[0]);\n\t\t\t\tint b = Integer.parseInt(in[1]);\n\t\t\t\twhile (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;\n\t\t\t\tSystem.out.println(a + \" \" + out2);\n\t\t\t\t//???????????§??????\n\t\t\t\tline = br.readLine();\n\t\t\t} while (line != null);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t}",
"try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\t\t\tString line = br.readLine();\n\t\t\tdo {\n\t\t\t\tString[] in = line.split(\" \", 0);\n\t\t\t\t//???????????????????¨????\n\t\t\t\tint a = Integer.parseInt(in[0]);\n\t\t\t\tint b = Integer.parseInt(in[1]);\n\t\t\t\twhile (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;\n\t\t\t\tSystem.out.println(a + \" \" + out2);\n\t\t\t\t//???????????§??????\n\t\t\t\tline = br.readLine();\n\t\t\t} while (line != null);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.exit(0);\n\t\t}",
"catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.exit(0);\n\t\t}",
"Exception e",
"{\n\t\t\t// TODO: handle exception\n\t\t\tSystem.exit(0);\n\t\t}",
"System.exit(0)",
"System.exit",
"System",
"0",
"{\n\t\t\tString line = br.readLine();\n\t\t\tdo {\n\t\t\t\tString[] in = line.split(\" \", 0);\n\t\t\t\t//???????????????????¨????\n\t\t\t\tint a = Integer.parseInt(in[0]);\n\t\t\t\tint b = Integer.parseInt(in[1]);\n\t\t\t\twhile (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;\n\t\t\t\tSystem.out.println(a + \" \" + out2);\n\t\t\t\t//???????????§??????\n\t\t\t\tline = br.readLine();\n\t\t\t} while (line != null);\n\n\t\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in))",
"new BufferedReader(new InputStreamReader(System.in))",
"String line = br.readLine();",
"line",
"br.readLine()",
"br.readLine",
"br",
"do {\n\t\t\t\tString[] in = line.split(\" \", 0);\n\t\t\t\t//???????????????????¨????\n\t\t\t\tint a = Integer.parseInt(in[0]);\n\t\t\t\tint b = Integer.parseInt(in[1]);\n\t\t\t\twhile (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;\n\t\t\t\tSystem.out.println(a + \" \" + out2);\n\t\t\t\t//???????????§??????\n\t\t\t\tline = br.readLine();\n\t\t\t} while (line != null);",
"line != null",
"line",
"null",
"{\n\t\t\t\tString[] in = line.split(\" \", 0);\n\t\t\t\t//???????????????????¨????\n\t\t\t\tint a = Integer.parseInt(in[0]);\n\t\t\t\tint b = Integer.parseInt(in[1]);\n\t\t\t\twhile (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;\n\t\t\t\tSystem.out.println(a + \" \" + out2);\n\t\t\t\t//???????????§??????\n\t\t\t\tline = br.readLine();\n\t\t\t}",
"String[] in = line.split(\" \", 0);",
"in",
"line.split(\" \", 0)",
"line.split",
"line",
"\" \"",
"0",
"int a = Integer.parseInt(in[0]);",
"a",
"Integer.parseInt(in[0])",
"Integer.parseInt",
"Integer",
"in[0]",
"in",
"0",
"int b = Integer.parseInt(in[1]);",
"b",
"Integer.parseInt(in[1])",
"Integer.parseInt",
"Integer",
"in[1]",
"in",
"1",
"while (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}",
"a != b",
"a",
"b",
"{\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}",
"if(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}",
"a > b",
"a",
"b",
"{\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}",
"a = a- b",
"a",
"a- b",
"a",
"b",
"{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}",
"b = b - a",
"b",
"b - a",
"b",
"a",
"long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;",
"out2",
"Long.parseLong(in[0]) * Long.parseLong(in[1]) / a",
"Long.parseLong(in[0]) * Long.parseLong(in[1])",
"Long.parseLong(in[0])",
"Long.parseLong",
"Long",
"in[0]",
"in",
"0",
"Long.parseLong(in[1])",
"Long.parseLong",
"Long",
"in[1]",
"in",
"1",
"a",
"System.out.println(a + \" \" + out2)",
"System.out.println",
"System.out",
"System",
"System.out",
"a + \" \" + out2",
"a + \" \" + out2",
"a",
"\" \"",
"out2",
"line = br.readLine()",
"line",
"br.readLine()",
"br.readLine",
"br",
"String[] args",
"args",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\t\t\tString line = br.readLine();\n\t\t\tdo {\n\t\t\t\tString[] in = line.split(\" \", 0);\n\t\t\t\t//???????????????????¨????\n\t\t\t\tint a = Integer.parseInt(in[0]);\n\t\t\t\tint b = Integer.parseInt(in[1]);\n\t\t\t\twhile (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;\n\t\t\t\tSystem.out.println(a + \" \" + out2);\n\t\t\t\t//???????????§??????\n\t\t\t\tline = br.readLine();\n\t\t\t} while (line != null);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\t// TODO Auto-generated method stub\n\t\ttry (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {\n\t\t\tString line = br.readLine();\n\t\t\tdo {\n\t\t\t\tString[] in = line.split(\" \", 0);\n\t\t\t\t//???????????????????¨????\n\t\t\t\tint a = Integer.parseInt(in[0]);\n\t\t\t\tint b = Integer.parseInt(in[1]);\n\t\t\t\twhile (a != b){\n\t\t\t\t\tif(a > b){\n\t\t\t\t\t\ta = a- b;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tb = b - a;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tlong out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;\n\t\t\t\tSystem.out.println(a + \" \" + out2);\n\t\t\t\t//???????????§??????\n\t\t\t\tline = br.readLine();\n\t\t\t} while (line != null);\n\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t}\n\n}",
"Main"
] | import java.io.*;
//import java.math.BigDecimal;
//import java.lang.reflect.Array;
//import java.util.Arrays;
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {
String line = br.readLine();
do {
String[] in = line.split(" ", 0);
//???????????????????¨????
int a = Integer.parseInt(in[0]);
int b = Integer.parseInt(in[1]);
while (a != b){
if(a > b){
a = a- b;
}else{
b = b - a;
}
}
long out2 = Long.parseLong(in[0]) * Long.parseLong(in[1]) / a;
System.out.println(a + " " + out2);
//???????????§??????
line = br.readLine();
} while (line != null);
} catch (Exception e) {
// TODO: handle exception
System.exit(0);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
38,
5,
13,
30,
4,
18,
13,
30,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
13,
41,
13,
13,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
41,
13,
2,
13,
13,
42,
2,
13,
17,
30,
0,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
2,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
117,
11
],
[
117,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
20,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
29,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
36,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
48,
50
],
[
36,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
56,
58
],
[
36,
59
],
[
59,
60
],
[
59,
61
],
[
36,
62
],
[
62,
63
],
[
62,
64
],
[
36,
65
],
[
65,
66
],
[
66,
67
],
[
66,
68
],
[
65,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
73,
74
],
[
73,
75
],
[
69,
76
],
[
76,
77
],
[
76,
78
],
[
36,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
36,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
92,
93
],
[
92,
94
],
[
88,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
36,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
100,
105
],
[
106,
106
],
[
106,
107
],
[
106,
108
],
[
106,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
12,
114
],
[
114,
115
],
[
0,
116
],
[
116,
117
],
[
116,
118
]
] | [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String input;\n try {\n while((input = reader.readLine()) != null){\n String[] inputArray = input.split(\" \");\n int a = Integer.parseInt(inputArray[0]);\n int b = Integer.parseInt(inputArray[1]);\n int aa = a;\n int bb = b;\n if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }\n int mod = aa % bb;\n while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }\n System.out.println(bb+\" \"+(a/bb*b));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String input;\n try {\n while((input = reader.readLine()) != null){\n String[] inputArray = input.split(\" \");\n int a = Integer.parseInt(inputArray[0]);\n int b = Integer.parseInt(inputArray[1]);\n int aa = a;\n int bb = b;\n if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }\n int mod = aa % bb;\n while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }\n System.out.println(bb+\" \"+(a/bb*b));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String input;\n try {\n while((input = reader.readLine()) != null){\n String[] inputArray = input.split(\" \");\n int a = Integer.parseInt(inputArray[0]);\n int b = Integer.parseInt(inputArray[1]);\n int aa = a;\n int bb = b;\n if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }\n int mod = aa % bb;\n while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }\n System.out.println(bb+\" \"+(a/bb*b));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"main",
"{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String input;\n try {\n while((input = reader.readLine()) != null){\n String[] inputArray = input.split(\" \");\n int a = Integer.parseInt(inputArray[0]);\n int b = Integer.parseInt(inputArray[1]);\n int aa = a;\n int bb = b;\n if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }\n int mod = aa % bb;\n while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }\n System.out.println(bb+\" \"+(a/bb*b));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String input;",
"input",
"try {\n while((input = reader.readLine()) != null){\n String[] inputArray = input.split(\" \");\n int a = Integer.parseInt(inputArray[0]);\n int b = Integer.parseInt(inputArray[1]);\n int aa = a;\n int bb = b;\n if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }\n int mod = aa % bb;\n while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }\n System.out.println(bb+\" \"+(a/bb*b));\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 while((input = reader.readLine()) != null){\n String[] inputArray = input.split(\" \");\n int a = Integer.parseInt(inputArray[0]);\n int b = Integer.parseInt(inputArray[1]);\n int aa = a;\n int bb = b;\n if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }\n int mod = aa % bb;\n while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }\n System.out.println(bb+\" \"+(a/bb*b));\n }\n }",
"while((input = reader.readLine()) != null){\n String[] inputArray = input.split(\" \");\n int a = Integer.parseInt(inputArray[0]);\n int b = Integer.parseInt(inputArray[1]);\n int aa = a;\n int bb = b;\n if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }\n int mod = aa % bb;\n while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }\n System.out.println(bb+\" \"+(a/bb*b));\n }",
"(input = reader.readLine()) != null",
"(input = reader.readLine())",
"input",
"reader.readLine()",
"reader.readLine",
"reader",
"null",
"{\n String[] inputArray = input.split(\" \");\n int a = Integer.parseInt(inputArray[0]);\n int b = Integer.parseInt(inputArray[1]);\n int aa = a;\n int bb = b;\n if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }\n int mod = aa % bb;\n while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }\n System.out.println(bb+\" \"+(a/bb*b));\n }",
"String[] inputArray = input.split(\" \");",
"inputArray",
"input.split(\" \")",
"input.split",
"input",
"\" \"",
"int a = Integer.parseInt(inputArray[0]);",
"a",
"Integer.parseInt(inputArray[0])",
"Integer.parseInt",
"Integer",
"inputArray[0]",
"inputArray",
"0",
"int b = Integer.parseInt(inputArray[1]);",
"b",
"Integer.parseInt(inputArray[1])",
"Integer.parseInt",
"Integer",
"inputArray[1]",
"inputArray",
"1",
"int aa = a;",
"aa",
"a",
"int bb = b;",
"bb",
"b",
"if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }",
"bb>aa",
"bb",
"aa",
"{\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }",
"int tmp = aa;",
"tmp",
"aa",
"aa = bb",
"aa",
"bb",
"bb = tmp",
"bb",
"tmp",
"int mod = aa % bb;",
"mod",
"aa % bb",
"aa",
"bb",
"while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }",
"mod != 0",
"mod",
"0",
"{\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }",
"aa = bb",
"aa",
"bb",
"bb = mod",
"bb",
"mod",
"mod = aa % bb",
"mod",
"aa % bb",
"aa",
"bb",
"System.out.println(bb+\" \"+(a/bb*b))",
"System.out.println",
"System.out",
"System",
"System.out",
"bb+\" \"+(a/bb*b)",
"bb+\" \"+(a/bb*b)",
"bb",
"\" \"",
"(a/bb*b)",
"a/bb",
"a",
"bb",
"b",
"String[] args",
"args",
"public class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String input;\n try {\n while((input = reader.readLine()) != null){\n String[] inputArray = input.split(\" \");\n int a = Integer.parseInt(inputArray[0]);\n int b = Integer.parseInt(inputArray[1]);\n int aa = a;\n int bb = b;\n if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }\n int mod = aa % bb;\n while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }\n System.out.println(bb+\" \"+(a/bb*b));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}",
"public class Main {\n public static void main(String[] args) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n String input;\n try {\n while((input = reader.readLine()) != null){\n String[] inputArray = input.split(\" \");\n int a = Integer.parseInt(inputArray[0]);\n int b = Integer.parseInt(inputArray[1]);\n int aa = a;\n int bb = b;\n if(bb>aa){\n int tmp = aa;\n aa = bb;\n bb = tmp;\n }\n int mod = aa % bb;\n while(mod != 0){\n aa = bb;\n bb = mod;\n mod = aa % bb;\n }\n System.out.println(bb+\" \"+(a/bb*b));\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String input;
try {
while((input = reader.readLine()) != null){
String[] inputArray = input.split(" ");
int a = Integer.parseInt(inputArray[0]);
int b = Integer.parseInt(inputArray[1]);
int aa = a;
int bb = b;
if(bb>aa){
int tmp = aa;
aa = bb;
bb = tmp;
}
int mod = aa % bb;
while(mod != 0){
aa = bb;
bb = mod;
mod = aa % bb;
}
System.out.println(bb+" "+(a/bb*b));
}
} catch (IOException e) {
e.printStackTrace();
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
12,
13,
30,
41,
13,
20,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
41,
13,
4,
13,
13,
13,
13,
4,
18,
13,
13,
4,
18,
13,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
17,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
4,
13,
13,
2,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
13,
41,
13,
2,
13,
13,
29,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
131,
5
],
[
131,
6
],
[
6,
7
],
[
6,
8
],
[
131,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
15,
17
],
[
11,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
18,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
22,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
35,
38
],
[
22,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
41,
44
],
[
41,
45
],
[
22,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
22,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
11,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
11,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
62,
63
],
[
11,
64
],
[
64,
65
],
[
65,
66
],
[
66,
67
],
[
64,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
68,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
77,
78
],
[
68,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
79,
85
],
[
79,
86
],
[
9,
87
],
[
87,
88
],
[
131,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
97,
100
],
[
100,
101
],
[
100,
102
],
[
92,
103
],
[
103,
104
],
[
89,
105
],
[
105,
106
],
[
89,
107
],
[
107,
108
],
[
131,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
111,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
111,
122
],
[
122,
123
],
[
109,
124
],
[
124,
125
],
[
109,
126
],
[
126,
127
],
[
109,
128
],
[
128,
129
],
[
0,
130
],
[
130,
131
],
[
130,
132
]
] | [
"import java.util.*;\n\npublic class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<Integer> listG = new ArrayList<Integer>();\n\t\tList<Integer> listL = new ArrayList<Integer>();\n\t\twhile(scan.hasNext()){\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\tint g = gcd(a, b);\n\t\t\tint l = lcm(a, b, g);\n\t\t\tlistG.add(g);\n\t\t\tlistL.add(l);\n\t\t}\n\t\tIterator<Integer> itG = listG.iterator();\n\t\tIterator<Integer> itL = listL.iterator();\n\t\twhile(itG.hasNext()){\n\t\t\tint g = itG.next();\n\t\t\tint l = itL.next();\n\t\t\tSystem.out.printf(\"%d %d\\n\", g, l);\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b){\n\t\tif(b != 0)return gcd(b, a % b);\n\t\telse return a;\n\t}\n\n\tpublic static int lcm(int a, int b, int g){\n\t\tint v = a / g;\n\t\tint l = v * b;\n\t\treturn l;\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<Integer> listG = new ArrayList<Integer>();\n\t\tList<Integer> listL = new ArrayList<Integer>();\n\t\twhile(scan.hasNext()){\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\tint g = gcd(a, b);\n\t\t\tint l = lcm(a, b, g);\n\t\t\tlistG.add(g);\n\t\t\tlistL.add(l);\n\t\t}\n\t\tIterator<Integer> itG = listG.iterator();\n\t\tIterator<Integer> itL = listL.iterator();\n\t\twhile(itG.hasNext()){\n\t\t\tint g = itG.next();\n\t\t\tint l = itL.next();\n\t\t\tSystem.out.printf(\"%d %d\\n\", g, l);\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b){\n\t\tif(b != 0)return gcd(b, a % b);\n\t\telse return a;\n\t}\n\n\tpublic static int lcm(int a, int b, int g){\n\t\tint v = a / g;\n\t\tint l = v * b;\n\t\treturn l;\n\t}\n}",
"Main",
"private static final Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"public static void main(String[] args){\n\t\tList<Integer> listG = new ArrayList<Integer>();\n\t\tList<Integer> listL = new ArrayList<Integer>();\n\t\twhile(scan.hasNext()){\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\tint g = gcd(a, b);\n\t\t\tint l = lcm(a, b, g);\n\t\t\tlistG.add(g);\n\t\t\tlistL.add(l);\n\t\t}\n\t\tIterator<Integer> itG = listG.iterator();\n\t\tIterator<Integer> itL = listL.iterator();\n\t\twhile(itG.hasNext()){\n\t\t\tint g = itG.next();\n\t\t\tint l = itL.next();\n\t\t\tSystem.out.printf(\"%d %d\\n\", g, l);\n\t\t}\n\t}",
"main",
"{\n\t\tList<Integer> listG = new ArrayList<Integer>();\n\t\tList<Integer> listL = new ArrayList<Integer>();\n\t\twhile(scan.hasNext()){\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\tint g = gcd(a, b);\n\t\t\tint l = lcm(a, b, g);\n\t\t\tlistG.add(g);\n\t\t\tlistL.add(l);\n\t\t}\n\t\tIterator<Integer> itG = listG.iterator();\n\t\tIterator<Integer> itL = listL.iterator();\n\t\twhile(itG.hasNext()){\n\t\t\tint g = itG.next();\n\t\t\tint l = itL.next();\n\t\t\tSystem.out.printf(\"%d %d\\n\", g, l);\n\t\t}\n\t}",
"List<Integer> listG = new ArrayList<Integer>();",
"listG",
"new ArrayList<Integer>()",
"List<Integer> listL = new ArrayList<Integer>();",
"listL",
"new ArrayList<Integer>()",
"while(scan.hasNext()){\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\tint g = gcd(a, b);\n\t\t\tint l = lcm(a, b, g);\n\t\t\tlistG.add(g);\n\t\t\tlistL.add(l);\n\t\t}",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\tint g = gcd(a, b);\n\t\t\tint l = lcm(a, b, g);\n\t\t\tlistG.add(g);\n\t\t\tlistL.add(l);\n\t\t}",
"int a = scan.nextInt();",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int b = scan.nextInt();",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"int g = gcd(a, b);",
"g",
"gcd(a, b)",
"gcd",
"a",
"b",
"int l = lcm(a, b, g);",
"l",
"lcm(a, b, g)",
"lcm",
"a",
"b",
"g",
"listG.add(g)",
"listG.add",
"listG",
"g",
"listL.add(l)",
"listL.add",
"listL",
"l",
"Iterator<Integer> itG = listG.iterator();",
"itG",
"listG.iterator()",
"listG.iterator",
"listG",
"Iterator<Integer> itL = listL.iterator();",
"itL",
"listL.iterator()",
"listL.iterator",
"listL",
"while(itG.hasNext()){\n\t\t\tint g = itG.next();\n\t\t\tint l = itL.next();\n\t\t\tSystem.out.printf(\"%d %d\\n\", g, l);\n\t\t}",
"itG.hasNext()",
"itG.hasNext",
"itG",
"{\n\t\t\tint g = itG.next();\n\t\t\tint l = itL.next();\n\t\t\tSystem.out.printf(\"%d %d\\n\", g, l);\n\t\t}",
"int g = itG.next();",
"g",
"itG.next()",
"itG.next",
"itG",
"int l = itL.next();",
"l",
"itL.next()",
"itL.next",
"itL",
"System.out.printf(\"%d %d\\n\", g, l)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d %d\\n\"",
"g",
"l",
"String[] args",
"args",
"public static int gcd(int a, int b){\n\t\tif(b != 0)return gcd(b, a % b);\n\t\telse return a;\n\t}",
"gcd",
"{\n\t\tif(b != 0)return gcd(b, a % b);\n\t\telse return a;\n\t}",
"if(b != 0)return gcd(b, a % b);\n\t\telse return a;",
"b != 0",
"b",
"0",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"return a;",
"a",
"int a",
"a",
"int b",
"b",
"public static int lcm(int a, int b, int g){\n\t\tint v = a / g;\n\t\tint l = v * b;\n\t\treturn l;\n\t}",
"lcm",
"{\n\t\tint v = a / g;\n\t\tint l = v * b;\n\t\treturn l;\n\t}",
"int v = a / g;",
"v",
"a / g",
"a",
"g",
"int l = v * b;",
"l",
"v * b",
"v",
"b",
"return l;",
"l",
"int a",
"a",
"int b",
"b",
"int g",
"g",
"public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<Integer> listG = new ArrayList<Integer>();\n\t\tList<Integer> listL = new ArrayList<Integer>();\n\t\twhile(scan.hasNext()){\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\tint g = gcd(a, b);\n\t\t\tint l = lcm(a, b, g);\n\t\t\tlistG.add(g);\n\t\t\tlistL.add(l);\n\t\t}\n\t\tIterator<Integer> itG = listG.iterator();\n\t\tIterator<Integer> itL = listL.iterator();\n\t\twhile(itG.hasNext()){\n\t\t\tint g = itG.next();\n\t\t\tint l = itL.next();\n\t\t\tSystem.out.printf(\"%d %d\\n\", g, l);\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b){\n\t\tif(b != 0)return gcd(b, a % b);\n\t\telse return a;\n\t}\n\n\tpublic static int lcm(int a, int b, int g){\n\t\tint v = a / g;\n\t\tint l = v * b;\n\t\treturn l;\n\t}\n}",
"public class Main{\n\tprivate static final Scanner scan = new Scanner(System.in);\n\n\tpublic static void main(String[] args){\n\t\tList<Integer> listG = new ArrayList<Integer>();\n\t\tList<Integer> listL = new ArrayList<Integer>();\n\t\twhile(scan.hasNext()){\n\t\t\tint a = scan.nextInt();\n\t\t\tint b = scan.nextInt();\n\t\t\tint g = gcd(a, b);\n\t\t\tint l = lcm(a, b, g);\n\t\t\tlistG.add(g);\n\t\t\tlistL.add(l);\n\t\t}\n\t\tIterator<Integer> itG = listG.iterator();\n\t\tIterator<Integer> itL = listL.iterator();\n\t\twhile(itG.hasNext()){\n\t\t\tint g = itG.next();\n\t\t\tint l = itL.next();\n\t\t\tSystem.out.printf(\"%d %d\\n\", g, l);\n\t\t}\n\t}\n\n\tpublic static int gcd(int a, int b){\n\t\tif(b != 0)return gcd(b, a % b);\n\t\telse return a;\n\t}\n\n\tpublic static int lcm(int a, int b, int g){\n\t\tint v = a / g;\n\t\tint l = v * b;\n\t\treturn l;\n\t}\n}",
"Main"
] | import java.util.*;
public class Main{
private static final Scanner scan = new Scanner(System.in);
public static void main(String[] args){
List<Integer> listG = new ArrayList<Integer>();
List<Integer> listL = new ArrayList<Integer>();
while(scan.hasNext()){
int a = scan.nextInt();
int b = scan.nextInt();
int g = gcd(a, b);
int l = lcm(a, b, g);
listG.add(g);
listL.add(l);
}
Iterator<Integer> itG = listG.iterator();
Iterator<Integer> itL = listL.iterator();
while(itG.hasNext()){
int g = itG.next();
int l = itL.next();
System.out.printf("%d %d\n", g, l);
}
}
public static int gcd(int a, int b){
if(b != 0)return gcd(b, a % b);
else return a;
}
public static int lcm(int a, int b, int g){
int v = a / g;
int l = v * b;
return l;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
20,
17,
0,
18,
13,
17,
4,
18,
13,
0,
18,
13,
17,
4,
18,
13,
41,
13,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
13,
18,
13,
17,
18,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
13,
17,
13,
17,
2,
2,
18,
13,
17,
13,
17,
30,
0,
13,
13,
0,
13,
2,
13,
13,
0,
18,
13,
17,
2,
18,
13,
17,
13,
0,
18,
13,
17,
2,
18,
13,
17,
13,
3,
4,
18,
18,
13,
13,
2,
13,
17,
4,
18,
18,
13,
13,
2,
2,
13,
18,
13,
17,
18,
13,
17,
23,
13,
12,
13,
30,
14,
2,
13,
13,
30,
29,
13,
30,
29,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
154,
5
],
[
154,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
25,
26
],
[
26,
27
],
[
16,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
33,
34
],
[
16,
35
],
[
35,
36
],
[
16,
37
],
[
37,
38
],
[
37,
39
],
[
16,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
48,
53
],
[
53,
54
],
[
53,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
48,
63
],
[
63,
64
],
[
64,
65
],
[
48,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
70,
76
],
[
69,
77
],
[
77,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
77,
83
],
[
68,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
84,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
90,
92
],
[
84,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
84,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
84,
111
],
[
16,
112
],
[
112,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
112,
117
],
[
117,
118
],
[
117,
119
],
[
16,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
122,
124
],
[
120,
125
],
[
126,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
128,
130
],
[
126,
131
],
[
131,
132
],
[
131,
133
],
[
6,
134
],
[
134,
135
],
[
154,
136
],
[
136,
137
],
[
136,
138
],
[
138,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
139,
143
],
[
143,
144
],
[
144,
145
],
[
139,
146
],
[
146,
147
],
[
147,
148
],
[
136,
149
],
[
149,
150
],
[
136,
151
],
[
151,
152
],
[
0,
153
],
[
153,
154
],
[
153,
155
]
] | [
"import java.util.*;\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tint[] num = new int[2];\n\t\t\tnum[0]=sc.nextInt();\n\t\t\tnum[1]=sc.nextInt();\n\t\t\t\n\t\t\tint cd0;\n\t\t\tint cd = 1;\n\t\t\t\n\t\t\tdo{\n\t\t\t\tcd0 = 1;\n\t\t\t\tfor(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}while(cd0 != 1);\n\t\t\t\n\t\t\tSystem.out.print(cd + \" \");\n\t\t\tSystem.out.println(cd * num[0] * num[1]);\n\t\t}\n\t}\n\t\n\tprivate static int getMin(int a, int b){\n\t\tif (a>b){\n\t\t\treturn a;\n\t\t}else{\n\t\t\treturn b;\n\t\t}\n\t}\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\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tint[] num = new int[2];\n\t\t\tnum[0]=sc.nextInt();\n\t\t\tnum[1]=sc.nextInt();\n\t\t\t\n\t\t\tint cd0;\n\t\t\tint cd = 1;\n\t\t\t\n\t\t\tdo{\n\t\t\t\tcd0 = 1;\n\t\t\t\tfor(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}while(cd0 != 1);\n\t\t\t\n\t\t\tSystem.out.print(cd + \" \");\n\t\t\tSystem.out.println(cd * num[0] * num[1]);\n\t\t}\n\t}\n\t\n\tprivate static int getMin(int a, int b){\n\t\tif (a>b){\n\t\t\treturn a;\n\t\t}else{\n\t\t\treturn b;\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\twhile(sc.hasNext()){\n\t\t\tint[] num = new int[2];\n\t\t\tnum[0]=sc.nextInt();\n\t\t\tnum[1]=sc.nextInt();\n\t\t\t\n\t\t\tint cd0;\n\t\t\tint cd = 1;\n\t\t\t\n\t\t\tdo{\n\t\t\t\tcd0 = 1;\n\t\t\t\tfor(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}while(cd0 != 1);\n\t\t\t\n\t\t\tSystem.out.print(cd + \" \");\n\t\t\tSystem.out.println(cd * num[0] * num[1]);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tint[] num = new int[2];\n\t\t\tnum[0]=sc.nextInt();\n\t\t\tnum[1]=sc.nextInt();\n\t\t\t\n\t\t\tint cd0;\n\t\t\tint cd = 1;\n\t\t\t\n\t\t\tdo{\n\t\t\t\tcd0 = 1;\n\t\t\t\tfor(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}while(cd0 != 1);\n\t\t\t\n\t\t\tSystem.out.print(cd + \" \");\n\t\t\tSystem.out.println(cd * num[0] * num[1]);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()){\n\t\t\tint[] num = new int[2];\n\t\t\tnum[0]=sc.nextInt();\n\t\t\tnum[1]=sc.nextInt();\n\t\t\t\n\t\t\tint cd0;\n\t\t\tint cd = 1;\n\t\t\t\n\t\t\tdo{\n\t\t\t\tcd0 = 1;\n\t\t\t\tfor(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}while(cd0 != 1);\n\t\t\t\n\t\t\tSystem.out.print(cd + \" \");\n\t\t\tSystem.out.println(cd * num[0] * num[1]);\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tint[] num = new int[2];\n\t\t\tnum[0]=sc.nextInt();\n\t\t\tnum[1]=sc.nextInt();\n\t\t\t\n\t\t\tint cd0;\n\t\t\tint cd = 1;\n\t\t\t\n\t\t\tdo{\n\t\t\t\tcd0 = 1;\n\t\t\t\tfor(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}while(cd0 != 1);\n\t\t\t\n\t\t\tSystem.out.print(cd + \" \");\n\t\t\tSystem.out.println(cd * num[0] * num[1]);\n\t\t}",
"int[] num = new int[2];",
"num",
"new int[2]",
"2",
"num[0]=sc.nextInt()",
"num[0]",
"num",
"0",
"sc.nextInt()",
"sc.nextInt",
"sc",
"num[1]=sc.nextInt()",
"num[1]",
"num",
"1",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int cd0;",
"cd0",
"int cd = 1;",
"cd",
"1",
"do{\n\t\t\t\tcd0 = 1;\n\t\t\t\tfor(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}while(cd0 != 1);",
"cd0 != 1",
"cd0",
"1",
"{\n\t\t\t\tcd0 = 1;\n\t\t\t\tfor(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"cd0 = 1",
"cd0",
"1",
"for(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"int j = 2;",
"int j = 2;",
"j",
"2",
"j<= getMin(num[0], num[1])",
"j",
"getMin(num[0], num[1])",
"getMin",
"num[0]",
"num",
"0",
"num[1]",
"num",
"1",
"j++",
"j++",
"j",
"{\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"if(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"num[0]%j == 0 && num[1]%j == 0",
"num[0]%j == 0",
"num[0]%j",
"num[0]",
"num",
"0",
"j",
"0",
"num[1]%j == 0",
"num[1]%j",
"num[1]",
"num",
"1",
"j",
"0",
"{\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"cd0 = j",
"cd0",
"j",
"cd = cd * j",
"cd",
"cd * j",
"cd",
"j",
"num[0]=num[0]/j",
"num[0]",
"num",
"0",
"num[0]/j",
"num[0]",
"num",
"0",
"j",
"num[1]=num[1]/j",
"num[1]",
"num",
"1",
"num[1]/j",
"num[1]",
"num",
"1",
"j",
"break;",
"System.out.print(cd + \" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"cd + \" \"",
"cd",
"\" \"",
"System.out.println(cd * num[0] * num[1])",
"System.out.println",
"System.out",
"System",
"System.out",
"cd * num[0] * num[1]",
"cd * num[0] * num[1]",
"cd",
"num[0]",
"num",
"0",
"num[1]",
"num",
"1",
"String[] args",
"args",
"private static int getMin(int a, int b){\n\t\tif (a>b){\n\t\t\treturn a;\n\t\t}else{\n\t\t\treturn b;\n\t\t}\n\t}",
"getMin",
"{\n\t\tif (a>b){\n\t\t\treturn a;\n\t\t}else{\n\t\t\treturn b;\n\t\t}\n\t}",
"if (a>b){\n\t\t\treturn a;\n\t\t}else{\n\t\t\treturn b;\n\t\t}",
"a>b",
"a",
"b",
"{\n\t\t\treturn a;\n\t\t}",
"return a;",
"a",
"{\n\t\t\treturn b;\n\t\t}",
"return b;",
"b",
"int a",
"a",
"int b",
"b",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tint[] num = new int[2];\n\t\t\tnum[0]=sc.nextInt();\n\t\t\tnum[1]=sc.nextInt();\n\t\t\t\n\t\t\tint cd0;\n\t\t\tint cd = 1;\n\t\t\t\n\t\t\tdo{\n\t\t\t\tcd0 = 1;\n\t\t\t\tfor(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}while(cd0 != 1);\n\t\t\t\n\t\t\tSystem.out.print(cd + \" \");\n\t\t\tSystem.out.println(cd * num[0] * num[1]);\n\t\t}\n\t}\n\t\n\tprivate static int getMin(int a, int b){\n\t\tif (a>b){\n\t\t\treturn a;\n\t\t}else{\n\t\t\treturn b;\n\t\t}\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tint[] num = new int[2];\n\t\t\tnum[0]=sc.nextInt();\n\t\t\tnum[1]=sc.nextInt();\n\t\t\t\n\t\t\tint cd0;\n\t\t\tint cd = 1;\n\t\t\t\n\t\t\tdo{\n\t\t\t\tcd0 = 1;\n\t\t\t\tfor(int j = 2; j<= getMin(num[0], num[1]); j++){\n\t\t\t\t\tif(num[0]%j == 0 && num[1]%j == 0){\n\t\t\t\t\t\tcd0 = j;\n\t\t\t\t\t\tcd = cd * j;\n\t\t\t\t\t\tnum[0]=num[0]/j;\n\t\t\t\t\t\tnum[1]=num[1]/j;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}while(cd0 != 1);\n\t\t\t\n\t\t\tSystem.out.print(cd + \" \");\n\t\t\tSystem.out.println(cd * num[0] * num[1]);\n\t\t}\n\t}\n\t\n\tprivate static int getMin(int a, int b){\n\t\tif (a>b){\n\t\t\treturn a;\n\t\t}else{\n\t\t\treturn b;\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);
while(sc.hasNext()){
int[] num = new int[2];
num[0]=sc.nextInt();
num[1]=sc.nextInt();
int cd0;
int cd = 1;
do{
cd0 = 1;
for(int j = 2; j<= getMin(num[0], num[1]); j++){
if(num[0]%j == 0 && num[1]%j == 0){
cd0 = j;
cd = cd * j;
num[0]=num[0]/j;
num[1]=num[1]/j;
break;
}
}
}while(cd0 != 1);
System.out.print(cd + " ");
System.out.println(cd * num[0] * num[1]);
}
}
private static int getMin(int a, int b){
if (a>b){
return a;
}else{
return b;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
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,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
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
],
[
104,
8
],
[
104,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
14,
16
],
[
13,
17
],
[
13,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
20,
22
],
[
18,
23
],
[
9,
24
],
[
24,
25
],
[
9,
26
],
[
26,
27
],
[
104,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
32,
36
],
[
36,
37
],
[
36,
38
],
[
36,
39
],
[
28,
40
],
[
40,
41
],
[
28,
42
],
[
42,
43
],
[
104,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
50,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
54,
60
],
[
60,
61
],
[
60,
62
],
[
62,
63
],
[
63,
64
],
[
54,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
65,
70
],
[
71,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
72,
75
],
[
71,
76
],
[
71,
77
],
[
77,
78
],
[
77,
79
],
[
77,
80
],
[
104,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
81,
87
],
[
87,
88
],
[
104,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
89,
101
],
[
101,
102
],
[
0,
103
],
[
103,
104
],
[
103,
105
]
] | [
"import java.util.Arrays;\nimport java.util.Scanner;\n\n\npublic class Main {\n\t\n\t\n\tlong gcd(long a, long b){\n\t\treturn a==0 ? b : gcd(b%a, a);\n\t}\n\t\n\tlong lcm(long a, long b){\n\t\treturn a*b / gcd(a, b);\n\t}\n\t\n\tvoid io(){\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tfinal long a = sc.nextInt(); final long b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main().io();\n\t}\n\t\n\tvoid debug(Object... os){\n\t\tSystem.out.println(Arrays.deepToString(os));\n\t}\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\n\t\n\tlong gcd(long a, long b){\n\t\treturn a==0 ? b : gcd(b%a, a);\n\t}\n\t\n\tlong lcm(long a, long b){\n\t\treturn a*b / gcd(a, b);\n\t}\n\t\n\tvoid io(){\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tfinal long a = sc.nextInt(); final long b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main().io();\n\t}\n\t\n\tvoid debug(Object... os){\n\t\tSystem.out.println(Arrays.deepToString(os));\n\t}\n}",
"Main",
"long gcd(long a, long b){\n\t\treturn a==0 ? b : gcd(b%a, a);\n\t}",
"gcd",
"{\n\t\treturn a==0 ? b : gcd(b%a, a);\n\t}",
"return a==0 ? b : gcd(b%a, a);",
"a==0 ? b : gcd(b%a, a)",
"a==0",
"a",
"0",
"b",
"gcd(b%a, a)",
"gcd",
"b%a",
"b",
"a",
"a",
"long a",
"a",
"long b",
"b",
"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",
"void io(){\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tfinal long a = sc.nextInt(); final long b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}",
"io",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tfinal long a = sc.nextInt(); final long b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()){\n\t\t\tfinal long a = sc.nextInt(); final long b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tfinal long a = sc.nextInt(); final long b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}",
"final long a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"final long b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(gcd(a, b) + \" \" + lcm(a, b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a, b) + \" \" + lcm(a, b)",
"gcd(a, b) + \" \" + lcm(a, b)",
"gcd(a, b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a, b)",
"lcm",
"a",
"b",
"public static void main(String[] args) {\n\t\tnew Main().io();\n\t}",
"main",
"{\n\t\tnew Main().io();\n\t}",
"new Main().io()",
"new Main().io",
"new Main()",
"String[] args",
"args",
"void debug(Object... os){\n\t\tSystem.out.println(Arrays.deepToString(os));\n\t}",
"debug",
"{\n\t\tSystem.out.println(Arrays.deepToString(os));\n\t}",
"System.out.println(Arrays.deepToString(os))",
"System.out.println",
"System.out",
"System",
"System.out",
"Arrays.deepToString(os)",
"Arrays.deepToString",
"Arrays",
"os",
"Object... os",
"os",
"public class Main {\n\t\n\t\n\tlong gcd(long a, long b){\n\t\treturn a==0 ? b : gcd(b%a, a);\n\t}\n\t\n\tlong lcm(long a, long b){\n\t\treturn a*b / gcd(a, b);\n\t}\n\t\n\tvoid io(){\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tfinal long a = sc.nextInt(); final long b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main().io();\n\t}\n\t\n\tvoid debug(Object... os){\n\t\tSystem.out.println(Arrays.deepToString(os));\n\t}\n}",
"public class Main {\n\t\n\t\n\tlong gcd(long a, long b){\n\t\treturn a==0 ? b : gcd(b%a, a);\n\t}\n\t\n\tlong lcm(long a, long b){\n\t\treturn a*b / gcd(a, b);\n\t}\n\t\n\tvoid io(){\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()){\n\t\t\tfinal long a = sc.nextInt(); final long b = sc.nextInt();\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tnew Main().io();\n\t}\n\t\n\tvoid debug(Object... os){\n\t\tSystem.out.println(Arrays.deepToString(os));\n\t}\n}",
"Main"
] | import java.util.Arrays;
import java.util.Scanner;
public class Main {
long gcd(long a, long b){
return a==0 ? b : gcd(b%a, a);
}
long lcm(long a, long b){
return a*b / gcd(a, b);
}
void io(){
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
final long a = sc.nextInt(); final long b = sc.nextInt();
System.out.println(gcd(a, b) + " " + lcm(a, b));
}
}
public static void main(String[] args) {
new Main().io();
}
void debug(Object... os){
System.out.println(Arrays.deepToString(os));
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
17,
41,
13,
18,
13,
17,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
41,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
2,
18,
13,
17,
18,
13,
17,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
119,
8
],
[
119,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
11,
17
],
[
17,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
22,
23
],
[
18,
24
],
[
17,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
25,
32
],
[
32,
33
],
[
32,
34
],
[
25,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
36,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
55,
57
],
[
25,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
25,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
25,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
76,
78
],
[
72,
79
],
[
79,
80
],
[
79,
81
],
[
25,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
92,
93
],
[
92,
94
],
[
86,
95
],
[
95,
96
],
[
95,
97
],
[
25,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
98,
103
],
[
104,
104
],
[
104,
105
],
[
104,
106
],
[
104,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
112,
113
],
[
112,
114
],
[
107,
115
],
[
9,
116
],
[
116,
117
],
[
0,
118
],
[
118,
119
],
[
118,
120
]
] | [
"import java.io.*;\nimport java.util.*;\npublic class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s;\n\t\twhile((s=reader.readLine())!=null){\n\t\t\tString[] t=s.split(\" \");\n\t\t\tint[] in=new int[2];\n\t\t\tfor(int i=0;i<2;i++)\n\t\t\t\tin[i]=Integer.parseInt(t[i]);\n\t\t\tint a=in[0];\n\t\t\tint b=in[1];\n\t\t\tif(a<b){int tmp=a;a=b;b=tmp;}\n\t\t\twhile(b!=0){\n\t\t\t\tint tmp=a%b;a=b;b=tmp;\n\t\t\t}\n\t\t\tSystem.out.println(a+\" \"+(long)in[0]*in[1]/a);\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"public class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s;\n\t\twhile((s=reader.readLine())!=null){\n\t\t\tString[] t=s.split(\" \");\n\t\t\tint[] in=new int[2];\n\t\t\tfor(int i=0;i<2;i++)\n\t\t\t\tin[i]=Integer.parseInt(t[i]);\n\t\t\tint a=in[0];\n\t\t\tint b=in[1];\n\t\t\tif(a<b){int tmp=a;a=b;b=tmp;}\n\t\t\twhile(b!=0){\n\t\t\t\tint tmp=a%b;a=b;b=tmp;\n\t\t\t}\n\t\t\tSystem.out.println(a+\" \"+(long)in[0]*in[1]/a);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s;\n\t\twhile((s=reader.readLine())!=null){\n\t\t\tString[] t=s.split(\" \");\n\t\t\tint[] in=new int[2];\n\t\t\tfor(int i=0;i<2;i++)\n\t\t\t\tin[i]=Integer.parseInt(t[i]);\n\t\t\tint a=in[0];\n\t\t\tint b=in[1];\n\t\t\tif(a<b){int tmp=a;a=b;b=tmp;}\n\t\t\twhile(b!=0){\n\t\t\t\tint tmp=a%b;a=b;b=tmp;\n\t\t\t}\n\t\t\tSystem.out.println(a+\" \"+(long)in[0]*in[1]/a);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s;\n\t\twhile((s=reader.readLine())!=null){\n\t\t\tString[] t=s.split(\" \");\n\t\t\tint[] in=new int[2];\n\t\t\tfor(int i=0;i<2;i++)\n\t\t\t\tin[i]=Integer.parseInt(t[i]);\n\t\t\tint a=in[0];\n\t\t\tint b=in[1];\n\t\t\tif(a<b){int tmp=a;a=b;b=tmp;}\n\t\t\twhile(b!=0){\n\t\t\t\tint tmp=a%b;a=b;b=tmp;\n\t\t\t}\n\t\t\tSystem.out.println(a+\" \"+(long)in[0]*in[1]/a);\n\t\t}\n\t}",
"BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String s;",
"s",
"while((s=reader.readLine())!=null){\n\t\t\tString[] t=s.split(\" \");\n\t\t\tint[] in=new int[2];\n\t\t\tfor(int i=0;i<2;i++)\n\t\t\t\tin[i]=Integer.parseInt(t[i]);\n\t\t\tint a=in[0];\n\t\t\tint b=in[1];\n\t\t\tif(a<b){int tmp=a;a=b;b=tmp;}\n\t\t\twhile(b!=0){\n\t\t\t\tint tmp=a%b;a=b;b=tmp;\n\t\t\t}\n\t\t\tSystem.out.println(a+\" \"+(long)in[0]*in[1]/a);\n\t\t}",
"(s=reader.readLine())!=null",
"(s=reader.readLine())",
"s",
"reader.readLine()",
"reader.readLine",
"reader",
"null",
"{\n\t\t\tString[] t=s.split(\" \");\n\t\t\tint[] in=new int[2];\n\t\t\tfor(int i=0;i<2;i++)\n\t\t\t\tin[i]=Integer.parseInt(t[i]);\n\t\t\tint a=in[0];\n\t\t\tint b=in[1];\n\t\t\tif(a<b){int tmp=a;a=b;b=tmp;}\n\t\t\twhile(b!=0){\n\t\t\t\tint tmp=a%b;a=b;b=tmp;\n\t\t\t}\n\t\t\tSystem.out.println(a+\" \"+(long)in[0]*in[1]/a);\n\t\t}",
"String[] t=s.split(\" \");",
"t",
"s.split(\" \")",
"s.split",
"s",
"\" \"",
"int[] in=new int[2];",
"in",
"new int[2]",
"2",
"for(int i=0;i<2;i++)\n\t\t\t\tin[i]=Integer.parseInt(t[i]);",
"int i=0;",
"int i=0;",
"i",
"0",
"i<2",
"i",
"2",
"i++",
"i++",
"i",
"in[i]=Integer.parseInt(t[i]);",
"in[i]=Integer.parseInt(t[i])",
"in[i]",
"in",
"i",
"Integer.parseInt(t[i])",
"Integer.parseInt",
"Integer",
"t[i]",
"t",
"i",
"int a=in[0];",
"a",
"in[0]",
"in",
"0",
"int b=in[1];",
"b",
"in[1]",
"in",
"1",
"if(a<b){int tmp=a;a=b;b=tmp;}",
"a<b",
"a",
"b",
"{int tmp=a;a=b;b=tmp;}",
"int tmp=a;",
"tmp",
"a",
"a=b",
"a",
"b",
"b=tmp",
"b",
"tmp",
"while(b!=0){\n\t\t\t\tint tmp=a%b;a=b;b=tmp;\n\t\t\t}",
"b!=0",
"b",
"0",
"{\n\t\t\t\tint tmp=a%b;a=b;b=tmp;\n\t\t\t}",
"int tmp=a%b;",
"tmp",
"a%b",
"a",
"b",
"a=b",
"a",
"b",
"b=tmp",
"b",
"tmp",
"System.out.println(a+\" \"+(long)in[0]*in[1]/a)",
"System.out.println",
"System.out",
"System",
"System.out",
"a+\" \"+(long)in[0]*in[1]/a",
"a+\" \"+(long)in[0]*in[1]/a",
"a",
"\" \"",
"(long)in[0]*in[1]/a",
"(long)in[0]*in[1]",
"(long)in[0]",
"in",
"0",
"in[1]",
"in",
"1",
"a",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s;\n\t\twhile((s=reader.readLine())!=null){\n\t\t\tString[] t=s.split(\" \");\n\t\t\tint[] in=new int[2];\n\t\t\tfor(int i=0;i<2;i++)\n\t\t\t\tin[i]=Integer.parseInt(t[i]);\n\t\t\tint a=in[0];\n\t\t\tint b=in[1];\n\t\t\tif(a<b){int tmp=a;a=b;b=tmp;}\n\t\t\twhile(b!=0){\n\t\t\t\tint tmp=a%b;a=b;b=tmp;\n\t\t\t}\n\t\t\tSystem.out.println(a+\" \"+(long)in[0]*in[1]/a);\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args)throws IOException{\n\t\tBufferedReader reader=new BufferedReader(new InputStreamReader(System.in));\n\t\tString s;\n\t\twhile((s=reader.readLine())!=null){\n\t\t\tString[] t=s.split(\" \");\n\t\t\tint[] in=new int[2];\n\t\t\tfor(int i=0;i<2;i++)\n\t\t\t\tin[i]=Integer.parseInt(t[i]);\n\t\t\tint a=in[0];\n\t\t\tint b=in[1];\n\t\t\tif(a<b){int tmp=a;a=b;b=tmp;}\n\t\t\twhile(b!=0){\n\t\t\t\tint tmp=a%b;a=b;b=tmp;\n\t\t\t}\n\t\t\tSystem.out.println(a+\" \"+(long)in[0]*in[1]/a);\n\t\t}\n\t}\n}",
"Main"
] | import java.io.*;
import java.util.*;
public class Main{
public static void main(String[] args)throws IOException{
BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
String s;
while((s=reader.readLine())!=null){
String[] t=s.split(" ");
int[] in=new int[2];
for(int i=0;i<2;i++)
in[i]=Integer.parseInt(t[i]);
int a=in[0];
int b=in[1];
if(a<b){int tmp=a;a=b;b=tmp;}
while(b!=0){
int tmp=a%b;a=b;b=tmp;
}
System.out.println(a+" "+(long)in[0]*in[1]/a);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
17,
4,
13,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
80,
5
],
[
80,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
27,
33
],
[
33,
34
],
[
33,
35
],
[
33,
36
],
[
27,
37
],
[
37,
38
],
[
37,
39
],
[
37,
40
],
[
6,
41
],
[
41,
42
],
[
80,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
46,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
53,
56
],
[
56,
57
],
[
56,
58
],
[
43,
59
],
[
59,
60
],
[
43,
61
],
[
61,
62
],
[
80,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
71,
72
],
[
71,
73
],
[
71,
74
],
[
63,
75
],
[
75,
76
],
[
63,
77
],
[
77,
78
],
[
0,
79
],
[
79,
80
],
[
79,
81
]
] | [
"import java.util.Scanner;\n\n\npublic class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tlong m = sc.nextLong();\n\t\t\tlong n = sc.nextLong();\n\t\t\t\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd(m, n), lcm(m, n));\n\t\t}\n\t}\n\t\n\tpublic static long gcd(long a, long b){\n\t\t\n\t\tif(b == 0)\treturn a;\n\t\telse return gcd(b, a % b);\n\t}\n\t\n\tpublic static long lcm(long a, long b){\n\t\treturn a * b / gcd(a, b);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tlong m = sc.nextLong();\n\t\t\tlong n = sc.nextLong();\n\t\t\t\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd(m, n), lcm(m, n));\n\t\t}\n\t}\n\t\n\tpublic static long gcd(long a, long b){\n\t\t\n\t\tif(b == 0)\treturn a;\n\t\telse return gcd(b, a % b);\n\t}\n\t\n\tpublic static long lcm(long a, long b){\n\t\treturn a * b / gcd(a, b);\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tlong m = sc.nextLong();\n\t\t\tlong n = sc.nextLong();\n\t\t\t\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd(m, n), lcm(m, n));\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tlong m = sc.nextLong();\n\t\t\tlong n = sc.nextLong();\n\t\t\t\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd(m, n), lcm(m, n));\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()){\n\t\t\tlong m = sc.nextLong();\n\t\t\tlong n = sc.nextLong();\n\t\t\t\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd(m, n), lcm(m, n));\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tlong m = sc.nextLong();\n\t\t\tlong n = sc.nextLong();\n\t\t\t\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd(m, n), lcm(m, n));\n\t\t}",
"long m = sc.nextLong();",
"m",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long n = sc.nextLong();",
"n",
"sc.nextLong()",
"sc.nextLong",
"sc",
"System.out.printf(\"%d %d\\n\",gcd(m, n), lcm(m, n))",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d %d\\n\"",
"gcd(m, n)",
"gcd",
"m",
"n",
"lcm(m, n)",
"lcm",
"m",
"n",
"String[] args",
"args",
"public static long gcd(long a, long b){\n\t\t\n\t\tif(b == 0)\treturn a;\n\t\telse return gcd(b, a % b);\n\t}",
"gcd",
"{\n\t\t\n\t\tif(b == 0)\treturn a;\n\t\telse return gcd(b, a % b);\n\t}",
"if(b == 0)\treturn a;\n\t\telse return gcd(b, a % b);",
"b == 0",
"b",
"0",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"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 class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tlong m = sc.nextLong();\n\t\t\tlong n = sc.nextLong();\n\t\t\t\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd(m, n), lcm(m, n));\n\t\t}\n\t}\n\t\n\tpublic static long gcd(long a, long b){\n\t\t\n\t\tif(b == 0)\treturn a;\n\t\telse return gcd(b, a % b);\n\t}\n\t\n\tpublic static long lcm(long a, long b){\n\t\treturn a * b / gcd(a, b);\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\twhile(sc.hasNext()){\n\t\t\tlong m = sc.nextLong();\n\t\t\tlong n = sc.nextLong();\n\t\t\t\n\t\t\tSystem.out.printf(\"%d %d\\n\",gcd(m, n), lcm(m, n));\n\t\t}\n\t}\n\t\n\tpublic static long gcd(long a, long b){\n\t\t\n\t\tif(b == 0)\treturn a;\n\t\telse return gcd(b, a % b);\n\t}\n\t\n\tpublic static long lcm(long a, long b){\n\t\treturn a * b / gcd(a, b);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
long m = sc.nextLong();
long n = sc.nextLong();
System.out.printf("%d %d\n",gcd(m, n), lcm(m, n));
}
}
public static long gcd(long a, long b){
if(b == 0) return a;
else return gcd(b, a % b);
}
public static long lcm(long a, long b){
return a * b / gcd(a, b);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
41,
13,
13,
41,
13,
13,
41,
13,
13,
41,
13,
13,
42,
2,
13,
13,
30,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
42,
2,
13,
13,
30,
14,
2,
13,
13,
0,
13,
13,
14,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
98,
5
],
[
98,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
16,
30
],
[
30,
31
],
[
30,
32
],
[
16,
33
],
[
33,
34
],
[
33,
35
],
[
16,
36
],
[
36,
37
],
[
36,
38
],
[
16,
39
],
[
39,
40
],
[
39,
41
],
[
16,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
46,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
60,
62
],
[
46,
63
],
[
63,
64
],
[
63,
65
],
[
16,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
71,
75
],
[
75,
76
],
[
75,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
82,
84
],
[
16,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
91,
91
],
[
91,
92
],
[
91,
93
],
[
91,
94
],
[
6,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
] | [
"import java.util.Scanner;\n\n public class Main{\n\t public static void main(String[] args){\n\t\t Scanner s = new Scanner(System.in);\n\t\t while(s.hasNextInt()){\n\t\t\t int a = s.nextInt();\n\t\t\t int b = s.nextInt();\n\t\t\t int c = a;\n\t\t\t int d = b;\n\t\t\t int max = a;\n\t\t\t int mox = b;\n\t\t\t int mix = max;\n\t\t\twhile(max != mox){\n\t\t\t\tif(mox > max){max = mox; mox = mix;}\n\t\t\t\tmax = max - mox;\n\t\t\t\tmix = max;\n\t\t\t}\n\t\t\twhile(a!=b){\n\t\t\t\tif(a<b) a += c;\n\t\t\t\tif(a>b) b += d;\n\t\t\t}\n\t\t\tSystem.out.println(mox+\" \"+a);\n\t\t }\n\t\t }\n\t } ",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\t public static void main(String[] args){\n\t\t Scanner s = new Scanner(System.in);\n\t\t while(s.hasNextInt()){\n\t\t\t int a = s.nextInt();\n\t\t\t int b = s.nextInt();\n\t\t\t int c = a;\n\t\t\t int d = b;\n\t\t\t int max = a;\n\t\t\t int mox = b;\n\t\t\t int mix = max;\n\t\t\twhile(max != mox){\n\t\t\t\tif(mox > max){max = mox; mox = mix;}\n\t\t\t\tmax = max - mox;\n\t\t\t\tmix = max;\n\t\t\t}\n\t\t\twhile(a!=b){\n\t\t\t\tif(a<b) a += c;\n\t\t\t\tif(a>b) b += d;\n\t\t\t}\n\t\t\tSystem.out.println(mox+\" \"+a);\n\t\t }\n\t\t }\n\t }",
"Main",
"public static void main(String[] args){\n\t\t Scanner s = new Scanner(System.in);\n\t\t while(s.hasNextInt()){\n\t\t\t int a = s.nextInt();\n\t\t\t int b = s.nextInt();\n\t\t\t int c = a;\n\t\t\t int d = b;\n\t\t\t int max = a;\n\t\t\t int mox = b;\n\t\t\t int mix = max;\n\t\t\twhile(max != mox){\n\t\t\t\tif(mox > max){max = mox; mox = mix;}\n\t\t\t\tmax = max - mox;\n\t\t\t\tmix = max;\n\t\t\t}\n\t\t\twhile(a!=b){\n\t\t\t\tif(a<b) a += c;\n\t\t\t\tif(a>b) b += d;\n\t\t\t}\n\t\t\tSystem.out.println(mox+\" \"+a);\n\t\t }\n\t\t }",
"main",
"{\n\t\t Scanner s = new Scanner(System.in);\n\t\t while(s.hasNextInt()){\n\t\t\t int a = s.nextInt();\n\t\t\t int b = s.nextInt();\n\t\t\t int c = a;\n\t\t\t int d = b;\n\t\t\t int max = a;\n\t\t\t int mox = b;\n\t\t\t int mix = max;\n\t\t\twhile(max != mox){\n\t\t\t\tif(mox > max){max = mox; mox = mix;}\n\t\t\t\tmax = max - mox;\n\t\t\t\tmix = max;\n\t\t\t}\n\t\t\twhile(a!=b){\n\t\t\t\tif(a<b) a += c;\n\t\t\t\tif(a>b) b += d;\n\t\t\t}\n\t\t\tSystem.out.println(mox+\" \"+a);\n\t\t }\n\t\t }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"while(s.hasNextInt()){\n\t\t\t int a = s.nextInt();\n\t\t\t int b = s.nextInt();\n\t\t\t int c = a;\n\t\t\t int d = b;\n\t\t\t int max = a;\n\t\t\t int mox = b;\n\t\t\t int mix = max;\n\t\t\twhile(max != mox){\n\t\t\t\tif(mox > max){max = mox; mox = mix;}\n\t\t\t\tmax = max - mox;\n\t\t\t\tmix = max;\n\t\t\t}\n\t\t\twhile(a!=b){\n\t\t\t\tif(a<b) a += c;\n\t\t\t\tif(a>b) b += d;\n\t\t\t}\n\t\t\tSystem.out.println(mox+\" \"+a);\n\t\t }",
"s.hasNextInt()",
"s.hasNextInt",
"s",
"{\n\t\t\t int a = s.nextInt();\n\t\t\t int b = s.nextInt();\n\t\t\t int c = a;\n\t\t\t int d = b;\n\t\t\t int max = a;\n\t\t\t int mox = b;\n\t\t\t int mix = max;\n\t\t\twhile(max != mox){\n\t\t\t\tif(mox > max){max = mox; mox = mix;}\n\t\t\t\tmax = max - mox;\n\t\t\t\tmix = max;\n\t\t\t}\n\t\t\twhile(a!=b){\n\t\t\t\tif(a<b) a += c;\n\t\t\t\tif(a>b) b += d;\n\t\t\t}\n\t\t\tSystem.out.println(mox+\" \"+a);\n\t\t }",
"int a = s.nextInt();",
"a",
"s.nextInt()",
"s.nextInt",
"s",
"int b = s.nextInt();",
"b",
"s.nextInt()",
"s.nextInt",
"s",
"int c = a;",
"c",
"a",
"int d = b;",
"d",
"b",
"int max = a;",
"max",
"a",
"int mox = b;",
"mox",
"b",
"int mix = max;",
"mix",
"max",
"while(max != mox){\n\t\t\t\tif(mox > max){max = mox; mox = mix;}\n\t\t\t\tmax = max - mox;\n\t\t\t\tmix = max;\n\t\t\t}",
"max != mox",
"max",
"mox",
"{\n\t\t\t\tif(mox > max){max = mox; mox = mix;}\n\t\t\t\tmax = max - mox;\n\t\t\t\tmix = max;\n\t\t\t}",
"if(mox > max){max = mox; mox = mix;}",
"mox > max",
"mox",
"max",
"{max = mox; mox = mix;}",
"max = mox",
"max",
"mox",
"mox = mix",
"mox",
"mix",
"max = max - mox",
"max",
"max - mox",
"max",
"mox",
"mix = max",
"mix",
"max",
"while(a!=b){\n\t\t\t\tif(a<b) a += c;\n\t\t\t\tif(a>b) b += d;\n\t\t\t}",
"a!=b",
"a",
"b",
"{\n\t\t\t\tif(a<b) a += c;\n\t\t\t\tif(a>b) b += d;\n\t\t\t}",
"if(a<b) a += c;",
"a<b",
"a",
"b",
"a += c",
"a",
"c",
"if(a>b) b += d;",
"a>b",
"a",
"b",
"b += d",
"b",
"d",
"System.out.println(mox+\" \"+a)",
"System.out.println",
"System.out",
"System",
"System.out",
"mox+\" \"+a",
"mox+\" \"+a",
"mox",
"\" \"",
"a",
"String[] args",
"args",
"public class Main{\n\t public static void main(String[] args){\n\t\t Scanner s = new Scanner(System.in);\n\t\t while(s.hasNextInt()){\n\t\t\t int a = s.nextInt();\n\t\t\t int b = s.nextInt();\n\t\t\t int c = a;\n\t\t\t int d = b;\n\t\t\t int max = a;\n\t\t\t int mox = b;\n\t\t\t int mix = max;\n\t\t\twhile(max != mox){\n\t\t\t\tif(mox > max){max = mox; mox = mix;}\n\t\t\t\tmax = max - mox;\n\t\t\t\tmix = max;\n\t\t\t}\n\t\t\twhile(a!=b){\n\t\t\t\tif(a<b) a += c;\n\t\t\t\tif(a>b) b += d;\n\t\t\t}\n\t\t\tSystem.out.println(mox+\" \"+a);\n\t\t }\n\t\t }\n\t }",
"public class Main{\n\t public static void main(String[] args){\n\t\t Scanner s = new Scanner(System.in);\n\t\t while(s.hasNextInt()){\n\t\t\t int a = s.nextInt();\n\t\t\t int b = s.nextInt();\n\t\t\t int c = a;\n\t\t\t int d = b;\n\t\t\t int max = a;\n\t\t\t int mox = b;\n\t\t\t int mix = max;\n\t\t\twhile(max != mox){\n\t\t\t\tif(mox > max){max = mox; mox = mix;}\n\t\t\t\tmax = max - mox;\n\t\t\t\tmix = max;\n\t\t\t}\n\t\t\twhile(a!=b){\n\t\t\t\tif(a<b) a += c;\n\t\t\t\tif(a>b) b += d;\n\t\t\t}\n\t\t\tSystem.out.println(mox+\" \"+a);\n\t\t }\n\t\t }\n\t }",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args){
Scanner s = new Scanner(System.in);
while(s.hasNextInt()){
int a = s.nextInt();
int b = s.nextInt();
int c = a;
int d = b;
int max = a;
int mox = b;
int mix = max;
while(max != mox){
if(mox > max){max = mox; mox = mix;}
max = max - mox;
mix = max;
}
while(a!=b){
if(a<b) a += c;
if(a>b) b += d;
}
System.out.println(mox+" "+a);
}
}
} |
[
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,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
2,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
13,
4,
18,
13,
13,
4,
18,
13,
17,
4,
18,
13,
13,
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
],
[
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
],
[
23,
30
],
[
30,
31
],
[
23,
32
],
[
32,
33
],
[
23,
34
],
[
34,
35
],
[
23,
36
],
[
36,
37
],
[
23,
38
],
[
38,
39
],
[
23,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
40,
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
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
44,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
68,
69
],
[
68,
70
],
[
64,
71
],
[
71,
72
],
[
71,
73
],
[
44,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
81,
82
],
[
81,
83
],
[
78,
84
],
[
84,
85
],
[
84,
86
],
[
78,
87
],
[
87,
88
],
[
87,
89
],
[
44,
90
],
[
90,
91
],
[
90,
92
],
[
44,
93
],
[
93,
94
],
[
94,
95
],
[
93,
96
],
[
44,
97
],
[
97,
98
],
[
98,
99
],
[
97,
100
],
[
44,
101
],
[
101,
102
],
[
102,
103
],
[
101,
104
],
[
44,
105
],
[
105,
106
],
[
106,
107
],
[
105,
108
],
[
23,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
109,
114
],
[
21,
115
],
[
115,
116
]
] | [
"import java.io.IOException;\nimport java.io.BufferedReader;\nimport java.io.InputStreamReader;\nimport java.util.Scanner;\nimport java.util.Arrays;\nimport java.util.Collections;\n\nclass Main {\n public static void main (String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n StringBuilder sb = new StringBuilder(\"\");\n\n int a, b, r, temp;\n long gcd;\n\n while (sc.hasNextInt()) {\n a = sc.nextInt();\n b = sc.nextInt();\n\n gcd = (long) a * (long) b;\n\n if (a < b) {\n temp = a;\n a = b;\n b = temp;\n }\n\n do {\n r = a % b;\n a = b;\n b = r;\n } while (b != 0);\n\n gcd /= a;\n\n sb.append(a);\n sb.append(' ');\n sb.append(gcd);\n sb.append('\\n');\n }\n\n System.out.print(sb);\n\n }\n}",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Collections;",
"Collections",
"java.util",
"class Main {\n public static void main (String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n StringBuilder sb = new StringBuilder(\"\");\n\n int a, b, r, temp;\n long gcd;\n\n while (sc.hasNextInt()) {\n a = sc.nextInt();\n b = sc.nextInt();\n\n gcd = (long) a * (long) b;\n\n if (a < b) {\n temp = a;\n a = b;\n b = temp;\n }\n\n do {\n r = a % b;\n a = b;\n b = r;\n } while (b != 0);\n\n gcd /= a;\n\n sb.append(a);\n sb.append(' ');\n sb.append(gcd);\n sb.append('\\n');\n }\n\n System.out.print(sb);\n\n }\n}",
"Main",
"public static void main (String[] args) throws IOException {\n Scanner sc = new Scanner(System.in);\n StringBuilder sb = new StringBuilder(\"\");\n\n int a, b, r, temp;\n long gcd;\n\n while (sc.hasNextInt()) {\n a = sc.nextInt();\n b = sc.nextInt();\n\n gcd = (long) a * (long) b;\n\n if (a < b) {\n temp = a;\n a = b;\n b = temp;\n }\n\n do {\n r = a % b;\n a = b;\n b = r;\n } while (b != 0);\n\n gcd /= a;\n\n sb.append(a);\n sb.append(' ');\n sb.append(gcd);\n sb.append('\\n');\n }\n\n System.out.print(sb);\n\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n StringBuilder sb = new StringBuilder(\"\");\n\n int a, b, r, temp;\n long gcd;\n\n while (sc.hasNextInt()) {\n a = sc.nextInt();\n b = sc.nextInt();\n\n gcd = (long) a * (long) b;\n\n if (a < b) {\n temp = a;\n a = b;\n b = temp;\n }\n\n do {\n r = a % b;\n a = b;\n b = r;\n } while (b != 0);\n\n gcd /= a;\n\n sb.append(a);\n sb.append(' ');\n sb.append(gcd);\n sb.append('\\n');\n }\n\n System.out.print(sb);\n\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"StringBuilder sb = new StringBuilder(\"\");",
"sb",
"new StringBuilder(\"\")",
"int a",
"a",
"b",
"b",
"r",
"r",
"temp;",
"temp",
"long gcd;",
"gcd",
"while (sc.hasNextInt()) {\n a = sc.nextInt();\n b = sc.nextInt();\n\n gcd = (long) a * (long) b;\n\n if (a < b) {\n temp = a;\n a = b;\n b = temp;\n }\n\n do {\n r = a % b;\n a = b;\n b = r;\n } while (b != 0);\n\n gcd /= a;\n\n sb.append(a);\n sb.append(' ');\n sb.append(gcd);\n sb.append('\\n');\n }",
"sc.hasNextInt()",
"sc.hasNextInt",
"sc",
"{\n a = sc.nextInt();\n b = sc.nextInt();\n\n gcd = (long) a * (long) b;\n\n if (a < b) {\n temp = a;\n a = b;\n b = temp;\n }\n\n do {\n r = a % b;\n a = b;\n b = r;\n } while (b != 0);\n\n gcd /= a;\n\n sb.append(a);\n sb.append(' ');\n sb.append(gcd);\n sb.append('\\n');\n }",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"gcd = (long) a * (long) b",
"gcd",
"(long) a * (long) b",
"(long) a",
"(long) b",
"if (a < b) {\n temp = a;\n a = b;\n b = temp;\n }",
"a < b",
"a",
"b",
"{\n temp = a;\n a = b;\n b = temp;\n }",
"temp = a",
"temp",
"a",
"a = b",
"a",
"b",
"b = temp",
"b",
"temp",
"do {\n r = a % b;\n a = b;\n b = r;\n } while (b != 0);",
"b != 0",
"b",
"0",
"{\n r = a % b;\n a = b;\n b = r;\n }",
"r = a % b",
"r",
"a % b",
"a",
"b",
"a = b",
"a",
"b",
"b = r",
"b",
"r",
"gcd /= a",
"gcd",
"a",
"sb.append(a)",
"sb.append",
"sb",
"a",
"sb.append(' ')",
"sb.append",
"sb",
"' '",
"sb.append(gcd)",
"sb.append",
"sb",
"gcd",
"sb.append('\\n')",
"sb.append",
"sb",
"'\\n'",
"System.out.print(sb)",
"System.out.print",
"System.out",
"System",
"System.out",
"sb",
"String[] args",
"args"
] | import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.Scanner;
import java.util.Arrays;
import java.util.Collections;
class Main {
public static void main (String[] args) throws IOException {
Scanner sc = new Scanner(System.in);
StringBuilder sb = new StringBuilder("");
int a, b, r, temp;
long gcd;
while (sc.hasNextInt()) {
a = sc.nextInt();
b = sc.nextInt();
gcd = (long) a * (long) b;
if (a < b) {
temp = a;
a = b;
b = temp;
}
do {
r = a % b;
a = b;
b = r;
} while (b != 0);
gcd /= a;
sb.append(a);
sb.append(' ');
sb.append(gcd);
sb.append('\n');
}
System.out.print(sb);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
20,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
30,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
4,
13,
13,
13,
4,
18,
13,
4,
13,
13,
13,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
2,
4,
18,
13,
13,
17,
4,
18,
13,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
41,
13,
42,
17,
30,
14,
2,
13,
13,
30,
0,
13,
13,
3,
41,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
2,
13,
4,
13,
13,
13,
29,
2,
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
],
[
184,
11
],
[
184,
12
],
[
12,
13
],
[
12,
14
],
[
184,
15
],
[
15,
16
],
[
15,
17
],
[
184,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
25,
26
],
[
25,
27
],
[
24,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
29,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
36,
37
],
[
37,
38
],
[
33,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
47,
48
],
[
47,
49
],
[
47,
50
],
[
33,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
54,
56
],
[
54,
57
],
[
20,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
20,
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
],
[
78,
80
],
[
76,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
82,
87
],
[
82,
88
],
[
88,
89
],
[
89,
90
],
[
88,
91
],
[
18,
92
],
[
92,
93
],
[
184,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
96,
99
],
[
99,
100
],
[
96,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
106,
107
],
[
106,
108
],
[
105,
109
],
[
109,
110
],
[
109,
111
],
[
101,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
112,
116
],
[
116,
117
],
[
116,
118
],
[
96,
119
],
[
119,
120
],
[
96,
121
],
[
121,
122
],
[
121,
123
],
[
123,
124
],
[
124,
125
],
[
125,
126
],
[
125,
127
],
[
124,
128
],
[
128,
129
],
[
129,
130
],
[
129,
131
],
[
128,
132
],
[
123,
133
],
[
133,
134
],
[
133,
135
],
[
123,
136
],
[
136,
137
],
[
136,
138
],
[
123,
139
],
[
139,
140
],
[
139,
141
],
[
141,
142
],
[
141,
143
],
[
123,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
144,
148
],
[
148,
149
],
[
149,
150
],
[
149,
151
],
[
148,
152
],
[
152,
153
],
[
152,
154
],
[
148,
155
],
[
155,
156
],
[
155,
157
],
[
96,
158
],
[
158,
159
],
[
94,
160
],
[
160,
161
],
[
94,
162
],
[
162,
163
],
[
184,
164
],
[
164,
165
],
[
164,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
171,
173
],
[
171,
174
],
[
166,
175
],
[
175,
176
],
[
176,
177
],
[
176,
178
],
[
164,
179
],
[
179,
180
],
[
164,
181
],
[
181,
182
],
[
0,
183
],
[
183,
184
],
[
183,
185
]
] | [
"\nimport java.util.ArrayList;\nimport java.util.NoSuchElementException;\nimport java.util.Scanner;\n\npublic class Main {\n\t\n\tprivate static ArrayList<Long> gcd = new ArrayList<Long>();\n\tprivate static ArrayList<Long> lcm = new ArrayList<Long>();\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\ttry{\n\t\t\twhile(sc.hasNextLong()){\n\t\t\t\tlong a = sc.nextLong();\n\t\t\t\tlong b = sc.nextLong();\n\t\t\t\tgcd.add(getGCD(a, b));\n\t\t\t\tlcm.add(getLCM(a, b));\n\t\t\t}\n\t\t}catch(NoSuchElementException e){\n\t\t\t//ツ禿シツ療債づ個終ツづュツづィツつェツ禿シツ療債つウツづェツつスツづァツ篠淞づ個コツーツドツづ鳴渉按猟敖づーツ進ツづ淞づゥ\n\t\t}\n\t\t\n\t\t//ツ催妥・ツ古カツ姪アツ青板δ環スツトツづ催渉ャツ古カツ倍ツ青板δ環スツトツづーツ出ツ療債つキツづゥ\n\t\tint sizeAnswerList = gcd.size();\n\t\tfor(int i = 0; i < sizeAnswerList; i++){\n\t\t\tSystem.out.println(gcd.get(i) + \" \" + lcm.get(i));\n\t\t}\n\t}\n\t\n\tprivate static long getGCD(long a, long b){\n\t\tlong numBigger;\n\t\tlong numSmaller;\n\t\tif(a > b){\n\t\t\tnumBigger = a;\n\t\t\tnumSmaller = b;\n\t\t}\n\t\telse{\n\t\t\tnumBigger = b;\n\t\t\tnumSmaller = a;\n\t\t}\n\t\t\n\t\tlong gcd;\n\t\twhile(true){\n\t\t\tif(numBigger == numSmaller){\n\t\t\t\tgcd = numBigger;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong tmp = numBigger;\n\t\t\tnumBigger = numSmaller;\n\t\t\tnumSmaller = tmp - numSmaller;\n\t\t\tif(numBigger < numSmaller){\n\t\t\t\ttmp = numBigger;\n\t\t\t\tnumBigger = numSmaller;\n\t\t\t\tnumSmaller = tmp;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn gcd;\n\t}\n\t\n\tprivate static long getLCM(long a, long b){\n\t\tlong tmp = b / getGCD(a, b);\n\t\treturn a * tmp;\n\t}\n}",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.NoSuchElementException;",
"NoSuchElementException",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\t\n\tprivate static ArrayList<Long> gcd = new ArrayList<Long>();\n\tprivate static ArrayList<Long> lcm = new ArrayList<Long>();\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\ttry{\n\t\t\twhile(sc.hasNextLong()){\n\t\t\t\tlong a = sc.nextLong();\n\t\t\t\tlong b = sc.nextLong();\n\t\t\t\tgcd.add(getGCD(a, b));\n\t\t\t\tlcm.add(getLCM(a, b));\n\t\t\t}\n\t\t}catch(NoSuchElementException e){\n\t\t\t//ツ禿シツ療債づ個終ツづュツづィツつェツ禿シツ療債つウツづェツつスツづァツ篠淞づ個コツーツドツづ鳴渉按猟敖づーツ進ツづ淞づゥ\n\t\t}\n\t\t\n\t\t//ツ催妥・ツ古カツ姪アツ青板δ環スツトツづ催渉ャツ古カツ倍ツ青板δ環スツトツづーツ出ツ療債つキツづゥ\n\t\tint sizeAnswerList = gcd.size();\n\t\tfor(int i = 0; i < sizeAnswerList; i++){\n\t\t\tSystem.out.println(gcd.get(i) + \" \" + lcm.get(i));\n\t\t}\n\t}\n\t\n\tprivate static long getGCD(long a, long b){\n\t\tlong numBigger;\n\t\tlong numSmaller;\n\t\tif(a > b){\n\t\t\tnumBigger = a;\n\t\t\tnumSmaller = b;\n\t\t}\n\t\telse{\n\t\t\tnumBigger = b;\n\t\t\tnumSmaller = a;\n\t\t}\n\t\t\n\t\tlong gcd;\n\t\twhile(true){\n\t\t\tif(numBigger == numSmaller){\n\t\t\t\tgcd = numBigger;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong tmp = numBigger;\n\t\t\tnumBigger = numSmaller;\n\t\t\tnumSmaller = tmp - numSmaller;\n\t\t\tif(numBigger < numSmaller){\n\t\t\t\ttmp = numBigger;\n\t\t\t\tnumBigger = numSmaller;\n\t\t\t\tnumSmaller = tmp;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn gcd;\n\t}\n\t\n\tprivate static long getLCM(long a, long b){\n\t\tlong tmp = b / getGCD(a, b);\n\t\treturn a * tmp;\n\t}\n}",
"Main",
"private static ArrayList<Long> gcd = new ArrayList<Long>();",
"gcd",
"new ArrayList<Long>()",
"private static ArrayList<Long> lcm = new ArrayList<Long>();",
"lcm",
"new ArrayList<Long>()",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\ttry{\n\t\t\twhile(sc.hasNextLong()){\n\t\t\t\tlong a = sc.nextLong();\n\t\t\t\tlong b = sc.nextLong();\n\t\t\t\tgcd.add(getGCD(a, b));\n\t\t\t\tlcm.add(getLCM(a, b));\n\t\t\t}\n\t\t}catch(NoSuchElementException e){\n\t\t\t//ツ禿シツ療債づ個終ツづュツづィツつェツ禿シツ療債つウツづェツつスツづァツ篠淞づ個コツーツドツづ鳴渉按猟敖づーツ進ツづ淞づゥ\n\t\t}\n\t\t\n\t\t//ツ催妥・ツ古カツ姪アツ青板δ環スツトツづ催渉ャツ古カツ倍ツ青板δ環スツトツづーツ出ツ療債つキツづゥ\n\t\tint sizeAnswerList = gcd.size();\n\t\tfor(int i = 0; i < sizeAnswerList; i++){\n\t\t\tSystem.out.println(gcd.get(i) + \" \" + lcm.get(i));\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\ttry{\n\t\t\twhile(sc.hasNextLong()){\n\t\t\t\tlong a = sc.nextLong();\n\t\t\t\tlong b = sc.nextLong();\n\t\t\t\tgcd.add(getGCD(a, b));\n\t\t\t\tlcm.add(getLCM(a, b));\n\t\t\t}\n\t\t}catch(NoSuchElementException e){\n\t\t\t//ツ禿シツ療債づ個終ツづュツづィツつェツ禿シツ療債つウツづェツつスツづァツ篠淞づ個コツーツドツづ鳴渉按猟敖づーツ進ツづ淞づゥ\n\t\t}\n\t\t\n\t\t//ツ催妥・ツ古カツ姪アツ青板δ環スツトツづ催渉ャツ古カツ倍ツ青板δ環スツトツづーツ出ツ療債つキツづゥ\n\t\tint sizeAnswerList = gcd.size();\n\t\tfor(int i = 0; i < sizeAnswerList; i++){\n\t\t\tSystem.out.println(gcd.get(i) + \" \" + lcm.get(i));\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"try{\n\t\t\twhile(sc.hasNextLong()){\n\t\t\t\tlong a = sc.nextLong();\n\t\t\t\tlong b = sc.nextLong();\n\t\t\t\tgcd.add(getGCD(a, b));\n\t\t\t\tlcm.add(getLCM(a, b));\n\t\t\t}\n\t\t}catch(NoSuchElementException e){\n\t\t\t//ツ禿シツ療債づ個終ツづュツづィツつェツ禿シツ療債つウツづェツつスツづァツ篠淞づ個コツーツドツづ鳴渉按猟敖づーツ進ツづ淞づゥ\n\t\t}",
"catch(NoSuchElementException e){\n\t\t\t//ツ禿シツ療債づ個終ツづュツづィツつェツ禿シツ療債つウツづェツつスツづァツ篠淞づ個コツーツドツづ鳴渉按猟敖づーツ進ツづ淞づゥ\n\t\t}",
"NoSuchElementException e",
"{\n\t\t\t//ツ禿シツ療債づ個終ツづュツづィツつェツ禿シツ療債つウツづェツつスツづァツ篠淞づ個コツーツドツづ鳴渉按猟敖づーツ進ツづ淞づゥ\n\t\t}",
"{\n\t\t\twhile(sc.hasNextLong()){\n\t\t\t\tlong a = sc.nextLong();\n\t\t\t\tlong b = sc.nextLong();\n\t\t\t\tgcd.add(getGCD(a, b));\n\t\t\t\tlcm.add(getLCM(a, b));\n\t\t\t}\n\t\t}",
"while(sc.hasNextLong()){\n\t\t\t\tlong a = sc.nextLong();\n\t\t\t\tlong b = sc.nextLong();\n\t\t\t\tgcd.add(getGCD(a, b));\n\t\t\t\tlcm.add(getLCM(a, b));\n\t\t\t}",
"sc.hasNextLong()",
"sc.hasNextLong",
"sc",
"{\n\t\t\t\tlong a = sc.nextLong();\n\t\t\t\tlong b = sc.nextLong();\n\t\t\t\tgcd.add(getGCD(a, b));\n\t\t\t\tlcm.add(getLCM(a, b));\n\t\t\t}",
"long a = sc.nextLong();",
"a",
"sc.nextLong()",
"sc.nextLong",
"sc",
"long b = sc.nextLong();",
"b",
"sc.nextLong()",
"sc.nextLong",
"sc",
"gcd.add(getGCD(a, b))",
"gcd.add",
"gcd",
"getGCD(a, b)",
"getGCD",
"a",
"b",
"lcm.add(getLCM(a, b))",
"lcm.add",
"lcm",
"getLCM(a, b)",
"getLCM",
"a",
"b",
"int sizeAnswerList = gcd.size();",
"sizeAnswerList",
"gcd.size()",
"gcd.size",
"gcd",
"for(int i = 0; i < sizeAnswerList; i++){\n\t\t\tSystem.out.println(gcd.get(i) + \" \" + lcm.get(i));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < sizeAnswerList",
"i",
"sizeAnswerList",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(gcd.get(i) + \" \" + lcm.get(i));\n\t\t}",
"{\n\t\t\tSystem.out.println(gcd.get(i) + \" \" + lcm.get(i));\n\t\t}",
"System.out.println(gcd.get(i) + \" \" + lcm.get(i))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd.get(i) + \" \" + lcm.get(i)",
"gcd.get(i) + \" \" + lcm.get(i)",
"gcd.get(i)",
"gcd.get",
"gcd",
"i",
"\" \"",
"lcm.get(i)",
"lcm.get",
"lcm",
"i",
"String[] args",
"args",
"private static long getGCD(long a, long b){\n\t\tlong numBigger;\n\t\tlong numSmaller;\n\t\tif(a > b){\n\t\t\tnumBigger = a;\n\t\t\tnumSmaller = b;\n\t\t}\n\t\telse{\n\t\t\tnumBigger = b;\n\t\t\tnumSmaller = a;\n\t\t}\n\t\t\n\t\tlong gcd;\n\t\twhile(true){\n\t\t\tif(numBigger == numSmaller){\n\t\t\t\tgcd = numBigger;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong tmp = numBigger;\n\t\t\tnumBigger = numSmaller;\n\t\t\tnumSmaller = tmp - numSmaller;\n\t\t\tif(numBigger < numSmaller){\n\t\t\t\ttmp = numBigger;\n\t\t\t\tnumBigger = numSmaller;\n\t\t\t\tnumSmaller = tmp;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn gcd;\n\t}",
"getGCD",
"{\n\t\tlong numBigger;\n\t\tlong numSmaller;\n\t\tif(a > b){\n\t\t\tnumBigger = a;\n\t\t\tnumSmaller = b;\n\t\t}\n\t\telse{\n\t\t\tnumBigger = b;\n\t\t\tnumSmaller = a;\n\t\t}\n\t\t\n\t\tlong gcd;\n\t\twhile(true){\n\t\t\tif(numBigger == numSmaller){\n\t\t\t\tgcd = numBigger;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong tmp = numBigger;\n\t\t\tnumBigger = numSmaller;\n\t\t\tnumSmaller = tmp - numSmaller;\n\t\t\tif(numBigger < numSmaller){\n\t\t\t\ttmp = numBigger;\n\t\t\t\tnumBigger = numSmaller;\n\t\t\t\tnumSmaller = tmp;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn gcd;\n\t}",
"long numBigger;",
"numBigger",
"long numSmaller;",
"numSmaller",
"if(a > b){\n\t\t\tnumBigger = a;\n\t\t\tnumSmaller = b;\n\t\t}\n\t\telse{\n\t\t\tnumBigger = b;\n\t\t\tnumSmaller = a;\n\t\t}",
"a > b",
"a",
"b",
"{\n\t\t\tnumBigger = a;\n\t\t\tnumSmaller = b;\n\t\t}",
"numBigger = a",
"numBigger",
"a",
"numSmaller = b",
"numSmaller",
"b",
"{\n\t\t\tnumBigger = b;\n\t\t\tnumSmaller = a;\n\t\t}",
"numBigger = b",
"numBigger",
"b",
"numSmaller = a",
"numSmaller",
"a",
"long gcd;",
"gcd",
"while(true){\n\t\t\tif(numBigger == numSmaller){\n\t\t\t\tgcd = numBigger;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong tmp = numBigger;\n\t\t\tnumBigger = numSmaller;\n\t\t\tnumSmaller = tmp - numSmaller;\n\t\t\tif(numBigger < numSmaller){\n\t\t\t\ttmp = numBigger;\n\t\t\t\tnumBigger = numSmaller;\n\t\t\t\tnumSmaller = tmp;\n\t\t\t}\n\t\t}",
"true",
"{\n\t\t\tif(numBigger == numSmaller){\n\t\t\t\tgcd = numBigger;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong tmp = numBigger;\n\t\t\tnumBigger = numSmaller;\n\t\t\tnumSmaller = tmp - numSmaller;\n\t\t\tif(numBigger < numSmaller){\n\t\t\t\ttmp = numBigger;\n\t\t\t\tnumBigger = numSmaller;\n\t\t\t\tnumSmaller = tmp;\n\t\t\t}\n\t\t}",
"if(numBigger == numSmaller){\n\t\t\t\tgcd = numBigger;\n\t\t\t\tbreak;\n\t\t\t}",
"numBigger == numSmaller",
"numBigger",
"numSmaller",
"{\n\t\t\t\tgcd = numBigger;\n\t\t\t\tbreak;\n\t\t\t}",
"gcd = numBigger",
"gcd",
"numBigger",
"break;",
"long tmp = numBigger;",
"tmp",
"numBigger",
"numBigger = numSmaller",
"numBigger",
"numSmaller",
"numSmaller = tmp - numSmaller",
"numSmaller",
"tmp - numSmaller",
"tmp",
"numSmaller",
"if(numBigger < numSmaller){\n\t\t\t\ttmp = numBigger;\n\t\t\t\tnumBigger = numSmaller;\n\t\t\t\tnumSmaller = tmp;\n\t\t\t}",
"numBigger < numSmaller",
"numBigger",
"numSmaller",
"{\n\t\t\t\ttmp = numBigger;\n\t\t\t\tnumBigger = numSmaller;\n\t\t\t\tnumSmaller = tmp;\n\t\t\t}",
"tmp = numBigger",
"tmp",
"numBigger",
"numBigger = numSmaller",
"numBigger",
"numSmaller",
"numSmaller = tmp",
"numSmaller",
"tmp",
"return gcd;",
"gcd",
"long a",
"a",
"long b",
"b",
"private static long getLCM(long a, long b){\n\t\tlong tmp = b / getGCD(a, b);\n\t\treturn a * tmp;\n\t}",
"getLCM",
"{\n\t\tlong tmp = b / getGCD(a, b);\n\t\treturn a * tmp;\n\t}",
"long tmp = b / getGCD(a, b);",
"tmp",
"b / getGCD(a, b)",
"b",
"getGCD(a, b)",
"getGCD",
"a",
"b",
"return a * tmp;",
"a * tmp",
"a",
"tmp",
"long a",
"a",
"long b",
"b",
"public class Main {\n\t\n\tprivate static ArrayList<Long> gcd = new ArrayList<Long>();\n\tprivate static ArrayList<Long> lcm = new ArrayList<Long>();\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\ttry{\n\t\t\twhile(sc.hasNextLong()){\n\t\t\t\tlong a = sc.nextLong();\n\t\t\t\tlong b = sc.nextLong();\n\t\t\t\tgcd.add(getGCD(a, b));\n\t\t\t\tlcm.add(getLCM(a, b));\n\t\t\t}\n\t\t}catch(NoSuchElementException e){\n\t\t\t//ツ禿シツ療債づ個終ツづュツづィツつェツ禿シツ療債つウツづェツつスツづァツ篠淞づ個コツーツドツづ鳴渉按猟敖づーツ進ツづ淞づゥ\n\t\t}\n\t\t\n\t\t//ツ催妥・ツ古カツ姪アツ青板δ環スツトツづ催渉ャツ古カツ倍ツ青板δ環スツトツづーツ出ツ療債つキツづゥ\n\t\tint sizeAnswerList = gcd.size();\n\t\tfor(int i = 0; i < sizeAnswerList; i++){\n\t\t\tSystem.out.println(gcd.get(i) + \" \" + lcm.get(i));\n\t\t}\n\t}\n\t\n\tprivate static long getGCD(long a, long b){\n\t\tlong numBigger;\n\t\tlong numSmaller;\n\t\tif(a > b){\n\t\t\tnumBigger = a;\n\t\t\tnumSmaller = b;\n\t\t}\n\t\telse{\n\t\t\tnumBigger = b;\n\t\t\tnumSmaller = a;\n\t\t}\n\t\t\n\t\tlong gcd;\n\t\twhile(true){\n\t\t\tif(numBigger == numSmaller){\n\t\t\t\tgcd = numBigger;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong tmp = numBigger;\n\t\t\tnumBigger = numSmaller;\n\t\t\tnumSmaller = tmp - numSmaller;\n\t\t\tif(numBigger < numSmaller){\n\t\t\t\ttmp = numBigger;\n\t\t\t\tnumBigger = numSmaller;\n\t\t\t\tnumSmaller = tmp;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn gcd;\n\t}\n\t\n\tprivate static long getLCM(long a, long b){\n\t\tlong tmp = b / getGCD(a, b);\n\t\treturn a * tmp;\n\t}\n}",
"public class Main {\n\t\n\tprivate static ArrayList<Long> gcd = new ArrayList<Long>();\n\tprivate static ArrayList<Long> lcm = new ArrayList<Long>();\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\ttry{\n\t\t\twhile(sc.hasNextLong()){\n\t\t\t\tlong a = sc.nextLong();\n\t\t\t\tlong b = sc.nextLong();\n\t\t\t\tgcd.add(getGCD(a, b));\n\t\t\t\tlcm.add(getLCM(a, b));\n\t\t\t}\n\t\t}catch(NoSuchElementException e){\n\t\t\t//ツ禿シツ療債づ個終ツづュツづィツつェツ禿シツ療債つウツづェツつスツづァツ篠淞づ個コツーツドツづ鳴渉按猟敖づーツ進ツづ淞づゥ\n\t\t}\n\t\t\n\t\t//ツ催妥・ツ古カツ姪アツ青板δ環スツトツづ催渉ャツ古カツ倍ツ青板δ環スツトツづーツ出ツ療債つキツづゥ\n\t\tint sizeAnswerList = gcd.size();\n\t\tfor(int i = 0; i < sizeAnswerList; i++){\n\t\t\tSystem.out.println(gcd.get(i) + \" \" + lcm.get(i));\n\t\t}\n\t}\n\t\n\tprivate static long getGCD(long a, long b){\n\t\tlong numBigger;\n\t\tlong numSmaller;\n\t\tif(a > b){\n\t\t\tnumBigger = a;\n\t\t\tnumSmaller = b;\n\t\t}\n\t\telse{\n\t\t\tnumBigger = b;\n\t\t\tnumSmaller = a;\n\t\t}\n\t\t\n\t\tlong gcd;\n\t\twhile(true){\n\t\t\tif(numBigger == numSmaller){\n\t\t\t\tgcd = numBigger;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong tmp = numBigger;\n\t\t\tnumBigger = numSmaller;\n\t\t\tnumSmaller = tmp - numSmaller;\n\t\t\tif(numBigger < numSmaller){\n\t\t\t\ttmp = numBigger;\n\t\t\t\tnumBigger = numSmaller;\n\t\t\t\tnumSmaller = tmp;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn gcd;\n\t}\n\t\n\tprivate static long getLCM(long a, long b){\n\t\tlong tmp = b / getGCD(a, b);\n\t\treturn a * tmp;\n\t}\n}",
"Main"
] |
import java.util.ArrayList;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
private static ArrayList<Long> gcd = new ArrayList<Long>();
private static ArrayList<Long> lcm = new ArrayList<Long>();
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
try{
while(sc.hasNextLong()){
long a = sc.nextLong();
long b = sc.nextLong();
gcd.add(getGCD(a, b));
lcm.add(getLCM(a, b));
}
}catch(NoSuchElementException e){
//ツ禿シツ療債づ個終ツづュツづィツつェツ禿シツ療債つウツづェツつスツづァツ篠淞づ個コツーツドツづ鳴渉按猟敖づーツ進ツづ淞づゥ
}
//ツ催妥・ツ古カツ姪アツ青板δ環スツトツづ催渉ャツ古カツ倍ツ青板δ環スツトツづーツ出ツ療債つキツづゥ
int sizeAnswerList = gcd.size();
for(int i = 0; i < sizeAnswerList; i++){
System.out.println(gcd.get(i) + " " + lcm.get(i));
}
}
private static long getGCD(long a, long b){
long numBigger;
long numSmaller;
if(a > b){
numBigger = a;
numSmaller = b;
}
else{
numBigger = b;
numSmaller = a;
}
long gcd;
while(true){
if(numBigger == numSmaller){
gcd = numBigger;
break;
}
long tmp = numBigger;
numBigger = numSmaller;
numSmaller = tmp - numSmaller;
if(numBigger < numSmaller){
tmp = numBigger;
numBigger = numSmaller;
numSmaller = tmp;
}
}
return gcd;
}
private static long getLCM(long a, long b){
long tmp = b / getGCD(a, b);
return a * tmp;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
41,
13,
4,
18,
13,
18,
4,
18,
13,
17,
17,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
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,
2,
2,
13,
13,
4,
13,
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
],
[
105,
11
],
[
105,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
21,
27
],
[
20,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
34,
39
],
[
28,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
45,
50
],
[
28,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
57,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
58,
61
],
[
57,
62
],
[
57,
63
],
[
63,
64
],
[
63,
65
],
[
63,
66
],
[
12,
67
],
[
67,
68
],
[
105,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
73,
77
],
[
73,
78
],
[
78,
79
],
[
78,
80
],
[
78,
81
],
[
81,
82
],
[
81,
83
],
[
69,
84
],
[
84,
85
],
[
69,
86
],
[
86,
87
],
[
105,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
96,
98
],
[
96,
99
],
[
88,
100
],
[
100,
101
],
[
88,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
] | [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String readStr;\n while ((readStr = reader.readLine()) != null) {\n long l = Integer.parseInt(readStr.split(\" \")[0]);\n long r = Integer.parseInt(readStr.split(\" \")[1]);\n \n System.out.println(gcd(l, r) + \" \" + lcm(l, r));\n }\n\n }\n\n public static long gcd(long m, long n) {\n return n == 0 ? m : gcd(n,m%n);\n }\n\n public static long lcm(long m, long n) {\n return m*n/gcd(m, 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",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String readStr;\n while ((readStr = reader.readLine()) != null) {\n long l = Integer.parseInt(readStr.split(\" \")[0]);\n long r = Integer.parseInt(readStr.split(\" \")[1]);\n \n System.out.println(gcd(l, r) + \" \" + lcm(l, r));\n }\n\n }\n\n public static long gcd(long m, long n) {\n return n == 0 ? m : gcd(n,m%n);\n }\n\n public static long lcm(long m, long n) {\n return m*n/gcd(m, n);\n }\n \n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String readStr;\n while ((readStr = reader.readLine()) != null) {\n long l = Integer.parseInt(readStr.split(\" \")[0]);\n long r = Integer.parseInt(readStr.split(\" \")[1]);\n \n System.out.println(gcd(l, r) + \" \" + lcm(l, r));\n }\n\n }",
"main",
"{\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String readStr;\n while ((readStr = reader.readLine()) != null) {\n long l = Integer.parseInt(readStr.split(\" \")[0]);\n long r = Integer.parseInt(readStr.split(\" \")[1]);\n \n System.out.println(gcd(l, r) + \" \" + lcm(l, r));\n }\n\n }",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String readStr;",
"readStr",
"while ((readStr = reader.readLine()) != null) {\n long l = Integer.parseInt(readStr.split(\" \")[0]);\n long r = Integer.parseInt(readStr.split(\" \")[1]);\n \n System.out.println(gcd(l, r) + \" \" + lcm(l, r));\n }",
"(readStr = reader.readLine()) != null",
"(readStr = reader.readLine())",
"readStr",
"reader.readLine()",
"reader.readLine",
"reader",
"null",
"{\n long l = Integer.parseInt(readStr.split(\" \")[0]);\n long r = Integer.parseInt(readStr.split(\" \")[1]);\n \n System.out.println(gcd(l, r) + \" \" + lcm(l, r));\n }",
"long l = Integer.parseInt(readStr.split(\" \")[0]);",
"l",
"Integer.parseInt(readStr.split(\" \")[0])",
"Integer.parseInt",
"Integer",
"readStr.split(\" \")[0]",
"readStr.split(\" \")",
"readStr.split",
"readStr",
"\" \"",
"0",
"long r = Integer.parseInt(readStr.split(\" \")[1]);",
"r",
"Integer.parseInt(readStr.split(\" \")[1])",
"Integer.parseInt",
"Integer",
"readStr.split(\" \")[1]",
"readStr.split(\" \")",
"readStr.split",
"readStr",
"\" \"",
"1",
"System.out.println(gcd(l, r) + \" \" + lcm(l, r))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(l, r) + \" \" + lcm(l, r)",
"gcd(l, r) + \" \" + lcm(l, r)",
"gcd(l, r)",
"gcd",
"l",
"r",
"\" \"",
"lcm(l, r)",
"lcm",
"l",
"r",
"String[] args",
"args",
"public static long gcd(long m, long n) {\n return n == 0 ? m : gcd(n,m%n);\n }",
"gcd",
"{\n return n == 0 ? m : gcd(n,m%n);\n }",
"return n == 0 ? m : gcd(n,m%n);",
"n == 0 ? m : gcd(n,m%n)",
"n == 0",
"n",
"0",
"m",
"gcd(n,m%n)",
"gcd",
"n",
"m%n",
"m",
"n",
"long m",
"m",
"long n",
"n",
"public static long lcm(long m, long n) {\n return m*n/gcd(m, n);\n }",
"lcm",
"{\n return m*n/gcd(m, n);\n }",
"return m*n/gcd(m, n);",
"m*n/gcd(m, n)",
"m*n",
"m",
"n",
"gcd(m, n)",
"gcd",
"m",
"n",
"long m",
"m",
"long n",
"n",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String readStr;\n while ((readStr = reader.readLine()) != null) {\n long l = Integer.parseInt(readStr.split(\" \")[0]);\n long r = Integer.parseInt(readStr.split(\" \")[1]);\n \n System.out.println(gcd(l, r) + \" \" + lcm(l, r));\n }\n\n }\n\n public static long gcd(long m, long n) {\n return n == 0 ? m : gcd(n,m%n);\n }\n\n public static long lcm(long m, long n) {\n return m*n/gcd(m, n);\n }\n \n}",
"public class Main {\n\n public static void main(String[] args) throws IOException {\n BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\n String readStr;\n while ((readStr = reader.readLine()) != null) {\n long l = Integer.parseInt(readStr.split(\" \")[0]);\n long r = Integer.parseInt(readStr.split(\" \")[1]);\n \n System.out.println(gcd(l, r) + \" \" + lcm(l, r));\n }\n\n }\n\n public static long gcd(long m, long n) {\n return n == 0 ? m : gcd(n,m%n);\n }\n\n public static long lcm(long m, long n) {\n return m*n/gcd(m, n);\n }\n \n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String readStr;
while ((readStr = reader.readLine()) != null) {
long l = Integer.parseInt(readStr.split(" ")[0]);
long r = Integer.parseInt(readStr.split(" ")[1]);
System.out.println(gcd(l, r) + " " + lcm(l, r));
}
}
public static long gcd(long m, long n) {
return n == 0 ? m : gcd(n,m%n);
}
public static long lcm(long m, long n) {
return m*n/gcd(m, n);
}
} |
[
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,
41,
13,
41,
13,
20,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
17,
4,
18,
13,
20,
4,
18,
13,
20,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
1,
40,
13,
30,
30,
0,
13,
4,
18,
4,
18,
13,
13,
4,
18,
13,
13,
4,
18,
18,
13,
13,
2,
13,
17,
4,
18,
18,
13,
13,
4,
18,
4,
18,
4,
18,
13,
13,
4,
18,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
0,
13
],
[
13,
14
],
[
13,
15
],
[
0,
16
],
[
16,
17
],
[
16,
18
],
[
0,
19
],
[
118,
20
],
[
118,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
23,
31
],
[
31,
32
],
[
31,
33
],
[
23,
34
],
[
34,
35
],
[
34,
36
],
[
23,
37
],
[
37,
38
],
[
23,
39
],
[
39,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
43,
44
],
[
44,
45
],
[
40,
46
],
[
39,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
50,
53
],
[
47,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
47,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
23,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
62,
72
],
[
72,
73
],
[
73,
74
],
[
62,
75
],
[
76,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
82,
83
],
[
81,
84
],
[
79,
85
],
[
85,
86
],
[
86,
87
],
[
85,
88
],
[
76,
89
],
[
89,
90
],
[
90,
91
],
[
91,
92
],
[
91,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
76,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
97,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
106,
107
],
[
107,
108
],
[
106,
109
],
[
104,
110
],
[
110,
111
],
[
111,
112
],
[
110,
113
],
[
102,
114
],
[
21,
115
],
[
115,
116
],
[
0,
117
],
[
117,
118
],
[
117,
119
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.math.BigInteger;\nimport java.util.ArrayList;\nimport java.util.List;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tString[] splitedStr;\n\t\tList<BigInteger> a = new ArrayList<BigInteger>();\n\t\tList<BigInteger> b = new ArrayList<BigInteger>();\n\t\tBigInteger gcd;\n\n\t\twhile((str = br.readLine()) != null) {\n\t\t\tsplitedStr = str.split(\" \");\n\t\t\ta.add(new BigInteger(splitedStr[0]));\n\t\t\tb.add(new BigInteger(splitedStr[1]));\n\t\t}\n\n\t\tfor(int i = 0; i < a.size(); i++) {\n\t\t\tgcd = a.get(i).gcd(b.get(i));\n\t\t\tSystem.out.print(gcd + \" \");\n\t\t\tSystem.out.println(a.get(i).multiply(b.get(i)).divide(gcd));\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"import java.util.List;",
"List",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tString[] splitedStr;\n\t\tList<BigInteger> a = new ArrayList<BigInteger>();\n\t\tList<BigInteger> b = new ArrayList<BigInteger>();\n\t\tBigInteger gcd;\n\n\t\twhile((str = br.readLine()) != null) {\n\t\t\tsplitedStr = str.split(\" \");\n\t\t\ta.add(new BigInteger(splitedStr[0]));\n\t\t\tb.add(new BigInteger(splitedStr[1]));\n\t\t}\n\n\t\tfor(int i = 0; i < a.size(); i++) {\n\t\t\tgcd = a.get(i).gcd(b.get(i));\n\t\t\tSystem.out.print(gcd + \" \");\n\t\t\tSystem.out.println(a.get(i).multiply(b.get(i)).divide(gcd));\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tString[] splitedStr;\n\t\tList<BigInteger> a = new ArrayList<BigInteger>();\n\t\tList<BigInteger> b = new ArrayList<BigInteger>();\n\t\tBigInteger gcd;\n\n\t\twhile((str = br.readLine()) != null) {\n\t\t\tsplitedStr = str.split(\" \");\n\t\t\ta.add(new BigInteger(splitedStr[0]));\n\t\t\tb.add(new BigInteger(splitedStr[1]));\n\t\t}\n\n\t\tfor(int i = 0; i < a.size(); i++) {\n\t\t\tgcd = a.get(i).gcd(b.get(i));\n\t\t\tSystem.out.print(gcd + \" \");\n\t\t\tSystem.out.println(a.get(i).multiply(b.get(i)).divide(gcd));\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tString[] splitedStr;\n\t\tList<BigInteger> a = new ArrayList<BigInteger>();\n\t\tList<BigInteger> b = new ArrayList<BigInteger>();\n\t\tBigInteger gcd;\n\n\t\twhile((str = br.readLine()) != null) {\n\t\t\tsplitedStr = str.split(\" \");\n\t\t\ta.add(new BigInteger(splitedStr[0]));\n\t\t\tb.add(new BigInteger(splitedStr[1]));\n\t\t}\n\n\t\tfor(int i = 0; i < a.size(); i++) {\n\t\t\tgcd = a.get(i).gcd(b.get(i));\n\t\t\tSystem.out.print(gcd + \" \");\n\t\t\tSystem.out.println(a.get(i).multiply(b.get(i)).divide(gcd));\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"String[] splitedStr;",
"splitedStr",
"List<BigInteger> a = new ArrayList<BigInteger>();",
"a",
"new ArrayList<BigInteger>()",
"List<BigInteger> b = new ArrayList<BigInteger>();",
"b",
"new ArrayList<BigInteger>()",
"BigInteger gcd;",
"gcd",
"while((str = br.readLine()) != null) {\n\t\t\tsplitedStr = str.split(\" \");\n\t\t\ta.add(new BigInteger(splitedStr[0]));\n\t\t\tb.add(new BigInteger(splitedStr[1]));\n\t\t}",
"(str = br.readLine()) != null",
"(str = br.readLine())",
"str",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tsplitedStr = str.split(\" \");\n\t\t\ta.add(new BigInteger(splitedStr[0]));\n\t\t\tb.add(new BigInteger(splitedStr[1]));\n\t\t}",
"splitedStr = str.split(\" \")",
"splitedStr",
"str.split(\" \")",
"str.split",
"str",
"\" \"",
"a.add(new BigInteger(splitedStr[0]))",
"a.add",
"a",
"new BigInteger(splitedStr[0])",
"b.add(new BigInteger(splitedStr[1]))",
"b.add",
"b",
"new BigInteger(splitedStr[1])",
"for(int i = 0; i < a.size(); i++) {\n\t\t\tgcd = a.get(i).gcd(b.get(i));\n\t\t\tSystem.out.print(gcd + \" \");\n\t\t\tSystem.out.println(a.get(i).multiply(b.get(i)).divide(gcd));\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < a.size()",
"i",
"a.size()",
"a.size",
"a",
"i++",
"i++",
"i",
"{\n\t\t\tgcd = a.get(i).gcd(b.get(i));\n\t\t\tSystem.out.print(gcd + \" \");\n\t\t\tSystem.out.println(a.get(i).multiply(b.get(i)).divide(gcd));\n\t\t}",
"{\n\t\t\tgcd = a.get(i).gcd(b.get(i));\n\t\t\tSystem.out.print(gcd + \" \");\n\t\t\tSystem.out.println(a.get(i).multiply(b.get(i)).divide(gcd));\n\t\t}",
"gcd = a.get(i).gcd(b.get(i))",
"gcd",
"a.get(i).gcd(b.get(i))",
"a.get(i).gcd",
"a.get(i)",
"a.get",
"a",
"i",
"b.get(i)",
"b.get",
"b",
"i",
"System.out.print(gcd + \" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"gcd + \" \"",
"gcd",
"\" \"",
"System.out.println(a.get(i).multiply(b.get(i)).divide(gcd))",
"System.out.println",
"System.out",
"System",
"System.out",
"a.get(i).multiply(b.get(i)).divide(gcd)",
"a.get(i).multiply(b.get(i)).divide",
"a.get(i).multiply(b.get(i))",
"a.get(i).multiply",
"a.get(i)",
"a.get",
"a",
"i",
"b.get(i)",
"b.get",
"b",
"i",
"gcd",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tString[] splitedStr;\n\t\tList<BigInteger> a = new ArrayList<BigInteger>();\n\t\tList<BigInteger> b = new ArrayList<BigInteger>();\n\t\tBigInteger gcd;\n\n\t\twhile((str = br.readLine()) != null) {\n\t\t\tsplitedStr = str.split(\" \");\n\t\t\ta.add(new BigInteger(splitedStr[0]));\n\t\t\tb.add(new BigInteger(splitedStr[1]));\n\t\t}\n\n\t\tfor(int i = 0; i < a.size(); i++) {\n\t\t\tgcd = a.get(i).gcd(b.get(i));\n\t\t\tSystem.out.print(gcd + \" \");\n\t\t\tSystem.out.println(a.get(i).multiply(b.get(i)).divide(gcd));\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tString[] splitedStr;\n\t\tList<BigInteger> a = new ArrayList<BigInteger>();\n\t\tList<BigInteger> b = new ArrayList<BigInteger>();\n\t\tBigInteger gcd;\n\n\t\twhile((str = br.readLine()) != null) {\n\t\t\tsplitedStr = str.split(\" \");\n\t\t\ta.add(new BigInteger(splitedStr[0]));\n\t\t\tb.add(new BigInteger(splitedStr[1]));\n\t\t}\n\n\t\tfor(int i = 0; i < a.size(); i++) {\n\t\t\tgcd = a.get(i).gcd(b.get(i));\n\t\t\tSystem.out.print(gcd + \" \");\n\t\t\tSystem.out.println(a.get(i).multiply(b.get(i)).divide(gcd));\n\t\t}\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.List;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String str;
String[] splitedStr;
List<BigInteger> a = new ArrayList<BigInteger>();
List<BigInteger> b = new ArrayList<BigInteger>();
BigInteger gcd;
while((str = br.readLine()) != null) {
splitedStr = str.split(" ");
a.add(new BigInteger(splitedStr[0]));
b.add(new BigInteger(splitedStr[1]));
}
for(int i = 0; i < a.size(); i++) {
gcd = a.get(i).gcd(b.get(i));
System.out.print(gcd + " ");
System.out.println(a.get(i).multiply(b.get(i)).divide(gcd));
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
20,
17,
41,
13,
20,
17,
41,
13,
42,
4,
18,
13,
30,
11,
1,
0,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
0,
18,
13,
13,
18,
13,
13,
42,
2,
18,
13,
17,
17,
30,
14,
2,
18,
13,
17,
18,
13,
17,
30,
0,
13,
18,
13,
17,
0,
18,
13,
17,
18,
13,
17,
0,
18,
13,
17,
13,
0,
13,
2,
18,
13,
17,
18,
13,
17,
0,
18,
13,
17,
18,
13,
17,
0,
18,
13,
17,
13,
0,
13,
18,
13,
17,
0,
13,
2,
2,
18,
13,
17,
18,
13,
17,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
4,
18,
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
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
18,
20
],
[
8,
22
],
[
22,
23
],
[
22,
24
],
[
8,
26
],
[
26,
27
],
[
8,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
28,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
33,
38
],
[
38,
39
],
[
38,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
33,
44
],
[
45,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
45,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
53,
57
],
[
57,
58
],
[
57,
59
],
[
32,
60
],
[
60,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
60,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
72,
74
],
[
67,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
75,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
81,
85
],
[
85,
86
],
[
85,
87
],
[
75,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
88,
92
],
[
66,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
99,
101
],
[
66,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
106,
107
],
[
106,
108
],
[
66,
109
],
[
109,
110
],
[
110,
111
],
[
110,
112
],
[
109,
113
],
[
32,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
116,
118
],
[
32,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
123,
124
],
[
123,
125
],
[
122,
126
],
[
126,
127
],
[
126,
128
],
[
121,
129
],
[
32,
130
],
[
130,
131
],
[
131,
132
],
[
132,
133
],
[
132,
134
],
[
130,
135
],
[
136,
136
],
[
136,
137
],
[
136,
138
],
[
136,
139
],
[
8,
140
],
[
140,
141
],
[
141,
142
],
[
6,
143
],
[
143,
144
]
] | [
"import java.util.Scanner;\n\nclass Main{\n\tpublic static void main(String args[]){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint i;\n\t\tint GCD,LCM;\n\t\tdouble[] num = new double[2];\n\t\tdouble[] tmpNum = new double[2];\n\t\tdouble tmp;\n\t\t\n\t\twhile(scan.hasNextInt()){\n\t\t\tfor(i=0;i<2;i++){\n\t\t\t\tnum[i] = scan.nextInt();\n\t\t\t\ttmpNum[i] = num[i];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\twhile(num[1] != 0){\n\t\t\t\tif(num[0] < num[1]){\n\t\t\t\t\ttmp = num[0];\n\t\t\t\t\tnum[0] = num[1];\n\t\t\t\t\tnum[1] = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp = num[0] - num[1];\n\t\t\t\tnum[0] = num[1];\n\t\t\t\tnum[1] = tmp;\n\t\t\t}\n\t\t\tGCD = (int)num[0];\n\t\t\tLCM = (int)((tmpNum[0]*tmpNum[1])/GCD);\n\t\t\t\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\tpublic static void main(String args[]){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint i;\n\t\tint GCD,LCM;\n\t\tdouble[] num = new double[2];\n\t\tdouble[] tmpNum = new double[2];\n\t\tdouble tmp;\n\t\t\n\t\twhile(scan.hasNextInt()){\n\t\t\tfor(i=0;i<2;i++){\n\t\t\t\tnum[i] = scan.nextInt();\n\t\t\t\ttmpNum[i] = num[i];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\twhile(num[1] != 0){\n\t\t\t\tif(num[0] < num[1]){\n\t\t\t\t\ttmp = num[0];\n\t\t\t\t\tnum[0] = num[1];\n\t\t\t\t\tnum[1] = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp = num[0] - num[1];\n\t\t\t\tnum[0] = num[1];\n\t\t\t\tnum[1] = tmp;\n\t\t\t}\n\t\t\tGCD = (int)num[0];\n\t\t\tLCM = (int)((tmpNum[0]*tmpNum[1])/GCD);\n\t\t\t\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}\n}",
"Main",
"public static void main(String args[]){\n\t\tScanner scan = new Scanner(System.in);\n\t\tint i;\n\t\tint GCD,LCM;\n\t\tdouble[] num = new double[2];\n\t\tdouble[] tmpNum = new double[2];\n\t\tdouble tmp;\n\t\t\n\t\twhile(scan.hasNextInt()){\n\t\t\tfor(i=0;i<2;i++){\n\t\t\t\tnum[i] = scan.nextInt();\n\t\t\t\ttmpNum[i] = num[i];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\twhile(num[1] != 0){\n\t\t\t\tif(num[0] < num[1]){\n\t\t\t\t\ttmp = num[0];\n\t\t\t\t\tnum[0] = num[1];\n\t\t\t\t\tnum[1] = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp = num[0] - num[1];\n\t\t\t\tnum[0] = num[1];\n\t\t\t\tnum[1] = tmp;\n\t\t\t}\n\t\t\tGCD = (int)num[0];\n\t\t\tLCM = (int)((tmpNum[0]*tmpNum[1])/GCD);\n\t\t\t\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint i;\n\t\tint GCD,LCM;\n\t\tdouble[] num = new double[2];\n\t\tdouble[] tmpNum = new double[2];\n\t\tdouble tmp;\n\t\t\n\t\twhile(scan.hasNextInt()){\n\t\t\tfor(i=0;i<2;i++){\n\t\t\t\tnum[i] = scan.nextInt();\n\t\t\t\ttmpNum[i] = num[i];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\twhile(num[1] != 0){\n\t\t\t\tif(num[0] < num[1]){\n\t\t\t\t\ttmp = num[0];\n\t\t\t\t\tnum[0] = num[1];\n\t\t\t\t\tnum[1] = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp = num[0] - num[1];\n\t\t\t\tnum[0] = num[1];\n\t\t\t\tnum[1] = tmp;\n\t\t\t}\n\t\t\tGCD = (int)num[0];\n\t\t\tLCM = (int)((tmpNum[0]*tmpNum[1])/GCD);\n\t\t\t\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}\n\t\t\n\t\tscan.close();\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int i;",
"i",
"int GCD",
"GCD",
"LCM;",
"LCM",
"double[] num = new double[2];",
"num",
"new double[2]",
"2",
"double[] tmpNum = new double[2];",
"tmpNum",
"new double[2]",
"2",
"double tmp;",
"tmp",
"while(scan.hasNextInt()){\n\t\t\tfor(i=0;i<2;i++){\n\t\t\t\tnum[i] = scan.nextInt();\n\t\t\t\ttmpNum[i] = num[i];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\twhile(num[1] != 0){\n\t\t\t\tif(num[0] < num[1]){\n\t\t\t\t\ttmp = num[0];\n\t\t\t\t\tnum[0] = num[1];\n\t\t\t\t\tnum[1] = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp = num[0] - num[1];\n\t\t\t\tnum[0] = num[1];\n\t\t\t\tnum[1] = tmp;\n\t\t\t}\n\t\t\tGCD = (int)num[0];\n\t\t\tLCM = (int)((tmpNum[0]*tmpNum[1])/GCD);\n\t\t\t\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}",
"scan.hasNextInt()",
"scan.hasNextInt",
"scan",
"{\n\t\t\tfor(i=0;i<2;i++){\n\t\t\t\tnum[i] = scan.nextInt();\n\t\t\t\ttmpNum[i] = num[i];\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\twhile(num[1] != 0){\n\t\t\t\tif(num[0] < num[1]){\n\t\t\t\t\ttmp = num[0];\n\t\t\t\t\tnum[0] = num[1];\n\t\t\t\t\tnum[1] = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp = num[0] - num[1];\n\t\t\t\tnum[0] = num[1];\n\t\t\t\tnum[1] = tmp;\n\t\t\t}\n\t\t\tGCD = (int)num[0];\n\t\t\tLCM = (int)((tmpNum[0]*tmpNum[1])/GCD);\n\t\t\t\n\t\t\tSystem.out.println(GCD + \" \" + LCM);\n\t\t}",
"for(i=0;i<2;i++){\n\t\t\t\tnum[i] = scan.nextInt();\n\t\t\t\ttmpNum[i] = num[i];\n\t\t\t}",
"i=0;",
"i=0",
"i",
"0",
"i<2",
"i",
"2",
"i++",
"i++",
"i",
"{\n\t\t\t\tnum[i] = scan.nextInt();\n\t\t\t\ttmpNum[i] = num[i];\n\t\t\t}",
"{\n\t\t\t\tnum[i] = scan.nextInt();\n\t\t\t\ttmpNum[i] = num[i];\n\t\t\t}",
"num[i] = scan.nextInt()",
"num[i]",
"num",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"tmpNum[i] = num[i]",
"tmpNum[i]",
"tmpNum",
"i",
"num[i]",
"num",
"i",
"while(num[1] != 0){\n\t\t\t\tif(num[0] < num[1]){\n\t\t\t\t\ttmp = num[0];\n\t\t\t\t\tnum[0] = num[1];\n\t\t\t\t\tnum[1] = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp = num[0] - num[1];\n\t\t\t\tnum[0] = num[1];\n\t\t\t\tnum[1] = tmp;\n\t\t\t}",
"num[1] != 0",
"num[1]",
"num",
"1",
"0",
"{\n\t\t\t\tif(num[0] < num[1]){\n\t\t\t\t\ttmp = num[0];\n\t\t\t\t\tnum[0] = num[1];\n\t\t\t\t\tnum[1] = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttmp = num[0] - num[1];\n\t\t\t\tnum[0] = num[1];\n\t\t\t\tnum[1] = tmp;\n\t\t\t}",
"if(num[0] < num[1]){\n\t\t\t\t\ttmp = num[0];\n\t\t\t\t\tnum[0] = num[1];\n\t\t\t\t\tnum[1] = tmp;\n\t\t\t\t}",
"num[0] < num[1]",
"num[0]",
"num",
"0",
"num[1]",
"num",
"1",
"{\n\t\t\t\t\ttmp = num[0];\n\t\t\t\t\tnum[0] = num[1];\n\t\t\t\t\tnum[1] = tmp;\n\t\t\t\t}",
"tmp = num[0]",
"tmp",
"num[0]",
"num",
"0",
"num[0] = num[1]",
"num[0]",
"num",
"0",
"num[1]",
"num",
"1",
"num[1] = tmp",
"num[1]",
"num",
"1",
"tmp",
"tmp = num[0] - num[1]",
"tmp",
"num[0] - num[1]",
"num[0]",
"num",
"0",
"num[1]",
"num",
"1",
"num[0] = num[1]",
"num[0]",
"num",
"0",
"num[1]",
"num",
"1",
"num[1] = tmp",
"num[1]",
"num",
"1",
"tmp",
"GCD = (int)num[0]",
"GCD",
"(int)num[0]",
"num",
"0",
"LCM = (int)((tmpNum[0]*tmpNum[1])/GCD)",
"LCM",
"(int)((tmpNum[0]*tmpNum[1])/GCD)",
"(tmpNum[0]*tmpNum[1])",
"tmpNum[0]",
"tmpNum",
"0",
"tmpNum[1]",
"tmpNum",
"1",
"GCD",
"System.out.println(GCD + \" \" + LCM)",
"System.out.println",
"System.out",
"System",
"System.out",
"GCD + \" \" + LCM",
"GCD + \" \" + LCM",
"GCD",
"\" \"",
"LCM",
"scan.close()",
"scan.close",
"scan",
"String args[]",
"args"
] | import java.util.Scanner;
class Main{
public static void main(String args[]){
Scanner scan = new Scanner(System.in);
int i;
int GCD,LCM;
double[] num = new double[2];
double[] tmpNum = new double[2];
double tmp;
while(scan.hasNextInt()){
for(i=0;i<2;i++){
num[i] = scan.nextInt();
tmpNum[i] = num[i];
}
while(num[1] != 0){
if(num[0] < num[1]){
tmp = num[0];
num[0] = num[1];
num[1] = tmp;
}
tmp = num[0] - num[1];
num[0] = num[1];
num[1] = tmp;
}
GCD = (int)num[0];
LCM = (int)((tmpNum[0]*tmpNum[1])/GCD);
System.out.println(GCD + " " + LCM);
}
scan.close();
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
20,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
18,
13,
17,
4,
18,
13,
4,
18,
13,
17,
4,
18,
13,
17,
0,
18,
13,
17,
4,
18,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
18,
13,
17,
18,
13,
17,
17,
4,
13,
18,
13,
17,
18,
13,
17,
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,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
20,
22
],
[
14,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
25,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
40,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
32,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
48,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
58,
63
],
[
55,
64
],
[
64,
65
],
[
65,
66
],
[
32,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
67,
72
],
[
73,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
79,
80
],
[
79,
81
],
[
73,
82
],
[
73,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
12,
91
],
[
91,
92
],
[
10,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
97,
101
],
[
97,
102
],
[
102,
103
],
[
102,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
93,
108
],
[
108,
109
],
[
93,
110
],
[
110,
111
],
[
10,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
120,
122
],
[
120,
123
],
[
112,
124
],
[
124,
125
],
[
112,
126
],
[
126,
127
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\n\nclass Main{\n\tpublic static void main(String args[]) throws IOException{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tlong num[] = new long[2];\n\t\twhile((str = in.readLine()) != null){\n\t\t\tnum[0] = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n\t\t\tnum[1] = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n\t\t\tSystem.out.println(gcd(num[0], num[1]) + \" \" + lcm(num[0], num[1]));\n\n\t\t}\n\n\t}\n\tstatic long gcd(long a, long b){\n\t\treturn b == 0 ? a : gcd(b, a%b);\n\t}\n\tstatic long lcm(long a, long b){\n\t\treturn b*a/gcd(a,b);\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",
"class Main{\n\tpublic static void main(String args[]) throws IOException{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tlong num[] = new long[2];\n\t\twhile((str = in.readLine()) != null){\n\t\t\tnum[0] = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n\t\t\tnum[1] = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n\t\t\tSystem.out.println(gcd(num[0], num[1]) + \" \" + lcm(num[0], num[1]));\n\n\t\t}\n\n\t}\n\tstatic long gcd(long a, long b){\n\t\treturn b == 0 ? a : gcd(b, a%b);\n\t}\n\tstatic long lcm(long a, long b){\n\t\treturn b*a/gcd(a,b);\n\t}\n\n}",
"Main",
"public static void main(String args[]) throws IOException{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tlong num[] = new long[2];\n\t\twhile((str = in.readLine()) != null){\n\t\t\tnum[0] = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n\t\t\tnum[1] = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n\t\t\tSystem.out.println(gcd(num[0], num[1]) + \" \" + lcm(num[0], num[1]));\n\n\t\t}\n\n\t}",
"main",
"{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t\tString str;\n\t\tlong num[] = new long[2];\n\t\twhile((str = in.readLine()) != null){\n\t\t\tnum[0] = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n\t\t\tnum[1] = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n\t\t\tSystem.out.println(gcd(num[0], num[1]) + \" \" + lcm(num[0], num[1]));\n\n\t\t}\n\n\t}",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"String str;",
"str",
"long num[] = new long[2];",
"num",
"new long[2]",
"2",
"while((str = in.readLine()) != null){\n\t\t\tnum[0] = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n\t\t\tnum[1] = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n\t\t\tSystem.out.println(gcd(num[0], num[1]) + \" \" + lcm(num[0], num[1]));\n\n\t\t}",
"(str = in.readLine()) != null",
"(str = in.readLine())",
"str",
"in.readLine()",
"in.readLine",
"in",
"null",
"{\n\t\t\tnum[0] = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n\t\t\tnum[1] = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n\t\t\tSystem.out.println(gcd(num[0], num[1]) + \" \" + lcm(num[0], num[1]));\n\n\t\t}",
"num[0] = Long.parseLong(str.substring(0, str.indexOf(\" \")))",
"num[0]",
"num",
"0",
"Long.parseLong(str.substring(0, str.indexOf(\" \")))",
"Long.parseLong",
"Long",
"str.substring(0, str.indexOf(\" \"))",
"str.substring",
"str",
"0",
"str.indexOf(\" \")",
"str.indexOf",
"str",
"\" \"",
"num[1] = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()))",
"num[1]",
"num",
"1",
"Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()))",
"Long.parseLong",
"Long",
"str.substring(str.indexOf(\" \")+1, str.length())",
"str.substring",
"str",
"str.indexOf(\" \")+1",
"str.indexOf(\" \")",
"str.indexOf",
"str",
"\" \"",
"1",
"str.length()",
"str.length",
"str",
"System.out.println(gcd(num[0], num[1]) + \" \" + lcm(num[0], num[1]))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(num[0], num[1]) + \" \" + lcm(num[0], num[1])",
"gcd(num[0], num[1]) + \" \" + lcm(num[0], num[1])",
"gcd(num[0], num[1])",
"gcd",
"num[0]",
"num",
"0",
"num[1]",
"num",
"1",
"\" \"",
"lcm(num[0], num[1])",
"lcm",
"num[0]",
"num",
"0",
"num[1]",
"num",
"1",
"String args[]",
"args",
"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",
"static long lcm(long a, long b){\n\t\treturn b*a/gcd(a,b);\n\t}",
"lcm",
"{\n\t\treturn b*a/gcd(a,b);\n\t}",
"return b*a/gcd(a,b);",
"b*a/gcd(a,b)",
"b*a",
"b",
"a",
"gcd(a,b)",
"gcd",
"a",
"b",
"long a",
"a",
"long b",
"b"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main{
public static void main(String args[]) throws IOException{
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String str;
long num[] = new long[2];
while((str = in.readLine()) != null){
num[0] = Long.parseLong(str.substring(0, str.indexOf(" ")));
num[1] = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
System.out.println(gcd(num[0], num[1]) + " " + lcm(num[0], num[1]));
}
}
static long gcd(long a, long b){
return b == 0 ? a : gcd(b, a%b);
}
static long lcm(long a, long b){
return b*a/gcd(a,b);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
13,
41,
13,
13,
41,
13,
13,
42,
2,
13,
17,
30,
0,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
2,
13,
13,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
69,
5
],
[
69,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
16,
30
],
[
30,
31
],
[
30,
32
],
[
16,
33
],
[
33,
34
],
[
33,
35
],
[
16,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
36,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
40,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
46,
48
],
[
40,
49
],
[
49,
50
],
[
49,
51
],
[
16,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
58,
58
],
[
58,
59
],
[
58,
60
],
[
58,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
61,
65
],
[
6,
66
],
[
66,
67
],
[
0,
68
],
[
68,
69
],
[
68,
70
]
] | [
"import java.util.Scanner;\n \npublic class Main\n{\n public static void main(String[] args)\n {\n\tScanner cin = new Scanner(System.in);\n\twhile(cin.hasNext())\n\t{\n\t\tlong a = cin.nextInt();\n\t\tlong b = cin.nextInt();\n\t\t\n\t\tlong m = a;\n\t\tlong n = b;\n\t\tlong p = m;\n\t\twhile(n != 0){p = n; n = m%n; m = p;}\n\t\t\n\t\t\n\t\tSystem.out.println(m+\" \"+a*b/m);\n\t}\n\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main\n{\n public static void main(String[] args)\n {\n\tScanner cin = new Scanner(System.in);\n\twhile(cin.hasNext())\n\t{\n\t\tlong a = cin.nextInt();\n\t\tlong b = cin.nextInt();\n\t\t\n\t\tlong m = a;\n\t\tlong n = b;\n\t\tlong p = m;\n\t\twhile(n != 0){p = n; n = m%n; m = p;}\n\t\t\n\t\t\n\t\tSystem.out.println(m+\" \"+a*b/m);\n\t}\n\n }\n}",
"Main",
"public static void main(String[] args)\n {\n\tScanner cin = new Scanner(System.in);\n\twhile(cin.hasNext())\n\t{\n\t\tlong a = cin.nextInt();\n\t\tlong b = cin.nextInt();\n\t\t\n\t\tlong m = a;\n\t\tlong n = b;\n\t\tlong p = m;\n\t\twhile(n != 0){p = n; n = m%n; m = p;}\n\t\t\n\t\t\n\t\tSystem.out.println(m+\" \"+a*b/m);\n\t}\n\n }",
"main",
"{\n\tScanner cin = new Scanner(System.in);\n\twhile(cin.hasNext())\n\t{\n\t\tlong a = cin.nextInt();\n\t\tlong b = cin.nextInt();\n\t\t\n\t\tlong m = a;\n\t\tlong n = b;\n\t\tlong p = m;\n\t\twhile(n != 0){p = n; n = m%n; m = p;}\n\t\t\n\t\t\n\t\tSystem.out.println(m+\" \"+a*b/m);\n\t}\n\n }",
"Scanner cin = new Scanner(System.in);",
"cin",
"new Scanner(System.in)",
"while(cin.hasNext())\n\t{\n\t\tlong a = cin.nextInt();\n\t\tlong b = cin.nextInt();\n\t\t\n\t\tlong m = a;\n\t\tlong n = b;\n\t\tlong p = m;\n\t\twhile(n != 0){p = n; n = m%n; m = p;}\n\t\t\n\t\t\n\t\tSystem.out.println(m+\" \"+a*b/m);\n\t}",
"cin.hasNext()",
"cin.hasNext",
"cin",
"{\n\t\tlong a = cin.nextInt();\n\t\tlong b = cin.nextInt();\n\t\t\n\t\tlong m = a;\n\t\tlong n = b;\n\t\tlong p = m;\n\t\twhile(n != 0){p = n; n = m%n; m = p;}\n\t\t\n\t\t\n\t\tSystem.out.println(m+\" \"+a*b/m);\n\t}",
"long a = cin.nextInt();",
"a",
"cin.nextInt()",
"cin.nextInt",
"cin",
"long b = cin.nextInt();",
"b",
"cin.nextInt()",
"cin.nextInt",
"cin",
"long m = a;",
"m",
"a",
"long n = b;",
"n",
"b",
"long p = m;",
"p",
"m",
"while(n != 0){p = n; n = m%n; m = p;}",
"n != 0",
"n",
"0",
"{p = n; n = m%n; m = p;}",
"p = n",
"p",
"n",
"n = m%n",
"n",
"m%n",
"m",
"n",
"m = p",
"m",
"p",
"System.out.println(m+\" \"+a*b/m)",
"System.out.println",
"System.out",
"System",
"System.out",
"m+\" \"+a*b/m",
"m+\" \"+a*b/m",
"m",
"\" \"",
"a*b/m",
"a*b",
"a",
"b",
"m",
"String[] args",
"args",
"public class Main\n{\n public static void main(String[] args)\n {\n\tScanner cin = new Scanner(System.in);\n\twhile(cin.hasNext())\n\t{\n\t\tlong a = cin.nextInt();\n\t\tlong b = cin.nextInt();\n\t\t\n\t\tlong m = a;\n\t\tlong n = b;\n\t\tlong p = m;\n\t\twhile(n != 0){p = n; n = m%n; m = p;}\n\t\t\n\t\t\n\t\tSystem.out.println(m+\" \"+a*b/m);\n\t}\n\n }\n}",
"public class Main\n{\n public static void main(String[] args)\n {\n\tScanner cin = new Scanner(System.in);\n\twhile(cin.hasNext())\n\t{\n\t\tlong a = cin.nextInt();\n\t\tlong b = cin.nextInt();\n\t\t\n\t\tlong m = a;\n\t\tlong n = b;\n\t\tlong p = m;\n\t\twhile(n != 0){p = n; n = m%n; m = p;}\n\t\t\n\t\t\n\t\tSystem.out.println(m+\" \"+a*b/m);\n\t}\n\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner cin = new Scanner(System.in);
while(cin.hasNext())
{
long a = cin.nextInt();
long b = cin.nextInt();
long m = a;
long n = b;
long p = m;
while(n != 0){p = n; n = m%n; m = p;}
System.out.println(m+" "+a*b/m);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
17,
41,
13,
41,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
0,
13,
13,
41,
13,
17,
42,
2,
13,
17,
30,
14,
2,
2,
2,
13,
13,
13,
17,
30,
0,
13,
2,
13,
13,
40,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
13,
30,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
41,
13,
39,
4,
18,
13,
18,
13,
17,
4,
18,
13,
18,
13,
17,
41,
13,
4,
13,
18,
13,
17,
18,
13,
17,
41,
13,
4,
13,
18,
13,
17,
18,
13,
17,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
173,
5
],
[
173,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
16,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
20,
24
],
[
24,
25
],
[
24,
26
],
[
16,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
31,
33
],
[
8,
34
],
[
34,
35
],
[
34,
36
],
[
8,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
37,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
43,
49
],
[
42,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
41,
56
],
[
56,
57
],
[
8,
58
],
[
58,
59
],
[
6,
60
],
[
60,
61
],
[
6,
62
],
[
62,
63
],
[
173,
64
],
[
64,
65
],
[
64,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
67,
73
],
[
73,
74
],
[
74,
75
],
[
67,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
84,
90
],
[
90,
91
],
[
90,
92
],
[
84,
93
],
[
93,
94
],
[
93,
95
],
[
76,
96
],
[
96,
97
],
[
64,
98
],
[
98,
99
],
[
64,
100
],
[
100,
101
],
[
173,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
104,
110
],
[
110,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
111,
117
],
[
110,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
121,
122
],
[
122,
123
],
[
121,
124
],
[
118,
125
],
[
125,
126
],
[
125,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
128,
131
],
[
131,
132
],
[
131,
133
],
[
127,
134
],
[
134,
135
],
[
135,
136
],
[
134,
137
],
[
137,
138
],
[
137,
139
],
[
118,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
144,
145
],
[
144,
146
],
[
142,
147
],
[
147,
148
],
[
147,
149
],
[
118,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
152,
154
],
[
154,
155
],
[
154,
156
],
[
152,
157
],
[
157,
158
],
[
157,
159
],
[
118,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
160,
165
],
[
166,
166
],
[
166,
167
],
[
166,
168
],
[
166,
169
],
[
102,
170
],
[
170,
171
],
[
0,
172
],
[
172,
173
],
[
172,
174
]
] | [
"import java.io.*;\n\npublic class Main{\n\t/*\n\tpublic static long findGcd(long f1, long f2){\n\t\tlong gcd = 1;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tfor(long i=1; i<=(long)(Math.sqrt(min)+1); i++){\n\t\t\tif(min % i == 0){\n\t\t\t\tlong tmp = min / i;\n\t\t\t\tif((max % tmp) == 0){\n\t\t\t\t\tgcd = tmp;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn gcd;\n\t}\n\t*/\n\t\n\tpublic static long findlcm(long f1, long f2){\n\t\tlong lcm = 0;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tlong i=1;\n\t\twhile(lcm == 0){\n\t\t\tif((max * i)%min == 0){\n\t\t\t\tlcm = max * i;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn lcm;\n\t}\n\t\n\t\n\t//最大公約数を求めるメソッド\n static long findGcd(long x, long y){\n if(x%y==0){\n return y;\n }else{\n long m = 1;\n while(m!=0){\n m = y%x;\n y = x;\n x = m;\n }\n return y;\n }\n }\n /*\n //最小公倍数を求めるメソッド\n static long findlcm(long x, long y){\n for(long i=1; i<=x; i++){\n if(y*i%x==0){\n return y*i;\n }\n }\n return 0;\n }\n */\n\t\n\tpublic static void main(String[] argv) throws NumberFormatException, IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\t\twhile((line = br.readLine()) != null){\n\t\t\tString[] lineArray = line.split(\" \");\n\t\t\tlong[] factor = {Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])};\n\t\t\tlong gcd = findGcd(factor[0], factor[1]);\n\t\t\tlong lcm = findlcm(factor[0], factor[1]);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"public class Main{\n\t/*\n\tpublic static long findGcd(long f1, long f2){\n\t\tlong gcd = 1;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tfor(long i=1; i<=(long)(Math.sqrt(min)+1); i++){\n\t\t\tif(min % i == 0){\n\t\t\t\tlong tmp = min / i;\n\t\t\t\tif((max % tmp) == 0){\n\t\t\t\t\tgcd = tmp;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn gcd;\n\t}\n\t*/\n\t\n\tpublic static long findlcm(long f1, long f2){\n\t\tlong lcm = 0;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tlong i=1;\n\t\twhile(lcm == 0){\n\t\t\tif((max * i)%min == 0){\n\t\t\t\tlcm = max * i;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn lcm;\n\t}\n\t\n\t\n\t//最大公約数を求めるメソッド\n static long findGcd(long x, long y){\n if(x%y==0){\n return y;\n }else{\n long m = 1;\n while(m!=0){\n m = y%x;\n y = x;\n x = m;\n }\n return y;\n }\n }\n /*\n //最小公倍数を求めるメソッド\n static long findlcm(long x, long y){\n for(long i=1; i<=x; i++){\n if(y*i%x==0){\n return y*i;\n }\n }\n return 0;\n }\n */\n\t\n\tpublic static void main(String[] argv) throws NumberFormatException, IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\t\twhile((line = br.readLine()) != null){\n\t\t\tString[] lineArray = line.split(\" \");\n\t\t\tlong[] factor = {Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])};\n\t\t\tlong gcd = findGcd(factor[0], factor[1]);\n\t\t\tlong lcm = findlcm(factor[0], factor[1]);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n}",
"Main",
"public static long findlcm(long f1, long f2){\n\t\tlong lcm = 0;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tlong i=1;\n\t\twhile(lcm == 0){\n\t\t\tif((max * i)%min == 0){\n\t\t\t\tlcm = max * i;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn lcm;\n\t}",
"findlcm",
"{\n\t\tlong lcm = 0;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tlong i=1;\n\t\twhile(lcm == 0){\n\t\t\tif((max * i)%min == 0){\n\t\t\t\tlcm = max * i;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn lcm;\n\t}",
"long lcm = 0;",
"lcm",
"0",
"long max",
"max",
"min;",
"min",
"if(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}",
"f1 > f2",
"f1",
"f2",
"{max = f1; min = f2;}",
"max = f1",
"max",
"f1",
"min = f2",
"min",
"f2",
"{max = f2; min = f1;}",
"max = f2",
"max",
"f2",
"min = f1",
"min",
"f1",
"long i=1;",
"i",
"1",
"while(lcm == 0){\n\t\t\tif((max * i)%min == 0){\n\t\t\t\tlcm = max * i;\n\t\t\t}\n\t\t\ti++;\n\t\t}",
"lcm == 0",
"lcm",
"0",
"{\n\t\t\tif((max * i)%min == 0){\n\t\t\t\tlcm = max * i;\n\t\t\t}\n\t\t\ti++;\n\t\t}",
"if((max * i)%min == 0){\n\t\t\t\tlcm = max * i;\n\t\t\t}",
"(max * i)%min == 0",
"(max * i)%min",
"(max * i)",
"max",
"i",
"min",
"0",
"{\n\t\t\t\tlcm = max * i;\n\t\t\t}",
"lcm = max * i",
"lcm",
"max * i",
"max",
"i",
"i++",
"i",
"return lcm;",
"lcm",
"long f1",
"f1",
"long f2",
"f2",
"//最大公約数を求めるメソッド\n static long findGcd(long x, long y){\n if(x%y==0){\n return y;\n }else{\n long m = 1;\n while(m!=0){\n m = y%x;\n y = x;\n x = m;\n }\n return y;\n }\n }",
"findGcd",
"{\n if(x%y==0){\n return y;\n }else{\n long m = 1;\n while(m!=0){\n m = y%x;\n y = x;\n x = m;\n }\n return y;\n }\n }",
"if(x%y==0){\n return y;\n }else{\n long m = 1;\n while(m!=0){\n m = y%x;\n y = x;\n x = m;\n }\n return y;\n }",
"x%y==0",
"x%y",
"x",
"y",
"0",
"{\n return y;\n }",
"return y;",
"y",
"{\n long m = 1;\n while(m!=0){\n m = y%x;\n y = x;\n x = m;\n }\n return y;\n }",
"long m = 1;",
"m",
"1",
"while(m!=0){\n m = y%x;\n y = x;\n x = m;\n }",
"m!=0",
"m",
"0",
"{\n m = y%x;\n y = x;\n x = m;\n }",
"m = y%x",
"m",
"y%x",
"y",
"x",
"y = x",
"y",
"x",
"x = m",
"x",
"m",
"return y;",
"y",
"long x",
"x",
"long y",
"y",
"public static void main(String[] argv) throws NumberFormatException, IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\t\twhile((line = br.readLine()) != null){\n\t\t\tString[] lineArray = line.split(\" \");\n\t\t\tlong[] factor = {Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])};\n\t\t\tlong gcd = findGcd(factor[0], factor[1]);\n\t\t\tlong lcm = findlcm(factor[0], factor[1]);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\t\twhile((line = br.readLine()) != null){\n\t\t\tString[] lineArray = line.split(\" \");\n\t\t\tlong[] factor = {Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])};\n\t\t\tlong gcd = findGcd(factor[0], factor[1]);\n\t\t\tlong lcm = findlcm(factor[0], factor[1]);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String line;",
"line",
"while((line = br.readLine()) != null){\n\t\t\tString[] lineArray = line.split(\" \");\n\t\t\tlong[] factor = {Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])};\n\t\t\tlong gcd = findGcd(factor[0], factor[1]);\n\t\t\tlong lcm = findlcm(factor[0], factor[1]);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}",
"(line = br.readLine()) != null",
"(line = br.readLine())",
"line",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tString[] lineArray = line.split(\" \");\n\t\t\tlong[] factor = {Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])};\n\t\t\tlong gcd = findGcd(factor[0], factor[1]);\n\t\t\tlong lcm = findlcm(factor[0], factor[1]);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}",
"String[] lineArray = line.split(\" \");",
"lineArray",
"line.split(\" \")",
"line.split",
"line",
"\" \"",
"long[] factor = {Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])};",
"factor",
"{Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])}",
"Long.parseLong(lineArray[0])",
"Long.parseLong",
"Long",
"lineArray[0]",
"lineArray",
"0",
"Long.parseLong(lineArray[1])",
"Long.parseLong",
"Long",
"lineArray[1]",
"lineArray",
"1",
"long gcd = findGcd(factor[0], factor[1]);",
"gcd",
"findGcd(factor[0], factor[1])",
"findGcd",
"factor[0]",
"factor",
"0",
"factor[1]",
"factor",
"1",
"long lcm = findlcm(factor[0], factor[1]);",
"lcm",
"findlcm(factor[0], factor[1])",
"findlcm",
"factor[0]",
"factor",
"0",
"factor[1]",
"factor",
"1",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"String[] argv",
"argv",
"public class Main{\n\t/*\n\tpublic static long findGcd(long f1, long f2){\n\t\tlong gcd = 1;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tfor(long i=1; i<=(long)(Math.sqrt(min)+1); i++){\n\t\t\tif(min % i == 0){\n\t\t\t\tlong tmp = min / i;\n\t\t\t\tif((max % tmp) == 0){\n\t\t\t\t\tgcd = tmp;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn gcd;\n\t}\n\t*/\n\t\n\tpublic static long findlcm(long f1, long f2){\n\t\tlong lcm = 0;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tlong i=1;\n\t\twhile(lcm == 0){\n\t\t\tif((max * i)%min == 0){\n\t\t\t\tlcm = max * i;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn lcm;\n\t}\n\t\n\t\n\t//最大公約数を求めるメソッド\n static long findGcd(long x, long y){\n if(x%y==0){\n return y;\n }else{\n long m = 1;\n while(m!=0){\n m = y%x;\n y = x;\n x = m;\n }\n return y;\n }\n }\n /*\n //最小公倍数を求めるメソッド\n static long findlcm(long x, long y){\n for(long i=1; i<=x; i++){\n if(y*i%x==0){\n return y*i;\n }\n }\n return 0;\n }\n */\n\t\n\tpublic static void main(String[] argv) throws NumberFormatException, IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\t\twhile((line = br.readLine()) != null){\n\t\t\tString[] lineArray = line.split(\" \");\n\t\t\tlong[] factor = {Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])};\n\t\t\tlong gcd = findGcd(factor[0], factor[1]);\n\t\t\tlong lcm = findlcm(factor[0], factor[1]);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n}",
"public class Main{\n\t/*\n\tpublic static long findGcd(long f1, long f2){\n\t\tlong gcd = 1;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tfor(long i=1; i<=(long)(Math.sqrt(min)+1); i++){\n\t\t\tif(min % i == 0){\n\t\t\t\tlong tmp = min / i;\n\t\t\t\tif((max % tmp) == 0){\n\t\t\t\t\tgcd = tmp;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn gcd;\n\t}\n\t*/\n\t\n\tpublic static long findlcm(long f1, long f2){\n\t\tlong lcm = 0;\n\t\tlong max, min;\n\t\tif(f1 > f2){max = f1; min = f2;}\n\t\telse{max = f2; min = f1;}\n\t\tlong i=1;\n\t\twhile(lcm == 0){\n\t\t\tif((max * i)%min == 0){\n\t\t\t\tlcm = max * i;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn lcm;\n\t}\n\t\n\t\n\t//最大公約数を求めるメソッド\n static long findGcd(long x, long y){\n if(x%y==0){\n return y;\n }else{\n long m = 1;\n while(m!=0){\n m = y%x;\n y = x;\n x = m;\n }\n return y;\n }\n }\n /*\n //最小公倍数を求めるメソッド\n static long findlcm(long x, long y){\n for(long i=1; i<=x; i++){\n if(y*i%x==0){\n return y*i;\n }\n }\n return 0;\n }\n */\n\t\n\tpublic static void main(String[] argv) throws NumberFormatException, IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line;\n\t\twhile((line = br.readLine()) != null){\n\t\t\tString[] lineArray = line.split(\" \");\n\t\t\tlong[] factor = {Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])};\n\t\t\tlong gcd = findGcd(factor[0], factor[1]);\n\t\t\tlong lcm = findlcm(factor[0], factor[1]);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n}",
"Main"
] | import java.io.*;
public class Main{
/*
public static long findGcd(long f1, long f2){
long gcd = 1;
long max, min;
if(f1 > f2){max = f1; min = f2;}
else{max = f2; min = f1;}
for(long i=1; i<=(long)(Math.sqrt(min)+1); i++){
if(min % i == 0){
long tmp = min / i;
if((max % tmp) == 0){
gcd = tmp;
break;
}
}
}
return gcd;
}
*/
public static long findlcm(long f1, long f2){
long lcm = 0;
long max, min;
if(f1 > f2){max = f1; min = f2;}
else{max = f2; min = f1;}
long i=1;
while(lcm == 0){
if((max * i)%min == 0){
lcm = max * i;
}
i++;
}
return lcm;
}
//最大公約数を求めるメソッド
static long findGcd(long x, long y){
if(x%y==0){
return y;
}else{
long m = 1;
while(m!=0){
m = y%x;
y = x;
x = m;
}
return y;
}
}
/*
//最小公倍数を求めるメソッド
static long findlcm(long x, long y){
for(long i=1; i<=x; i++){
if(y*i%x==0){
return y*i;
}
}
return 0;
}
*/
public static void main(String[] argv) throws NumberFormatException, IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line;
while((line = br.readLine()) != null){
String[] lineArray = line.split(" ");
long[] factor = {Long.parseLong(lineArray[0]), Long.parseLong(lineArray[1])};
long gcd = findGcd(factor[0], factor[1]);
long lcm = findlcm(factor[0], factor[1]);
System.out.println(gcd + " " + lcm);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
41,
13,
4,
13,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
11,
1,
41,
13,
13,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
13,
17,
30,
29,
13,
29,
17,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
13,
23,
13,
23,
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
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
29,
31
],
[
29,
32
],
[
16,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
35,
38
],
[
35,
39
],
[
16,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
46,
46
],
[
46,
47
],
[
46,
48
],
[
46,
49
],
[
6,
50
],
[
50,
51
],
[
4,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
60,
61
],
[
60,
62
],
[
55,
63
],
[
63,
64
],
[
64,
65
],
[
55,
66
],
[
67,
67
],
[
67,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
69,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
75,
79
],
[
68,
80
],
[
80,
81
],
[
81,
82
],
[
54,
83
],
[
83,
84
],
[
52,
85
],
[
85,
86
],
[
52,
87
],
[
87,
88
],
[
4,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
89,
98
],
[
98,
99
],
[
89,
100
],
[
100,
101
],
[
89,
102
],
[
102,
103
]
] | [
"import java.util.Scanner;\nclass Main {\n\n public static void main(String args[]) {\n Scanner scanner = new Scanner(System.in);\n\n while (scanner.hasNext()) {\n\n int A = scanner.nextInt();\n\n int B = scanner.nextInt();\n\n int max = getMAX(A, B);\n\n int min = getMIN(A, B, max);\n\n System.out.println(max + \" \" + min);\n\n\n\n }\n }\n\n private static int getMAX(int A, int B) {\n for (int i = A; A > 0; i--) {\n if (A % i == 0 && B % i == 0) {\n return i;\n }\n }\n return 1;\n }\n private static int getMIN(int A, int B, int max){\n return A/max*B;\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\n public static void main(String args[]) {\n Scanner scanner = new Scanner(System.in);\n\n while (scanner.hasNext()) {\n\n int A = scanner.nextInt();\n\n int B = scanner.nextInt();\n\n int max = getMAX(A, B);\n\n int min = getMIN(A, B, max);\n\n System.out.println(max + \" \" + min);\n\n\n\n }\n }\n\n private static int getMAX(int A, int B) {\n for (int i = A; A > 0; i--) {\n if (A % i == 0 && B % i == 0) {\n return i;\n }\n }\n return 1;\n }\n private static int getMIN(int A, int B, int max){\n return A/max*B;\n }\n}",
"Main",
"public static void main(String args[]) {\n Scanner scanner = new Scanner(System.in);\n\n while (scanner.hasNext()) {\n\n int A = scanner.nextInt();\n\n int B = scanner.nextInt();\n\n int max = getMAX(A, B);\n\n int min = getMIN(A, B, max);\n\n System.out.println(max + \" \" + min);\n\n\n\n }\n }",
"main",
"{\n Scanner scanner = new Scanner(System.in);\n\n while (scanner.hasNext()) {\n\n int A = scanner.nextInt();\n\n int B = scanner.nextInt();\n\n int max = getMAX(A, B);\n\n int min = getMIN(A, B, max);\n\n System.out.println(max + \" \" + min);\n\n\n\n }\n }",
"Scanner scanner = new Scanner(System.in);",
"scanner",
"new Scanner(System.in)",
"while (scanner.hasNext()) {\n\n int A = scanner.nextInt();\n\n int B = scanner.nextInt();\n\n int max = getMAX(A, B);\n\n int min = getMIN(A, B, max);\n\n System.out.println(max + \" \" + min);\n\n\n\n }",
"scanner.hasNext()",
"scanner.hasNext",
"scanner",
"{\n\n int A = scanner.nextInt();\n\n int B = scanner.nextInt();\n\n int max = getMAX(A, B);\n\n int min = getMIN(A, B, max);\n\n System.out.println(max + \" \" + min);\n\n\n\n }",
"int A = scanner.nextInt();",
"A",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int B = scanner.nextInt();",
"B",
"scanner.nextInt()",
"scanner.nextInt",
"scanner",
"int max = getMAX(A, B);",
"max",
"getMAX(A, B)",
"getMAX",
"A",
"B",
"int min = getMIN(A, B, max);",
"min",
"getMIN(A, B, max)",
"getMIN",
"A",
"B",
"max",
"System.out.println(max + \" \" + min)",
"System.out.println",
"System.out",
"System",
"System.out",
"max + \" \" + min",
"max + \" \" + min",
"max",
"\" \"",
"min",
"String args[]",
"args",
"private static int getMAX(int A, int B) {\n for (int i = A; A > 0; i--) {\n if (A % i == 0 && B % i == 0) {\n return i;\n }\n }\n return 1;\n }",
"getMAX",
"{\n for (int i = A; A > 0; i--) {\n if (A % i == 0 && B % i == 0) {\n return i;\n }\n }\n return 1;\n }",
"for (int i = A; A > 0; i--) {\n if (A % i == 0 && B % i == 0) {\n return i;\n }\n }",
"int i = A;",
"int i = A;",
"i",
"A",
"A > 0",
"A",
"0",
"i--",
"i--",
"i",
"{\n if (A % i == 0 && B % i == 0) {\n return i;\n }\n }",
"{\n if (A % i == 0 && B % i == 0) {\n return i;\n }\n }",
"if (A % i == 0 && B % i == 0) {\n return i;\n }",
"A % i == 0 && B % i == 0",
"A % i == 0",
"A % i",
"A",
"i",
"0",
"B % i == 0",
"B % i",
"B",
"i",
"0",
"{\n return i;\n }",
"return i;",
"i",
"return 1;",
"1",
"int A",
"A",
"int B",
"B",
"private static int getMIN(int A, int B, int max){\n return A/max*B;\n }",
"getMIN",
"{\n return A/max*B;\n }",
"return A/max*B;",
"A/max*B",
"A/max",
"A",
"max",
"B",
"int A",
"A",
"int B",
"B",
"int max",
"max"
] | import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scanner = new Scanner(System.in);
while (scanner.hasNext()) {
int A = scanner.nextInt();
int B = scanner.nextInt();
int max = getMAX(A, B);
int min = getMIN(A, B, max);
System.out.println(max + " " + min);
}
}
private static int getMAX(int A, int B) {
for (int i = A; A > 0; i--) {
if (A % i == 0 && B % i == 0) {
return i;
}
}
return 1;
}
private static int getMIN(int A, int B, int max){
return A/max*B;
}
}
|
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
41,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
41,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
4,
18,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
95,
5
],
[
95,
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
],
[
13,
20
],
[
20,
21
],
[
20,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
27,
33
],
[
33,
34
],
[
33,
35
],
[
27,
36
],
[
36,
37
],
[
36,
38
],
[
8,
39
],
[
39,
40
],
[
6,
41
],
[
41,
42
],
[
6,
43
],
[
43,
44
],
[
95,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
51,
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
],
[
66,
68
],
[
68,
69
],
[
68,
70
],
[
68,
71
],
[
55,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
55,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
85,
85
],
[
85,
86
],
[
85,
87
],
[
85,
88
],
[
47,
89
],
[
89,
90
],
[
90,
91
],
[
45,
92
],
[
92,
93
],
[
0,
94
],
[
94,
95
],
[
94,
96
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static long gcd(long a, long b) {\n\t\tif(a < b) {\n\t\t\tlong tmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\twhile(b != 0) {\n\t\t\tlong r = a % b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tlong g = gcd(a, b);\n\t\t\tlong l = a / g * b;\n\t\t\tSystem.out.println(g + \" \" + l);\n\t\t}\n\t\tsc.close();\n\t}\n\n}\n",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static long gcd(long a, long b) {\n\t\tif(a < b) {\n\t\t\tlong tmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\twhile(b != 0) {\n\t\t\tlong r = a % b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tlong g = gcd(a, b);\n\t\t\tlong l = a / g * b;\n\t\t\tSystem.out.println(g + \" \" + l);\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"Main",
"public static long gcd(long a, long b) {\n\t\tif(a < b) {\n\t\t\tlong tmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\twhile(b != 0) {\n\t\t\tlong r = a % b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}",
"gcd",
"{\n\t\tif(a < b) {\n\t\t\tlong tmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\twhile(b != 0) {\n\t\t\tlong r = a % b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}",
"if(a < b) {\n\t\t\tlong tmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}",
"a < b",
"a",
"b",
"{\n\t\t\tlong tmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}",
"long tmp = a;",
"tmp",
"a",
"a = b",
"a",
"b",
"b = tmp",
"b",
"tmp",
"while(b != 0) {\n\t\t\tlong r = a % b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}",
"b != 0",
"b",
"0",
"{\n\t\t\tlong r = a % b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}",
"long r = a % b;",
"r",
"a % b",
"a",
"b",
"a = b",
"a",
"b",
"b = r",
"b",
"r",
"return a;",
"a",
"long a",
"a",
"long b",
"b",
"public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tlong g = gcd(a, b);\n\t\t\tlong l = a / g * b;\n\t\t\tSystem.out.println(g + \" \" + l);\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tlong g = gcd(a, b);\n\t\t\tlong l = a / g * b;\n\t\t\tSystem.out.println(g + \" \" + l);\n\t\t}\n\t\tsc.close();\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tlong g = gcd(a, b);\n\t\t\tlong l = a / g * b;\n\t\t\tSystem.out.println(g + \" \" + l);\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tlong g = gcd(a, b);\n\t\t\tlong l = a / g * b;\n\t\t\tSystem.out.println(g + \" \" + l);\n\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"long g = gcd(a, b);",
"g",
"gcd(a, b)",
"gcd",
"a",
"b",
"long l = a / g * b;",
"l",
"a / g * b",
"a / g",
"a",
"g",
"b",
"System.out.println(g + \" \" + l)",
"System.out.println",
"System.out",
"System",
"System.out",
"g + \" \" + l",
"g + \" \" + l",
"g",
"\" \"",
"l",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"public class Main {\n\tpublic static long gcd(long a, long b) {\n\t\tif(a < b) {\n\t\t\tlong tmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\twhile(b != 0) {\n\t\t\tlong r = a % b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tlong g = gcd(a, b);\n\t\t\tlong l = a / g * b;\n\t\t\tSystem.out.println(g + \" \" + l);\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"public class Main {\n\tpublic static long gcd(long a, long b) {\n\t\tif(a < b) {\n\t\t\tlong tmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\twhile(b != 0) {\n\t\t\tlong r = a % b;\n\t\t\ta = b;\n\t\t\tb = r;\n\t\t}\n\t\treturn a;\n\t}\n\t\n\tpublic static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\t\n\t\t\tlong g = gcd(a, b);\n\t\t\tlong l = a / g * b;\n\t\t\tSystem.out.println(g + \" \" + l);\n\t\t}\n\t\tsc.close();\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static long gcd(long a, long b) {
if(a < b) {
long tmp = a;
a = b;
b = tmp;
}
while(b != 0) {
long r = a % b;
a = b;
b = r;
}
return a;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()) {
int a = sc.nextInt();
int b = sc.nextInt();
long g = gcd(a, b);
long l = a / g * b;
System.out.println(g + " " + l);
}
sc.close();
}
}
|
[
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,
2,
17,
17,
41,
13,
17,
12,
13,
30,
0,
13,
20,
11,
1,
30,
30,
14,
40,
4,
18,
13,
3,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
4,
18,
13,
13,
13,
4,
13,
2,
2,
13,
17,
13,
4,
18,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
4,
18,
18,
13,
13,
13,
23,
13,
12,
13,
30,
4,
18,
20,
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
],
[
113,
20
],
[
113,
21
],
[
21,
22
],
[
113,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
25,
27
],
[
113,
28
],
[
28,
29
],
[
28,
30
],
[
113,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
33,
37
],
[
37,
38
],
[
37,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
41,
46
],
[
40,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
40,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
40,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
40,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
65,
71
],
[
40,
72
],
[
72,
73
],
[
72,
74
],
[
75,
75
],
[
75,
76
],
[
75,
77
],
[
75,
78
],
[
33,
79
],
[
79,
80
],
[
80,
81
],
[
113,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
85,
90
],
[
82,
91
],
[
91,
92
],
[
113,
93
],
[
93,
94
],
[
93,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
98,
100
],
[
96,
101
],
[
93,
102
],
[
102,
103
],
[
113,
104
],
[
104,
105
],
[
104,
106
],
[
106,
107
],
[
107,
108
],
[
108,
109
],
[
104,
110
],
[
110,
111
],
[
0,
112
],
[
112,
113
],
[
112,
114
]
] | [
"import java.util.*;\nimport java.lang.*;\nimport java.math.*;\nimport java.io.*;\n\nimport static java.lang.Math.*;\nimport static java.util.Arrays.*;\n\npublic class Main{\n\n\tScanner sc;\n\n\tstatic final int INF=1<<28;\n\tstatic final double EPS=1e-9;\n\n\tvoid run(){\n\t\tsc=new Scanner(System.in);\n\t\tfor(;;){\n\t\t\tif(!sc.hasNext())\n\t\t\t\tbreak;\n\t\t\tBigInteger a=sc.nextBigInteger();\n\t\t\tBigInteger b=sc.nextBigInteger();\n\t\t\tBigInteger gcd=a.gcd(b);\n\t\t\tBigInteger lcm=a.multiply(b).divide(gcd);\n\t\t\tprintln(gcd+\" \"+lcm);\n\t\t}\n\t\tsc.close();\n\t}\n\n\tvoid print(String s){\n\t\tSystem.out.print(s);\n\t}\n\n\tvoid println(String s){\n\t\tSystem.out.println(s);\n\t}\n\n\tpublic static void main(String[] args){\n\t\tnew Main().run();\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"import java.math.*;",
"math.*",
"java",
"import java.io.*;",
"io.*",
"java",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"import static java.lang.Math.*;",
"import static java.util.Arrays.*;",
"import static java.util.Arrays.*;",
"import static java.util.Arrays.*;",
"public class Main{\n\n\tScanner sc;\n\n\tstatic final int INF=1<<28;\n\tstatic final double EPS=1e-9;\n\n\tvoid run(){\n\t\tsc=new Scanner(System.in);\n\t\tfor(;;){\n\t\t\tif(!sc.hasNext())\n\t\t\t\tbreak;\n\t\t\tBigInteger a=sc.nextBigInteger();\n\t\t\tBigInteger b=sc.nextBigInteger();\n\t\t\tBigInteger gcd=a.gcd(b);\n\t\t\tBigInteger lcm=a.multiply(b).divide(gcd);\n\t\t\tprintln(gcd+\" \"+lcm);\n\t\t}\n\t\tsc.close();\n\t}\n\n\tvoid print(String s){\n\t\tSystem.out.print(s);\n\t}\n\n\tvoid println(String s){\n\t\tSystem.out.println(s);\n\t}\n\n\tpublic static void main(String[] args){\n\t\tnew Main().run();\n\t}\n}",
"Main",
"Scanner sc;",
"sc",
"static final int INF=1<<28;",
"INF",
"1<<28",
"1",
"28",
"static final double EPS=1e-9;",
"EPS",
"1e-9",
"void run(){\n\t\tsc=new Scanner(System.in);\n\t\tfor(;;){\n\t\t\tif(!sc.hasNext())\n\t\t\t\tbreak;\n\t\t\tBigInteger a=sc.nextBigInteger();\n\t\t\tBigInteger b=sc.nextBigInteger();\n\t\t\tBigInteger gcd=a.gcd(b);\n\t\t\tBigInteger lcm=a.multiply(b).divide(gcd);\n\t\t\tprintln(gcd+\" \"+lcm);\n\t\t}\n\t\tsc.close();\n\t}",
"run",
"{\n\t\tsc=new Scanner(System.in);\n\t\tfor(;;){\n\t\t\tif(!sc.hasNext())\n\t\t\t\tbreak;\n\t\t\tBigInteger a=sc.nextBigInteger();\n\t\t\tBigInteger b=sc.nextBigInteger();\n\t\t\tBigInteger gcd=a.gcd(b);\n\t\t\tBigInteger lcm=a.multiply(b).divide(gcd);\n\t\t\tprintln(gcd+\" \"+lcm);\n\t\t}\n\t\tsc.close();\n\t}",
"sc=new Scanner(System.in)",
"sc",
"new Scanner(System.in)",
"for(;;){\n\t\t\tif(!sc.hasNext())\n\t\t\t\tbreak;\n\t\t\tBigInteger a=sc.nextBigInteger();\n\t\t\tBigInteger b=sc.nextBigInteger();\n\t\t\tBigInteger gcd=a.gcd(b);\n\t\t\tBigInteger lcm=a.multiply(b).divide(gcd);\n\t\t\tprintln(gcd+\" \"+lcm);\n\t\t}",
";",
"{\n\t\t\tif(!sc.hasNext())\n\t\t\t\tbreak;\n\t\t\tBigInteger a=sc.nextBigInteger();\n\t\t\tBigInteger b=sc.nextBigInteger();\n\t\t\tBigInteger gcd=a.gcd(b);\n\t\t\tBigInteger lcm=a.multiply(b).divide(gcd);\n\t\t\tprintln(gcd+\" \"+lcm);\n\t\t}",
"{\n\t\t\tif(!sc.hasNext())\n\t\t\t\tbreak;\n\t\t\tBigInteger a=sc.nextBigInteger();\n\t\t\tBigInteger b=sc.nextBigInteger();\n\t\t\tBigInteger gcd=a.gcd(b);\n\t\t\tBigInteger lcm=a.multiply(b).divide(gcd);\n\t\t\tprintln(gcd+\" \"+lcm);\n\t\t}",
"if(!sc.hasNext())\n\t\t\t\tbreak;",
"!sc.hasNext()",
"sc.hasNext()",
"sc.hasNext",
"sc",
"break;",
"BigInteger a=sc.nextBigInteger();",
"a",
"sc.nextBigInteger()",
"sc.nextBigInteger",
"sc",
"BigInteger b=sc.nextBigInteger();",
"b",
"sc.nextBigInteger()",
"sc.nextBigInteger",
"sc",
"BigInteger gcd=a.gcd(b);",
"gcd",
"a.gcd(b)",
"a.gcd",
"a",
"b",
"BigInteger lcm=a.multiply(b).divide(gcd);",
"lcm",
"a.multiply(b).divide(gcd)",
"a.multiply(b).divide",
"a.multiply(b)",
"a.multiply",
"a",
"b",
"gcd",
"println(gcd+\" \"+lcm)",
"println",
"gcd+\" \"+lcm",
"gcd+\" \"+lcm",
"gcd",
"\" \"",
"lcm",
"sc.close()",
"sc.close",
"sc",
"void print(String s){\n\t\tSystem.out.print(s);\n\t}",
"print",
"{\n\t\tSystem.out.print(s);\n\t}",
"System.out.print(s)",
"System.out.print",
"System.out",
"System",
"System.out",
"s",
"String s",
"s",
"void println(String s){\n\t\tSystem.out.println(s);\n\t}",
"println",
"{\n\t\tSystem.out.println(s);\n\t}",
"System.out.println(s)",
"System.out.println",
"System.out",
"System",
"System.out",
"s",
"String s",
"s",
"public static void main(String[] args){\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",
"public class Main{\n\n\tScanner sc;\n\n\tstatic final int INF=1<<28;\n\tstatic final double EPS=1e-9;\n\n\tvoid run(){\n\t\tsc=new Scanner(System.in);\n\t\tfor(;;){\n\t\t\tif(!sc.hasNext())\n\t\t\t\tbreak;\n\t\t\tBigInteger a=sc.nextBigInteger();\n\t\t\tBigInteger b=sc.nextBigInteger();\n\t\t\tBigInteger gcd=a.gcd(b);\n\t\t\tBigInteger lcm=a.multiply(b).divide(gcd);\n\t\t\tprintln(gcd+\" \"+lcm);\n\t\t}\n\t\tsc.close();\n\t}\n\n\tvoid print(String s){\n\t\tSystem.out.print(s);\n\t}\n\n\tvoid println(String s){\n\t\tSystem.out.println(s);\n\t}\n\n\tpublic static void main(String[] args){\n\t\tnew Main().run();\n\t}\n}",
"public class Main{\n\n\tScanner sc;\n\n\tstatic final int INF=1<<28;\n\tstatic final double EPS=1e-9;\n\n\tvoid run(){\n\t\tsc=new Scanner(System.in);\n\t\tfor(;;){\n\t\t\tif(!sc.hasNext())\n\t\t\t\tbreak;\n\t\t\tBigInteger a=sc.nextBigInteger();\n\t\t\tBigInteger b=sc.nextBigInteger();\n\t\t\tBigInteger gcd=a.gcd(b);\n\t\t\tBigInteger lcm=a.multiply(b).divide(gcd);\n\t\t\tprintln(gcd+\" \"+lcm);\n\t\t}\n\t\tsc.close();\n\t}\n\n\tvoid print(String s){\n\t\tSystem.out.print(s);\n\t}\n\n\tvoid println(String s){\n\t\tSystem.out.println(s);\n\t}\n\n\tpublic static void main(String[] args){\n\t\tnew Main().run();\n\t}\n}",
"Main"
] | import java.util.*;
import java.lang.*;
import java.math.*;
import java.io.*;
import static java.lang.Math.*;
import static java.util.Arrays.*;
public class Main{
Scanner sc;
static final int INF=1<<28;
static final double EPS=1e-9;
void run(){
sc=new Scanner(System.in);
for(;;){
if(!sc.hasNext())
break;
BigInteger a=sc.nextBigInteger();
BigInteger b=sc.nextBigInteger();
BigInteger gcd=a.gcd(b);
BigInteger lcm=a.multiply(b).divide(gcd);
println(gcd+" "+lcm);
}
sc.close();
}
void print(String s){
System.out.print(s);
}
void println(String s){
System.out.println(s);
}
public static void main(String[] args){
new Main().run();
}
} |
[
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,
42,
2,
0,
13,
4,
18,
13,
17,
30,
14,
2,
4,
18,
13,
17,
30,
3,
4,
18,
13,
13,
41,
13,
20,
4,
18,
13,
17,
41,
13,
4,
18,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
41,
13,
4,
18,
4,
18,
13,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
0,
18,
18,
13,
13,
17,
4,
13,
13,
13,
0,
18,
18,
13,
13,
17,
4,
13,
13,
13,
18,
18,
13,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
2,
18,
18,
13,
13,
17,
17,
18,
18,
13,
13,
17,
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,
2,
2,
13,
13,
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
],
[
192,
14
],
[
192,
15
],
[
15,
16
],
[
15,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
21,
23
],
[
17,
24
],
[
24,
25
],
[
17,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
27,
33
],
[
26,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
36,
40
],
[
35,
41
],
[
41,
42
],
[
34,
43
],
[
43,
44
],
[
44,
45
],
[
43,
46
],
[
17,
47
],
[
47,
48
],
[
47,
49
],
[
50,
51
],
[
51,
52
],
[
17,
54
],
[
54,
55
],
[
54,
56
],
[
56,
57
],
[
57,
58
],
[
17,
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
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
74,
80
],
[
71,
81
],
[
81,
82
],
[
81,
83
],
[
83,
84
],
[
84,
85
],
[
83,
86
],
[
86,
87
],
[
86,
88
],
[
71,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
91,
94
],
[
94,
95
],
[
94,
96
],
[
71,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
97,
103
],
[
103,
104
],
[
103,
105
],
[
103,
106
],
[
71,
107
],
[
107,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
107,
113
],
[
113,
114
],
[
113,
115
],
[
113,
116
],
[
113,
117
],
[
117,
118
],
[
118,
119
],
[
118,
120
],
[
117,
121
],
[
17,
122
],
[
122,
123
],
[
123,
124
],
[
124,
125
],
[
124,
126
],
[
122,
127
],
[
127,
128
],
[
127,
129
],
[
129,
130
],
[
129,
131
],
[
122,
132
],
[
132,
133
],
[
133,
134
],
[
122,
135
],
[
136,
136
],
[
136,
137
],
[
137,
138
],
[
138,
139
],
[
139,
140
],
[
139,
141
],
[
137,
142
],
[
143,
143
],
[
143,
144
],
[
144,
145
],
[
145,
146
],
[
145,
147
],
[
144,
148
],
[
143,
149
],
[
143,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
15,
155
],
[
155,
156
],
[
192,
157
],
[
157,
158
],
[
157,
159
],
[
159,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
161,
166
],
[
166,
167
],
[
166,
168
],
[
166,
169
],
[
169,
170
],
[
169,
171
],
[
157,
172
],
[
172,
173
],
[
157,
174
],
[
174,
175
],
[
192,
176
],
[
176,
177
],
[
176,
178
],
[
178,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
181,
183
],
[
180,
184
],
[
176,
185
],
[
185,
186
],
[
176,
187
],
[
187,
188
],
[
176,
189
],
[
189,
190
],
[
0,
191
],
[
191,
192
],
[
191,
193
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.ArrayList;\n\npublic class Main {\n\tpublic static void main(String[] a) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tArrayList<String> al = new ArrayList<String>();\n\n\t\tString str;\n\t\t// 1???????????\\?????????????????????????????????\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tal.add(str);\n\t\t}\n\n\t\tint[][] gcdLcm = new int[al.size()][2];\n\t\tint len = al.size();\n\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString[] buf = al.get(i).split(\" \");\n\t\t\tint m = Integer.parseInt(buf[0]);\n\t\t\tint n = Integer.parseInt(buf[1]);\n\t\t\tgcdLcm[i][0] = gcd(m, n);\n\t\t\tgcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0]);\n\t\t}\n\n\t\t//??????\n\t\tfor(int i=0;i<gcdLcm.length;i++){\n\t\t\tSystem.out.println(gcdLcm[i][0]+\" \"+gcdLcm[i][1]);\n\t\t}\n\t}\n\n\t// GCD????¨????\n\tprivate static int gcd(int m, int n) {\n\t\treturn n == 0 ? m : gcd(n, m % n);\n\t}\n\n\t// LCM????¨????\n\tprivate static int lcm(long m, long n, long gcd) {\n\t\treturn (int)(m * n / gcd);\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.ArrayList;",
"ArrayList",
"java.util",
"public class Main {\n\tpublic static void main(String[] a) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tArrayList<String> al = new ArrayList<String>();\n\n\t\tString str;\n\t\t// 1???????????\\?????????????????????????????????\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tal.add(str);\n\t\t}\n\n\t\tint[][] gcdLcm = new int[al.size()][2];\n\t\tint len = al.size();\n\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString[] buf = al.get(i).split(\" \");\n\t\t\tint m = Integer.parseInt(buf[0]);\n\t\t\tint n = Integer.parseInt(buf[1]);\n\t\t\tgcdLcm[i][0] = gcd(m, n);\n\t\t\tgcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0]);\n\t\t}\n\n\t\t//??????\n\t\tfor(int i=0;i<gcdLcm.length;i++){\n\t\t\tSystem.out.println(gcdLcm[i][0]+\" \"+gcdLcm[i][1]);\n\t\t}\n\t}\n\n\t// GCD????¨????\n\tprivate static int gcd(int m, int n) {\n\t\treturn n == 0 ? m : gcd(n, m % n);\n\t}\n\n\t// LCM????¨????\n\tprivate static int lcm(long m, long n, long gcd) {\n\t\treturn (int)(m * n / gcd);\n\t}\n}",
"Main",
"public static void main(String[] a) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tArrayList<String> al = new ArrayList<String>();\n\n\t\tString str;\n\t\t// 1???????????\\?????????????????????????????????\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tal.add(str);\n\t\t}\n\n\t\tint[][] gcdLcm = new int[al.size()][2];\n\t\tint len = al.size();\n\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString[] buf = al.get(i).split(\" \");\n\t\t\tint m = Integer.parseInt(buf[0]);\n\t\t\tint n = Integer.parseInt(buf[1]);\n\t\t\tgcdLcm[i][0] = gcd(m, n);\n\t\t\tgcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0]);\n\t\t}\n\n\t\t//??????\n\t\tfor(int i=0;i<gcdLcm.length;i++){\n\t\t\tSystem.out.println(gcdLcm[i][0]+\" \"+gcdLcm[i][1]);\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tArrayList<String> al = new ArrayList<String>();\n\n\t\tString str;\n\t\t// 1???????????\\?????????????????????????????????\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tal.add(str);\n\t\t}\n\n\t\tint[][] gcdLcm = new int[al.size()][2];\n\t\tint len = al.size();\n\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString[] buf = al.get(i).split(\" \");\n\t\t\tint m = Integer.parseInt(buf[0]);\n\t\t\tint n = Integer.parseInt(buf[1]);\n\t\t\tgcdLcm[i][0] = gcd(m, n);\n\t\t\tgcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0]);\n\t\t}\n\n\t\t//??????\n\t\tfor(int i=0;i<gcdLcm.length;i++){\n\t\t\tSystem.out.println(gcdLcm[i][0]+\" \"+gcdLcm[i][1]);\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"ArrayList<String> al = new ArrayList<String>();",
"al",
"new ArrayList<String>()",
"String str;",
"str",
"while ((str = br.readLine()) != null) {\n\t\t\tif (str.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tal.add(str);\n\t\t}",
"(str = br.readLine()) != null",
"(str = br.readLine())",
"str",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tif (str.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tal.add(str);\n\t\t}",
"if (str.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}",
"str.length() == 0",
"str.length()",
"str.length",
"str",
"0",
"{\n\t\t\t\tbreak;\n\t\t\t}",
"break;",
"al.add(str)",
"al.add",
"al",
"str",
"int[][] gcdLcm = new int[al.size()][2];",
"gcdLcm",
"new int[al.size()][2]",
"al.size()",
"al.size",
"al",
"2",
"int len = al.size();",
"len",
"al.size()",
"al.size",
"al",
"for (int i = 0; i < len; i++) {\n\t\t\tString[] buf = al.get(i).split(\" \");\n\t\t\tint m = Integer.parseInt(buf[0]);\n\t\t\tint n = Integer.parseInt(buf[1]);\n\t\t\tgcdLcm[i][0] = gcd(m, n);\n\t\t\tgcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < len",
"i",
"len",
"i++",
"i++",
"i",
"{\n\t\t\tString[] buf = al.get(i).split(\" \");\n\t\t\tint m = Integer.parseInt(buf[0]);\n\t\t\tint n = Integer.parseInt(buf[1]);\n\t\t\tgcdLcm[i][0] = gcd(m, n);\n\t\t\tgcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0]);\n\t\t}",
"{\n\t\t\tString[] buf = al.get(i).split(\" \");\n\t\t\tint m = Integer.parseInt(buf[0]);\n\t\t\tint n = Integer.parseInt(buf[1]);\n\t\t\tgcdLcm[i][0] = gcd(m, n);\n\t\t\tgcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0]);\n\t\t}",
"String[] buf = al.get(i).split(\" \");",
"buf",
"al.get(i).split(\" \")",
"al.get(i).split",
"al.get(i)",
"al.get",
"al",
"i",
"\" \"",
"int m = Integer.parseInt(buf[0]);",
"m",
"Integer.parseInt(buf[0])",
"Integer.parseInt",
"Integer",
"buf[0]",
"buf",
"0",
"int n = Integer.parseInt(buf[1]);",
"n",
"Integer.parseInt(buf[1])",
"Integer.parseInt",
"Integer",
"buf[1]",
"buf",
"1",
"gcdLcm[i][0] = gcd(m, n)",
"gcdLcm[i][0]",
"gcdLcm[i]",
"gcdLcm",
"i",
"0",
"gcd(m, n)",
"gcd",
"m",
"n",
"gcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0])",
"gcdLcm[i][1]",
"gcdLcm[i]",
"gcdLcm",
"i",
"1",
"lcm((long)m, (long)n, (long)gcdLcm[i][0])",
"lcm",
"(long)m",
"(long)n",
"(long)gcdLcm[i][0]",
"gcdLcm[i]",
"gcdLcm",
"i",
"0",
"for(int i=0;i<gcdLcm.length;i++){\n\t\t\tSystem.out.println(gcdLcm[i][0]+\" \"+gcdLcm[i][1]);\n\t\t}",
"int i=0;",
"int i=0;",
"i",
"0",
"i<gcdLcm.length",
"i",
"gcdLcm.length",
"gcdLcm",
"gcdLcm.length",
"i++",
"i++",
"i",
"{\n\t\t\tSystem.out.println(gcdLcm[i][0]+\" \"+gcdLcm[i][1]);\n\t\t}",
"{\n\t\t\tSystem.out.println(gcdLcm[i][0]+\" \"+gcdLcm[i][1]);\n\t\t}",
"System.out.println(gcdLcm[i][0]+\" \"+gcdLcm[i][1])",
"System.out.println",
"System.out",
"System",
"System.out",
"gcdLcm[i][0]+\" \"+gcdLcm[i][1]",
"gcdLcm[i][0]+\" \"+gcdLcm[i][1]",
"gcdLcm[i][0]",
"gcdLcm[i]",
"gcdLcm",
"i",
"0",
"\" \"",
"gcdLcm[i][1]",
"gcdLcm[i]",
"gcdLcm",
"i",
"1",
"String[] a",
"a",
"// GCD????¨????\n\tprivate static int gcd(int m, int n) {\n\t\treturn n == 0 ? m : gcd(n, m % n);\n\t}",
"gcd",
"{\n\t\treturn n == 0 ? m : gcd(n, m % n);\n\t}",
"return n == 0 ? m : gcd(n, m % n);",
"n == 0 ? m : gcd(n, m % n)",
"n == 0",
"n",
"0",
"m",
"gcd(n, m % n)",
"gcd",
"n",
"m % n",
"m",
"n",
"int m",
"m",
"int n",
"n",
"// LCM????¨????\n\tprivate static int lcm(long m, long n, long gcd) {\n\t\treturn (int)(m * n / gcd);\n\t}",
"lcm",
"{\n\t\treturn (int)(m * n / gcd);\n\t}",
"return (int)(m * n / gcd);",
"(int)(m * n / gcd)",
"m * n",
"m",
"n",
"gcd",
"long m",
"m",
"long n",
"n",
"long gcd",
"gcd",
"public class Main {\n\tpublic static void main(String[] a) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tArrayList<String> al = new ArrayList<String>();\n\n\t\tString str;\n\t\t// 1???????????\\?????????????????????????????????\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tal.add(str);\n\t\t}\n\n\t\tint[][] gcdLcm = new int[al.size()][2];\n\t\tint len = al.size();\n\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString[] buf = al.get(i).split(\" \");\n\t\t\tint m = Integer.parseInt(buf[0]);\n\t\t\tint n = Integer.parseInt(buf[1]);\n\t\t\tgcdLcm[i][0] = gcd(m, n);\n\t\t\tgcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0]);\n\t\t}\n\n\t\t//??????\n\t\tfor(int i=0;i<gcdLcm.length;i++){\n\t\t\tSystem.out.println(gcdLcm[i][0]+\" \"+gcdLcm[i][1]);\n\t\t}\n\t}\n\n\t// GCD????¨????\n\tprivate static int gcd(int m, int n) {\n\t\treturn n == 0 ? m : gcd(n, m % n);\n\t}\n\n\t// LCM????¨????\n\tprivate static int lcm(long m, long n, long gcd) {\n\t\treturn (int)(m * n / gcd);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] a) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tArrayList<String> al = new ArrayList<String>();\n\n\t\tString str;\n\t\t// 1???????????\\?????????????????????????????????\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tif (str.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tal.add(str);\n\t\t}\n\n\t\tint[][] gcdLcm = new int[al.size()][2];\n\t\tint len = al.size();\n\n\t\tfor (int i = 0; i < len; i++) {\n\t\t\tString[] buf = al.get(i).split(\" \");\n\t\t\tint m = Integer.parseInt(buf[0]);\n\t\t\tint n = Integer.parseInt(buf[1]);\n\t\t\tgcdLcm[i][0] = gcd(m, n);\n\t\t\tgcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0]);\n\t\t}\n\n\t\t//??????\n\t\tfor(int i=0;i<gcdLcm.length;i++){\n\t\t\tSystem.out.println(gcdLcm[i][0]+\" \"+gcdLcm[i][1]);\n\t\t}\n\t}\n\n\t// GCD????¨????\n\tprivate static int gcd(int m, int n) {\n\t\treturn n == 0 ? m : gcd(n, m % n);\n\t}\n\n\t// LCM????¨????\n\tprivate static int lcm(long m, long n, long gcd) {\n\t\treturn (int)(m * n / gcd);\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
public class Main {
public static void main(String[] a) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
ArrayList<String> al = new ArrayList<String>();
String str;
// 1???????????\?????????????????????????????????
while ((str = br.readLine()) != null) {
if (str.length() == 0) {
break;
}
al.add(str);
}
int[][] gcdLcm = new int[al.size()][2];
int len = al.size();
for (int i = 0; i < len; i++) {
String[] buf = al.get(i).split(" ");
int m = Integer.parseInt(buf[0]);
int n = Integer.parseInt(buf[1]);
gcdLcm[i][0] = gcd(m, n);
gcdLcm[i][1] = lcm((long)m, (long)n, (long)gcdLcm[i][0]);
}
//??????
for(int i=0;i<gcdLcm.length;i++){
System.out.println(gcdLcm[i][0]+" "+gcdLcm[i][1]);
}
}
// GCD????¨????
private static int gcd(int m, int n) {
return n == 0 ? m : gcd(n, m % n);
}
// LCM????¨????
private static int lcm(long m, long n, long gcd) {
return (int)(m * n / gcd);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
4,
18,
13,
23,
13,
12,
13,
30,
14,
2,
13,
13,
29,
4,
13,
13,
13,
41,
13,
17,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
102,
5
],
[
102,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
33,
33
],
[
33,
34
],
[
34,
35
],
[
34,
36
],
[
34,
37
],
[
33,
38
],
[
33,
39
],
[
39,
40
],
[
39,
41
],
[
39,
42
],
[
8,
43
],
[
43,
44
],
[
44,
45
],
[
6,
46
],
[
46,
47
],
[
102,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
56,
59
],
[
50,
60
],
[
60,
61
],
[
60,
62
],
[
50,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
67,
73
],
[
73,
74
],
[
73,
75
],
[
67,
76
],
[
76,
77
],
[
76,
78
],
[
50,
79
],
[
79,
80
],
[
48,
81
],
[
81,
82
],
[
48,
83
],
[
83,
84
],
[
102,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
93,
95
],
[
93,
96
],
[
85,
97
],
[
97,
98
],
[
85,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] | [
"import java.util.*;\npublic class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t\tsc.close();\n\t}\n\t\n\tstatic int gcd(long a,long b){\t//最大公約数\n\t\tif(a<b) return gcd(b,a);\t//入れ換えて再実行\n\t\tlong d=0;\n\t\tdo{\n\t\t\td=a%b;\n\t\t\ta=b;\n\t\t\tb=d;\n\t\t}while(d!=0);\n\t\treturn (int)a;\n\t}\n\n\tstatic int lcm(long a,long b){\t//最小公倍数\n\t\treturn (int)(a*b/gcd(a,b));\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\twhile(sc.hasNextInt()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t\tsc.close();\n\t}\n\t\n\tstatic int gcd(long a,long b){\t//最大公約数\n\t\tif(a<b) return gcd(b,a);\t//入れ換えて再実行\n\t\tlong d=0;\n\t\tdo{\n\t\t\td=a%b;\n\t\t\ta=b;\n\t\t\tb=d;\n\t\t}while(d!=0);\n\t\treturn (int)a;\n\t}\n\n\tstatic int lcm(long a,long b){\t//最小公倍数\n\t\treturn (int)(a*b/gcd(a,b));\n\t}\n}",
"Main",
"public static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t\tsc.close();\n\t}",
"main",
"{\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t\tsc.close();\n\t}",
"Scanner sc=new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNextInt()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}",
"sc.hasNextInt()",
"sc.hasNextInt",
"sc",
"{\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}",
"int a=sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b=sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"System.out.println(gcd(a,b)+\" \"+lcm(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a,b)",
"lcm",
"a",
"b",
"sc.close()",
"sc.close",
"sc",
"String[] args",
"args",
"static int gcd(long a,long b){\t//最大公約数\n\t\tif(a<b) return gcd(b,a);\t//入れ換えて再実行\n\t\tlong d=0;\n\t\tdo{\n\t\t\td=a%b;\n\t\t\ta=b;\n\t\t\tb=d;\n\t\t}while(d!=0);\n\t\treturn (int)a;\n\t}",
"gcd",
"{\t//最大公約数\n\t\tif(a<b) return gcd(b,a);\t//入れ換えて再実行\n\t\tlong d=0;\n\t\tdo{\n\t\t\td=a%b;\n\t\t\ta=b;\n\t\t\tb=d;\n\t\t}while(d!=0);\n\t\treturn (int)a;\n\t}",
"if(a<b) return gcd(b,a);\t//入れ換えて再実行",
"a<b",
"a",
"b",
"return gcd(b,a);\t//入れ換えて再実行",
"gcd(b,a)",
"gcd",
"b",
"a",
"long d=0;",
"d",
"0",
"do{\n\t\t\td=a%b;\n\t\t\ta=b;\n\t\t\tb=d;\n\t\t}while(d!=0);",
"d!=0",
"d",
"0",
"{\n\t\t\td=a%b;\n\t\t\ta=b;\n\t\t\tb=d;\n\t\t}",
"d=a%b",
"d",
"a%b",
"a",
"b",
"a=b",
"a",
"b",
"b=d",
"b",
"d",
"return (int)a;",
"(int)a",
"long a",
"a",
"long b",
"b",
"static int lcm(long a,long b){\t//最小公倍数\n\t\treturn (int)(a*b/gcd(a,b));\n\t}",
"lcm",
"{\t//最小公倍数\n\t\treturn (int)(a*b/gcd(a,b));\n\t}",
"return (int)(a*b/gcd(a,b));",
"(int)(a*b/gcd(a,b))",
"a*b",
"a",
"b",
"gcd(a,b)",
"gcd",
"a",
"b",
"long a",
"a",
"long b",
"b",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t\tsc.close();\n\t}\n\t\n\tstatic int gcd(long a,long b){\t//最大公約数\n\t\tif(a<b) return gcd(b,a);\t//入れ換えて再実行\n\t\tlong d=0;\n\t\tdo{\n\t\t\td=a%b;\n\t\t\ta=b;\n\t\t\tb=d;\n\t\t}while(d!=0);\n\t\treturn (int)a;\n\t}\n\n\tstatic int lcm(long a,long b){\t//最小公倍数\n\t\treturn (int)(a*b/gcd(a,b));\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args){\n\t\tScanner sc=new Scanner(System.in);\n\t\twhile(sc.hasNextInt()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t}\n\t\tsc.close();\n\t}\n\t\n\tstatic int gcd(long a,long b){\t//最大公約数\n\t\tif(a<b) return gcd(b,a);\t//入れ換えて再実行\n\t\tlong d=0;\n\t\tdo{\n\t\t\td=a%b;\n\t\t\ta=b;\n\t\t\tb=d;\n\t\t}while(d!=0);\n\t\treturn (int)a;\n\t}\n\n\tstatic int lcm(long a,long b){\t//最小公倍数\n\t\treturn (int)(a*b/gcd(a,b));\n\t}\n}",
"Main"
] | import java.util.*;
public class Main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
while(sc.hasNextInt()){
int a=sc.nextInt();
int b=sc.nextInt();
System.out.println(gcd(a,b)+" "+lcm(a,b));
}
sc.close();
}
static int gcd(long a,long b){ //最大公約数
if(a<b) return gcd(b,a); //入れ換えて再実行
long d=0;
do{
d=a%b;
a=b;
b=d;
}while(d!=0);
return (int)a;
}
static int lcm(long a,long b){ //最小公倍数
return (int)(a*b/gcd(a,b));
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
13,
13,
23,
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
],
[
11,
17
],
[
17,
18
],
[
11,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
19,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
23,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
23,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
34,
39
],
[
40,
40
],
[
40,
41
],
[
41,
42
],
[
41,
43
],
[
41,
44
],
[
40,
45
],
[
40,
46
],
[
46,
47
],
[
46,
48
],
[
46,
49
],
[
9,
50
],
[
50,
51
],
[
7,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
55,
59
],
[
59,
60
],
[
55,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
62,
65
],
[
65,
66
],
[
65,
67
],
[
52,
68
],
[
68,
69
],
[
52,
70
],
[
70,
71
],
[
7,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
80,
82
],
[
80,
83
],
[
72,
84
],
[
84,
85
],
[
72,
86
],
[
86,
87
]
] | [
"import java.io.*;\nimport java.util.*;\nclass Main{\n public static void main(String[] args)throws IOException{\n\tScanner s = new Scanner(System.in);\n\tlong a,b;\n\t\n\twhile(s.hasNext()){\n\t a=s.nextInt();\n\t b=s.nextInt();\n\t System.out.println(getGCD(a,b)+\" \"+getLCM(a,b));\n\t /* System.out.println(a*b);*/\n\t}\n }\n \n \n \n \n static long getGCD(long a, long b){\n\tif(b==0)\n\t return a;\n\telse return getGCD(b ,a%b);\n\t\n\t }\n\n static long getLCM(long a,long b){\n\t return a*b/(getGCD(a,b));\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.*;",
"util.*",
"java",
"class Main{\n public static void main(String[] args)throws IOException{\n\tScanner s = new Scanner(System.in);\n\tlong a,b;\n\t\n\twhile(s.hasNext()){\n\t a=s.nextInt();\n\t b=s.nextInt();\n\t System.out.println(getGCD(a,b)+\" \"+getLCM(a,b));\n\t /* System.out.println(a*b);*/\n\t}\n }\n \n \n \n \n static long getGCD(long a, long b){\n\tif(b==0)\n\t return a;\n\telse return getGCD(b ,a%b);\n\t\n\t }\n\n static long getLCM(long a,long b){\n\t return a*b/(getGCD(a,b));\n }\n}",
"Main",
"public static void main(String[] args)throws IOException{\n\tScanner s = new Scanner(System.in);\n\tlong a,b;\n\t\n\twhile(s.hasNext()){\n\t a=s.nextInt();\n\t b=s.nextInt();\n\t System.out.println(getGCD(a,b)+\" \"+getLCM(a,b));\n\t /* System.out.println(a*b);*/\n\t}\n }",
"main",
"{\n\tScanner s = new Scanner(System.in);\n\tlong a,b;\n\t\n\twhile(s.hasNext()){\n\t a=s.nextInt();\n\t b=s.nextInt();\n\t System.out.println(getGCD(a,b)+\" \"+getLCM(a,b));\n\t /* System.out.println(a*b);*/\n\t}\n }",
"Scanner s = new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"long a",
"a",
"b;",
"b",
"while(s.hasNext()){\n\t a=s.nextInt();\n\t b=s.nextInt();\n\t System.out.println(getGCD(a,b)+\" \"+getLCM(a,b));\n\t /* System.out.println(a*b);*/\n\t}",
"s.hasNext()",
"s.hasNext",
"s",
"{\n\t a=s.nextInt();\n\t b=s.nextInt();\n\t System.out.println(getGCD(a,b)+\" \"+getLCM(a,b));\n\t /* System.out.println(a*b);*/\n\t}",
"a=s.nextInt()",
"a",
"s.nextInt()",
"s.nextInt",
"s",
"b=s.nextInt()",
"b",
"s.nextInt()",
"s.nextInt",
"s",
"System.out.println(getGCD(a,b)+\" \"+getLCM(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"getGCD(a,b)+\" \"+getLCM(a,b)",
"getGCD(a,b)+\" \"+getLCM(a,b)",
"getGCD(a,b)",
"getGCD",
"a",
"b",
"\" \"",
"getLCM(a,b)",
"getLCM",
"a",
"b",
"String[] args",
"args",
"static long getGCD(long a, long b){\n\tif(b==0)\n\t return a;\n\telse return getGCD(b ,a%b);\n\t\n\t }",
"getGCD",
"{\n\tif(b==0)\n\t return a;\n\telse return getGCD(b ,a%b);\n\t\n\t }",
"if(b==0)\n\t return a;\n\telse return getGCD(b ,a%b);",
"b==0",
"b",
"0",
"return a;",
"a",
"return getGCD(b ,a%b);",
"getGCD(b ,a%b)",
"getGCD",
"b",
"a%b",
"a",
"b",
"long a",
"a",
"long b",
"b",
"static long getLCM(long a,long b){\n\t return a*b/(getGCD(a,b));\n }",
"getLCM",
"{\n\t return a*b/(getGCD(a,b));\n }",
"return a*b/(getGCD(a,b));",
"a*b/(getGCD(a,b))",
"a*b",
"a",
"b",
"(getGCD(a,b))",
"getGCD",
"a",
"b",
"long a",
"a",
"long b",
"b"
] | import java.io.*;
import java.util.*;
class Main{
public static void main(String[] args)throws IOException{
Scanner s = new Scanner(System.in);
long a,b;
while(s.hasNext()){
a=s.nextInt();
b=s.nextInt();
System.out.println(getGCD(a,b)+" "+getLCM(a,b));
/* System.out.println(a*b);*/
}
}
static long getGCD(long a, long b){
if(b==0)
return a;
else return getGCD(b ,a%b);
}
static long getLCM(long a,long b){
return a*b/(getGCD(a,b));
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
17,
0,
13,
13,
0,
13,
13,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
14,
2,
2,
13,
13,
2,
13,
13,
30,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
3,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
98,
5
],
[
98,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
37,
38
],
[
37,
39
],
[
26,
40
],
[
40,
41
],
[
40,
42
],
[
26,
43
],
[
43,
44
],
[
43,
45
],
[
26,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
50,
56
],
[
56,
57
],
[
56,
58
],
[
50,
59
],
[
59,
60
],
[
59,
61
],
[
26,
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
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
84,
89
],
[
90,
90
],
[
90,
91
],
[
90,
92
],
[
90,
93
],
[
83,
94
],
[
6,
95
],
[
95,
96
],
[
0,
97
],
[
97,
98
],
[
97,
99
]
] | [
"import java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a,b,z,A,B;\n\t\twhile(scan.hasNext()){\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tz = 1;\n\t\t\tA = a;\n\t\t\tB = b;\n\t\t\twhile(z != 0){\n\t\t\t\tz = a % b;\n\t\t\t\ta = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tfor(int i = 1 ; i > 0 ; i++){\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a,b,z,A,B;\n\t\twhile(scan.hasNext()){\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tz = 1;\n\t\t\tA = a;\n\t\t\tB = b;\n\t\t\twhile(z != 0){\n\t\t\t\tz = a % b;\n\t\t\t\ta = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tfor(int i = 1 ; i > 0 ; i++){\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a,b,z,A,B;\n\t\twhile(scan.hasNext()){\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tz = 1;\n\t\t\tA = a;\n\t\t\tB = b;\n\t\t\twhile(z != 0){\n\t\t\t\tz = a % b;\n\t\t\t\ta = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tfor(int i = 1 ; i > 0 ; i++){\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a,b,z,A,B;\n\t\twhile(scan.hasNext()){\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tz = 1;\n\t\t\tA = a;\n\t\t\tB = b;\n\t\t\twhile(z != 0){\n\t\t\t\tz = a % b;\n\t\t\t\ta = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tfor(int i = 1 ; i > 0 ; i++){\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"long a",
"a",
"b",
"b",
"z",
"z",
"A",
"A",
"B;",
"B",
"while(scan.hasNext()){\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tz = 1;\n\t\t\tA = a;\n\t\t\tB = b;\n\t\t\twhile(z != 0){\n\t\t\t\tz = a % b;\n\t\t\t\ta = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tfor(int i = 1 ; i > 0 ; i++){\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tz = 1;\n\t\t\tA = a;\n\t\t\tB = b;\n\t\t\twhile(z != 0){\n\t\t\t\tz = a % b;\n\t\t\t\ta = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tfor(int i = 1 ; i > 0 ; i++){\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"a = scan.nextInt()",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"b = scan.nextInt()",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"z = 1",
"z",
"1",
"A = a",
"A",
"a",
"B = b",
"B",
"b",
"while(z != 0){\n\t\t\t\tz = a % b;\n\t\t\t\ta = b;\n\t\t\t\tb = z;\n\t\t\t}",
"z != 0",
"z",
"0",
"{\n\t\t\t\tz = a % b;\n\t\t\t\ta = b;\n\t\t\t\tb = z;\n\t\t\t}",
"z = a % b",
"z",
"a % b",
"a",
"b",
"a = b",
"a",
"b",
"b = z",
"b",
"z",
"for(int i = 1 ; i > 0 ; i++){\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"int i = 1 ;",
"int i = 1 ;",
"i",
"1",
"i > 0",
"i",
"0",
"i++",
"i++",
"i",
"{\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"A*B == a*i",
"A*B",
"A",
"B",
"a*i",
"a",
"i",
"{\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"System.out.println(a + \" \" + i)",
"System.out.println",
"System.out",
"System",
"System.out",
"a + \" \" + i",
"a + \" \" + i",
"a",
"\" \"",
"i",
"break;",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a,b,z,A,B;\n\t\twhile(scan.hasNext()){\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tz = 1;\n\t\t\tA = a;\n\t\t\tB = b;\n\t\t\twhile(z != 0){\n\t\t\t\tz = a % b;\n\t\t\t\ta = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tfor(int i = 1 ; i > 0 ; i++){\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws java.io.IOException {\n\t\tScanner scan = new Scanner(System.in);\n\t\tlong a,b,z,A,B;\n\t\twhile(scan.hasNext()){\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\t\t\tz = 1;\n\t\t\tA = a;\n\t\t\tB = b;\n\t\t\twhile(z != 0){\n\t\t\t\tz = a % b;\n\t\t\t\ta = b;\n\t\t\t\tb = z;\n\t\t\t}\n\t\t\tfor(int i = 1 ; i > 0 ; i++){\n\t\t\t\tif(A*B == a*i){\n\t\t\t\t\tSystem.out.println(a + \" \" + i);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] args) throws java.io.IOException {
Scanner scan = new Scanner(System.in);
long a,b,z,A,B;
while(scan.hasNext()){
a = scan.nextInt();
b = scan.nextInt();
z = 1;
A = a;
B = b;
while(z != 0){
z = a % b;
a = b;
b = z;
}
for(int i = 1 ; i > 0 ; i++){
if(A*B == a*i){
System.out.println(a + " " + i);
break;
}
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
0,
13,
4,
13,
13,
13,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
76,
5
],
[
76,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
17,
18
],
[
18,
19
],
[
16,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
20,
31
],
[
31,
32
],
[
31,
33
],
[
33,
34
],
[
33,
35
],
[
33,
36
],
[
20,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
20,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
50,
50
],
[
50,
51
],
[
50,
52
],
[
50,
53
],
[
6,
54
],
[
54,
55
],
[
76,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
60,
65
],
[
65,
66
],
[
65,
67
],
[
65,
68
],
[
68,
69
],
[
68,
70
],
[
56,
71
],
[
71,
72
],
[
56,
73
],
[
73,
74
],
[
0,
75
],
[
75,
76
],
[
75,
77
]
] | [
"import java.util.*;\npublic class Main{\n\tpublic static void main(String[] args) { \n\t\tScanner sc = new Scanner(System.in);\n\t\tint c,d;\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tc=s(a,b);\n\t\t\td=a/c*b;\n\t\t\tSystem.out.println(c+\" \"+d);\n\t\t}\n\t}\n\tstatic int s(int a,int b){\n\t\treturn b==0?a:s(b, a%b);\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 c,d;\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tc=s(a,b);\n\t\t\td=a/c*b;\n\t\t\tSystem.out.println(c+\" \"+d);\n\t\t}\n\t}\n\tstatic int s(int a,int b){\n\t\treturn b==0?a:s(b, a%b);\n\t}\n}",
"Main",
"public static void main(String[] args) { \n\t\tScanner sc = new Scanner(System.in);\n\t\tint c,d;\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tc=s(a,b);\n\t\t\td=a/c*b;\n\t\t\tSystem.out.println(c+\" \"+d);\n\t\t}\n\t}",
"main",
"{ \n\t\tScanner sc = new Scanner(System.in);\n\t\tint c,d;\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tc=s(a,b);\n\t\t\td=a/c*b;\n\t\t\tSystem.out.println(c+\" \"+d);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int c",
"c",
"d;",
"d",
"while(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tc=s(a,b);\n\t\t\td=a/c*b;\n\t\t\tSystem.out.println(c+\" \"+d);\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tc=s(a,b);\n\t\t\td=a/c*b;\n\t\t\tSystem.out.println(c+\" \"+d);\n\t\t}",
"int a=sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b=sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"c=s(a,b)",
"c",
"s(a,b)",
"s",
"a",
"b",
"d=a/c*b",
"d",
"a/c*b",
"a/c",
"a",
"c",
"b",
"System.out.println(c+\" \"+d)",
"System.out.println",
"System.out",
"System",
"System.out",
"c+\" \"+d",
"c+\" \"+d",
"c",
"\" \"",
"d",
"String[] args",
"args",
"static int s(int a,int b){\n\t\treturn b==0?a:s(b, a%b);\n\t}",
"s",
"{\n\t\treturn b==0?a:s(b, a%b);\n\t}",
"return b==0?a:s(b, a%b);",
"b==0?a:s(b, a%b)",
"b==0",
"b",
"0",
"a",
"s(b, a%b)",
"s",
"b",
"a%b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public class Main{\n\tpublic static void main(String[] args) { \n\t\tScanner sc = new Scanner(System.in);\n\t\tint c,d;\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tc=s(a,b);\n\t\t\td=a/c*b;\n\t\t\tSystem.out.println(c+\" \"+d);\n\t\t}\n\t}\n\tstatic int s(int a,int b){\n\t\treturn b==0?a:s(b, a%b);\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) { \n\t\tScanner sc = new Scanner(System.in);\n\t\tint c,d;\n\t\twhile(sc.hasNext()){\n\t\t\tint a=sc.nextInt();\n\t\t\tint b=sc.nextInt();\n\t\t\tc=s(a,b);\n\t\t\td=a/c*b;\n\t\t\tSystem.out.println(c+\" \"+d);\n\t\t}\n\t}\n\tstatic int s(int a,int b){\n\t\treturn b==0?a:s(b, a%b);\n\t}\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int c,d;
while(sc.hasNext()){
int a=sc.nextInt();
int b=sc.nextInt();
c=s(a,b);
d=a/c*b;
System.out.println(c+" "+d);
}
}
static int s(int a,int b){
return b==0?a:s(b, a%b);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
14,
2,
13,
17,
30,
29,
13,
30,
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,
41,
13,
17,
41,
13,
20,
17,
17,
41,
13,
17,
38,
30,
14,
2,
13,
17,
30,
4,
18,
13,
30,
0,
13,
20,
41,
13,
17,
41,
13,
17,
42,
4,
18,
13,
30,
14,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
30,
4,
18,
13,
0,
18,
18,
13,
13,
17,
4,
13,
13,
13,
0,
18,
18,
13,
13,
17,
4,
13,
13,
13,
40,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
2,
2,
18,
18,
13,
13,
17,
17,
18,
18,
13,
13,
17,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
175,
8
],
[
175,
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
],
[
20,
22
],
[
16,
23
],
[
23,
24
],
[
23,
25
],
[
11,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
31,
32
],
[
26,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
37,
39
],
[
35,
40
],
[
9,
41
],
[
41,
42
],
[
9,
43
],
[
43,
44
],
[
175,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
50,
52
],
[
49,
53
],
[
53,
54
],
[
53,
55
],
[
53,
56
],
[
45,
57
],
[
57,
58
],
[
45,
59
],
[
59,
60
],
[
175,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
67,
69
],
[
63,
72
],
[
72,
73
],
[
72,
74
],
[
63,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
78,
79
],
[
78,
80
],
[
77,
81
],
[
81,
82
],
[
82,
83
],
[
83,
84
],
[
75,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
85,
89
],
[
89,
90
],
[
89,
91
],
[
85,
92
],
[
92,
93
],
[
92,
94
],
[
85,
95
],
[
95,
96
],
[
96,
97
],
[
97,
98
],
[
95,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
100,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
108,
109
],
[
104,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
100,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
99,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
121,
123
],
[
120,
124
],
[
119,
125
],
[
125,
126
],
[
125,
127
],
[
125,
128
],
[
99,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
129,
135
],
[
135,
136
],
[
135,
137
],
[
135,
138
],
[
99,
139
],
[
139,
140
],
[
85,
141
],
[
141,
142
],
[
142,
143
],
[
143,
144
],
[
143,
145
],
[
141,
146
],
[
146,
147
],
[
146,
148
],
[
141,
149
],
[
149,
150
],
[
150,
151
],
[
141,
152
],
[
153,
153
],
[
153,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
154,
159
],
[
160,
160
],
[
160,
161
],
[
161,
162
],
[
162,
163
],
[
162,
164
],
[
161,
165
],
[
160,
166
],
[
160,
167
],
[
167,
168
],
[
168,
169
],
[
168,
170
],
[
167,
171
],
[
61,
172
],
[
172,
173
],
[
0,
174
],
[
174,
175
],
[
174,
176
]
] | [
"import java.io.*;\nimport java.util.Scanner;\n\npublic class Main{\n\tpublic static long calculateGCD(long x, long y){\n\t\tif( y > x ){\n\t\t\tlong temp = x;\n\t\t\tx = y;\n\t\t\ty = temp;\n\t\t}\n\t\tif( y == 0 ){\n\t\t\treturn x;\n\t\t} else {\n\t\t\treturn calculateGCD(x-y, y);\n\t\t}\n\t}\n\t\n\tpublic static long calculateLCM(long x, long y){\n\t\treturn x*y/calculateGCD(x, y);\n\t}\n\t\t\t\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner stdIn = null;\n\t\tlong[][] result = new long[100][2];\n\t\tint index = 0;\n\t\t\n\t\ttry{\n\t\t\tstdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\t\tlong x = 0;\n\t\t\tlong y = 0;\n\t\t\twhile( stdIn.hasNext() ){\n\t\t\t\tif( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult[index][0] = calculateGCD(x, y);\n\t\t\t\tresult[index][1] = calculateLCM(x, y);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < index; i++){\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}\n\t\t} finally {\n\t\t\tif( stdIn != null ){\n\t\t\t\tstdIn.close();\n\t\t\t}\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\tpublic static long calculateGCD(long x, long y){\n\t\tif( y > x ){\n\t\t\tlong temp = x;\n\t\t\tx = y;\n\t\t\ty = temp;\n\t\t}\n\t\tif( y == 0 ){\n\t\t\treturn x;\n\t\t} else {\n\t\t\treturn calculateGCD(x-y, y);\n\t\t}\n\t}\n\t\n\tpublic static long calculateLCM(long x, long y){\n\t\treturn x*y/calculateGCD(x, y);\n\t}\n\t\t\t\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner stdIn = null;\n\t\tlong[][] result = new long[100][2];\n\t\tint index = 0;\n\t\t\n\t\ttry{\n\t\t\tstdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\t\tlong x = 0;\n\t\t\tlong y = 0;\n\t\t\twhile( stdIn.hasNext() ){\n\t\t\t\tif( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult[index][0] = calculateGCD(x, y);\n\t\t\t\tresult[index][1] = calculateLCM(x, y);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < index; i++){\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}\n\t\t} finally {\n\t\t\tif( stdIn != null ){\n\t\t\t\tstdIn.close();\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"public static long calculateGCD(long x, long y){\n\t\tif( y > x ){\n\t\t\tlong temp = x;\n\t\t\tx = y;\n\t\t\ty = temp;\n\t\t}\n\t\tif( y == 0 ){\n\t\t\treturn x;\n\t\t} else {\n\t\t\treturn calculateGCD(x-y, y);\n\t\t}\n\t}",
"calculateGCD",
"{\n\t\tif( y > x ){\n\t\t\tlong temp = x;\n\t\t\tx = y;\n\t\t\ty = temp;\n\t\t}\n\t\tif( y == 0 ){\n\t\t\treturn x;\n\t\t} else {\n\t\t\treturn calculateGCD(x-y, y);\n\t\t}\n\t}",
"if( y > x ){\n\t\t\tlong temp = x;\n\t\t\tx = y;\n\t\t\ty = temp;\n\t\t}",
"y > x",
"y",
"x",
"{\n\t\t\tlong temp = x;\n\t\t\tx = y;\n\t\t\ty = temp;\n\t\t}",
"long temp = x;",
"temp",
"x",
"x = y",
"x",
"y",
"y = temp",
"y",
"temp",
"if( y == 0 ){\n\t\t\treturn x;\n\t\t} else {\n\t\t\treturn calculateGCD(x-y, y);\n\t\t}",
"y == 0",
"y",
"0",
"{\n\t\t\treturn x;\n\t\t}",
"return x;",
"x",
"{\n\t\t\treturn calculateGCD(x-y, y);\n\t\t}",
"return calculateGCD(x-y, y);",
"calculateGCD(x-y, y)",
"calculateGCD",
"x-y",
"x",
"y",
"y",
"long x",
"x",
"long y",
"y",
"public static long calculateLCM(long x, long y){\n\t\treturn x*y/calculateGCD(x, y);\n\t}",
"calculateLCM",
"{\n\t\treturn x*y/calculateGCD(x, y);\n\t}",
"return x*y/calculateGCD(x, y);",
"x*y/calculateGCD(x, y)",
"x*y",
"x",
"y",
"calculateGCD(x, y)",
"calculateGCD",
"x",
"y",
"long x",
"x",
"long y",
"y",
"public static void main(String[] args) throws IOException{\n\t\tScanner stdIn = null;\n\t\tlong[][] result = new long[100][2];\n\t\tint index = 0;\n\t\t\n\t\ttry{\n\t\t\tstdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\t\tlong x = 0;\n\t\t\tlong y = 0;\n\t\t\twhile( stdIn.hasNext() ){\n\t\t\t\tif( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult[index][0] = calculateGCD(x, y);\n\t\t\t\tresult[index][1] = calculateLCM(x, y);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < index; i++){\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}\n\t\t} finally {\n\t\t\tif( stdIn != null ){\n\t\t\t\tstdIn.close();\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\tScanner stdIn = null;\n\t\tlong[][] result = new long[100][2];\n\t\tint index = 0;\n\t\t\n\t\ttry{\n\t\t\tstdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\t\tlong x = 0;\n\t\t\tlong y = 0;\n\t\t\twhile( stdIn.hasNext() ){\n\t\t\t\tif( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult[index][0] = calculateGCD(x, y);\n\t\t\t\tresult[index][1] = calculateLCM(x, y);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < index; i++){\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}\n\t\t} finally {\n\t\t\tif( stdIn != null ){\n\t\t\t\tstdIn.close();\n\t\t\t}\n\t\t}\n\t}",
"Scanner stdIn = null;",
"stdIn",
"null",
"long[][] result = new long[100][2];",
"result",
"new long[100][2]",
"100",
"2",
"int index = 0;",
"index",
"0",
"try{\n\t\t\tstdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\t\tlong x = 0;\n\t\t\tlong y = 0;\n\t\t\twhile( stdIn.hasNext() ){\n\t\t\t\tif( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult[index][0] = calculateGCD(x, y);\n\t\t\t\tresult[index][1] = calculateLCM(x, y);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < index; i++){\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}\n\t\t} finally {\n\t\t\tif( stdIn != null ){\n\t\t\t\tstdIn.close();\n\t\t\t}\n\t\t}",
"{\n\t\t\tif( stdIn != null ){\n\t\t\t\tstdIn.close();\n\t\t\t}\n\t\t}",
"if( stdIn != null ){\n\t\t\t\tstdIn.close();\n\t\t\t}",
"stdIn != null",
"stdIn",
"null",
"{\n\t\t\t\tstdIn.close();\n\t\t\t}",
"stdIn.close()",
"stdIn.close",
"stdIn",
"{\n\t\t\tstdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\t\tlong x = 0;\n\t\t\tlong y = 0;\n\t\t\twhile( stdIn.hasNext() ){\n\t\t\t\tif( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult[index][0] = calculateGCD(x, y);\n\t\t\t\tresult[index][1] = calculateLCM(x, y);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < index; i++){\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}\n\t\t}",
"stdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)))",
"stdIn",
"new Scanner(new BufferedReader(new InputStreamReader(System.in)))",
"long x = 0;",
"x",
"0",
"long y = 0;",
"y",
"0",
"while( stdIn.hasNext() ){\n\t\t\t\tif( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult[index][0] = calculateGCD(x, y);\n\t\t\t\tresult[index][1] = calculateLCM(x, y);\n\t\t\t\tindex++;\n\t\t\t}",
"stdIn.hasNext()",
"stdIn.hasNext",
"stdIn",
"{\n\t\t\t\tif( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult[index][0] = calculateGCD(x, y);\n\t\t\t\tresult[index][1] = calculateLCM(x, y);\n\t\t\t\tindex++;\n\t\t\t}",
"if( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}",
"stdIn.hasNextInt()",
"stdIn.hasNextInt",
"stdIn",
"{\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t}",
"x = stdIn.nextInt()",
"x",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"y = stdIn.nextInt()",
"y",
"stdIn.nextInt()",
"stdIn.nextInt",
"stdIn",
"{\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}",
"stdIn.next()",
"stdIn.next",
"stdIn",
"result[index][0] = calculateGCD(x, y)",
"result[index][0]",
"result[index]",
"result",
"index",
"0",
"calculateGCD(x, y)",
"calculateGCD",
"x",
"y",
"result[index][1] = calculateLCM(x, y)",
"result[index][1]",
"result[index]",
"result",
"index",
"1",
"calculateLCM(x, y)",
"calculateLCM",
"x",
"y",
"index++",
"index",
"for(int i = 0; i < index; i++){\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < index",
"i",
"index",
"i++",
"i++",
"i",
"{\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}",
"{\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}",
"System.out.println(result[i][0] + \" \" + result[i][1])",
"System.out.println",
"System.out",
"System",
"System.out",
"result[i][0] + \" \" + result[i][1]",
"result[i][0] + \" \" + result[i][1]",
"result[i][0]",
"result[i]",
"result",
"i",
"0",
"\" \"",
"result[i][1]",
"result[i]",
"result",
"i",
"1",
"String[] args",
"args",
"public class Main{\n\tpublic static long calculateGCD(long x, long y){\n\t\tif( y > x ){\n\t\t\tlong temp = x;\n\t\t\tx = y;\n\t\t\ty = temp;\n\t\t}\n\t\tif( y == 0 ){\n\t\t\treturn x;\n\t\t} else {\n\t\t\treturn calculateGCD(x-y, y);\n\t\t}\n\t}\n\t\n\tpublic static long calculateLCM(long x, long y){\n\t\treturn x*y/calculateGCD(x, y);\n\t}\n\t\t\t\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner stdIn = null;\n\t\tlong[][] result = new long[100][2];\n\t\tint index = 0;\n\t\t\n\t\ttry{\n\t\t\tstdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\t\tlong x = 0;\n\t\t\tlong y = 0;\n\t\t\twhile( stdIn.hasNext() ){\n\t\t\t\tif( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult[index][0] = calculateGCD(x, y);\n\t\t\t\tresult[index][1] = calculateLCM(x, y);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < index; i++){\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}\n\t\t} finally {\n\t\t\tif( stdIn != null ){\n\t\t\t\tstdIn.close();\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static long calculateGCD(long x, long y){\n\t\tif( y > x ){\n\t\t\tlong temp = x;\n\t\t\tx = y;\n\t\t\ty = temp;\n\t\t}\n\t\tif( y == 0 ){\n\t\t\treturn x;\n\t\t} else {\n\t\t\treturn calculateGCD(x-y, y);\n\t\t}\n\t}\n\t\n\tpublic static long calculateLCM(long x, long y){\n\t\treturn x*y/calculateGCD(x, y);\n\t}\n\t\t\t\n\tpublic static void main(String[] args) throws IOException{\n\t\tScanner stdIn = null;\n\t\tlong[][] result = new long[100][2];\n\t\tint index = 0;\n\t\t\n\t\ttry{\n\t\t\tstdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));\n\t\t\tlong x = 0;\n\t\t\tlong y = 0;\n\t\t\twhile( stdIn.hasNext() ){\n\t\t\t\tif( stdIn.hasNextInt() ){\n\t\t\t\t\tx = stdIn.nextInt();\n\t\t\t\t\ty = stdIn.nextInt();\n\t\t\t\t} else {\n\t\t\t\t\tstdIn.next();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tresult[index][0] = calculateGCD(x, y);\n\t\t\t\tresult[index][1] = calculateLCM(x, y);\n\t\t\t\tindex++;\n\t\t\t}\n\t\t\t\n\t\t\tfor(int i = 0; i < index; i++){\n\t\t\t\tSystem.out.println(result[i][0] + \" \" + result[i][1]);\n\t\t\t}\n\t\t} finally {\n\t\t\tif( stdIn != null ){\n\t\t\t\tstdIn.close();\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
] | import java.io.*;
import java.util.Scanner;
public class Main{
public static long calculateGCD(long x, long y){
if( y > x ){
long temp = x;
x = y;
y = temp;
}
if( y == 0 ){
return x;
} else {
return calculateGCD(x-y, y);
}
}
public static long calculateLCM(long x, long y){
return x*y/calculateGCD(x, y);
}
public static void main(String[] args) throws IOException{
Scanner stdIn = null;
long[][] result = new long[100][2];
int index = 0;
try{
stdIn = new Scanner(new BufferedReader(new InputStreamReader(System.in)));
long x = 0;
long y = 0;
while( stdIn.hasNext() ){
if( stdIn.hasNextInt() ){
x = stdIn.nextInt();
y = stdIn.nextInt();
} else {
stdIn.next();
}
result[index][0] = calculateGCD(x, y);
result[index][1] = calculateLCM(x, y);
index++;
}
for(int i = 0; i < index; i++){
System.out.println(result[i][0] + " " + result[i][1]);
}
} finally {
if( stdIn != null ){
stdIn.close();
}
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
13,
41,
13,
4,
18,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
64,
8
],
[
64,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
11,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
22,
25
],
[
25,
26
],
[
26,
27
],
[
19,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
30,
33
],
[
33,
34
],
[
34,
35
],
[
19,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
19,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
44,
50
],
[
19,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
51,
56
],
[
57,
57
],
[
57,
58
],
[
57,
59
],
[
57,
60
],
[
9,
61
],
[
61,
62
],
[
0,
63
],
[
63,
64
],
[
63,
65
]
] | [
"import java.math.BigInteger;\nimport java.util.Scanner;\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\twhile(s.hasNext()){\n\t\t\tBigInteger a = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger b = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger g = a.gcd(b);\n\t\t\tBigInteger l = a.multiply(b).divide(g);\n\t\t\tSystem.out.println(g+\" \"+l);\n\t\t}\t\n\t}\t\n}",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\twhile(s.hasNext()){\n\t\t\tBigInteger a = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger b = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger g = a.gcd(b);\n\t\t\tBigInteger l = a.multiply(b).divide(g);\n\t\t\tSystem.out.println(g+\" \"+l);\n\t\t}\t\n\t}\t\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\twhile(s.hasNext()){\n\t\t\tBigInteger a = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger b = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger g = a.gcd(b);\n\t\t\tBigInteger l = a.multiply(b).divide(g);\n\t\t\tSystem.out.println(g+\" \"+l);\n\t\t}\t\n\t}",
"main",
"{\n\t\tScanner s=new Scanner(System.in);\n\t\twhile(s.hasNext()){\n\t\t\tBigInteger a = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger b = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger g = a.gcd(b);\n\t\t\tBigInteger l = a.multiply(b).divide(g);\n\t\t\tSystem.out.println(g+\" \"+l);\n\t\t}\t\n\t}",
"Scanner s=new Scanner(System.in);",
"s",
"new Scanner(System.in)",
"while(s.hasNext()){\n\t\t\tBigInteger a = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger b = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger g = a.gcd(b);\n\t\t\tBigInteger l = a.multiply(b).divide(g);\n\t\t\tSystem.out.println(g+\" \"+l);\n\t\t}",
"s.hasNext()",
"s.hasNext",
"s",
"{\n\t\t\tBigInteger a = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger b = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger g = a.gcd(b);\n\t\t\tBigInteger l = a.multiply(b).divide(g);\n\t\t\tSystem.out.println(g+\" \"+l);\n\t\t}",
"BigInteger a = BigInteger.valueOf(s.nextInt());",
"a",
"BigInteger.valueOf(s.nextInt())",
"BigInteger.valueOf",
"BigInteger",
"s.nextInt()",
"s.nextInt",
"s",
"BigInteger b = BigInteger.valueOf(s.nextInt());",
"b",
"BigInteger.valueOf(s.nextInt())",
"BigInteger.valueOf",
"BigInteger",
"s.nextInt()",
"s.nextInt",
"s",
"BigInteger g = a.gcd(b);",
"g",
"a.gcd(b)",
"a.gcd",
"a",
"b",
"BigInteger l = a.multiply(b).divide(g);",
"l",
"a.multiply(b).divide(g)",
"a.multiply(b).divide",
"a.multiply(b)",
"a.multiply",
"a",
"b",
"g",
"System.out.println(g+\" \"+l)",
"System.out.println",
"System.out",
"System",
"System.out",
"g+\" \"+l",
"g+\" \"+l",
"g",
"\" \"",
"l",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\twhile(s.hasNext()){\n\t\t\tBigInteger a = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger b = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger g = a.gcd(b);\n\t\t\tBigInteger l = a.multiply(b).divide(g);\n\t\t\tSystem.out.println(g+\" \"+l);\n\t\t}\t\n\t}\t\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tScanner s=new Scanner(System.in);\n\t\twhile(s.hasNext()){\n\t\t\tBigInteger a = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger b = BigInteger.valueOf(s.nextInt());\n\t\t\tBigInteger g = a.gcd(b);\n\t\t\tBigInteger l = a.multiply(b).divide(g);\n\t\t\tSystem.out.println(g+\" \"+l);\n\t\t}\t\n\t}\t\n}",
"Main"
] | import java.math.BigInteger;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
while(s.hasNext()){
BigInteger a = BigInteger.valueOf(s.nextInt());
BigInteger b = BigInteger.valueOf(s.nextInt());
BigInteger g = a.gcd(b);
BigInteger l = a.multiply(b).divide(g);
System.out.println(g+" "+l);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
2,
13,
17,
30,
3,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
13,
42,
2,
2,
13,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
13,
29,
2,
2,
13,
2,
13,
13,
2,
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
],
[
126,
11
],
[
126,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
20,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
34,
37
],
[
20,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
41,
42
],
[
40,
43
],
[
43,
44
],
[
43,
45
],
[
20,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
51,
52
],
[
51,
53
],
[
20,
54
],
[
54,
55
],
[
55,
56
],
[
56,
57
],
[
56,
58
],
[
54,
59
],
[
60,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
61,
64
],
[
60,
65
],
[
60,
66
],
[
66,
67
],
[
66,
68
],
[
66,
69
],
[
12,
70
],
[
70,
71
],
[
126,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
80,
82
],
[
79,
83
],
[
78,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
84,
90
],
[
90,
91
],
[
90,
92
],
[
84,
93
],
[
93,
94
],
[
93,
95
],
[
74,
96
],
[
96,
97
],
[
72,
98
],
[
98,
99
],
[
72,
100
],
[
100,
101
],
[
126,
102
],
[
102,
103
],
[
102,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
107,
110
],
[
104,
111
],
[
111,
112
],
[
113,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
118,
119
],
[
118,
120
],
[
102,
121
],
[
121,
122
],
[
102,
123
],
[
123,
124
],
[
0,
125
],
[
125,
126
],
[
125,
127
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n \npublic class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n while(true){\n String tmp = br.readLine();\n \n if(tmp == null){\n break;\n }\n \n String[] tmpArray = tmp.split(\" \");\n int a = Integer.parseInt(tmpArray[0]);\n int b = Integer.parseInt(tmpArray[1]);\n \n System.out.println(GCD(a,b) + \" \"+ LCM(a,b));\n }\n }\n \n static long GCD (long a, long b){\n\t long candidate = a;\n\t while (b % a != 0) {\n\t candidate = b % a;\n\t b = a;\n\t a = candidate;\n\t }\n\t return candidate;\n\t}\n \n static long LCM (long a, long b){\n\t\tlong GCD = GCD(a, b);\n\t\t//System.out.println(\"GCD(\"+a+\",\"+b+\") is \"+GCD);\n\t\treturn GCD * (a/GCD) * (b/GCD);\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",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n while(true){\n String tmp = br.readLine();\n \n if(tmp == null){\n break;\n }\n \n String[] tmpArray = tmp.split(\" \");\n int a = Integer.parseInt(tmpArray[0]);\n int b = Integer.parseInt(tmpArray[1]);\n \n System.out.println(GCD(a,b) + \" \"+ LCM(a,b));\n }\n }\n \n static long GCD (long a, long b){\n\t long candidate = a;\n\t while (b % a != 0) {\n\t candidate = b % a;\n\t b = a;\n\t a = candidate;\n\t }\n\t return candidate;\n\t}\n \n static long LCM (long a, long b){\n\t\tlong GCD = GCD(a, b);\n\t\t//System.out.println(\"GCD(\"+a+\",\"+b+\") is \"+GCD);\n\t\treturn GCD * (a/GCD) * (b/GCD);\n\t}\n \n}",
"Main",
"public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n while(true){\n String tmp = br.readLine();\n \n if(tmp == null){\n break;\n }\n \n String[] tmpArray = tmp.split(\" \");\n int a = Integer.parseInt(tmpArray[0]);\n int b = Integer.parseInt(tmpArray[1]);\n \n System.out.println(GCD(a,b) + \" \"+ LCM(a,b));\n }\n }",
"main",
"{\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n while(true){\n String tmp = br.readLine();\n \n if(tmp == null){\n break;\n }\n \n String[] tmpArray = tmp.split(\" \");\n int a = Integer.parseInt(tmpArray[0]);\n int b = Integer.parseInt(tmpArray[1]);\n \n System.out.println(GCD(a,b) + \" \"+ LCM(a,b));\n }\n }",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"while(true){\n String tmp = br.readLine();\n \n if(tmp == null){\n break;\n }\n \n String[] tmpArray = tmp.split(\" \");\n int a = Integer.parseInt(tmpArray[0]);\n int b = Integer.parseInt(tmpArray[1]);\n \n System.out.println(GCD(a,b) + \" \"+ LCM(a,b));\n }",
"true",
"{\n String tmp = br.readLine();\n \n if(tmp == null){\n break;\n }\n \n String[] tmpArray = tmp.split(\" \");\n int a = Integer.parseInt(tmpArray[0]);\n int b = Integer.parseInt(tmpArray[1]);\n \n System.out.println(GCD(a,b) + \" \"+ LCM(a,b));\n }",
"String tmp = br.readLine();",
"tmp",
"br.readLine()",
"br.readLine",
"br",
"if(tmp == null){\n break;\n }",
"tmp == null",
"tmp",
"null",
"{\n break;\n }",
"break;",
"String[] tmpArray = tmp.split(\" \");",
"tmpArray",
"tmp.split(\" \")",
"tmp.split",
"tmp",
"\" \"",
"int a = Integer.parseInt(tmpArray[0]);",
"a",
"Integer.parseInt(tmpArray[0])",
"Integer.parseInt",
"Integer",
"tmpArray[0]",
"tmpArray",
"0",
"int b = Integer.parseInt(tmpArray[1]);",
"b",
"Integer.parseInt(tmpArray[1])",
"Integer.parseInt",
"Integer",
"tmpArray[1]",
"tmpArray",
"1",
"System.out.println(GCD(a,b) + \" \"+ LCM(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"GCD(a,b) + \" \"+ LCM(a,b)",
"GCD(a,b) + \" \"+ LCM(a,b)",
"GCD(a,b)",
"GCD",
"a",
"b",
"\" \"",
"LCM(a,b)",
"LCM",
"a",
"b",
"String[] args",
"args",
"static long GCD (long a, long b){\n\t long candidate = a;\n\t while (b % a != 0) {\n\t candidate = b % a;\n\t b = a;\n\t a = candidate;\n\t }\n\t return candidate;\n\t}",
"GCD",
"{\n\t long candidate = a;\n\t while (b % a != 0) {\n\t candidate = b % a;\n\t b = a;\n\t a = candidate;\n\t }\n\t return candidate;\n\t}",
"long candidate = a;",
"candidate",
"a",
"while (b % a != 0) {\n\t candidate = b % a;\n\t b = a;\n\t a = candidate;\n\t }",
"b % a != 0",
"b % a",
"b",
"a",
"0",
"{\n\t candidate = b % a;\n\t b = a;\n\t a = candidate;\n\t }",
"candidate = b % a",
"candidate",
"b % a",
"b",
"a",
"b = a",
"b",
"a",
"a = candidate",
"a",
"candidate",
"return candidate;",
"candidate",
"long a",
"a",
"long b",
"b",
"static long LCM (long a, long b){\n\t\tlong GCD = GCD(a, b);\n\t\t//System.out.println(\"GCD(\"+a+\",\"+b+\") is \"+GCD);\n\t\treturn GCD * (a/GCD) * (b/GCD);\n\t}",
"LCM",
"{\n\t\tlong GCD = GCD(a, b);\n\t\t//System.out.println(\"GCD(\"+a+\",\"+b+\") is \"+GCD);\n\t\treturn GCD * (a/GCD) * (b/GCD);\n\t}",
"long GCD = GCD(a, b);",
"GCD",
"GCD(a, b)",
"GCD",
"a",
"b",
"return GCD * (a/GCD) * (b/GCD);",
"GCD * (a/GCD) * (b/GCD)",
"GCD * (a/GCD) * (b/GCD)",
"GCD",
"(a/GCD)",
"a",
"GCD",
"(b/GCD)",
"b",
"GCD",
"long a",
"a",
"long b",
"b",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n while(true){\n String tmp = br.readLine();\n \n if(tmp == null){\n break;\n }\n \n String[] tmpArray = tmp.split(\" \");\n int a = Integer.parseInt(tmpArray[0]);\n int b = Integer.parseInt(tmpArray[1]);\n \n System.out.println(GCD(a,b) + \" \"+ LCM(a,b));\n }\n }\n \n static long GCD (long a, long b){\n\t long candidate = a;\n\t while (b % a != 0) {\n\t candidate = b % a;\n\t b = a;\n\t a = candidate;\n\t }\n\t return candidate;\n\t}\n \n static long LCM (long a, long b){\n\t\tlong GCD = GCD(a, b);\n\t\t//System.out.println(\"GCD(\"+a+\",\"+b+\") is \"+GCD);\n\t\treturn GCD * (a/GCD) * (b/GCD);\n\t}\n \n}",
"public class Main {\n \n public static void main(String[] args) throws IOException {\n BufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n \n while(true){\n String tmp = br.readLine();\n \n if(tmp == null){\n break;\n }\n \n String[] tmpArray = tmp.split(\" \");\n int a = Integer.parseInt(tmpArray[0]);\n int b = Integer.parseInt(tmpArray[1]);\n \n System.out.println(GCD(a,b) + \" \"+ LCM(a,b));\n }\n }\n \n static long GCD (long a, long b){\n\t long candidate = a;\n\t while (b % a != 0) {\n\t candidate = b % a;\n\t b = a;\n\t a = candidate;\n\t }\n\t return candidate;\n\t}\n \n static long LCM (long a, long b){\n\t\tlong GCD = GCD(a, b);\n\t\t//System.out.println(\"GCD(\"+a+\",\"+b+\") is \"+GCD);\n\t\treturn GCD * (a/GCD) * (b/GCD);\n\t}\n \n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
while(true){
String tmp = br.readLine();
if(tmp == null){
break;
}
String[] tmpArray = tmp.split(" ");
int a = Integer.parseInt(tmpArray[0]);
int b = Integer.parseInt(tmpArray[1]);
System.out.println(GCD(a,b) + " "+ LCM(a,b));
}
}
static long GCD (long a, long b){
long candidate = a;
while (b % a != 0) {
candidate = b % a;
b = a;
a = candidate;
}
return candidate;
}
static long LCM (long a, long b){
long GCD = GCD(a, b);
//System.out.println("GCD("+a+","+b+") is "+GCD);
return GCD * (a/GCD) * (b/GCD);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
38,
5,
13,
30,
30,
42,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
41,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
42,
2,
13,
17,
30,
0,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
97,
5
],
[
97,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
32,
34
],
[
32,
35
],
[
19,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
19,
43
],
[
43,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
43,
48
],
[
49,
49
],
[
49,
50
],
[
49,
51
],
[
49,
52
],
[
6,
53
],
[
53,
54
],
[
97,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
60,
64
],
[
57,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
67,
71
],
[
57,
72
],
[
72,
73
],
[
57,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
78,
87
],
[
87,
88
],
[
87,
89
],
[
57,
90
],
[
90,
91
],
[
55,
92
],
[
92,
93
],
[
55,
94
],
[
94,
95
],
[
0,
96
],
[
96,
97
],
[
96,
98
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\tpublic static void main(String[] a){\n\t\tScanner scn = new Scanner(System.in);\n\t\ttry{\n\t\t\twhile(true){\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t}catch(Exception e){\n\n\t\t}\n\n\t}\n\tpublic static long gcd(long alpha,long beta){\n\t\tlong x = Math.max(alpha,beta);\n\t\tlong y = Math.min(alpha,beta);\n\t\tlong z;\n\t\twhile(y != 0){\n\t\t\tz = y;\n\t\t\ty = x % y;\n\t\t\tx = z;\n\t\t}\n\t\treturn x;\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tpublic static void main(String[] a){\n\t\tScanner scn = new Scanner(System.in);\n\t\ttry{\n\t\t\twhile(true){\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t}catch(Exception e){\n\n\t\t}\n\n\t}\n\tpublic static long gcd(long alpha,long beta){\n\t\tlong x = Math.max(alpha,beta);\n\t\tlong y = Math.min(alpha,beta);\n\t\tlong z;\n\t\twhile(y != 0){\n\t\t\tz = y;\n\t\t\ty = x % y;\n\t\t\tx = z;\n\t\t}\n\t\treturn x;\n\t}\n}",
"Main",
"public static void main(String[] a){\n\t\tScanner scn = new Scanner(System.in);\n\t\ttry{\n\t\t\twhile(true){\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t}catch(Exception e){\n\n\t\t}\n\n\t}",
"main",
"{\n\t\tScanner scn = new Scanner(System.in);\n\t\ttry{\n\t\t\twhile(true){\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t}catch(Exception e){\n\n\t\t}\n\n\t}",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"try{\n\t\t\twhile(true){\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t}catch(Exception e){\n\n\t\t}",
"catch(Exception e){\n\n\t\t}",
"Exception e",
"{\n\n\t\t}",
"{\n\t\t\twhile(true){\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t}",
"while(true){\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}",
"true",
"{\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}",
"long alpha = scn.nextInt();",
"alpha",
"scn.nextInt()",
"scn.nextInt",
"scn",
"long beta = scn.nextInt();",
"beta",
"scn.nextInt()",
"scn.nextInt",
"scn",
"long gcd = gcd(alpha,beta);",
"gcd",
"gcd(alpha,beta)",
"gcd",
"alpha",
"beta",
"long lcm = alpha /gcd * beta;",
"lcm",
"alpha /gcd * beta",
"alpha /gcd",
"alpha",
"gcd",
"beta",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"String[] a",
"a",
"public static long gcd(long alpha,long beta){\n\t\tlong x = Math.max(alpha,beta);\n\t\tlong y = Math.min(alpha,beta);\n\t\tlong z;\n\t\twhile(y != 0){\n\t\t\tz = y;\n\t\t\ty = x % y;\n\t\t\tx = z;\n\t\t}\n\t\treturn x;\n\t}",
"gcd",
"{\n\t\tlong x = Math.max(alpha,beta);\n\t\tlong y = Math.min(alpha,beta);\n\t\tlong z;\n\t\twhile(y != 0){\n\t\t\tz = y;\n\t\t\ty = x % y;\n\t\t\tx = z;\n\t\t}\n\t\treturn x;\n\t}",
"long x = Math.max(alpha,beta);",
"x",
"Math.max(alpha,beta)",
"Math.max",
"Math",
"alpha",
"beta",
"long y = Math.min(alpha,beta);",
"y",
"Math.min(alpha,beta)",
"Math.min",
"Math",
"alpha",
"beta",
"long z;",
"z",
"while(y != 0){\n\t\t\tz = y;\n\t\t\ty = x % y;\n\t\t\tx = z;\n\t\t}",
"y != 0",
"y",
"0",
"{\n\t\t\tz = y;\n\t\t\ty = x % y;\n\t\t\tx = z;\n\t\t}",
"z = y",
"z",
"y",
"y = x % y",
"y",
"x % y",
"x",
"y",
"x = z",
"x",
"z",
"return x;",
"x",
"long alpha",
"alpha",
"long beta",
"beta",
"public class Main {\n\tpublic static void main(String[] a){\n\t\tScanner scn = new Scanner(System.in);\n\t\ttry{\n\t\t\twhile(true){\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t}catch(Exception e){\n\n\t\t}\n\n\t}\n\tpublic static long gcd(long alpha,long beta){\n\t\tlong x = Math.max(alpha,beta);\n\t\tlong y = Math.min(alpha,beta);\n\t\tlong z;\n\t\twhile(y != 0){\n\t\t\tz = y;\n\t\t\ty = x % y;\n\t\t\tx = z;\n\t\t}\n\t\treturn x;\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] a){\n\t\tScanner scn = new Scanner(System.in);\n\t\ttry{\n\t\t\twhile(true){\n\t\t\t\tlong alpha = scn.nextInt();\n\t\t\t\tlong beta = scn.nextInt();\n\t\t\t\tlong gcd = gcd(alpha,beta);\n\t\t\t\tlong lcm = alpha /gcd * beta;\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t}catch(Exception e){\n\n\t\t}\n\n\t}\n\tpublic static long gcd(long alpha,long beta){\n\t\tlong x = Math.max(alpha,beta);\n\t\tlong y = Math.min(alpha,beta);\n\t\tlong z;\n\t\twhile(y != 0){\n\t\t\tz = y;\n\t\t\ty = x % y;\n\t\t\tx = z;\n\t\t}\n\t\treturn x;\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String[] a){
Scanner scn = new Scanner(System.in);
try{
while(true){
long alpha = scn.nextInt();
long beta = scn.nextInt();
long gcd = gcd(alpha,beta);
long lcm = alpha /gcd * beta;
System.out.println(gcd + " " + lcm);
}
}catch(Exception e){
}
}
public static long gcd(long alpha,long beta){
long x = Math.max(alpha,beta);
long y = Math.min(alpha,beta);
long z;
while(y != 0){
z = y;
y = x % y;
x = z;
}
return x;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
41,
13,
4,
18,
13,
14,
2,
2,
13,
17,
2,
4,
18,
13,
17,
30,
3,
4,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
18,
13,
17,
41,
13,
4,
18,
13,
4,
18,
13,
18,
13,
17,
14,
2,
4,
18,
13,
13,
40,
17,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
2,
2,
4,
18,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
14,
2,
4,
18,
13,
18,
13,
13,
17,
30,
29,
18,
13,
13,
29,
4,
18,
4,
18,
13,
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
],
[
146,
11
],
[
146,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
20,
26
],
[
26,
27
],
[
27,
28
],
[
28,
29
],
[
28,
30
],
[
27,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
31,
35
],
[
26,
36
],
[
36,
37
],
[
20,
38
],
[
38,
39
],
[
38,
40
],
[
12,
41
],
[
41,
42
],
[
146,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
48,
49
],
[
49,
50
],
[
48,
51
],
[
45,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
57,
60
],
[
60,
61
],
[
60,
62
],
[
45,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
65,
68
],
[
68,
69
],
[
69,
70
],
[
68,
71
],
[
71,
72
],
[
71,
73
],
[
45,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
75,
80
],
[
80,
81
],
[
74,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
86,
87
],
[
86,
88
],
[
82,
89
],
[
89,
90
],
[
89,
91
],
[
45,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
98,
98
],
[
98,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
98,
103
],
[
98,
104
],
[
104,
105
],
[
104,
106
],
[
104,
107
],
[
43,
108
],
[
108,
109
],
[
146,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
116,
117
],
[
115,
118
],
[
112,
119
],
[
119,
120
],
[
120,
121
],
[
121,
122
],
[
122,
123
],
[
121,
124
],
[
124,
125
],
[
124,
126
],
[
120,
127
],
[
119,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
112,
133
],
[
133,
134
],
[
134,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
136,
139
],
[
134,
140
],
[
110,
141
],
[
141,
142
],
[
110,
143
],
[
143,
144
],
[
0,
145
],
[
145,
146
],
[
145,
147
]
] | [
"\nimport java.io.*;\nimport java.math.BigInteger;\nimport java.util.*;\n\npublic class Main {\n\n public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n while(true) {\n String s = in.readLine();\n if (s == null || s.length() < 1) {\n break;\n }\n f(s);\n }\n /*/\n f(\"8 6\");\n f(\"50000000 30000000\");\n //*/\n }\n\n public static void f(String s) {\n String[] sp = s.split(\" \");\n BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));\n BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));\n if (a.compareTo(b) == -1) {\n BigInteger temp = a;\n a = b;\n b = temp;\n }\n System.out.println(a.gcd(b) + \" \" + lcm(a, b));\n }\n\n public static BigInteger lcm(BigInteger m, BigInteger n) {\n final BigInteger gcd = m.gcd(n);\n if (gcd.compareTo(BigInteger.ZERO) == 0) {\n return BigInteger.ZERO;\n }\n return m.multiply(n).divide(gcd);\n }\n}",
"import java.io.*;",
"io.*",
"java",
"import java.math.BigInteger;",
"BigInteger",
"java.math",
"import java.util.*;",
"util.*",
"java",
"public class Main {\n\n public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n while(true) {\n String s = in.readLine();\n if (s == null || s.length() < 1) {\n break;\n }\n f(s);\n }\n /*/\n f(\"8 6\");\n f(\"50000000 30000000\");\n //*/\n }\n\n public static void f(String s) {\n String[] sp = s.split(\" \");\n BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));\n BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));\n if (a.compareTo(b) == -1) {\n BigInteger temp = a;\n a = b;\n b = temp;\n }\n System.out.println(a.gcd(b) + \" \" + lcm(a, b));\n }\n\n public static BigInteger lcm(BigInteger m, BigInteger n) {\n final BigInteger gcd = m.gcd(n);\n if (gcd.compareTo(BigInteger.ZERO) == 0) {\n return BigInteger.ZERO;\n }\n return m.multiply(n).divide(gcd);\n }\n}",
"Main",
"public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n while(true) {\n String s = in.readLine();\n if (s == null || s.length() < 1) {\n break;\n }\n f(s);\n }\n /*/\n f(\"8 6\");\n f(\"50000000 30000000\");\n //*/\n }",
"main",
"{\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n while(true) {\n String s = in.readLine();\n if (s == null || s.length() < 1) {\n break;\n }\n f(s);\n }\n /*/\n f(\"8 6\");\n f(\"50000000 30000000\");\n //*/\n }",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"while(true) {\n String s = in.readLine();\n if (s == null || s.length() < 1) {\n break;\n }\n f(s);\n }",
"true",
"{\n String s = in.readLine();\n if (s == null || s.length() < 1) {\n break;\n }\n f(s);\n }",
"String s = in.readLine();",
"s",
"in.readLine()",
"in.readLine",
"in",
"if (s == null || s.length() < 1) {\n break;\n }",
"s == null || s.length() < 1",
"s == null",
"s",
"null",
"s.length() < 1",
"s.length()",
"s.length",
"s",
"1",
"{\n break;\n }",
"break;",
"f(s)",
"f",
"s",
"String[] argv",
"argv",
"public static void f(String s) {\n String[] sp = s.split(\" \");\n BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));\n BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));\n if (a.compareTo(b) == -1) {\n BigInteger temp = a;\n a = b;\n b = temp;\n }\n System.out.println(a.gcd(b) + \" \" + lcm(a, b));\n }",
"f",
"{\n String[] sp = s.split(\" \");\n BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));\n BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));\n if (a.compareTo(b) == -1) {\n BigInteger temp = a;\n a = b;\n b = temp;\n }\n System.out.println(a.gcd(b) + \" \" + lcm(a, b));\n }",
"String[] sp = s.split(\" \");",
"sp",
"s.split(\" \")",
"s.split",
"s",
"\" \"",
"BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));",
"a",
"BigInteger.valueOf(Integer.parseInt(sp[0]))",
"BigInteger.valueOf",
"BigInteger",
"Integer.parseInt(sp[0])",
"Integer.parseInt",
"Integer",
"sp[0]",
"sp",
"0",
"BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));",
"b",
"BigInteger.valueOf(Integer.parseInt(sp[1]))",
"BigInteger.valueOf",
"BigInteger",
"Integer.parseInt(sp[1])",
"Integer.parseInt",
"Integer",
"sp[1]",
"sp",
"1",
"if (a.compareTo(b) == -1) {\n BigInteger temp = a;\n a = b;\n b = temp;\n }",
"a.compareTo(b) == -1",
"a.compareTo(b)",
"a.compareTo",
"a",
"b",
"-1",
"1",
"{\n BigInteger temp = a;\n a = b;\n b = temp;\n }",
"BigInteger temp = a;",
"temp",
"a",
"a = b",
"a",
"b",
"b = temp",
"b",
"temp",
"System.out.println(a.gcd(b) + \" \" + lcm(a, b))",
"System.out.println",
"System.out",
"System",
"System.out",
"a.gcd(b) + \" \" + lcm(a, b)",
"a.gcd(b) + \" \" + lcm(a, b)",
"a.gcd(b)",
"a.gcd",
"a",
"b",
"\" \"",
"lcm(a, b)",
"lcm",
"a",
"b",
"String s",
"s",
"public static BigInteger lcm(BigInteger m, BigInteger n) {\n final BigInteger gcd = m.gcd(n);\n if (gcd.compareTo(BigInteger.ZERO) == 0) {\n return BigInteger.ZERO;\n }\n return m.multiply(n).divide(gcd);\n }",
"lcm",
"{\n final BigInteger gcd = m.gcd(n);\n if (gcd.compareTo(BigInteger.ZERO) == 0) {\n return BigInteger.ZERO;\n }\n return m.multiply(n).divide(gcd);\n }",
"final BigInteger gcd = m.gcd(n);",
"gcd",
"m.gcd(n)",
"m.gcd",
"m",
"n",
"if (gcd.compareTo(BigInteger.ZERO) == 0) {\n return BigInteger.ZERO;\n }",
"gcd.compareTo(BigInteger.ZERO) == 0",
"gcd.compareTo(BigInteger.ZERO)",
"gcd.compareTo",
"gcd",
"BigInteger.ZERO",
"BigInteger",
"BigInteger.ZERO",
"0",
"{\n return BigInteger.ZERO;\n }",
"return BigInteger.ZERO;",
"BigInteger.ZERO",
"BigInteger",
"BigInteger.ZERO",
"return m.multiply(n).divide(gcd);",
"m.multiply(n).divide(gcd)",
"m.multiply(n).divide",
"m.multiply(n)",
"m.multiply",
"m",
"n",
"gcd",
"BigInteger m",
"m",
"BigInteger n",
"n",
"public class Main {\n\n public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n while(true) {\n String s = in.readLine();\n if (s == null || s.length() < 1) {\n break;\n }\n f(s);\n }\n /*/\n f(\"8 6\");\n f(\"50000000 30000000\");\n //*/\n }\n\n public static void f(String s) {\n String[] sp = s.split(\" \");\n BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));\n BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));\n if (a.compareTo(b) == -1) {\n BigInteger temp = a;\n a = b;\n b = temp;\n }\n System.out.println(a.gcd(b) + \" \" + lcm(a, b));\n }\n\n public static BigInteger lcm(BigInteger m, BigInteger n) {\n final BigInteger gcd = m.gcd(n);\n if (gcd.compareTo(BigInteger.ZERO) == 0) {\n return BigInteger.ZERO;\n }\n return m.multiply(n).divide(gcd);\n }\n}",
"public class Main {\n\n public static void main(String[] argv) throws IOException {\n //*\n BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n while(true) {\n String s = in.readLine();\n if (s == null || s.length() < 1) {\n break;\n }\n f(s);\n }\n /*/\n f(\"8 6\");\n f(\"50000000 30000000\");\n //*/\n }\n\n public static void f(String s) {\n String[] sp = s.split(\" \");\n BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));\n BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));\n if (a.compareTo(b) == -1) {\n BigInteger temp = a;\n a = b;\n b = temp;\n }\n System.out.println(a.gcd(b) + \" \" + lcm(a, b));\n }\n\n public static BigInteger lcm(BigInteger m, BigInteger n) {\n final BigInteger gcd = m.gcd(n);\n if (gcd.compareTo(BigInteger.ZERO) == 0) {\n return BigInteger.ZERO;\n }\n return m.multiply(n).divide(gcd);\n }\n}",
"Main"
] |
import java.io.*;
import java.math.BigInteger;
import java.util.*;
public class Main {
public static void main(String[] argv) throws IOException {
//*
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
while(true) {
String s = in.readLine();
if (s == null || s.length() < 1) {
break;
}
f(s);
}
/*/
f("8 6");
f("50000000 30000000");
//*/
}
public static void f(String s) {
String[] sp = s.split(" ");
BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));
BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));
if (a.compareTo(b) == -1) {
BigInteger temp = a;
a = b;
b = temp;
}
System.out.println(a.gcd(b) + " " + lcm(a, b));
}
public static BigInteger lcm(BigInteger m, BigInteger n) {
final BigInteger gcd = m.gcd(n);
if (gcd.compareTo(BigInteger.ZERO) == 0) {
return BigInteger.ZERO;
}
return m.multiply(n).divide(gcd);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
2,
13,
13,
17,
30,
29,
13,
29,
4,
13,
2,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
2,
13,
13,
41,
13,
4,
13,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
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
],
[
9,
15
],
[
15,
16
],
[
16,
17
],
[
9,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
21,
22
],
[
21,
23
],
[
19,
24
],
[
6,
25
],
[
25,
26
],
[
6,
27
],
[
27,
28
],
[
79,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
35,
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
],
[
50,
52
],
[
52,
53
],
[
52,
54
],
[
39,
55
],
[
55,
56
],
[
55,
57
],
[
57,
58
],
[
57,
59
],
[
57,
60
],
[
39,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
39,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
72,
72
],
[
72,
73
],
[
72,
74
],
[
72,
75
],
[
29,
76
],
[
76,
77
],
[
0,
78
],
[
78,
79
],
[
78,
80
]
] | [
"import java.util.Scanner;\npublic class Main {\n public static long gcd (long a, long b) {\n if (b%a == 0) {\n return a;\n }\n else return gcd(b%a, a);\n }\n public static void main (String [] args) {\n Scanner s = new Scanner (System.in);\n while (s.hasNextLong()) {\n long a = s.nextLong();\n long b = s.nextLong();\n long c = a * b;\n long d = gcd(a, b);\n c = c/d;\n System.out.println(d + \" \" + c);\n }\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n public static long gcd (long a, long b) {\n if (b%a == 0) {\n return a;\n }\n else return gcd(b%a, a);\n }\n public static void main (String [] args) {\n Scanner s = new Scanner (System.in);\n while (s.hasNextLong()) {\n long a = s.nextLong();\n long b = s.nextLong();\n long c = a * b;\n long d = gcd(a, b);\n c = c/d;\n System.out.println(d + \" \" + c);\n }\n }\n}",
"Main",
"public static long gcd (long a, long b) {\n if (b%a == 0) {\n return a;\n }\n else return gcd(b%a, a);\n }",
"gcd",
"{\n if (b%a == 0) {\n return a;\n }\n else return gcd(b%a, a);\n }",
"if (b%a == 0) {\n return a;\n }\n else return gcd(b%a, a);",
"b%a == 0",
"b%a",
"b",
"a",
"0",
"{\n return a;\n }",
"return a;",
"a",
"return gcd(b%a, a);",
"gcd(b%a, a)",
"gcd",
"b%a",
"b",
"a",
"a",
"long a",
"a",
"long b",
"b",
"public static void main (String [] args) {\n Scanner s = new Scanner (System.in);\n while (s.hasNextLong()) {\n long a = s.nextLong();\n long b = s.nextLong();\n long c = a * b;\n long d = gcd(a, b);\n c = c/d;\n System.out.println(d + \" \" + c);\n }\n }",
"main",
"{\n Scanner s = new Scanner (System.in);\n while (s.hasNextLong()) {\n long a = s.nextLong();\n long b = s.nextLong();\n long c = a * b;\n long d = gcd(a, b);\n c = c/d;\n System.out.println(d + \" \" + c);\n }\n }",
"Scanner s = new Scanner (System.in);",
"s",
"new Scanner (System.in)",
"while (s.hasNextLong()) {\n long a = s.nextLong();\n long b = s.nextLong();\n long c = a * b;\n long d = gcd(a, b);\n c = c/d;\n System.out.println(d + \" \" + c);\n }",
"s.hasNextLong()",
"s.hasNextLong",
"s",
"{\n long a = s.nextLong();\n long b = s.nextLong();\n long c = a * b;\n long d = gcd(a, b);\n c = c/d;\n System.out.println(d + \" \" + c);\n }",
"long a = s.nextLong();",
"a",
"s.nextLong()",
"s.nextLong",
"s",
"long b = s.nextLong();",
"b",
"s.nextLong()",
"s.nextLong",
"s",
"long c = a * b;",
"c",
"a * b",
"a",
"b",
"long d = gcd(a, b);",
"d",
"gcd(a, b)",
"gcd",
"a",
"b",
"c = c/d",
"c",
"c/d",
"c",
"d",
"System.out.println(d + \" \" + c)",
"System.out.println",
"System.out",
"System",
"System.out",
"d + \" \" + c",
"d + \" \" + c",
"d",
"\" \"",
"c",
"String [] args",
"args",
"public class Main {\n public static long gcd (long a, long b) {\n if (b%a == 0) {\n return a;\n }\n else return gcd(b%a, a);\n }\n public static void main (String [] args) {\n Scanner s = new Scanner (System.in);\n while (s.hasNextLong()) {\n long a = s.nextLong();\n long b = s.nextLong();\n long c = a * b;\n long d = gcd(a, b);\n c = c/d;\n System.out.println(d + \" \" + c);\n }\n }\n}",
"public class Main {\n public static long gcd (long a, long b) {\n if (b%a == 0) {\n return a;\n }\n else return gcd(b%a, a);\n }\n public static void main (String [] args) {\n Scanner s = new Scanner (System.in);\n while (s.hasNextLong()) {\n long a = s.nextLong();\n long b = s.nextLong();\n long c = a * b;\n long d = gcd(a, b);\n c = c/d;\n System.out.println(d + \" \" + c);\n }\n }\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static long gcd (long a, long b) {
if (b%a == 0) {
return a;
}
else return gcd(b%a, a);
}
public static void main (String [] args) {
Scanner s = new Scanner (System.in);
while (s.hasNextLong()) {
long a = s.nextLong();
long b = s.nextLong();
long c = a * b;
long d = gcd(a, b);
c = c/d;
System.out.println(d + " " + c);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
13,
4,
18,
13,
13,
13,
4,
18,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
2,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
30,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
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
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
18,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
22,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
22,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
37,
40
],
[
37,
41
],
[
35,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
42,
46
],
[
22,
47
],
[
47,
48
],
[
48,
49
],
[
49,
50
],
[
49,
51
],
[
47,
52
],
[
53,
53
],
[
53,
54
],
[
53,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
56,
60
],
[
6,
61
],
[
61,
62
],
[
85,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
65,
73
],
[
73,
74
],
[
74,
75
],
[
74,
76
],
[
74,
77
],
[
77,
78
],
[
77,
79
],
[
63,
80
],
[
80,
81
],
[
63,
82
],
[
82,
83
],
[
0,
84
],
[
84,
85
],
[
84,
86
]
] | [
"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 a, b;\n\t\tint gcd;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tgcd = gcd(Math.max(a, b), Math.min(a, b));\n\t\t\tSystem.out.println(gcd + \" \" + a / gcd * b);\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a, int b) {\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\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 a, b;\n\t\tint gcd;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tgcd = gcd(Math.max(a, b), Math.min(a, b));\n\t\t\tSystem.out.println(gcd + \" \" + a / gcd * b);\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a, int b) {\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tint gcd;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tgcd = gcd(Math.max(a, b), Math.min(a, b));\n\t\t\tSystem.out.println(gcd + \" \" + a / gcd * b);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tint gcd;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tgcd = gcd(Math.max(a, b), Math.min(a, b));\n\t\t\tSystem.out.println(gcd + \" \" + a / gcd * b);\n\t\t}\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a",
"a",
"b;",
"b",
"int gcd;",
"gcd",
"while (sc.hasNext()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tgcd = gcd(Math.max(a, b), Math.min(a, b));\n\t\t\tSystem.out.println(gcd + \" \" + a / gcd * b);\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tgcd = gcd(Math.max(a, b), Math.min(a, b));\n\t\t\tSystem.out.println(gcd + \" \" + a / gcd * b);\n\t\t}",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"gcd = gcd(Math.max(a, b), Math.min(a, b))",
"gcd",
"gcd(Math.max(a, b), Math.min(a, b))",
"gcd",
"Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"System.out.println(gcd + \" \" + a / gcd * b)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + a / gcd * b",
"gcd + \" \" + a / gcd * b",
"gcd",
"\" \"",
"a / gcd * b",
"a / gcd",
"a",
"gcd",
"b",
"String args[]",
"args",
"public static int gcd(int a, int b) {\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}",
"gcd",
"{\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}",
"if (b == 0) {\n\t\t\treturn a;\n\t\t}",
"b == 0",
"b",
"0",
"{\n\t\t\treturn a;\n\t\t}",
"return a;",
"a",
"return gcd(b, a % b);",
"gcd(b, a % b)",
"gcd",
"b",
"a % b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tint gcd;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tgcd = gcd(Math.max(a, b), Math.min(a, b));\n\t\t\tSystem.out.println(gcd + \" \" + a / gcd * b);\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a, int b) {\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n}",
"public class Main {\n\tpublic static void main(String args[]) {\n\t\tScanner sc = new Scanner(System.in);\n\t\tint a, b;\n\t\tint gcd;\n\t\t\n\t\twhile (sc.hasNext()) {\n\t\t\ta = sc.nextInt();\n\t\t\tb = sc.nextInt();\n\t\t\tgcd = gcd(Math.max(a, b), Math.min(a, b));\n\t\t\tSystem.out.println(gcd + \" \" + a / gcd * b);\n\t\t}\n\t}\n\t\n\tpublic static int gcd(int a, int b) {\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int a, b;
int gcd;
while (sc.hasNext()) {
a = sc.nextInt();
b = sc.nextInt();
gcd = gcd(Math.max(a, b), Math.min(a, b));
System.out.println(gcd + " " + a / gcd * b);
}
}
public static int gcd(int a, int b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
17,
11,
1,
0,
13,
17,
2,
13,
4,
18,
13,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
13,
17,
0,
13,
13,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
92,
5
],
[
92,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
8,
16
],
[
16,
17
],
[
8,
18
],
[
18,
19
],
[
8,
20
],
[
20,
21
],
[
8,
22
],
[
22,
23
],
[
23,
24
],
[
24,
25
],
[
22,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
26,
32
],
[
32,
33
],
[
32,
34
],
[
34,
35
],
[
35,
36
],
[
26,
37
],
[
37,
38
],
[
37,
39
],
[
26,
40
],
[
40,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
40,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
47,
51
],
[
40,
52
],
[
52,
53
],
[
53,
54
],
[
40,
55
],
[
56,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
60,
62
],
[
59,
63
],
[
58,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
57,
69
],
[
69,
70
],
[
69,
71
],
[
26,
72
],
[
72,
73
],
[
72,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
74,
78
],
[
26,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
79,
84
],
[
85,
85
],
[
85,
86
],
[
85,
87
],
[
85,
88
],
[
6,
89
],
[
89,
90
],
[
0,
91
],
[
91,
92
],
[
91,
93
]
] | [
"import java.util.*;\npublic class Main{\n public static void main(String [] args){\n Scanner sc = new Scanner(System.in);\n int a,b,i,c,d;\n while(sc.hasNext()){\n a = sc.nextInt();\n b = sc.nextInt();\n d = 1;\n for(i = 1;i <= Math.min(a,b);i++){\n if(a % i == 0 && b % i == 0)d = i;\n }\n c = a / d * b ;\n System.out.println(d + \" \" + c);\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 a,b,i,c,d;\n while(sc.hasNext()){\n a = sc.nextInt();\n b = sc.nextInt();\n d = 1;\n for(i = 1;i <= Math.min(a,b);i++){\n if(a % i == 0 && b % i == 0)d = i;\n }\n c = a / d * b ;\n System.out.println(d + \" \" + c);\n }\n }\n}",
"Main",
"public static void main(String [] args){\n Scanner sc = new Scanner(System.in);\n int a,b,i,c,d;\n while(sc.hasNext()){\n a = sc.nextInt();\n b = sc.nextInt();\n d = 1;\n for(i = 1;i <= Math.min(a,b);i++){\n if(a % i == 0 && b % i == 0)d = i;\n }\n c = a / d * b ;\n System.out.println(d + \" \" + c);\n }\n }",
"main",
"{\n Scanner sc = new Scanner(System.in);\n int a,b,i,c,d;\n while(sc.hasNext()){\n a = sc.nextInt();\n b = sc.nextInt();\n d = 1;\n for(i = 1;i <= Math.min(a,b);i++){\n if(a % i == 0 && b % i == 0)d = i;\n }\n c = a / d * b ;\n System.out.println(d + \" \" + c);\n }\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"int a",
"a",
"b",
"b",
"i",
"i",
"c",
"c",
"d;",
"d",
"while(sc.hasNext()){\n a = sc.nextInt();\n b = sc.nextInt();\n d = 1;\n for(i = 1;i <= Math.min(a,b);i++){\n if(a % i == 0 && b % i == 0)d = i;\n }\n c = a / d * b ;\n System.out.println(d + \" \" + c);\n }",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n a = sc.nextInt();\n b = sc.nextInt();\n d = 1;\n for(i = 1;i <= Math.min(a,b);i++){\n if(a % i == 0 && b % i == 0)d = i;\n }\n c = a / d * b ;\n System.out.println(d + \" \" + c);\n }",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"d = 1",
"d",
"1",
"for(i = 1;i <= Math.min(a,b);i++){\n if(a % i == 0 && b % i == 0)d = i;\n }",
"i = 1;",
"i = 1",
"i",
"1",
"i <= Math.min(a,b)",
"i",
"Math.min(a,b)",
"Math.min",
"Math",
"a",
"b",
"i++",
"i++",
"i",
"{\n if(a % i == 0 && b % i == 0)d = i;\n }",
"{\n if(a % i == 0 && b % i == 0)d = i;\n }",
"if(a % i == 0 && b % i == 0)d = i;",
"a % i == 0 && b % i == 0",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"b % i == 0",
"b % i",
"b",
"i",
"0",
"d = i",
"d",
"i",
"c = a / d * b",
"c",
"a / d * b",
"a / d",
"a",
"d",
"b",
"System.out.println(d + \" \" + c)",
"System.out.println",
"System.out",
"System",
"System.out",
"d + \" \" + c",
"d + \" \" + c",
"d",
"\" \"",
"c",
"String [] args",
"args",
"public class Main{\n public static void main(String [] args){\n Scanner sc = new Scanner(System.in);\n int a,b,i,c,d;\n while(sc.hasNext()){\n a = sc.nextInt();\n b = sc.nextInt();\n d = 1;\n for(i = 1;i <= Math.min(a,b);i++){\n if(a % i == 0 && b % i == 0)d = i;\n }\n c = a / d * b ;\n System.out.println(d + \" \" + c);\n }\n }\n}",
"public class Main{\n public static void main(String [] args){\n Scanner sc = new Scanner(System.in);\n int a,b,i,c,d;\n while(sc.hasNext()){\n a = sc.nextInt();\n b = sc.nextInt();\n d = 1;\n for(i = 1;i <= Math.min(a,b);i++){\n if(a % i == 0 && b % i == 0)d = i;\n }\n c = a / d * b ;\n System.out.println(d + \" \" + c);\n }\n }\n}",
"Main"
] | import java.util.*;
public class Main{
public static void main(String [] args){
Scanner sc = new Scanner(System.in);
int a,b,i,c,d;
while(sc.hasNext()){
a = sc.nextInt();
b = sc.nextInt();
d = 1;
for(i = 1;i <= Math.min(a,b);i++){
if(a % i == 0 && b % i == 0)d = i;
}
c = a / d * b ;
System.out.println(d + " " + c);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
18,
13,
13,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
20,
17,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
41,
13,
18,
13,
17,
41,
13,
18,
13,
17,
42,
17,
30,
0,
13,
2,
13,
13,
14,
2,
13,
17,
3,
0,
13,
13,
0,
13,
13,
4,
18,
18,
13,
13,
17,
13,
2,
2,
18,
13,
17,
13,
18,
13,
17,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
13,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
13,
18
],
[
9,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
19,
27
],
[
27,
28
],
[
27,
29
],
[
19,
31
],
[
31,
32
],
[
19,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
44,
47
],
[
41,
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
],
[
64,
65
],
[
64,
66
],
[
63,
67
],
[
67,
68
],
[
68,
69
],
[
67,
70
],
[
70,
71
],
[
70,
72
],
[
41,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
75,
77
],
[
41,
78
],
[
78,
79
],
[
78,
80
],
[
80,
81
],
[
80,
82
],
[
41,
83
],
[
83,
84
],
[
83,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
85,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
91,
95
],
[
85,
96
],
[
96,
97
],
[
96,
98
],
[
85,
99
],
[
99,
100
],
[
99,
101
],
[
41,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
102,
107
],
[
102,
108
],
[
102,
109
],
[
109,
110
],
[
110,
111
],
[
111,
112
],
[
111,
113
],
[
110,
114
],
[
109,
115
],
[
115,
116
],
[
115,
117
],
[
6,
118
],
[
118,
119
]
] | [
"import java.io.*;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[], s;\n\t\t\tint a[] = new int[2];\n\t\t\tint c;\n\t\t\twhile((s = reader.readLine()) != null) {\n\t\t\t\tt = s.split(\" \");\n\t\t\t\tfor(int i = 0;i < a.length;i++) {\n\t\t\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\t\t}\n\t\t\t\tint a0_tmp = a[0], a1_tmp = a[1];\n\t\t\t\twhile(true) {\n\t\t\t\t\tc = a0_tmp % a1_tmp;\n\t\t\t\t\tif(c == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ta0_tmp = a1_tmp;\n\t\t\t\t\ta1_tmp = c;\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"%d %d\\n\", a1_tmp, a[0]/a1_tmp*a[1]);\n\n\t\t\t}\n\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"class Main {\n\tpublic static void main(String args[]) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[], s;\n\t\t\tint a[] = new int[2];\n\t\t\tint c;\n\t\t\twhile((s = reader.readLine()) != null) {\n\t\t\t\tt = s.split(\" \");\n\t\t\t\tfor(int i = 0;i < a.length;i++) {\n\t\t\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\t\t}\n\t\t\t\tint a0_tmp = a[0], a1_tmp = a[1];\n\t\t\t\twhile(true) {\n\t\t\t\t\tc = a0_tmp % a1_tmp;\n\t\t\t\t\tif(c == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ta0_tmp = a1_tmp;\n\t\t\t\t\ta1_tmp = c;\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"%d %d\\n\", a1_tmp, a[0]/a1_tmp*a[1]);\n\n\t\t\t}\n\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[], s;\n\t\t\tint a[] = new int[2];\n\t\t\tint c;\n\t\t\twhile((s = reader.readLine()) != null) {\n\t\t\t\tt = s.split(\" \");\n\t\t\t\tfor(int i = 0;i < a.length;i++) {\n\t\t\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\t\t}\n\t\t\t\tint a0_tmp = a[0], a1_tmp = a[1];\n\t\t\t\twhile(true) {\n\t\t\t\t\tc = a0_tmp % a1_tmp;\n\t\t\t\t\tif(c == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ta0_tmp = a1_tmp;\n\t\t\t\t\ta1_tmp = c;\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"%d %d\\n\", a1_tmp, a[0]/a1_tmp*a[1]);\n\n\t\t\t}\n\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"main",
"{\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[], s;\n\t\t\tint a[] = new int[2];\n\t\t\tint c;\n\t\t\twhile((s = reader.readLine()) != null) {\n\t\t\t\tt = s.split(\" \");\n\t\t\t\tfor(int i = 0;i < a.length;i++) {\n\t\t\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\t\t}\n\t\t\t\tint a0_tmp = a[0], a1_tmp = a[1];\n\t\t\t\twhile(true) {\n\t\t\t\t\tc = a0_tmp % a1_tmp;\n\t\t\t\t\tif(c == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ta0_tmp = a1_tmp;\n\t\t\t\t\ta1_tmp = c;\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"%d %d\\n\", a1_tmp, a[0]/a1_tmp*a[1]);\n\n\t\t\t}\n\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"try {\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[], s;\n\t\t\tint a[] = new int[2];\n\t\t\tint c;\n\t\t\twhile((s = reader.readLine()) != null) {\n\t\t\t\tt = s.split(\" \");\n\t\t\t\tfor(int i = 0;i < a.length;i++) {\n\t\t\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\t\t}\n\t\t\t\tint a0_tmp = a[0], a1_tmp = a[1];\n\t\t\t\twhile(true) {\n\t\t\t\t\tc = a0_tmp % a1_tmp;\n\t\t\t\t\tif(c == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ta0_tmp = a1_tmp;\n\t\t\t\t\ta1_tmp = c;\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"%d %d\\n\", a1_tmp, a[0]/a1_tmp*a[1]);\n\n\t\t\t}\n\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}",
"catch(IOException e) {\n\t\t\tSystem.out.println(e);\n\t\t}",
"IOException e",
"{\n\t\t\tSystem.out.println(e);\n\t\t}",
"System.out.println(e)",
"System.out.println",
"System.out",
"System",
"System.out",
"e",
"{\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\tString t[], s;\n\t\t\tint a[] = new int[2];\n\t\t\tint c;\n\t\t\twhile((s = reader.readLine()) != null) {\n\t\t\t\tt = s.split(\" \");\n\t\t\t\tfor(int i = 0;i < a.length;i++) {\n\t\t\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\t\t}\n\t\t\t\tint a0_tmp = a[0], a1_tmp = a[1];\n\t\t\t\twhile(true) {\n\t\t\t\t\tc = a0_tmp % a1_tmp;\n\t\t\t\t\tif(c == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ta0_tmp = a1_tmp;\n\t\t\t\t\ta1_tmp = c;\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"%d %d\\n\", a1_tmp, a[0]/a1_tmp*a[1]);\n\n\t\t\t}\n\n\t\t}",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String t[]",
"t",
"s;",
"s",
"int a[] = new int[2];",
"a",
"new int[2]",
"2",
"int c;",
"c",
"while((s = reader.readLine()) != null) {\n\t\t\t\tt = s.split(\" \");\n\t\t\t\tfor(int i = 0;i < a.length;i++) {\n\t\t\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\t\t}\n\t\t\t\tint a0_tmp = a[0], a1_tmp = a[1];\n\t\t\t\twhile(true) {\n\t\t\t\t\tc = a0_tmp % a1_tmp;\n\t\t\t\t\tif(c == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ta0_tmp = a1_tmp;\n\t\t\t\t\ta1_tmp = c;\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"%d %d\\n\", a1_tmp, a[0]/a1_tmp*a[1]);\n\n\t\t\t}",
"(s = reader.readLine()) != null",
"(s = reader.readLine())",
"s",
"reader.readLine()",
"reader.readLine",
"reader",
"null",
"{\n\t\t\t\tt = s.split(\" \");\n\t\t\t\tfor(int i = 0;i < a.length;i++) {\n\t\t\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\t\t}\n\t\t\t\tint a0_tmp = a[0], a1_tmp = a[1];\n\t\t\t\twhile(true) {\n\t\t\t\t\tc = a0_tmp % a1_tmp;\n\t\t\t\t\tif(c == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ta0_tmp = a1_tmp;\n\t\t\t\t\ta1_tmp = c;\n\t\t\t\t}\n\t\t\t\tSystem.out.printf(\"%d %d\\n\", a1_tmp, a[0]/a1_tmp*a[1]);\n\n\t\t\t}",
"t = s.split(\" \")",
"t",
"s.split(\" \")",
"s.split",
"s",
"\" \"",
"for(int i = 0;i < a.length;i++) {\n\t\t\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\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\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\t\t}",
"{\n\t\t\t\t\ta[i] = Integer.parseInt(t[i]);\n\t\t\t\t}",
"a[i] = Integer.parseInt(t[i])",
"a[i]",
"a",
"i",
"Integer.parseInt(t[i])",
"Integer.parseInt",
"Integer",
"t[i]",
"t",
"i",
"int a0_tmp = a[0]",
"a0_tmp",
"a[0]",
"a",
"0",
"a1_tmp = a[1];",
"a1_tmp",
"a[1]",
"a",
"1",
"while(true) {\n\t\t\t\t\tc = a0_tmp % a1_tmp;\n\t\t\t\t\tif(c == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ta0_tmp = a1_tmp;\n\t\t\t\t\ta1_tmp = c;\n\t\t\t\t}",
"true",
"{\n\t\t\t\t\tc = a0_tmp % a1_tmp;\n\t\t\t\t\tif(c == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t\ta0_tmp = a1_tmp;\n\t\t\t\t\ta1_tmp = c;\n\t\t\t\t}",
"c = a0_tmp % a1_tmp",
"c",
"a0_tmp % a1_tmp",
"a0_tmp",
"a1_tmp",
"if(c == 0)\n\t\t\t\t\t\tbreak;",
"c == 0",
"c",
"0",
"break;",
"a0_tmp = a1_tmp",
"a0_tmp",
"a1_tmp",
"a1_tmp = c",
"a1_tmp",
"c",
"System.out.printf(\"%d %d\\n\", a1_tmp, a[0]/a1_tmp*a[1])",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d %d\\n\"",
"a1_tmp",
"a[0]/a1_tmp*a[1]",
"a[0]/a1_tmp",
"a[0]",
"a",
"0",
"a1_tmp",
"a[1]",
"a",
"1",
"String args[]",
"args"
] | import java.io.*;
class Main {
public static void main(String args[]) {
try {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String t[], s;
int a[] = new int[2];
int c;
while((s = reader.readLine()) != null) {
t = s.split(" ");
for(int i = 0;i < a.length;i++) {
a[i] = Integer.parseInt(t[i]);
}
int a0_tmp = a[0], a1_tmp = a[1];
while(true) {
c = a0_tmp % a1_tmp;
if(c == 0)
break;
a0_tmp = a1_tmp;
a1_tmp = c;
}
System.out.printf("%d %d\n", a1_tmp, a[0]/a1_tmp*a[1]);
}
}
catch(IOException e) {
System.out.println(e);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
17,
41,
13,
17,
41,
13,
17,
12,
13,
30,
41,
13,
17,
41,
13,
20,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
13,
13,
4,
18,
13,
13,
41,
13,
4,
13,
13,
41,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
13,
4,
18,
18,
13,
13,
17,
4,
18,
18,
13,
13,
13,
14,
2,
13,
17,
30,
4,
18,
13,
23,
13,
12,
13,
30,
41,
13,
20,
13,
41,
13,
4,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
18,
13,
13,
41,
13,
18,
13,
13,
41,
13,
2,
13,
13,
42,
2,
13,
17,
30,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
30,
0,
13,
13,
0,
13,
2,
13,
13,
29,
13,
23,
13,
12,
13,
30,
41,
13,
2,
18,
13,
13,
2,
18,
13,
13,
13,
29,
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
],
[
200,
14
],
[
200,
15
],
[
15,
16
],
[
15,
17
],
[
200,
18
],
[
18,
19
],
[
18,
20
],
[
200,
21
],
[
21,
22
],
[
21,
23
],
[
200,
24
],
[
24,
25
],
[
24,
26
],
[
26,
27
],
[
27,
28
],
[
27,
29
],
[
26,
30
],
[
30,
31
],
[
30,
32
],
[
26,
33
],
[
33,
34
],
[
34,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
34,
40
],
[
33,
41
],
[
41,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
44,
46
],
[
41,
47
],
[
47,
48
],
[
48,
49
],
[
47,
50
],
[
41,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
53,
55
],
[
41,
56
],
[
56,
57
],
[
56,
58
],
[
58,
59
],
[
58,
60
],
[
58,
61
],
[
41,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
62,
67
],
[
41,
68
],
[
68,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
68,
73
],
[
41,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
26,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
80,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
24,
88
],
[
88,
89
],
[
200,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
92,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
103,
113
],
[
113,
114
],
[
114,
115
],
[
103,
116
],
[
117,
117
],
[
117,
118
],
[
118,
119
],
[
119,
120
],
[
119,
121
],
[
118,
122
],
[
122,
123
],
[
123,
124
],
[
122,
125
],
[
125,
126
],
[
125,
127
],
[
92,
128
],
[
128,
129
],
[
90,
130
],
[
130,
131
],
[
200,
132
],
[
132,
133
],
[
132,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
137,
138
],
[
137,
139
],
[
134,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
134,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
147,
149
],
[
134,
150
],
[
150,
151
],
[
151,
152
],
[
151,
153
],
[
150,
154
],
[
154,
155
],
[
155,
156
],
[
156,
157
],
[
156,
158
],
[
155,
159
],
[
159,
160
],
[
160,
161
],
[
160,
162
],
[
159,
163
],
[
163,
164
],
[
163,
165
],
[
155,
166
],
[
166,
167
],
[
167,
168
],
[
167,
169
],
[
154,
170
],
[
170,
171
],
[
170,
172
],
[
172,
173
],
[
172,
174
],
[
134,
175
],
[
175,
176
],
[
132,
177
],
[
177,
178
],
[
200,
179
],
[
179,
180
],
[
179,
181
],
[
181,
182
],
[
182,
183
],
[
182,
184
],
[
184,
185
],
[
185,
186
],
[
185,
187
],
[
184,
188
],
[
188,
189
],
[
189,
190
],
[
189,
191
],
[
188,
192
],
[
181,
193
],
[
193,
194
],
[
179,
195
],
[
195,
196
],
[
179,
197
],
[
197,
198
],
[
0,
199
],
[
199,
200
],
[
199,
201
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\nimport java.util.Arrays;\n\npublic class Main {\n\n\t/** ??\\??????????????°????????° */\n\tprivate static final int NUMBER_OF_INPUT = 2;\n\n\t/** ??\\??????????????°????????????????????????????°???? */\n\tprivate static final int INDEX_LITTLE = 0;\n\n\t/** ??\\??????????????°?????????????????????????????§??? */\n\tprivate static final int INDEX_GREAT = 1;\n\n\t/**\n\t * ??????????????????2????????°???????????????????????????2????????°??????????¨????????????°??????????????????\n\t *\n\t * @param args\n\t */\n\tpublic static void main(String[] args) throws IOException {\n\n\t\t// ??\\?????????????????????????????????\n\t\tString line = null;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\twhile ((line = reader.readLine()) != null) {\n\n\t\t\t// ??\\?????????????????°????????????????????????\n\t\t\tint[] input = convertStringToIntArray(line);\n\n\t\t\t// ????¨????????????°???????????????\n\t\t\tArrays.sort(input);\n\t\t\tint greatestCommonDivisor = calculateGreatestCommonDivisor(input);\n\t\t\tint leastCommonMultiplyer = calculateLeastCommonMultiplyer(input, greatestCommonDivisor);\n\n\t\t\t// ?????????????????????\n\t\t\tSystem.out.print(greatestCommonDivisor);\n\t\t\tSystem.out.print(\" \");\n\t\t\tSystem.out.println(leastCommonMultiplyer);\n\t\t}\n\n\t\tif (reader != null) {\n\t\t\treader.close();\n\t\t}\n\t}\n\n\t/**\n\t * ????????????????????°????????????????????´??°???????????¨???????????´?????????\n\t *\n\t * @param line\n\t * ????????????????????°????????????\n\t * @return ??´??°?????????\n\t */\n\tprotected static int[] convertStringToIntArray(String line) {\n\t\tint[] result = new int[NUMBER_OF_INPUT];\n\n\t\tString[] splittedLine = line.split(\" \");\n\t\tfor (int i = 0; i < splittedLine.length; i++) {\n\t\t\tresult[i] = Integer.parseInt(splittedLine[i]);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * ?????°??§??????????????´??°??????????????§??¬?´???°????????????\n\t *\n\t * @param input\n\t * ??´??°?????????\n\t * @return ?????§??¬?´???°\n\t */\n\tprotected static int calculateGreatestCommonDivisor(int[] input) {\n\n\t\t// ??????????????????????????????\n\t\tint greater = input[INDEX_GREAT];\n\t\tint less = input[INDEX_LITTLE];\n\t\tint divisor = greater - less;\n\n\t\twhile (divisor != 0) {\n\n\t\t\t// ??§?????????????????? greater ???????°??????????????????? less ????¨??????????\n\t\t\tif (less >= divisor) {\n\t\t\t\tgreater = less;\n\t\t\t\tless = divisor;\n\t\t\t} else {\n\t\t\t\tgreater = divisor;\n\t\t\t}\n\t\t\tdivisor = greater - less;\n\t\t}\n\n\t\t// ??????????????¨????????????????????§??¬?´???°\n\t\treturn less;\n\t}\n\n\t/**\n\t * ?????°??§??????????????´??°????????¨?????§??¬?´???°??????????°???¬?????°????????????\n\t *\n\t * @param input\n\t * ??´??°?????????\n\t * @param greatestCommonDivisor\n\t * \t\t\t ?????§??¬?´???°\n\t *\n\t * @return ????°???¬?????°\n\t */\n\tprotected static int calculateLeastCommonMultiplyer(int[] input, int greatestCommonDivisor) {\n\n\t\t// ????°???¬?????° = ??\\??????A ?? ??\\??????B / ?????§??¬?´???°\n\t\t// ??????????????? int ??????????????????????????????????????????????????????????????¨ int ?????????????¶???????????????§?????????\n\t\tint leastCommonMultiplyer = input[INDEX_LITTLE] * (input[INDEX_GREAT]\n\t\t\t\t/ greatestCommonDivisor);\n\t\treturn leastCommonMultiplyer;\n\n\t}\n\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"import java.util.Arrays;",
"Arrays",
"java.util",
"public class Main {\n\n\t/** ??\\??????????????°????????° */\n\tprivate static final int NUMBER_OF_INPUT = 2;\n\n\t/** ??\\??????????????°????????????????????????????°???? */\n\tprivate static final int INDEX_LITTLE = 0;\n\n\t/** ??\\??????????????°?????????????????????????????§??? */\n\tprivate static final int INDEX_GREAT = 1;\n\n\t/**\n\t * ??????????????????2????????°???????????????????????????2????????°??????????¨????????????°??????????????????\n\t *\n\t * @param args\n\t */\n\tpublic static void main(String[] args) throws IOException {\n\n\t\t// ??\\?????????????????????????????????\n\t\tString line = null;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\twhile ((line = reader.readLine()) != null) {\n\n\t\t\t// ??\\?????????????????°????????????????????????\n\t\t\tint[] input = convertStringToIntArray(line);\n\n\t\t\t// ????¨????????????°???????????????\n\t\t\tArrays.sort(input);\n\t\t\tint greatestCommonDivisor = calculateGreatestCommonDivisor(input);\n\t\t\tint leastCommonMultiplyer = calculateLeastCommonMultiplyer(input, greatestCommonDivisor);\n\n\t\t\t// ?????????????????????\n\t\t\tSystem.out.print(greatestCommonDivisor);\n\t\t\tSystem.out.print(\" \");\n\t\t\tSystem.out.println(leastCommonMultiplyer);\n\t\t}\n\n\t\tif (reader != null) {\n\t\t\treader.close();\n\t\t}\n\t}\n\n\t/**\n\t * ????????????????????°????????????????????´??°???????????¨???????????´?????????\n\t *\n\t * @param line\n\t * ????????????????????°????????????\n\t * @return ??´??°?????????\n\t */\n\tprotected static int[] convertStringToIntArray(String line) {\n\t\tint[] result = new int[NUMBER_OF_INPUT];\n\n\t\tString[] splittedLine = line.split(\" \");\n\t\tfor (int i = 0; i < splittedLine.length; i++) {\n\t\t\tresult[i] = Integer.parseInt(splittedLine[i]);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * ?????°??§??????????????´??°??????????????§??¬?´???°????????????\n\t *\n\t * @param input\n\t * ??´??°?????????\n\t * @return ?????§??¬?´???°\n\t */\n\tprotected static int calculateGreatestCommonDivisor(int[] input) {\n\n\t\t// ??????????????????????????????\n\t\tint greater = input[INDEX_GREAT];\n\t\tint less = input[INDEX_LITTLE];\n\t\tint divisor = greater - less;\n\n\t\twhile (divisor != 0) {\n\n\t\t\t// ??§?????????????????? greater ???????°??????????????????? less ????¨??????????\n\t\t\tif (less >= divisor) {\n\t\t\t\tgreater = less;\n\t\t\t\tless = divisor;\n\t\t\t} else {\n\t\t\t\tgreater = divisor;\n\t\t\t}\n\t\t\tdivisor = greater - less;\n\t\t}\n\n\t\t// ??????????????¨????????????????????§??¬?´???°\n\t\treturn less;\n\t}\n\n\t/**\n\t * ?????°??§??????????????´??°????????¨?????§??¬?´???°??????????°???¬?????°????????????\n\t *\n\t * @param input\n\t * ??´??°?????????\n\t * @param greatestCommonDivisor\n\t * \t\t\t ?????§??¬?´???°\n\t *\n\t * @return ????°???¬?????°\n\t */\n\tprotected static int calculateLeastCommonMultiplyer(int[] input, int greatestCommonDivisor) {\n\n\t\t// ????°???¬?????° = ??\\??????A ?? ??\\??????B / ?????§??¬?´???°\n\t\t// ??????????????? int ??????????????????????????????????????????????????????????????¨ int ?????????????¶???????????????§?????????\n\t\tint leastCommonMultiplyer = input[INDEX_LITTLE] * (input[INDEX_GREAT]\n\t\t\t\t/ greatestCommonDivisor);\n\t\treturn leastCommonMultiplyer;\n\n\t}\n\n}",
"Main",
"/** ??\\??????????????°????????° */\n\tprivate static final int NUMBER_OF_INPUT = 2;",
"NUMBER_OF_INPUT",
"2",
"/** ??\\??????????????°????????????????????????????°???? */\n\tprivate static final int INDEX_LITTLE = 0;",
"INDEX_LITTLE",
"0",
"/** ??\\??????????????°?????????????????????????????§??? */\n\tprivate static final int INDEX_GREAT = 1;",
"INDEX_GREAT",
"1",
"/**\n\t * ??????????????????2????????°???????????????????????????2????????°??????????¨????????????°??????????????????\n\t *\n\t * @param args\n\t */\n\tpublic static void main(String[] args) throws IOException {\n\n\t\t// ??\\?????????????????????????????????\n\t\tString line = null;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\twhile ((line = reader.readLine()) != null) {\n\n\t\t\t// ??\\?????????????????°????????????????????????\n\t\t\tint[] input = convertStringToIntArray(line);\n\n\t\t\t// ????¨????????????°???????????????\n\t\t\tArrays.sort(input);\n\t\t\tint greatestCommonDivisor = calculateGreatestCommonDivisor(input);\n\t\t\tint leastCommonMultiplyer = calculateLeastCommonMultiplyer(input, greatestCommonDivisor);\n\n\t\t\t// ?????????????????????\n\t\t\tSystem.out.print(greatestCommonDivisor);\n\t\t\tSystem.out.print(\" \");\n\t\t\tSystem.out.println(leastCommonMultiplyer);\n\t\t}\n\n\t\tif (reader != null) {\n\t\t\treader.close();\n\t\t}\n\t}",
"main",
"{\n\n\t\t// ??\\?????????????????????????????????\n\t\tString line = null;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\twhile ((line = reader.readLine()) != null) {\n\n\t\t\t// ??\\?????????????????°????????????????????????\n\t\t\tint[] input = convertStringToIntArray(line);\n\n\t\t\t// ????¨????????????°???????????????\n\t\t\tArrays.sort(input);\n\t\t\tint greatestCommonDivisor = calculateGreatestCommonDivisor(input);\n\t\t\tint leastCommonMultiplyer = calculateLeastCommonMultiplyer(input, greatestCommonDivisor);\n\n\t\t\t// ?????????????????????\n\t\t\tSystem.out.print(greatestCommonDivisor);\n\t\t\tSystem.out.print(\" \");\n\t\t\tSystem.out.println(leastCommonMultiplyer);\n\t\t}\n\n\t\tif (reader != null) {\n\t\t\treader.close();\n\t\t}\n\t}",
"String line = null;",
"line",
"null",
"BufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));",
"reader",
"new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in))",
"while ((line = reader.readLine()) != null) {\n\n\t\t\t// ??\\?????????????????°????????????????????????\n\t\t\tint[] input = convertStringToIntArray(line);\n\n\t\t\t// ????¨????????????°???????????????\n\t\t\tArrays.sort(input);\n\t\t\tint greatestCommonDivisor = calculateGreatestCommonDivisor(input);\n\t\t\tint leastCommonMultiplyer = calculateLeastCommonMultiplyer(input, greatestCommonDivisor);\n\n\t\t\t// ?????????????????????\n\t\t\tSystem.out.print(greatestCommonDivisor);\n\t\t\tSystem.out.print(\" \");\n\t\t\tSystem.out.println(leastCommonMultiplyer);\n\t\t}",
"(line = reader.readLine()) != null",
"(line = reader.readLine())",
"line",
"reader.readLine()",
"reader.readLine",
"reader",
"null",
"{\n\n\t\t\t// ??\\?????????????????°????????????????????????\n\t\t\tint[] input = convertStringToIntArray(line);\n\n\t\t\t// ????¨????????????°???????????????\n\t\t\tArrays.sort(input);\n\t\t\tint greatestCommonDivisor = calculateGreatestCommonDivisor(input);\n\t\t\tint leastCommonMultiplyer = calculateLeastCommonMultiplyer(input, greatestCommonDivisor);\n\n\t\t\t// ?????????????????????\n\t\t\tSystem.out.print(greatestCommonDivisor);\n\t\t\tSystem.out.print(\" \");\n\t\t\tSystem.out.println(leastCommonMultiplyer);\n\t\t}",
"int[] input = convertStringToIntArray(line);",
"input",
"convertStringToIntArray(line)",
"convertStringToIntArray",
"line",
"Arrays.sort(input)",
"Arrays.sort",
"Arrays",
"input",
"int greatestCommonDivisor = calculateGreatestCommonDivisor(input);",
"greatestCommonDivisor",
"calculateGreatestCommonDivisor(input)",
"calculateGreatestCommonDivisor",
"input",
"int leastCommonMultiplyer = calculateLeastCommonMultiplyer(input, greatestCommonDivisor);",
"leastCommonMultiplyer",
"calculateLeastCommonMultiplyer(input, greatestCommonDivisor)",
"calculateLeastCommonMultiplyer",
"input",
"greatestCommonDivisor",
"System.out.print(greatestCommonDivisor)",
"System.out.print",
"System.out",
"System",
"System.out",
"greatestCommonDivisor",
"System.out.print(\" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"\" \"",
"System.out.println(leastCommonMultiplyer)",
"System.out.println",
"System.out",
"System",
"System.out",
"leastCommonMultiplyer",
"if (reader != null) {\n\t\t\treader.close();\n\t\t}",
"reader != null",
"reader",
"null",
"{\n\t\t\treader.close();\n\t\t}",
"reader.close()",
"reader.close",
"reader",
"String[] args",
"args",
"/**\n\t * ????????????????????°????????????????????´??°???????????¨???????????´?????????\n\t *\n\t * @param line\n\t * ????????????????????°????????????\n\t * @return ??´??°?????????\n\t */\n\tprotected static int[] convertStringToIntArray(String line) {\n\t\tint[] result = new int[NUMBER_OF_INPUT];\n\n\t\tString[] splittedLine = line.split(\" \");\n\t\tfor (int i = 0; i < splittedLine.length; i++) {\n\t\t\tresult[i] = Integer.parseInt(splittedLine[i]);\n\t\t}\n\n\t\treturn result;\n\t}",
"convertStringToIntArray",
"{\n\t\tint[] result = new int[NUMBER_OF_INPUT];\n\n\t\tString[] splittedLine = line.split(\" \");\n\t\tfor (int i = 0; i < splittedLine.length; i++) {\n\t\t\tresult[i] = Integer.parseInt(splittedLine[i]);\n\t\t}\n\n\t\treturn result;\n\t}",
"int[] result = new int[NUMBER_OF_INPUT];",
"result",
"new int[NUMBER_OF_INPUT]",
"NUMBER_OF_INPUT",
"String[] splittedLine = line.split(\" \");",
"splittedLine",
"line.split(\" \")",
"line.split",
"line",
"\" \"",
"for (int i = 0; i < splittedLine.length; i++) {\n\t\t\tresult[i] = Integer.parseInt(splittedLine[i]);\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < splittedLine.length",
"i",
"splittedLine.length",
"splittedLine",
"splittedLine.length",
"i++",
"i++",
"i",
"{\n\t\t\tresult[i] = Integer.parseInt(splittedLine[i]);\n\t\t}",
"{\n\t\t\tresult[i] = Integer.parseInt(splittedLine[i]);\n\t\t}",
"result[i] = Integer.parseInt(splittedLine[i])",
"result[i]",
"result",
"i",
"Integer.parseInt(splittedLine[i])",
"Integer.parseInt",
"Integer",
"splittedLine[i]",
"splittedLine",
"i",
"return result;",
"result",
"String line",
"line",
"/**\n\t * ?????°??§??????????????´??°??????????????§??¬?´???°????????????\n\t *\n\t * @param input\n\t * ??´??°?????????\n\t * @return ?????§??¬?´???°\n\t */\n\tprotected static int calculateGreatestCommonDivisor(int[] input) {\n\n\t\t// ??????????????????????????????\n\t\tint greater = input[INDEX_GREAT];\n\t\tint less = input[INDEX_LITTLE];\n\t\tint divisor = greater - less;\n\n\t\twhile (divisor != 0) {\n\n\t\t\t// ??§?????????????????? greater ???????°??????????????????? less ????¨??????????\n\t\t\tif (less >= divisor) {\n\t\t\t\tgreater = less;\n\t\t\t\tless = divisor;\n\t\t\t} else {\n\t\t\t\tgreater = divisor;\n\t\t\t}\n\t\t\tdivisor = greater - less;\n\t\t}\n\n\t\t// ??????????????¨????????????????????§??¬?´???°\n\t\treturn less;\n\t}",
"calculateGreatestCommonDivisor",
"{\n\n\t\t// ??????????????????????????????\n\t\tint greater = input[INDEX_GREAT];\n\t\tint less = input[INDEX_LITTLE];\n\t\tint divisor = greater - less;\n\n\t\twhile (divisor != 0) {\n\n\t\t\t// ??§?????????????????? greater ???????°??????????????????? less ????¨??????????\n\t\t\tif (less >= divisor) {\n\t\t\t\tgreater = less;\n\t\t\t\tless = divisor;\n\t\t\t} else {\n\t\t\t\tgreater = divisor;\n\t\t\t}\n\t\t\tdivisor = greater - less;\n\t\t}\n\n\t\t// ??????????????¨????????????????????§??¬?´???°\n\t\treturn less;\n\t}",
"int greater = input[INDEX_GREAT];",
"greater",
"input[INDEX_GREAT]",
"input",
"INDEX_GREAT",
"int less = input[INDEX_LITTLE];",
"less",
"input[INDEX_LITTLE]",
"input",
"INDEX_LITTLE",
"int divisor = greater - less;",
"divisor",
"greater - less",
"greater",
"less",
"while (divisor != 0) {\n\n\t\t\t// ??§?????????????????? greater ???????°??????????????????? less ????¨??????????\n\t\t\tif (less >= divisor) {\n\t\t\t\tgreater = less;\n\t\t\t\tless = divisor;\n\t\t\t} else {\n\t\t\t\tgreater = divisor;\n\t\t\t}\n\t\t\tdivisor = greater - less;\n\t\t}",
"divisor != 0",
"divisor",
"0",
"{\n\n\t\t\t// ??§?????????????????? greater ???????°??????????????????? less ????¨??????????\n\t\t\tif (less >= divisor) {\n\t\t\t\tgreater = less;\n\t\t\t\tless = divisor;\n\t\t\t} else {\n\t\t\t\tgreater = divisor;\n\t\t\t}\n\t\t\tdivisor = greater - less;\n\t\t}",
"if (less >= divisor) {\n\t\t\t\tgreater = less;\n\t\t\t\tless = divisor;\n\t\t\t} else {\n\t\t\t\tgreater = divisor;\n\t\t\t}",
"less >= divisor",
"less",
"divisor",
"{\n\t\t\t\tgreater = less;\n\t\t\t\tless = divisor;\n\t\t\t}",
"greater = less",
"greater",
"less",
"less = divisor",
"less",
"divisor",
"{\n\t\t\t\tgreater = divisor;\n\t\t\t}",
"greater = divisor",
"greater",
"divisor",
"divisor = greater - less",
"divisor",
"greater - less",
"greater",
"less",
"return less;",
"less",
"int[] input",
"input",
"/**\n\t * ?????°??§??????????????´??°????????¨?????§??¬?´???°??????????°???¬?????°????????????\n\t *\n\t * @param input\n\t * ??´??°?????????\n\t * @param greatestCommonDivisor\n\t * \t\t\t ?????§??¬?´???°\n\t *\n\t * @return ????°???¬?????°\n\t */\n\tprotected static int calculateLeastCommonMultiplyer(int[] input, int greatestCommonDivisor) {\n\n\t\t// ????°???¬?????° = ??\\??????A ?? ??\\??????B / ?????§??¬?´???°\n\t\t// ??????????????? int ??????????????????????????????????????????????????????????????¨ int ?????????????¶???????????????§?????????\n\t\tint leastCommonMultiplyer = input[INDEX_LITTLE] * (input[INDEX_GREAT]\n\t\t\t\t/ greatestCommonDivisor);\n\t\treturn leastCommonMultiplyer;\n\n\t}",
"calculateLeastCommonMultiplyer",
"{\n\n\t\t// ????°???¬?????° = ??\\??????A ?? ??\\??????B / ?????§??¬?´???°\n\t\t// ??????????????? int ??????????????????????????????????????????????????????????????¨ int ?????????????¶???????????????§?????????\n\t\tint leastCommonMultiplyer = input[INDEX_LITTLE] * (input[INDEX_GREAT]\n\t\t\t\t/ greatestCommonDivisor);\n\t\treturn leastCommonMultiplyer;\n\n\t}",
"int leastCommonMultiplyer = input[INDEX_LITTLE] * (input[INDEX_GREAT]\n\t\t\t\t/ greatestCommonDivisor);",
"leastCommonMultiplyer",
"input[INDEX_LITTLE] * (input[INDEX_GREAT]\n\t\t\t\t/ greatestCommonDivisor)",
"input[INDEX_LITTLE]",
"input",
"INDEX_LITTLE",
"(input[INDEX_GREAT]\n\t\t\t\t/ greatestCommonDivisor)",
"input[INDEX_GREAT]",
"input",
"INDEX_GREAT",
"greatestCommonDivisor",
"return leastCommonMultiplyer;",
"leastCommonMultiplyer",
"int[] input",
"input",
"int greatestCommonDivisor",
"greatestCommonDivisor",
"public class Main {\n\n\t/** ??\\??????????????°????????° */\n\tprivate static final int NUMBER_OF_INPUT = 2;\n\n\t/** ??\\??????????????°????????????????????????????°???? */\n\tprivate static final int INDEX_LITTLE = 0;\n\n\t/** ??\\??????????????°?????????????????????????????§??? */\n\tprivate static final int INDEX_GREAT = 1;\n\n\t/**\n\t * ??????????????????2????????°???????????????????????????2????????°??????????¨????????????°??????????????????\n\t *\n\t * @param args\n\t */\n\tpublic static void main(String[] args) throws IOException {\n\n\t\t// ??\\?????????????????????????????????\n\t\tString line = null;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\twhile ((line = reader.readLine()) != null) {\n\n\t\t\t// ??\\?????????????????°????????????????????????\n\t\t\tint[] input = convertStringToIntArray(line);\n\n\t\t\t// ????¨????????????°???????????????\n\t\t\tArrays.sort(input);\n\t\t\tint greatestCommonDivisor = calculateGreatestCommonDivisor(input);\n\t\t\tint leastCommonMultiplyer = calculateLeastCommonMultiplyer(input, greatestCommonDivisor);\n\n\t\t\t// ?????????????????????\n\t\t\tSystem.out.print(greatestCommonDivisor);\n\t\t\tSystem.out.print(\" \");\n\t\t\tSystem.out.println(leastCommonMultiplyer);\n\t\t}\n\n\t\tif (reader != null) {\n\t\t\treader.close();\n\t\t}\n\t}\n\n\t/**\n\t * ????????????????????°????????????????????´??°???????????¨???????????´?????????\n\t *\n\t * @param line\n\t * ????????????????????°????????????\n\t * @return ??´??°?????????\n\t */\n\tprotected static int[] convertStringToIntArray(String line) {\n\t\tint[] result = new int[NUMBER_OF_INPUT];\n\n\t\tString[] splittedLine = line.split(\" \");\n\t\tfor (int i = 0; i < splittedLine.length; i++) {\n\t\t\tresult[i] = Integer.parseInt(splittedLine[i]);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * ?????°??§??????????????´??°??????????????§??¬?´???°????????????\n\t *\n\t * @param input\n\t * ??´??°?????????\n\t * @return ?????§??¬?´???°\n\t */\n\tprotected static int calculateGreatestCommonDivisor(int[] input) {\n\n\t\t// ??????????????????????????????\n\t\tint greater = input[INDEX_GREAT];\n\t\tint less = input[INDEX_LITTLE];\n\t\tint divisor = greater - less;\n\n\t\twhile (divisor != 0) {\n\n\t\t\t// ??§?????????????????? greater ???????°??????????????????? less ????¨??????????\n\t\t\tif (less >= divisor) {\n\t\t\t\tgreater = less;\n\t\t\t\tless = divisor;\n\t\t\t} else {\n\t\t\t\tgreater = divisor;\n\t\t\t}\n\t\t\tdivisor = greater - less;\n\t\t}\n\n\t\t// ??????????????¨????????????????????§??¬?´???°\n\t\treturn less;\n\t}\n\n\t/**\n\t * ?????°??§??????????????´??°????????¨?????§??¬?´???°??????????°???¬?????°????????????\n\t *\n\t * @param input\n\t * ??´??°?????????\n\t * @param greatestCommonDivisor\n\t * \t\t\t ?????§??¬?´???°\n\t *\n\t * @return ????°???¬?????°\n\t */\n\tprotected static int calculateLeastCommonMultiplyer(int[] input, int greatestCommonDivisor) {\n\n\t\t// ????°???¬?????° = ??\\??????A ?? ??\\??????B / ?????§??¬?´???°\n\t\t// ??????????????? int ??????????????????????????????????????????????????????????????¨ int ?????????????¶???????????????§?????????\n\t\tint leastCommonMultiplyer = input[INDEX_LITTLE] * (input[INDEX_GREAT]\n\t\t\t\t/ greatestCommonDivisor);\n\t\treturn leastCommonMultiplyer;\n\n\t}\n\n}",
"public class Main {\n\n\t/** ??\\??????????????°????????° */\n\tprivate static final int NUMBER_OF_INPUT = 2;\n\n\t/** ??\\??????????????°????????????????????????????°???? */\n\tprivate static final int INDEX_LITTLE = 0;\n\n\t/** ??\\??????????????°?????????????????????????????§??? */\n\tprivate static final int INDEX_GREAT = 1;\n\n\t/**\n\t * ??????????????????2????????°???????????????????????????2????????°??????????¨????????????°??????????????????\n\t *\n\t * @param args\n\t */\n\tpublic static void main(String[] args) throws IOException {\n\n\t\t// ??\\?????????????????????????????????\n\t\tString line = null;\n\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(\n\t\t\t\tSystem.in));\n\t\twhile ((line = reader.readLine()) != null) {\n\n\t\t\t// ??\\?????????????????°????????????????????????\n\t\t\tint[] input = convertStringToIntArray(line);\n\n\t\t\t// ????¨????????????°???????????????\n\t\t\tArrays.sort(input);\n\t\t\tint greatestCommonDivisor = calculateGreatestCommonDivisor(input);\n\t\t\tint leastCommonMultiplyer = calculateLeastCommonMultiplyer(input, greatestCommonDivisor);\n\n\t\t\t// ?????????????????????\n\t\t\tSystem.out.print(greatestCommonDivisor);\n\t\t\tSystem.out.print(\" \");\n\t\t\tSystem.out.println(leastCommonMultiplyer);\n\t\t}\n\n\t\tif (reader != null) {\n\t\t\treader.close();\n\t\t}\n\t}\n\n\t/**\n\t * ????????????????????°????????????????????´??°???????????¨???????????´?????????\n\t *\n\t * @param line\n\t * ????????????????????°????????????\n\t * @return ??´??°?????????\n\t */\n\tprotected static int[] convertStringToIntArray(String line) {\n\t\tint[] result = new int[NUMBER_OF_INPUT];\n\n\t\tString[] splittedLine = line.split(\" \");\n\t\tfor (int i = 0; i < splittedLine.length; i++) {\n\t\t\tresult[i] = Integer.parseInt(splittedLine[i]);\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * ?????°??§??????????????´??°??????????????§??¬?´???°????????????\n\t *\n\t * @param input\n\t * ??´??°?????????\n\t * @return ?????§??¬?´???°\n\t */\n\tprotected static int calculateGreatestCommonDivisor(int[] input) {\n\n\t\t// ??????????????????????????????\n\t\tint greater = input[INDEX_GREAT];\n\t\tint less = input[INDEX_LITTLE];\n\t\tint divisor = greater - less;\n\n\t\twhile (divisor != 0) {\n\n\t\t\t// ??§?????????????????? greater ???????°??????????????????? less ????¨??????????\n\t\t\tif (less >= divisor) {\n\t\t\t\tgreater = less;\n\t\t\t\tless = divisor;\n\t\t\t} else {\n\t\t\t\tgreater = divisor;\n\t\t\t}\n\t\t\tdivisor = greater - less;\n\t\t}\n\n\t\t// ??????????????¨????????????????????§??¬?´???°\n\t\treturn less;\n\t}\n\n\t/**\n\t * ?????°??§??????????????´??°????????¨?????§??¬?´???°??????????°???¬?????°????????????\n\t *\n\t * @param input\n\t * ??´??°?????????\n\t * @param greatestCommonDivisor\n\t * \t\t\t ?????§??¬?´???°\n\t *\n\t * @return ????°???¬?????°\n\t */\n\tprotected static int calculateLeastCommonMultiplyer(int[] input, int greatestCommonDivisor) {\n\n\t\t// ????°???¬?????° = ??\\??????A ?? ??\\??????B / ?????§??¬?´???°\n\t\t// ??????????????? int ??????????????????????????????????????????????????????????????¨ int ?????????????¶???????????????§?????????\n\t\tint leastCommonMultiplyer = input[INDEX_LITTLE] * (input[INDEX_GREAT]\n\t\t\t\t/ greatestCommonDivisor);\n\t\treturn leastCommonMultiplyer;\n\n\t}\n\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
public class Main {
/** ??\??????????????°????????° */
private static final int NUMBER_OF_INPUT = 2;
/** ??\??????????????°????????????????????????????°???? */
private static final int INDEX_LITTLE = 0;
/** ??\??????????????°?????????????????????????????§??? */
private static final int INDEX_GREAT = 1;
/**
* ??????????????????2????????°???????????????????????????2????????°??????????¨????????????°??????????????????
*
* @param args
*/
public static void main(String[] args) throws IOException {
// ??\?????????????????????????????????
String line = null;
BufferedReader reader = new BufferedReader(new InputStreamReader(
System.in));
while ((line = reader.readLine()) != null) {
// ??\?????????????????°????????????????????????
int[] input = convertStringToIntArray(line);
// ????¨????????????°???????????????
Arrays.sort(input);
int greatestCommonDivisor = calculateGreatestCommonDivisor(input);
int leastCommonMultiplyer = calculateLeastCommonMultiplyer(input, greatestCommonDivisor);
// ?????????????????????
System.out.print(greatestCommonDivisor);
System.out.print(" ");
System.out.println(leastCommonMultiplyer);
}
if (reader != null) {
reader.close();
}
}
/**
* ????????????????????°????????????????????´??°???????????¨???????????´?????????
*
* @param line
* ????????????????????°????????????
* @return ??´??°?????????
*/
protected static int[] convertStringToIntArray(String line) {
int[] result = new int[NUMBER_OF_INPUT];
String[] splittedLine = line.split(" ");
for (int i = 0; i < splittedLine.length; i++) {
result[i] = Integer.parseInt(splittedLine[i]);
}
return result;
}
/**
* ?????°??§??????????????´??°??????????????§??¬?´???°????????????
*
* @param input
* ??´??°?????????
* @return ?????§??¬?´???°
*/
protected static int calculateGreatestCommonDivisor(int[] input) {
// ??????????????????????????????
int greater = input[INDEX_GREAT];
int less = input[INDEX_LITTLE];
int divisor = greater - less;
while (divisor != 0) {
// ??§?????????????????? greater ???????°??????????????????? less ????¨??????????
if (less >= divisor) {
greater = less;
less = divisor;
} else {
greater = divisor;
}
divisor = greater - less;
}
// ??????????????¨????????????????????§??¬?´???°
return less;
}
/**
* ?????°??§??????????????´??°????????¨?????§??¬?´???°??????????°???¬?????°????????????
*
* @param input
* ??´??°?????????
* @param greatestCommonDivisor
* ?????§??¬?´???°
*
* @return ????°???¬?????°
*/
protected static int calculateLeastCommonMultiplyer(int[] input, int greatestCommonDivisor) {
// ????°???¬?????° = ??\??????A ?? ??\??????B / ?????§??¬?´???°
// ??????????????? int ??????????????????????????????????????????????????????????????¨ int ?????????????¶???????????????§?????????
int leastCommonMultiplyer = input[INDEX_LITTLE] * (input[INDEX_GREAT]
/ greatestCommonDivisor);
return leastCommonMultiplyer;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
13,
29,
13,
14,
2,
13,
13,
30,
41,
13,
13,
0,
13,
13,
0,
13,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
41,
13,
2,
13,
2,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
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
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
[
8,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
23,
25
],
[
19,
26
],
[
26,
27
],
[
26,
28
],
[
8,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
30,
33
],
[
33,
34
],
[
33,
35
],
[
6,
36
],
[
36,
37
],
[
6,
38
],
[
38,
39
],
[
87,
40
],
[
40,
41
],
[
40,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
48,
49
],
[
46,
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
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
63,
66
],
[
50,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
50,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
80,
80
],
[
80,
81
],
[
80,
82
],
[
80,
83
],
[
40,
84
],
[
84,
85
],
[
0,
86
],
[
86,
87
],
[
86,
88
]
] | [
"import java.util.Scanner;\n\npublic class Main {\n\n\tpublic static int gcd (int a, int b) {\n\t\tif (a == b) return a;\n\t\tif (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn gcd(b, a - b);\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint gcd = gcd(a, b);\n\t\t\tlong lcm = a * (b / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n\tpublic static int gcd (int a, int b) {\n\t\tif (a == b) return a;\n\t\tif (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn gcd(b, a - b);\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint gcd = gcd(a, b);\n\t\t\tlong lcm = a * (b / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\n\t}\n\n}",
"Main",
"public static int gcd (int a, int b) {\n\t\tif (a == b) return a;\n\t\tif (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn gcd(b, a - b);\n\t}",
"gcd",
"{\n\t\tif (a == b) return a;\n\t\tif (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn gcd(b, a - b);\n\t}",
"if (a == b) return a;",
"a == b",
"a",
"b",
"return a;",
"a",
"if (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}",
"a < b",
"a",
"b",
"{\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}",
"int temp = a;",
"temp",
"a",
"a = b",
"a",
"b",
"b = temp",
"b",
"temp",
"return gcd(b, a - b);",
"gcd(b, a - b)",
"gcd",
"b",
"a - b",
"a",
"b",
"int a",
"a",
"int b",
"b",
"public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint gcd = gcd(a, b);\n\t\t\tlong lcm = a * (b / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\n\t}",
"main",
"{\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint gcd = gcd(a, b);\n\t\t\tlong lcm = a * (b / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\n\t}",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint gcd = gcd(a, b);\n\t\t\tlong lcm = a * (b / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint gcd = gcd(a, b);\n\t\t\tlong lcm = a * (b / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}",
"int a = sc.nextInt();",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int b = sc.nextInt();",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"int gcd = gcd(a, b);",
"gcd",
"gcd(a, b)",
"gcd",
"a",
"b",
"long lcm = a * (b / gcd);",
"lcm",
"a * (b / gcd)",
"a",
"(b / gcd)",
"b",
"gcd",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"String[] args",
"args",
"public class Main {\n\n\tpublic static int gcd (int a, int b) {\n\t\tif (a == b) return a;\n\t\tif (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn gcd(b, a - b);\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint gcd = gcd(a, b);\n\t\t\tlong lcm = a * (b / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\n\t}\n\n}",
"public class Main {\n\n\tpublic static int gcd (int a, int b) {\n\t\tif (a == b) return a;\n\t\tif (a < b) {\n\t\t\tint temp = a;\n\t\t\ta = b;\n\t\t\tb = temp;\n\t\t}\n\t\treturn gcd(b, a - b);\n\t}\n\n\tpublic static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\n\t\twhile (sc.hasNext()) {\n\t\t\tint a = sc.nextInt();\n\t\t\tint b = sc.nextInt();\n\t\t\tint gcd = gcd(a, b);\n\t\t\tlong lcm = a * (b / gcd);\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main {
public static int gcd (int a, int b) {
if (a == b) return a;
if (a < b) {
int temp = a;
a = b;
b = temp;
}
return gcd(b, a - b);
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
int a = sc.nextInt();
int b = sc.nextInt();
int gcd = gcd(a, b);
long lcm = a * (b / gcd);
System.out.println(gcd + " " + lcm);
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
12,
13,
30,
4,
18,
20,
23,
13,
12,
13,
30,
0,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
17,
0,
13,
4,
18,
13,
13,
13,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
2,
13,
13,
17,
2,
2,
13,
2,
13,
13,
17,
30,
0,
13,
2,
13,
13,
3,
0,
13,
0,
13,
17,
42,
17,
30,
14,
2,
2,
13,
13,
2,
13,
13,
30,
3,
14,
2,
2,
13,
13,
2,
13,
13,
30,
40,
13,
14,
2,
2,
13,
13,
2,
13,
13,
30,
40,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
13,
13,
4,
18,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
151,
5
],
[
151,
6
],
[
6,
7
],
[
151,
8
],
[
8,
9
],
[
8,
10
],
[
10,
11
],
[
11,
12
],
[
12,
13
],
[
8,
14
],
[
14,
15
],
[
151,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
18,
22
],
[
22,
23
],
[
18,
24
],
[
24,
25
],
[
18,
26
],
[
26,
27
],
[
18,
28
],
[
28,
29
],
[
18,
30
],
[
30,
31
],
[
18,
32
],
[
32,
33
],
[
18,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
34,
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
],
[
49,
51
],
[
38,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
54,
58
],
[
38,
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
],
[
77,
78
],
[
77,
79
],
[
74,
80
],
[
73,
81
],
[
81,
82
],
[
82,
83
],
[
82,
84
],
[
84,
85
],
[
84,
86
],
[
81,
87
],
[
72,
88
],
[
88,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
91,
93
],
[
88,
94
],
[
38,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
38,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
108,
110
],
[
103,
111
],
[
111,
112
],
[
103,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
114,
118
],
[
118,
119
],
[
118,
120
],
[
113,
121
],
[
121,
122
],
[
122,
123
],
[
113,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
125,
129
],
[
129,
130
],
[
129,
131
],
[
124,
132
],
[
132,
133
],
[
133,
134
],
[
38,
135
],
[
135,
136
],
[
136,
137
],
[
137,
138
],
[
137,
139
],
[
135,
140
],
[
141,
141
],
[
141,
142
],
[
141,
143
],
[
141,
144
],
[
144,
145
],
[
144,
146
],
[
18,
147
],
[
147,
148
],
[
148,
149
],
[
0,
150
],
[
150,
151
],
[
150,
152
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n\n\tpublic static void main(String args[]){\n\t\tnew Main().mainrun();\n\t}\n\n\tprivate Scanner scan;\n\n\tprivate void mainrun() {\n\t\tscan = new Scanner(System.in);\n\n\t\tlong a,b,ans,n,ax,bx;\n\n\t\twhile(scan.hasNext()) {\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\n\n\t\t\t//最大公約数\n\t\t\tans = 1;\n\t\t\tn = Math.min(a, b);\n\n\t\t\tfor(long i = 1;i <= n;i++) {\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//最小公倍数\n\n\t\t\tax = bx = 1;\n\n\t\t\twhile(true) {\n\t\t\t\tif(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ans + \" \" + a * ax);\n\t\t}\n\n\t\tscan.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\tnew Main().mainrun();\n\t}\n\n\tprivate Scanner scan;\n\n\tprivate void mainrun() {\n\t\tscan = new Scanner(System.in);\n\n\t\tlong a,b,ans,n,ax,bx;\n\n\t\twhile(scan.hasNext()) {\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\n\n\t\t\t//最大公約数\n\t\t\tans = 1;\n\t\t\tn = Math.min(a, b);\n\n\t\t\tfor(long i = 1;i <= n;i++) {\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//最小公倍数\n\n\t\t\tax = bx = 1;\n\n\t\t\twhile(true) {\n\t\t\t\tif(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ans + \" \" + a * ax);\n\t\t}\n\n\t\tscan.close();\n\n\t}\n\n}",
"Main",
"private Scanner scan;",
"scan",
"public static void main(String args[]){\n\t\tnew Main().mainrun();\n\t}",
"main",
"{\n\t\tnew Main().mainrun();\n\t}",
"new Main().mainrun()",
"new Main().mainrun",
"new Main()",
"String args[]",
"args",
"private void mainrun() {\n\t\tscan = new Scanner(System.in);\n\n\t\tlong a,b,ans,n,ax,bx;\n\n\t\twhile(scan.hasNext()) {\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\n\n\t\t\t//最大公約数\n\t\t\tans = 1;\n\t\t\tn = Math.min(a, b);\n\n\t\t\tfor(long i = 1;i <= n;i++) {\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//最小公倍数\n\n\t\t\tax = bx = 1;\n\n\t\t\twhile(true) {\n\t\t\t\tif(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ans + \" \" + a * ax);\n\t\t}\n\n\t\tscan.close();\n\n\t}",
"mainrun",
"{\n\t\tscan = new Scanner(System.in);\n\n\t\tlong a,b,ans,n,ax,bx;\n\n\t\twhile(scan.hasNext()) {\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\n\n\t\t\t//最大公約数\n\t\t\tans = 1;\n\t\t\tn = Math.min(a, b);\n\n\t\t\tfor(long i = 1;i <= n;i++) {\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//最小公倍数\n\n\t\t\tax = bx = 1;\n\n\t\t\twhile(true) {\n\t\t\t\tif(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ans + \" \" + a * ax);\n\t\t}\n\n\t\tscan.close();\n\n\t}",
"scan = new Scanner(System.in)",
"scan",
"new Scanner(System.in)",
"long a",
"a",
"b",
"b",
"ans",
"ans",
"n",
"n",
"ax",
"ax",
"bx;",
"bx",
"while(scan.hasNext()) {\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\n\n\t\t\t//最大公約数\n\t\t\tans = 1;\n\t\t\tn = Math.min(a, b);\n\n\t\t\tfor(long i = 1;i <= n;i++) {\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//最小公倍数\n\n\t\t\tax = bx = 1;\n\n\t\t\twhile(true) {\n\t\t\t\tif(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ans + \" \" + a * ax);\n\t\t}",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\n\n\t\t\t//最大公約数\n\t\t\tans = 1;\n\t\t\tn = Math.min(a, b);\n\n\t\t\tfor(long i = 1;i <= n;i++) {\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//最小公倍数\n\n\t\t\tax = bx = 1;\n\n\t\t\twhile(true) {\n\t\t\t\tif(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ans + \" \" + a * ax);\n\t\t}",
"a = scan.nextInt()",
"a",
"scan.nextInt()",
"scan.nextInt",
"scan",
"b = scan.nextInt()",
"b",
"scan.nextInt()",
"scan.nextInt",
"scan",
"ans = 1",
"ans",
"1",
"n = Math.min(a, b)",
"n",
"Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"for(long i = 1;i <= n;i++) {\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"long i = 1;",
"long i = 1;",
"i",
"1",
"i <= n",
"i",
"n",
"i++",
"i++",
"i",
"{\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"{\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"if(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"a % (n/i) == 0 && b % (n/i) == 0",
"a % (n/i) == 0",
"a % (n/i)",
"a",
"(n/i)",
"n",
"i",
"0",
"b % (n/i) == 0",
"b % (n/i)",
"b",
"(n/i)",
"n",
"i",
"0",
"{\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"ans = n/i",
"ans",
"n/i",
"n",
"i",
"break;",
"ax = bx = 1",
"ax",
"bx = 1",
"bx",
"1",
"while(true) {\n\t\t\t\tif(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}\n\t\t\t}",
"true",
"{\n\t\t\t\tif(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}\n\t\t\t}",
"if(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}",
"a * ax == b * bx",
"a * ax",
"a",
"ax",
"b * bx",
"b",
"bx",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}",
"a * ax > b * bx",
"a * ax",
"a",
"ax",
"b * bx",
"b",
"bx",
"{\n\t\t\t\t\tbx++;\n\t\t\t\t}",
"bx++",
"bx",
"if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}",
"a * ax < b * bx",
"a * ax",
"a",
"ax",
"b * bx",
"b",
"bx",
"{\n\t\t\t\t\tax++;\n\t\t\t\t}",
"ax++",
"ax",
"System.out.println(ans + \" \" + a * ax)",
"System.out.println",
"System.out",
"System",
"System.out",
"ans + \" \" + a * ax",
"ans + \" \" + a * ax",
"ans",
"\" \"",
"a * ax",
"a",
"ax",
"scan.close()",
"scan.close",
"scan",
"public class Main{\n\n\tpublic static void main(String args[]){\n\t\tnew Main().mainrun();\n\t}\n\n\tprivate Scanner scan;\n\n\tprivate void mainrun() {\n\t\tscan = new Scanner(System.in);\n\n\t\tlong a,b,ans,n,ax,bx;\n\n\t\twhile(scan.hasNext()) {\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\n\n\t\t\t//最大公約数\n\t\t\tans = 1;\n\t\t\tn = Math.min(a, b);\n\n\t\t\tfor(long i = 1;i <= n;i++) {\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//最小公倍数\n\n\t\t\tax = bx = 1;\n\n\t\t\twhile(true) {\n\t\t\t\tif(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ans + \" \" + a * ax);\n\t\t}\n\n\t\tscan.close();\n\n\t}\n\n}",
"public class Main{\n\n\tpublic static void main(String args[]){\n\t\tnew Main().mainrun();\n\t}\n\n\tprivate Scanner scan;\n\n\tprivate void mainrun() {\n\t\tscan = new Scanner(System.in);\n\n\t\tlong a,b,ans,n,ax,bx;\n\n\t\twhile(scan.hasNext()) {\n\t\t\ta = scan.nextInt();\n\t\t\tb = scan.nextInt();\n\n\n\t\t\t//最大公約数\n\t\t\tans = 1;\n\t\t\tn = Math.min(a, b);\n\n\t\t\tfor(long i = 1;i <= n;i++) {\n\n\n\t\t\t\tif(a % (n/i) == 0 && b % (n/i) == 0) {\n\t\t\t\t\tans = n/i;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//最小公倍数\n\n\t\t\tax = bx = 1;\n\n\t\t\twhile(true) {\n\t\t\t\tif(a * ax == b * bx) {\n\t\t\t\t\tbreak;\n\t\t\t\t}else if(a * ax > b * bx){\n\t\t\t\t\tbx++;\n\t\t\t\t}else if(a * ax < b * bx){\n\t\t\t\t\tax++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(ans + \" \" + a * ax);\n\t\t}\n\n\t\tscan.close();\n\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String args[]){
new Main().mainrun();
}
private Scanner scan;
private void mainrun() {
scan = new Scanner(System.in);
long a,b,ans,n,ax,bx;
while(scan.hasNext()) {
a = scan.nextInt();
b = scan.nextInt();
//最大公約数
ans = 1;
n = Math.min(a, b);
for(long i = 1;i <= n;i++) {
if(a % (n/i) == 0 && b % (n/i) == 0) {
ans = n/i;
break;
}
}
//最小公倍数
ax = bx = 1;
while(true) {
if(a * ax == b * bx) {
break;
}else if(a * ax > b * bx){
bx++;
}else if(a * ax < b * bx){
ax++;
}
}
System.out.println(ans + " " + a * ax);
}
scan.close();
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
17,
30,
38,
5,
13,
30,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
2,
4,
18,
13,
2,
13,
13,
17,
17,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
40,
13,
0,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
137,
8
],
[
137,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
12,
16
],
[
16,
17
],
[
11,
18
],
[
18,
19
],
[
19,
20
],
[
19,
21
],
[
19,
22
],
[
22,
23
],
[
22,
24
],
[
9,
25
],
[
25,
26
],
[
9,
27
],
[
27,
28
],
[
137,
29
],
[
29,
30
],
[
29,
31
],
[
31,
32
],
[
32,
33
],
[
32,
34
],
[
31,
35
],
[
35,
36
],
[
35,
37
],
[
37,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
38,
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
],
[
57,
59
],
[
59,
60
],
[
59,
61
],
[
59,
62
],
[
46,
63
],
[
63,
64
],
[
63,
65
],
[
46,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
66,
71
],
[
71,
72
],
[
71,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
74,
77
],
[
77,
78
],
[
77,
79
],
[
74,
80
],
[
73,
81
],
[
66,
82
],
[
82,
83
],
[
83,
84
],
[
66,
85
],
[
86,
86
],
[
86,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
88,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
87,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
102,
104
],
[
99,
105
],
[
105,
106
],
[
105,
107
],
[
107,
108
],
[
107,
109
],
[
99,
110
],
[
110,
111
],
[
110,
112
],
[
112,
113
],
[
112,
114
],
[
99,
115
],
[
115,
116
],
[
46,
117
],
[
117,
118
],
[
117,
119
],
[
120,
120
],
[
120,
121
],
[
120,
122
],
[
120,
123
],
[
46,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
130,
130
],
[
130,
131
],
[
130,
132
],
[
130,
133
],
[
29,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
] | [
"import java.util.Arrays;\nimport java.util.Scanner;\n\npublic class Main {\n\tstatic int gcd(int a, int b){\n\t\tif(b == 0) return a;\n\t\treturn gcd(b,a % b);\n }\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true){\n\t\t\ttry{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint min = gcd(a,b);\n\t\t\t\tint max = 1;\n\t\t\t\tfor(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmax = max * a * b;\n\t\t\t\tSystem.out.println(min + \" \" + max);\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}\n}",
"import java.util.Arrays;",
"Arrays",
"java.util",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\tstatic int gcd(int a, int b){\n\t\tif(b == 0) return a;\n\t\treturn gcd(b,a % b);\n }\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true){\n\t\t\ttry{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint min = gcd(a,b);\n\t\t\t\tint max = 1;\n\t\t\t\tfor(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmax = max * a * b;\n\t\t\t\tSystem.out.println(min + \" \" + max);\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}\n}",
"Main",
"static int gcd(int a, int b){\n\t\tif(b == 0) return a;\n\t\treturn gcd(b,a % b);\n }",
"gcd",
"{\n\t\tif(b == 0) return a;\n\t\treturn gcd(b,a % b);\n }",
"if(b == 0) 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 void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true){\n\t\t\ttry{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint min = gcd(a,b);\n\t\t\t\tint max = 1;\n\t\t\t\tfor(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmax = max * a * b;\n\t\t\t\tSystem.out.println(min + \" \" + max);\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true){\n\t\t\ttry{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint min = gcd(a,b);\n\t\t\t\tint max = 1;\n\t\t\t\tfor(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmax = max * a * b;\n\t\t\t\tSystem.out.println(min + \" \" + max);\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"while(true){\n\t\t\ttry{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint min = gcd(a,b);\n\t\t\t\tint max = 1;\n\t\t\t\tfor(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmax = max * a * b;\n\t\t\t\tSystem.out.println(min + \" \" + max);\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}",
"true",
"{\n\t\t\ttry{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint min = gcd(a,b);\n\t\t\t\tint max = 1;\n\t\t\t\tfor(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmax = max * a * b;\n\t\t\t\tSystem.out.println(min + \" \" + max);\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}",
"try{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint min = gcd(a,b);\n\t\t\t\tint max = 1;\n\t\t\t\tfor(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmax = max * a * b;\n\t\t\t\tSystem.out.println(min + \" \" + max);\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"catch(Exception e){\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"Exception e",
"{\n\t\t\t\tSystem.exit(0);\n\t\t\t}",
"System.exit(0)",
"System.exit",
"System",
"0",
"{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint min = gcd(a,b);\n\t\t\t\tint max = 1;\n\t\t\t\tfor(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmax = max * a * b;\n\t\t\t\tSystem.out.println(min + \" \" + max);\n\t\t\t}",
"int a = in.nextInt();",
"a",
"in.nextInt()",
"in.nextInt",
"in",
"int b = in.nextInt();",
"b",
"in.nextInt()",
"in.nextInt",
"in",
"int min = gcd(a,b);",
"min",
"gcd(a,b)",
"gcd",
"a",
"b",
"int max = 1;",
"max",
"1",
"for(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}",
"int i = 2;",
"int i = 2;",
"i",
"2",
"i < Math.pow(a + b, 0.5) + 1",
"i",
"Math.pow(a + b, 0.5) + 1",
"Math.pow(a + b, 0.5)",
"Math.pow",
"Math",
"a + b",
"a",
"b",
"0.5",
"1",
"i++",
"i++",
"i",
"{\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}",
"if(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}",
"a % i == 0 && b % i == 0",
"a % i == 0",
"a % i",
"a",
"i",
"0",
"b % i == 0",
"b % i",
"b",
"i",
"0",
"{\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}",
"max = max * i",
"max",
"max * i",
"max",
"i",
"a = a / i",
"a",
"a / i",
"a",
"i",
"b = b / i",
"b",
"b / i",
"b",
"i",
"i--",
"i",
"max = max * a * b",
"max",
"max * a * b",
"max * a * b",
"max",
"a",
"b",
"System.out.println(min + \" \" + max)",
"System.out.println",
"System.out",
"System",
"System.out",
"min + \" \" + max",
"min + \" \" + max",
"min",
"\" \"",
"max",
"String[] args",
"args",
"public class Main {\n\tstatic int gcd(int a, int b){\n\t\tif(b == 0) return a;\n\t\treturn gcd(b,a % b);\n }\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true){\n\t\t\ttry{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint min = gcd(a,b);\n\t\t\t\tint max = 1;\n\t\t\t\tfor(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmax = max * a * b;\n\t\t\t\tSystem.out.println(min + \" \" + max);\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}\n}",
"public class Main {\n\tstatic int gcd(int a, int b){\n\t\tif(b == 0) return a;\n\t\treturn gcd(b,a % b);\n }\n\tpublic static void main(String[] args){\n\t\tScanner in = new Scanner(System.in);\n\t\twhile(true){\n\t\t\ttry{\n\t\t\t\tint a = in.nextInt();\n\t\t\t\tint b = in.nextInt();\n\t\t\t\tint min = gcd(a,b);\n\t\t\t\tint max = 1;\n\t\t\t\tfor(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){\n\t\t\t\t\tif(a % i == 0 && b % i == 0){\n\t\t\t\t\t\tmax = max * i;\n\t\t\t\t\t\ta = a / i;\n\t\t\t\t\t\tb = b / i;\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmax = max * a * b;\n\t\t\t\tSystem.out.println(min + \" \" + max);\n\t\t\t}catch(Exception e){\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Arrays;
import java.util.Scanner;
public class Main {
static int gcd(int a, int b){
if(b == 0) return a;
return gcd(b,a % b);
}
public static void main(String[] args){
Scanner in = new Scanner(System.in);
while(true){
try{
int a = in.nextInt();
int b = in.nextInt();
int min = gcd(a,b);
int max = 1;
for(int i = 2;i < Math.pow(a + b, 0.5) + 1;i++){
if(a % i == 0 && b % i == 0){
max = max * i;
a = a / i;
b = b / i;
i--;
}
}
max = max * a * b;
System.out.println(min + " " + max);
}catch(Exception e){
System.exit(0);
}
}
}
} |
[
7,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
12,
13,
30,
42,
4,
13,
30,
4,
13,
4,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
12,
13,
30,
14,
40,
4,
18,
13,
29,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
14,
2,
13,
13,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
29,
17,
12,
13,
30,
0,
13,
13,
0,
13,
13,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
0,
13,
13,
12,
13,
30,
0,
13,
2,
2,
13,
13,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
122,
5
],
[
122,
6
],
[
6,
7
],
[
6,
8
],
[
122,
9
],
[
9,
10
],
[
122,
11
],
[
11,
12
],
[
122,
13
],
[
13,
14
],
[
122,
15
],
[
15,
16
],
[
122,
17
],
[
17,
18
],
[
122,
19
],
[
19,
20
],
[
122,
21
],
[
21,
22
],
[
122,
23
],
[
23,
24
],
[
122,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
28,
31
],
[
31,
32
],
[
32,
33
],
[
31,
34
],
[
34,
35
],
[
31,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
42,
42
],
[
42,
43
],
[
42,
44
],
[
42,
45
],
[
25,
46
],
[
46,
47
],
[
122,
48
],
[
48,
49
],
[
48,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
51,
56
],
[
56,
57
],
[
50,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
50,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
50,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
68,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
76,
78
],
[
72,
79
],
[
79,
80
],
[
79,
81
],
[
50,
82
],
[
82,
83
],
[
122,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
90,
91
],
[
90,
92
],
[
86,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
97,
98
],
[
97,
99
],
[
94,
100
],
[
93,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
105,
106
],
[
105,
107
],
[
86,
108
],
[
108,
109
],
[
108,
110
],
[
122,
111
],
[
111,
112
],
[
111,
113
],
[
113,
114
],
[
114,
115
],
[
114,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
0,
121
],
[
121,
122
],
[
121,
123
]
] | [
"import java.util.Scanner;\n\n\npublic class Main{\n\t\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic long a, b, tmp, max, min, mod, x, y;\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve_max();\n\t\t\tsolve_min();\n\t\t\tSystem.out.println(max + \" \" + min);\n\t\t}\n\t}\n\t\n\tpublic static boolean read(){\n\t\tif(!sc.hasNext()) return false;\n\t\t\t\n\t\ta = sc.nextInt();\n\t\tb = sc.nextInt();\n\t\t\n\t\tif(a < b){\n\t\t\ttmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tpublic static void solve_max(){\n\t\t\n\t\tx = a;\n\t\ty = b;\n\t\t\n\t\twhile((mod = (x % y)) != 0){\n\t\t\tx = y;\n\t\t\ty = mod;\n\t\t}\n\t\t\n\t\tmax = y;\n\t}\n\t\n\tpublic static void solve_min(){\n\t\tmin = (a * b) / max;\n\t}\n\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main{\n\t\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic long a, b, tmp, max, min, mod, x, y;\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve_max();\n\t\t\tsolve_min();\n\t\t\tSystem.out.println(max + \" \" + min);\n\t\t}\n\t}\n\t\n\tpublic static boolean read(){\n\t\tif(!sc.hasNext()) return false;\n\t\t\t\n\t\ta = sc.nextInt();\n\t\tb = sc.nextInt();\n\t\t\n\t\tif(a < b){\n\t\t\ttmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tpublic static void solve_max(){\n\t\t\n\t\tx = a;\n\t\ty = b;\n\t\t\n\t\twhile((mod = (x % y)) != 0){\n\t\t\tx = y;\n\t\t\ty = mod;\n\t\t}\n\t\t\n\t\tmax = y;\n\t}\n\t\n\tpublic static void solve_min(){\n\t\tmin = (a * b) / max;\n\t}\n\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"static long a",
"a",
"b",
"b",
"tmp",
"tmp",
"max",
"max",
"min",
"min",
"mod",
"mod",
"x",
"x",
"y;",
"y",
"public static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve_max();\n\t\t\tsolve_min();\n\t\t\tSystem.out.println(max + \" \" + min);\n\t\t}\n\t}",
"main",
"{\n\t\t\n\t\twhile(read()){\n\t\t\tsolve_max();\n\t\t\tsolve_min();\n\t\t\tSystem.out.println(max + \" \" + min);\n\t\t}\n\t}",
"while(read()){\n\t\t\tsolve_max();\n\t\t\tsolve_min();\n\t\t\tSystem.out.println(max + \" \" + min);\n\t\t}",
"read()",
"read",
"{\n\t\t\tsolve_max();\n\t\t\tsolve_min();\n\t\t\tSystem.out.println(max + \" \" + min);\n\t\t}",
"solve_max()",
"solve_max",
"solve_min()",
"solve_min",
"System.out.println(max + \" \" + min)",
"System.out.println",
"System.out",
"System",
"System.out",
"max + \" \" + min",
"max + \" \" + min",
"max",
"\" \"",
"min",
"String[] args",
"args",
"public static boolean read(){\n\t\tif(!sc.hasNext()) return false;\n\t\t\t\n\t\ta = sc.nextInt();\n\t\tb = sc.nextInt();\n\t\t\n\t\tif(a < b){\n\t\t\ttmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"read",
"{\n\t\tif(!sc.hasNext()) return false;\n\t\t\t\n\t\ta = sc.nextInt();\n\t\tb = sc.nextInt();\n\t\t\n\t\tif(a < b){\n\t\t\ttmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"if(!sc.hasNext()) return false;",
"!sc.hasNext()",
"sc.hasNext()",
"sc.hasNext",
"sc",
"return false;",
"false",
"a = sc.nextInt()",
"a",
"sc.nextInt()",
"sc.nextInt",
"sc",
"b = sc.nextInt()",
"b",
"sc.nextInt()",
"sc.nextInt",
"sc",
"if(a < b){\n\t\t\ttmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}",
"a < b",
"a",
"b",
"{\n\t\t\ttmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}",
"tmp = a",
"tmp",
"a",
"a = b",
"a",
"b",
"b = tmp",
"b",
"tmp",
"return true;",
"true",
"public static void solve_max(){\n\t\t\n\t\tx = a;\n\t\ty = b;\n\t\t\n\t\twhile((mod = (x % y)) != 0){\n\t\t\tx = y;\n\t\t\ty = mod;\n\t\t}\n\t\t\n\t\tmax = y;\n\t}",
"solve_max",
"{\n\t\t\n\t\tx = a;\n\t\ty = b;\n\t\t\n\t\twhile((mod = (x % y)) != 0){\n\t\t\tx = y;\n\t\t\ty = mod;\n\t\t}\n\t\t\n\t\tmax = y;\n\t}",
"x = a",
"x",
"a",
"y = b",
"y",
"b",
"while((mod = (x % y)) != 0){\n\t\t\tx = y;\n\t\t\ty = mod;\n\t\t}",
"(mod = (x % y)) != 0",
"(mod = (x % y))",
"mod",
"(x % y)",
"x",
"y",
"0",
"{\n\t\t\tx = y;\n\t\t\ty = mod;\n\t\t}",
"x = y",
"x",
"y",
"y = mod",
"y",
"mod",
"max = y",
"max",
"y",
"public static void solve_min(){\n\t\tmin = (a * b) / max;\n\t}",
"solve_min",
"{\n\t\tmin = (a * b) / max;\n\t}",
"min = (a * b) / max",
"min",
"(a * b) / max",
"(a * b)",
"a",
"b",
"max",
"public class Main{\n\t\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic long a, b, tmp, max, min, mod, x, y;\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve_max();\n\t\t\tsolve_min();\n\t\t\tSystem.out.println(max + \" \" + min);\n\t\t}\n\t}\n\t\n\tpublic static boolean read(){\n\t\tif(!sc.hasNext()) return false;\n\t\t\t\n\t\ta = sc.nextInt();\n\t\tb = sc.nextInt();\n\t\t\n\t\tif(a < b){\n\t\t\ttmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tpublic static void solve_max(){\n\t\t\n\t\tx = a;\n\t\ty = b;\n\t\t\n\t\twhile((mod = (x % y)) != 0){\n\t\t\tx = y;\n\t\t\ty = mod;\n\t\t}\n\t\t\n\t\tmax = y;\n\t}\n\t\n\tpublic static void solve_min(){\n\t\tmin = (a * b) / max;\n\t}\n\n}",
"public class Main{\n\t\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic long a, b, tmp, max, min, mod, x, y;\n\n\tpublic static void main(String[] args) {\n\t\t\n\t\twhile(read()){\n\t\t\tsolve_max();\n\t\t\tsolve_min();\n\t\t\tSystem.out.println(max + \" \" + min);\n\t\t}\n\t}\n\t\n\tpublic static boolean read(){\n\t\tif(!sc.hasNext()) return false;\n\t\t\t\n\t\ta = sc.nextInt();\n\t\tb = sc.nextInt();\n\t\t\n\t\tif(a < b){\n\t\t\ttmp = a;\n\t\t\ta = b;\n\t\t\tb = tmp;\n\t\t}\n\t\t\n\t\treturn true;\n\t}\n\t\n\tpublic static void solve_max(){\n\t\t\n\t\tx = a;\n\t\ty = b;\n\t\t\n\t\twhile((mod = (x % y)) != 0){\n\t\t\tx = y;\n\t\t\ty = mod;\n\t\t}\n\t\t\n\t\tmax = y;\n\t}\n\t\n\tpublic static void solve_min(){\n\t\tmin = (a * b) / max;\n\t}\n\n}",
"Main"
] | import java.util.Scanner;
public class Main{
static Scanner sc = new Scanner(System.in);
static long a, b, tmp, max, min, mod, x, y;
public static void main(String[] args) {
while(read()){
solve_max();
solve_min();
System.out.println(max + " " + min);
}
}
public static boolean read(){
if(!sc.hasNext()) return false;
a = sc.nextInt();
b = sc.nextInt();
if(a < b){
tmp = a;
a = b;
b = tmp;
}
return true;
}
public static void solve_max(){
x = a;
y = b;
while((mod = (x % y)) != 0){
x = y;
y = mod;
}
max = y;
}
public static void solve_min(){
min = (a * b) / max;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
17,
41,
13,
17,
41,
13,
41,
13,
42,
4,
18,
13,
30,
11,
1,
41,
13,
17,
2,
13,
18,
13,
13,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
14,
2,
18,
13,
17,
18,
13,
17,
30,
0,
13,
18,
13,
17,
30,
0,
13,
18,
13,
17,
11,
1,
41,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
18,
13,
17,
13,
17,
2,
2,
18,
13,
17,
13,
17,
30,
0,
13,
13,
0,
18,
13,
17,
13,
0,
18,
13,
17,
13,
0,
13,
2,
2,
18,
13,
17,
18,
13,
17,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
137,
5
],
[
137,
6
],
[
6,
7
],
[
6,
8
],
[
8,
9
],
[
9,
10
],
[
9,
11
],
[
8,
12
],
[
12,
13
],
[
12,
14
],
[
8,
16
],
[
16,
17
],
[
16,
18
],
[
8,
19
],
[
19,
20
],
[
8,
21
],
[
21,
22
],
[
8,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
23,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
28,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
35,
37
],
[
28,
38
],
[
38,
39
],
[
39,
40
],
[
28,
41
],
[
42,
42
],
[
42,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
43,
47
],
[
47,
48
],
[
48,
49
],
[
27,
50
],
[
50,
51
],
[
51,
52
],
[
52,
53
],
[
52,
54
],
[
51,
55
],
[
55,
56
],
[
55,
57
],
[
50,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
61,
62
],
[
61,
63
],
[
50,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
27,
70
],
[
70,
71
],
[
71,
72
],
[
72,
73
],
[
72,
74
],
[
70,
75
],
[
75,
76
],
[
75,
77
],
[
70,
78
],
[
78,
79
],
[
79,
80
],
[
70,
81
],
[
82,
82
],
[
82,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
86,
90
],
[
85,
91
],
[
84,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
93,
97
],
[
92,
98
],
[
83,
99
],
[
99,
100
],
[
100,
101
],
[
100,
102
],
[
27,
103
],
[
103,
104
],
[
104,
105
],
[
104,
106
],
[
103,
107
],
[
27,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
108,
112
],
[
27,
113
],
[
113,
114
],
[
113,
115
],
[
116,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
120,
122
],
[
116,
123
],
[
27,
124
],
[
124,
125
],
[
125,
126
],
[
126,
127
],
[
126,
128
],
[
124,
129
],
[
130,
130
],
[
130,
131
],
[
130,
132
],
[
130,
133
],
[
6,
134
],
[
134,
135
],
[
0,
136
],
[
136,
137
],
[
136,
138
]
] | [
"import java.util.Scanner;\n\npublic class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] x = new int[2];\n\t\tint gcd = 1;\n\t\tint lcm;\n\t\tint temp;\n\t\twhile (scan.hasNext()) {\n\t\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}\n\t\t\tif (x[0] > x[1]) {\n\t\t\t\ttemp = x[1];\n\t\t\t} else {\n\t\t\t\ttemp = x[0];\n\t\t\t}\n\t\t\tfor (int i = 1; i <= temp; i++) {\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tx[0] /= gcd;\n\t\t\tx[1] /= gcd;\n\t\t\tlcm = x[0] * x[1] * gcd;\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\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\tScanner scan = new Scanner(System.in);\n\t\tint[] x = new int[2];\n\t\tint gcd = 1;\n\t\tint lcm;\n\t\tint temp;\n\t\twhile (scan.hasNext()) {\n\t\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}\n\t\t\tif (x[0] > x[1]) {\n\t\t\t\ttemp = x[1];\n\t\t\t} else {\n\t\t\t\ttemp = x[0];\n\t\t\t}\n\t\t\tfor (int i = 1; i <= temp; i++) {\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tx[0] /= gcd;\n\t\t\tx[1] /= gcd;\n\t\t\tlcm = x[0] * x[1] * gcd;\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] x = new int[2];\n\t\tint gcd = 1;\n\t\tint lcm;\n\t\tint temp;\n\t\twhile (scan.hasNext()) {\n\t\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}\n\t\t\tif (x[0] > x[1]) {\n\t\t\t\ttemp = x[1];\n\t\t\t} else {\n\t\t\t\ttemp = x[0];\n\t\t\t}\n\t\t\tfor (int i = 1; i <= temp; i++) {\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tx[0] /= gcd;\n\t\t\tx[1] /= gcd;\n\t\t\tlcm = x[0] * x[1] * gcd;\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] x = new int[2];\n\t\tint gcd = 1;\n\t\tint lcm;\n\t\tint temp;\n\t\twhile (scan.hasNext()) {\n\t\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}\n\t\t\tif (x[0] > x[1]) {\n\t\t\t\ttemp = x[1];\n\t\t\t} else {\n\t\t\t\ttemp = x[0];\n\t\t\t}\n\t\t\tfor (int i = 1; i <= temp; i++) {\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tx[0] /= gcd;\n\t\t\tx[1] /= gcd;\n\t\t\tlcm = x[0] * x[1] * gcd;\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}",
"Scanner scan = new Scanner(System.in);",
"scan",
"new Scanner(System.in)",
"int[] x = new int[2];",
"x",
"new int[2]",
"2",
"int gcd = 1;",
"gcd",
"1",
"int lcm;",
"lcm",
"int temp;",
"temp",
"while (scan.hasNext()) {\n\t\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}\n\t\t\tif (x[0] > x[1]) {\n\t\t\t\ttemp = x[1];\n\t\t\t} else {\n\t\t\t\ttemp = x[0];\n\t\t\t}\n\t\t\tfor (int i = 1; i <= temp; i++) {\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tx[0] /= gcd;\n\t\t\tx[1] /= gcd;\n\t\t\tlcm = x[0] * x[1] * gcd;\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}",
"scan.hasNext()",
"scan.hasNext",
"scan",
"{\n\t\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}\n\t\t\tif (x[0] > x[1]) {\n\t\t\t\ttemp = x[1];\n\t\t\t} else {\n\t\t\t\ttemp = x[0];\n\t\t\t}\n\t\t\tfor (int i = 1; i <= temp; i++) {\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tx[0] /= gcd;\n\t\t\tx[1] /= gcd;\n\t\t\tlcm = x[0] * x[1] * gcd;\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}",
"for (int i = 0; i < x.length; i++) {\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < x.length",
"i",
"x.length",
"x",
"x.length",
"i++",
"i++",
"i",
"{\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}",
"{\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}",
"x[i] = scan.nextInt()",
"x[i]",
"x",
"i",
"scan.nextInt()",
"scan.nextInt",
"scan",
"if (x[0] > x[1]) {\n\t\t\t\ttemp = x[1];\n\t\t\t} else {\n\t\t\t\ttemp = x[0];\n\t\t\t}",
"x[0] > x[1]",
"x[0]",
"x",
"0",
"x[1]",
"x",
"1",
"{\n\t\t\t\ttemp = x[1];\n\t\t\t}",
"temp = x[1]",
"temp",
"x[1]",
"x",
"1",
"{\n\t\t\t\ttemp = x[0];\n\t\t\t}",
"temp = x[0]",
"temp",
"x[0]",
"x",
"0",
"for (int i = 1; i <= temp; i++) {\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}",
"int i = 1;",
"int i = 1;",
"i",
"1",
"i <= temp",
"i",
"temp",
"i++",
"i++",
"i",
"{\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}",
"{\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}",
"if (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}",
"x[0] % i == 0 && x[1] % i == 0",
"x[0] % i == 0",
"x[0] % i",
"x[0]",
"x",
"0",
"i",
"0",
"x[1] % i == 0",
"x[1] % i",
"x[1]",
"x",
"1",
"i",
"0",
"{\n\t\t\t\t\tgcd = i;\n\t\t\t\t}",
"gcd = i",
"gcd",
"i",
"x[0] /= gcd",
"x[0]",
"x",
"0",
"gcd",
"x[1] /= gcd",
"x[1]",
"x",
"1",
"gcd",
"lcm = x[0] * x[1] * gcd",
"lcm",
"x[0] * x[1] * gcd",
"x[0] * x[1] * gcd",
"x[0]",
"x",
"0",
"x[1]",
"x",
"1",
"gcd",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"String[] args",
"args",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] x = new int[2];\n\t\tint gcd = 1;\n\t\tint lcm;\n\t\tint temp;\n\t\twhile (scan.hasNext()) {\n\t\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}\n\t\t\tif (x[0] > x[1]) {\n\t\t\t\ttemp = x[1];\n\t\t\t} else {\n\t\t\t\ttemp = x[0];\n\t\t\t}\n\t\t\tfor (int i = 1; i <= temp; i++) {\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tx[0] /= gcd;\n\t\t\tx[1] /= gcd;\n\t\t\tlcm = x[0] * x[1] * gcd;\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n}",
"public class Main{\n\tpublic static void main(String[] args) {\n\t\tScanner scan = new Scanner(System.in);\n\t\tint[] x = new int[2];\n\t\tint gcd = 1;\n\t\tint lcm;\n\t\tint temp;\n\t\twhile (scan.hasNext()) {\n\t\t\tfor (int i = 0; i < x.length; i++) {\n\t\t\t\tx[i] = scan.nextInt();\n\t\t\t}\n\t\t\tif (x[0] > x[1]) {\n\t\t\t\ttemp = x[1];\n\t\t\t} else {\n\t\t\t\ttemp = x[0];\n\t\t\t}\n\t\t\tfor (int i = 1; i <= temp; i++) {\n\t\t\t\tif (x[0] % i == 0 && x[1] % i == 0) {\n\t\t\t\t\tgcd = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tx[0] /= gcd;\n\t\t\tx[1] /= gcd;\n\t\t\tlcm = x[0] * x[1] * gcd;\n\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t}\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int[] x = new int[2];
int gcd = 1;
int lcm;
int temp;
while (scan.hasNext()) {
for (int i = 0; i < x.length; i++) {
x[i] = scan.nextInt();
}
if (x[0] > x[1]) {
temp = x[1];
} else {
temp = x[0];
}
for (int i = 1; i <= temp; i++) {
if (x[0] % i == 0 && x[1] % i == 0) {
gcd = i;
}
}
x[0] /= gcd;
x[1] /= gcd;
lcm = x[0] * x[1] * gcd;
System.out.println(gcd + " " + lcm);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
38,
5,
13,
30,
4,
18,
18,
13,
13,
17,
30,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
20,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
13,
41,
13,
41,
13,
2,
13,
13,
42,
2,
2,
13,
13,
17,
30,
41,
13,
13,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
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
],
[
11,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
24,
29
],
[
20,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
32,
38
],
[
31,
39
],
[
39,
40
],
[
40,
41
],
[
40,
42
],
[
39,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
48,
49
],
[
49,
50
],
[
39,
51
],
[
51,
52
],
[
51,
53
],
[
53,
54
],
[
54,
55
],
[
53,
56
],
[
56,
57
],
[
57,
58
],
[
39,
59
],
[
59,
60
],
[
39,
61
],
[
61,
62
],
[
61,
63
],
[
63,
64
],
[
63,
65
],
[
39,
66
],
[
66,
67
],
[
67,
68
],
[
68,
69
],
[
68,
70
],
[
67,
71
],
[
66,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
72,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
78,
80
],
[
72,
81
],
[
81,
82
],
[
81,
83
],
[
39,
84
],
[
84,
85
],
[
84,
86
],
[
39,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
39,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
94,
96
],
[
92,
97
],
[
98,
98
],
[
98,
99
],
[
98,
100
],
[
98,
101
],
[
9,
102
],
[
102,
103
]
] | [
"import java.io.*;\nimport java.util.StringTokenizer;\n\nclass Main {\n\tpublic static void main(String args[]) {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\tString buf;\n\n\t\ttry {\n\t\t\twhile ((buf = br.readLine())!=null) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(buf);\n\t\t\t\tlong n = Integer.parseInt(st.nextToken());\n\t\t\t\tlong m = Integer.parseInt(st.nextToken());\n\t\t\t\tlong gcd;\n\t\t\t\tlong lcm = n*m;\n\t\t\t\twhile (n%m!=0) {\n\t\t\t\t\tlong t = m;\n\t\t\t\t\tm = n%m;\n\t\t\t\t\tn = t;\n\t\t\t\t}\n\t\t\t\tgcd = m;\n\t\t\t\tlcm = lcm/gcd;\n\t\t\t\tSystem.out.println(gcd+\" \"+lcm);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}\n\t}\n}",
"import java.io.*;",
"io.*",
"java",
"import java.util.StringTokenizer;",
"StringTokenizer",
"java.util",
"class Main {\n\tpublic static void main(String args[]) {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\tString buf;\n\n\t\ttry {\n\t\t\twhile ((buf = br.readLine())!=null) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(buf);\n\t\t\t\tlong n = Integer.parseInt(st.nextToken());\n\t\t\t\tlong m = Integer.parseInt(st.nextToken());\n\t\t\t\tlong gcd;\n\t\t\t\tlong lcm = n*m;\n\t\t\t\twhile (n%m!=0) {\n\t\t\t\t\tlong t = m;\n\t\t\t\t\tm = n%m;\n\t\t\t\t\tn = t;\n\t\t\t\t}\n\t\t\t\tgcd = m;\n\t\t\t\tlcm = lcm/gcd;\n\t\t\t\tSystem.out.println(gcd+\" \"+lcm);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}\n\t}\n}",
"Main",
"public static void main(String args[]) {\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\tString buf;\n\n\t\ttry {\n\t\t\twhile ((buf = br.readLine())!=null) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(buf);\n\t\t\t\tlong n = Integer.parseInt(st.nextToken());\n\t\t\t\tlong m = Integer.parseInt(st.nextToken());\n\t\t\t\tlong gcd;\n\t\t\t\tlong lcm = n*m;\n\t\t\t\twhile (n%m!=0) {\n\t\t\t\t\tlong t = m;\n\t\t\t\t\tm = n%m;\n\t\t\t\t\tn = t;\n\t\t\t\t}\n\t\t\t\tgcd = m;\n\t\t\t\tlcm = lcm/gcd;\n\t\t\t\tSystem.out.println(gcd+\" \"+lcm);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}\n\t}",
"main",
"{\n\t\tInputStreamReader isr = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(isr);\n\t\tString buf;\n\n\t\ttry {\n\t\t\twhile ((buf = br.readLine())!=null) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(buf);\n\t\t\t\tlong n = Integer.parseInt(st.nextToken());\n\t\t\t\tlong m = Integer.parseInt(st.nextToken());\n\t\t\t\tlong gcd;\n\t\t\t\tlong lcm = n*m;\n\t\t\t\twhile (n%m!=0) {\n\t\t\t\t\tlong t = m;\n\t\t\t\t\tm = n%m;\n\t\t\t\t\tn = t;\n\t\t\t\t}\n\t\t\t\tgcd = m;\n\t\t\t\tlcm = lcm/gcd;\n\t\t\t\tSystem.out.println(gcd+\" \"+lcm);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}\n\t}",
"InputStreamReader isr = new InputStreamReader(System.in);",
"isr",
"new InputStreamReader(System.in)",
"BufferedReader br = new BufferedReader(isr);",
"br",
"new BufferedReader(isr)",
"String buf;",
"buf",
"try {\n\t\t\twhile ((buf = br.readLine())!=null) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(buf);\n\t\t\t\tlong n = Integer.parseInt(st.nextToken());\n\t\t\t\tlong m = Integer.parseInt(st.nextToken());\n\t\t\t\tlong gcd;\n\t\t\t\tlong lcm = n*m;\n\t\t\t\twhile (n%m!=0) {\n\t\t\t\t\tlong t = m;\n\t\t\t\t\tm = n%m;\n\t\t\t\t\tn = t;\n\t\t\t\t}\n\t\t\t\tgcd = m;\n\t\t\t\tlcm = lcm/gcd;\n\t\t\t\tSystem.out.println(gcd+\" \"+lcm);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}",
"catch (Exception e) {\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}",
"Exception e",
"{\n\t\t\tSystem.out.println(\"Exception!\");\n\t\t}",
"System.out.println(\"Exception!\")",
"System.out.println",
"System.out",
"System",
"System.out",
"\"Exception!\"",
"{\n\t\t\twhile ((buf = br.readLine())!=null) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(buf);\n\t\t\t\tlong n = Integer.parseInt(st.nextToken());\n\t\t\t\tlong m = Integer.parseInt(st.nextToken());\n\t\t\t\tlong gcd;\n\t\t\t\tlong lcm = n*m;\n\t\t\t\twhile (n%m!=0) {\n\t\t\t\t\tlong t = m;\n\t\t\t\t\tm = n%m;\n\t\t\t\t\tn = t;\n\t\t\t\t}\n\t\t\t\tgcd = m;\n\t\t\t\tlcm = lcm/gcd;\n\t\t\t\tSystem.out.println(gcd+\" \"+lcm);\n\t\t\t}\n\t\t}",
"while ((buf = br.readLine())!=null) {\n\t\t\t\tStringTokenizer st = new StringTokenizer(buf);\n\t\t\t\tlong n = Integer.parseInt(st.nextToken());\n\t\t\t\tlong m = Integer.parseInt(st.nextToken());\n\t\t\t\tlong gcd;\n\t\t\t\tlong lcm = n*m;\n\t\t\t\twhile (n%m!=0) {\n\t\t\t\t\tlong t = m;\n\t\t\t\t\tm = n%m;\n\t\t\t\t\tn = t;\n\t\t\t\t}\n\t\t\t\tgcd = m;\n\t\t\t\tlcm = lcm/gcd;\n\t\t\t\tSystem.out.println(gcd+\" \"+lcm);\n\t\t\t}",
"(buf = br.readLine())!=null",
"(buf = br.readLine())",
"buf",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\t\tStringTokenizer st = new StringTokenizer(buf);\n\t\t\t\tlong n = Integer.parseInt(st.nextToken());\n\t\t\t\tlong m = Integer.parseInt(st.nextToken());\n\t\t\t\tlong gcd;\n\t\t\t\tlong lcm = n*m;\n\t\t\t\twhile (n%m!=0) {\n\t\t\t\t\tlong t = m;\n\t\t\t\t\tm = n%m;\n\t\t\t\t\tn = t;\n\t\t\t\t}\n\t\t\t\tgcd = m;\n\t\t\t\tlcm = lcm/gcd;\n\t\t\t\tSystem.out.println(gcd+\" \"+lcm);\n\t\t\t}",
"StringTokenizer st = new StringTokenizer(buf);",
"st",
"new StringTokenizer(buf)",
"long n = Integer.parseInt(st.nextToken());",
"n",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"long m = Integer.parseInt(st.nextToken());",
"m",
"Integer.parseInt(st.nextToken())",
"Integer.parseInt",
"Integer",
"st.nextToken()",
"st.nextToken",
"st",
"long gcd;",
"gcd",
"long lcm = n*m;",
"lcm",
"n*m",
"n",
"m",
"while (n%m!=0) {\n\t\t\t\t\tlong t = m;\n\t\t\t\t\tm = n%m;\n\t\t\t\t\tn = t;\n\t\t\t\t}",
"n%m!=0",
"n%m",
"n",
"m",
"0",
"{\n\t\t\t\t\tlong t = m;\n\t\t\t\t\tm = n%m;\n\t\t\t\t\tn = t;\n\t\t\t\t}",
"long t = m;",
"t",
"m",
"m = n%m",
"m",
"n%m",
"n",
"m",
"n = t",
"n",
"t",
"gcd = m",
"gcd",
"m",
"lcm = lcm/gcd",
"lcm",
"lcm/gcd",
"lcm",
"gcd",
"System.out.println(gcd+\" \"+lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd+\" \"+lcm",
"gcd+\" \"+lcm",
"gcd",
"\" \"",
"lcm",
"String args[]",
"args"
] | import java.io.*;
import java.util.StringTokenizer;
class Main {
public static void main(String args[]) {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String buf;
try {
while ((buf = br.readLine())!=null) {
StringTokenizer st = new StringTokenizer(buf);
long n = Integer.parseInt(st.nextToken());
long m = Integer.parseInt(st.nextToken());
long gcd;
long lcm = n*m;
while (n%m!=0) {
long t = m;
m = n%m;
n = t;
}
gcd = m;
lcm = lcm/gcd;
System.out.println(gcd+" "+lcm);
}
} catch (Exception e) {
System.out.println("Exception!");
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
17,
41,
13,
17,
41,
13,
20,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
4,
18,
13,
17,
4,
18,
13,
17,
0,
13,
4,
18,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
4,
18,
13,
0,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
2,
2,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
8,
2,
13,
13,
13,
13,
41,
13,
8,
2,
13,
13,
13,
13,
41,
13,
17,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
7,
8
],
[
7,
9
],
[
0,
10
],
[
10,
11
],
[
10,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
14,
17
],
[
17,
18
],
[
14,
19
],
[
19,
20
],
[
19,
21
],
[
14,
22
],
[
22,
23
],
[
22,
24
],
[
14,
25
],
[
25,
26
],
[
25,
27
],
[
14,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
29,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
39,
42
],
[
42,
43
],
[
43,
44
],
[
42,
45
],
[
42,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
36,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
58,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
58,
63
],
[
55,
64
],
[
64,
65
],
[
65,
66
],
[
36,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
69,
71
],
[
69,
72
],
[
36,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
73,
78
],
[
79,
79
],
[
79,
80
],
[
79,
81
],
[
79,
82
],
[
82,
83
],
[
83,
84
],
[
83,
85
],
[
82,
86
],
[
12,
87
],
[
87,
88
],
[
10,
89
],
[
89,
90
],
[
89,
91
],
[
91,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
95,
97
],
[
94,
98
],
[
94,
99
],
[
91,
100
],
[
100,
101
],
[
100,
102
],
[
102,
103
],
[
103,
104
],
[
103,
105
],
[
102,
106
],
[
102,
107
],
[
91,
108
],
[
108,
109
],
[
108,
110
],
[
91,
111
],
[
111,
112
],
[
112,
113
],
[
113,
114
],
[
113,
115
],
[
115,
116
],
[
115,
117
],
[
112,
118
],
[
111,
119
],
[
119,
120
],
[
120,
121
],
[
120,
122
],
[
119,
123
],
[
123,
124
],
[
123,
125
],
[
91,
126
],
[
126,
127
],
[
89,
128
],
[
128,
129
],
[
89,
130
],
[
130,
131
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\nclass Main{\n public static void main(String[] args) throws IOException{\n long num1,num2,kouyakusu=0;\n String str=\"\";\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n\n while((str=buf.readLine()) != null){\n num1 = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n num2 = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n kouyakusu = kouyakusu(num1,num2);\n System.out.println(kouyakusu+\" \"+num1*num2/kouyakusu);\n }\n }\n public static long kouyakusu(long num1,long num2){\n long x = (num1>num2)? num1 : num2;\n long y = (num1>num2)? num2 : num1;\n long tmp = 0;\n while((tmp = x%y)!=0){\n x = y;\n y = tmp;\n }\n return y;\n }\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",
"class Main{\n public static void main(String[] args) throws IOException{\n long num1,num2,kouyakusu=0;\n String str=\"\";\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n\n while((str=buf.readLine()) != null){\n num1 = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n num2 = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n kouyakusu = kouyakusu(num1,num2);\n System.out.println(kouyakusu+\" \"+num1*num2/kouyakusu);\n }\n }\n public static long kouyakusu(long num1,long num2){\n long x = (num1>num2)? num1 : num2;\n long y = (num1>num2)? num2 : num1;\n long tmp = 0;\n while((tmp = x%y)!=0){\n x = y;\n y = tmp;\n }\n return y;\n }\n\n\n\n}",
"Main",
"public static void main(String[] args) throws IOException{\n long num1,num2,kouyakusu=0;\n String str=\"\";\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n\n while((str=buf.readLine()) != null){\n num1 = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n num2 = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n kouyakusu = kouyakusu(num1,num2);\n System.out.println(kouyakusu+\" \"+num1*num2/kouyakusu);\n }\n }",
"main",
"{\n long num1,num2,kouyakusu=0;\n String str=\"\";\n BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));\n\n while((str=buf.readLine()) != null){\n num1 = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n num2 = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n kouyakusu = kouyakusu(num1,num2);\n System.out.println(kouyakusu+\" \"+num1*num2/kouyakusu);\n }\n }",
"long num1",
"num1",
"num2",
"num2",
"kouyakusu=0;",
"kouyakusu",
"0",
"String str=\"\";",
"str",
"\"\"",
"BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));",
"buf",
"new BufferedReader(new InputStreamReader(System.in))",
"while((str=buf.readLine()) != null){\n num1 = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n num2 = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n kouyakusu = kouyakusu(num1,num2);\n System.out.println(kouyakusu+\" \"+num1*num2/kouyakusu);\n }",
"(str=buf.readLine()) != null",
"(str=buf.readLine())",
"str",
"buf.readLine()",
"buf.readLine",
"buf",
"null",
"{\n num1 = Long.parseLong(str.substring(0, str.indexOf(\" \")));\n num2 = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()));\n kouyakusu = kouyakusu(num1,num2);\n System.out.println(kouyakusu+\" \"+num1*num2/kouyakusu);\n }",
"num1 = Long.parseLong(str.substring(0, str.indexOf(\" \")))",
"num1",
"Long.parseLong(str.substring(0, str.indexOf(\" \")))",
"Long.parseLong",
"Long",
"str.substring(0, str.indexOf(\" \"))",
"str.substring",
"str",
"0",
"str.indexOf(\" \")",
"str.indexOf",
"str",
"\" \"",
"num2 = Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()))",
"num2",
"Long.parseLong(str.substring(str.indexOf(\" \")+1, str.length()))",
"Long.parseLong",
"Long",
"str.substring(str.indexOf(\" \")+1, str.length())",
"str.substring",
"str",
"str.indexOf(\" \")+1",
"str.indexOf(\" \")",
"str.indexOf",
"str",
"\" \"",
"1",
"str.length()",
"str.length",
"str",
"kouyakusu = kouyakusu(num1,num2)",
"kouyakusu",
"kouyakusu(num1,num2)",
"kouyakusu",
"num1",
"num2",
"System.out.println(kouyakusu+\" \"+num1*num2/kouyakusu)",
"System.out.println",
"System.out",
"System",
"System.out",
"kouyakusu+\" \"+num1*num2/kouyakusu",
"kouyakusu+\" \"+num1*num2/kouyakusu",
"kouyakusu",
"\" \"",
"num1*num2/kouyakusu",
"num1*num2",
"num1",
"num2",
"kouyakusu",
"String[] args",
"args",
"public static long kouyakusu(long num1,long num2){\n long x = (num1>num2)? num1 : num2;\n long y = (num1>num2)? num2 : num1;\n long tmp = 0;\n while((tmp = x%y)!=0){\n x = y;\n y = tmp;\n }\n return y;\n }",
"kouyakusu",
"{\n long x = (num1>num2)? num1 : num2;\n long y = (num1>num2)? num2 : num1;\n long tmp = 0;\n while((tmp = x%y)!=0){\n x = y;\n y = tmp;\n }\n return y;\n }",
"long x = (num1>num2)? num1 : num2;",
"x",
"(num1>num2)? num1 : num2",
"(num1>num2)",
"num1",
"num2",
"num1",
"num2",
"long y = (num1>num2)? num2 : num1;",
"y",
"(num1>num2)? num2 : num1",
"(num1>num2)",
"num1",
"num2",
"num2",
"num1",
"long tmp = 0;",
"tmp",
"0",
"while((tmp = x%y)!=0){\n x = y;\n y = tmp;\n }",
"(tmp = x%y)!=0",
"(tmp = x%y)",
"tmp",
"x%y",
"x",
"y",
"0",
"{\n x = y;\n y = tmp;\n }",
"x = y",
"x",
"y",
"y = tmp",
"y",
"tmp",
"return y;",
"y",
"long num1",
"num1",
"long num2",
"num2"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
class Main{
public static void main(String[] args) throws IOException{
long num1,num2,kouyakusu=0;
String str="";
BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
while((str=buf.readLine()) != null){
num1 = Long.parseLong(str.substring(0, str.indexOf(" ")));
num2 = Long.parseLong(str.substring(str.indexOf(" ")+1, str.length()));
kouyakusu = kouyakusu(num1,num2);
System.out.println(kouyakusu+" "+num1*num2/kouyakusu);
}
}
public static long kouyakusu(long num1,long num2){
long x = (num1>num2)? num1 : num2;
long y = (num1>num2)? num2 : num1;
long tmp = 0;
while((tmp = x%y)!=0){
x = y;
y = tmp;
}
return y;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
41,
13,
41,
13,
0,
13,
4,
18,
13,
4,
18,
13,
17,
4,
18,
13,
17,
0,
13,
4,
18,
13,
4,
18,
13,
2,
4,
18,
13,
17,
17,
0,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
4,
13,
13,
13,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
13,
13,
42,
2,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
13,
0,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
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
],
[
142,
11
],
[
142,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
22,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
29,
32
],
[
32,
33
],
[
29,
34
],
[
34,
35
],
[
29,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
41,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
29,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
55,
56
],
[
54,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
58,
61
],
[
57,
62
],
[
29,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
65,
67
],
[
65,
68
],
[
29,
69
],
[
69,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
69,
74
],
[
75,
75
],
[
75,
76
],
[
75,
77
],
[
75,
78
],
[
78,
79
],
[
78,
80
],
[
78,
81
],
[
78,
82
],
[
12,
83
],
[
83,
84
],
[
142,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
87,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
93,
94
],
[
92,
95
],
[
92,
96
],
[
87,
97
],
[
97,
98
],
[
97,
99
],
[
99,
100
],
[
100,
101
],
[
99,
102
],
[
99,
103
],
[
87,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
104,
108
],
[
108,
109
],
[
109,
110
],
[
109,
111
],
[
111,
112
],
[
111,
113
],
[
108,
114
],
[
114,
115
],
[
114,
116
],
[
108,
117
],
[
117,
118
],
[
117,
119
],
[
87,
120
],
[
120,
121
],
[
85,
122
],
[
122,
123
],
[
85,
124
],
[
124,
125
],
[
142,
126
],
[
126,
127
],
[
126,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
131,
132
],
[
131,
133
],
[
130,
134
],
[
126,
135
],
[
135,
136
],
[
126,
137
],
[
137,
138
],
[
126,
139
],
[
139,
140
],
[
0,
141
],
[
141,
142
],
[
141,
143
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = \"\";\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tint a, b, gcm;\n\t\t\ta = Integer.parseInt(line.substring(0, line.indexOf(\" \")));\n\t\t\tb = Integer.parseInt(line.substring(line.indexOf(\" \") + 1));\n\t\t\tgcm = getGCD(a, b);\n\t\t\tSystem.out.println(gcm + \" \" + getLCM(a, b, gcm));\n\t\t}\n\t}\n\n\tpublic static int getGCD(long a, long b) {\n\n\t\tint mod;\n\t\tint gt = (int) Math.max(a, b);\n\t\tint lt = (int) Math.min(a, b);\n\n\t\tdo {\n\t\t\tmod = gt % lt;\n\t\t\tgt = lt;\n\t\t\tlt = mod;\n\t\t} while (mod != 0);\n\n\t\treturn gt;\n\t}\n\n\tpublic static long getLCM(int a, int b, int gcm) {\n\t\treturn (long) a * (long) b / gcm;\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = \"\";\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tint a, b, gcm;\n\t\t\ta = Integer.parseInt(line.substring(0, line.indexOf(\" \")));\n\t\t\tb = Integer.parseInt(line.substring(line.indexOf(\" \") + 1));\n\t\t\tgcm = getGCD(a, b);\n\t\t\tSystem.out.println(gcm + \" \" + getLCM(a, b, gcm));\n\t\t}\n\t}\n\n\tpublic static int getGCD(long a, long b) {\n\n\t\tint mod;\n\t\tint gt = (int) Math.max(a, b);\n\t\tint lt = (int) Math.min(a, b);\n\n\t\tdo {\n\t\t\tmod = gt % lt;\n\t\t\tgt = lt;\n\t\t\tlt = mod;\n\t\t} while (mod != 0);\n\n\t\treturn gt;\n\t}\n\n\tpublic static long getLCM(int a, int b, int gcm) {\n\t\treturn (long) a * (long) b / gcm;\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = \"\";\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tint a, b, gcm;\n\t\t\ta = Integer.parseInt(line.substring(0, line.indexOf(\" \")));\n\t\t\tb = Integer.parseInt(line.substring(line.indexOf(\" \") + 1));\n\t\t\tgcm = getGCD(a, b);\n\t\t\tSystem.out.println(gcm + \" \" + getLCM(a, b, gcm));\n\t\t}\n\t}",
"main",
"{\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = \"\";\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tint a, b, gcm;\n\t\t\ta = Integer.parseInt(line.substring(0, line.indexOf(\" \")));\n\t\t\tb = Integer.parseInt(line.substring(line.indexOf(\" \") + 1));\n\t\t\tgcm = getGCD(a, b);\n\t\t\tSystem.out.println(gcm + \" \" + getLCM(a, b, gcm));\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String line = \"\";",
"line",
"\"\"",
"while ((line = br.readLine()) != null) {\n\t\t\tint a, b, gcm;\n\t\t\ta = Integer.parseInt(line.substring(0, line.indexOf(\" \")));\n\t\t\tb = Integer.parseInt(line.substring(line.indexOf(\" \") + 1));\n\t\t\tgcm = getGCD(a, b);\n\t\t\tSystem.out.println(gcm + \" \" + getLCM(a, b, gcm));\n\t\t}",
"(line = br.readLine()) != null",
"(line = br.readLine())",
"line",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tint a, b, gcm;\n\t\t\ta = Integer.parseInt(line.substring(0, line.indexOf(\" \")));\n\t\t\tb = Integer.parseInt(line.substring(line.indexOf(\" \") + 1));\n\t\t\tgcm = getGCD(a, b);\n\t\t\tSystem.out.println(gcm + \" \" + getLCM(a, b, gcm));\n\t\t}",
"int a",
"a",
"b",
"b",
"gcm;",
"gcm",
"a = Integer.parseInt(line.substring(0, line.indexOf(\" \")))",
"a",
"Integer.parseInt(line.substring(0, line.indexOf(\" \")))",
"Integer.parseInt",
"Integer",
"line.substring(0, line.indexOf(\" \"))",
"line.substring",
"line",
"0",
"line.indexOf(\" \")",
"line.indexOf",
"line",
"\" \"",
"b = Integer.parseInt(line.substring(line.indexOf(\" \") + 1))",
"b",
"Integer.parseInt(line.substring(line.indexOf(\" \") + 1))",
"Integer.parseInt",
"Integer",
"line.substring(line.indexOf(\" \") + 1)",
"line.substring",
"line",
"line.indexOf(\" \") + 1",
"line.indexOf(\" \")",
"line.indexOf",
"line",
"\" \"",
"1",
"gcm = getGCD(a, b)",
"gcm",
"getGCD(a, b)",
"getGCD",
"a",
"b",
"System.out.println(gcm + \" \" + getLCM(a, b, gcm))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcm + \" \" + getLCM(a, b, gcm)",
"gcm + \" \" + getLCM(a, b, gcm)",
"gcm",
"\" \"",
"getLCM(a, b, gcm)",
"getLCM",
"a",
"b",
"gcm",
"String[] args",
"args",
"public static int getGCD(long a, long b) {\n\n\t\tint mod;\n\t\tint gt = (int) Math.max(a, b);\n\t\tint lt = (int) Math.min(a, b);\n\n\t\tdo {\n\t\t\tmod = gt % lt;\n\t\t\tgt = lt;\n\t\t\tlt = mod;\n\t\t} while (mod != 0);\n\n\t\treturn gt;\n\t}",
"getGCD",
"{\n\n\t\tint mod;\n\t\tint gt = (int) Math.max(a, b);\n\t\tint lt = (int) Math.min(a, b);\n\n\t\tdo {\n\t\t\tmod = gt % lt;\n\t\t\tgt = lt;\n\t\t\tlt = mod;\n\t\t} while (mod != 0);\n\n\t\treturn gt;\n\t}",
"int mod;",
"mod",
"int gt = (int) Math.max(a, b);",
"gt",
"(int) Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"int lt = (int) Math.min(a, b);",
"lt",
"(int) Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"do {\n\t\t\tmod = gt % lt;\n\t\t\tgt = lt;\n\t\t\tlt = mod;\n\t\t} while (mod != 0);",
"mod != 0",
"mod",
"0",
"{\n\t\t\tmod = gt % lt;\n\t\t\tgt = lt;\n\t\t\tlt = mod;\n\t\t}",
"mod = gt % lt",
"mod",
"gt % lt",
"gt",
"lt",
"gt = lt",
"gt",
"lt",
"lt = mod",
"lt",
"mod",
"return gt;",
"gt",
"long a",
"a",
"long b",
"b",
"public static long getLCM(int a, int b, int gcm) {\n\t\treturn (long) a * (long) b / gcm;\n\t}",
"getLCM",
"{\n\t\treturn (long) a * (long) b / gcm;\n\t}",
"return (long) a * (long) b / gcm;",
"(long) a * (long) b / gcm",
"(long) a * (long) b",
"(long) a",
"(long) b",
"gcm",
"int a",
"a",
"int b",
"b",
"int gcm",
"gcm",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = \"\";\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tint a, b, gcm;\n\t\t\ta = Integer.parseInt(line.substring(0, line.indexOf(\" \")));\n\t\t\tb = Integer.parseInt(line.substring(line.indexOf(\" \") + 1));\n\t\t\tgcm = getGCD(a, b);\n\t\t\tSystem.out.println(gcm + \" \" + getLCM(a, b, gcm));\n\t\t}\n\t}\n\n\tpublic static int getGCD(long a, long b) {\n\n\t\tint mod;\n\t\tint gt = (int) Math.max(a, b);\n\t\tint lt = (int) Math.min(a, b);\n\n\t\tdo {\n\t\t\tmod = gt % lt;\n\t\t\tgt = lt;\n\t\t\tlt = mod;\n\t\t} while (mod != 0);\n\n\t\treturn gt;\n\t}\n\n\tpublic static long getLCM(int a, int b, int gcm) {\n\t\treturn (long) a * (long) b / gcm;\n\t}\n}",
"public class Main {\n\n\tpublic static void main(String[] args) throws IOException {\n\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line = \"\";\n\t\twhile ((line = br.readLine()) != null) {\n\t\t\tint a, b, gcm;\n\t\t\ta = Integer.parseInt(line.substring(0, line.indexOf(\" \")));\n\t\t\tb = Integer.parseInt(line.substring(line.indexOf(\" \") + 1));\n\t\t\tgcm = getGCD(a, b);\n\t\t\tSystem.out.println(gcm + \" \" + getLCM(a, b, gcm));\n\t\t}\n\t}\n\n\tpublic static int getGCD(long a, long b) {\n\n\t\tint mod;\n\t\tint gt = (int) Math.max(a, b);\n\t\tint lt = (int) Math.min(a, b);\n\n\t\tdo {\n\t\t\tmod = gt % lt;\n\t\t\tgt = lt;\n\t\t\tlt = mod;\n\t\t} while (mod != 0);\n\n\t\treturn gt;\n\t}\n\n\tpublic static long getLCM(int a, int b, int gcm) {\n\t\treturn (long) a * (long) b / gcm;\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line = "";
while ((line = br.readLine()) != null) {
int a, b, gcm;
a = Integer.parseInt(line.substring(0, line.indexOf(" ")));
b = Integer.parseInt(line.substring(line.indexOf(" ") + 1));
gcm = getGCD(a, b);
System.out.println(gcm + " " + getLCM(a, b, gcm));
}
}
public static int getGCD(long a, long b) {
int mod;
int gt = (int) Math.max(a, b);
int lt = (int) Math.min(a, b);
do {
mod = gt % lt;
gt = lt;
lt = mod;
} while (mod != 0);
return gt;
}
public static long getLCM(int a, int b, int gcm) {
return (long) a * (long) b / gcm;
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
2,
13,
13,
42,
2,
13,
17,
30,
0,
13,
13,
0,
13,
13,
0,
13,
2,
13,
13,
29,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
41,
13,
41,
13,
41,
13,
41,
13,
20,
42,
4,
18,
13,
30,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
0,
13,
4,
13,
13,
13,
0,
13,
2,
2,
2,
17,
13,
13,
13,
4,
18,
18,
13,
13,
2,
13,
17,
4,
18,
18,
13,
13,
4,
18,
20,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
102,
8
],
[
102,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
14,
16
],
[
11,
17
],
[
17,
18
],
[
18,
19
],
[
18,
20
],
[
17,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
21,
25
],
[
25,
26
],
[
25,
27
],
[
21,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
30,
32
],
[
11,
33
],
[
33,
34
],
[
9,
35
],
[
35,
36
],
[
9,
37
],
[
37,
38
],
[
102,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
41,
46
],
[
46,
47
],
[
41,
48
],
[
48,
49
],
[
41,
50
],
[
50,
51
],
[
50,
52
],
[
41,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
53,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
57,
63
],
[
63,
64
],
[
63,
65
],
[
65,
66
],
[
66,
67
],
[
57,
68
],
[
68,
69
],
[
68,
70
],
[
70,
71
],
[
70,
72
],
[
70,
73
],
[
57,
74
],
[
74,
75
],
[
74,
76
],
[
76,
77
],
[
78,
78
],
[
78,
79
],
[
78,
80
],
[
78,
81
],
[
76,
82
],
[
57,
83
],
[
83,
84
],
[
84,
85
],
[
85,
86
],
[
85,
87
],
[
83,
88
],
[
88,
89
],
[
88,
90
],
[
57,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
91,
96
],
[
96,
97
],
[
97,
98
],
[
39,
99
],
[
99,
100
],
[
0,
101
],
[
101,
102
],
[
101,
103
]
] | [
"import java.io.BufferedInputStream;\nimport java.util.Scanner;\n\npublic class Main {\n\n static int gcd(int a, int b)\n {\n int t = a % b;\n while(t != 0)\n {\n a = b;\n b = t;\n t = a % b;\n }\n\n return b;\n }\n public static void main(String[] args)\n {\n int a, b, g;\n\n long l;\n\n Scanner cin = new Scanner(new BufferedInputStream(System.in));\n\n while(cin.hasNext())\n {\n a = cin.nextInt();\n b = cin.nextInt();\n\n g = gcd(a, b);\n l = 1L * a*b / g;\n System.out.print(g+\" \");\n System.out.println(new Long(l).toString());\n }\n\n }\n}\n",
"import java.io.BufferedInputStream;",
"BufferedInputStream",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main {\n\n static int gcd(int a, int b)\n {\n int t = a % b;\n while(t != 0)\n {\n a = b;\n b = t;\n t = a % b;\n }\n\n return b;\n }\n public static void main(String[] args)\n {\n int a, b, g;\n\n long l;\n\n Scanner cin = new Scanner(new BufferedInputStream(System.in));\n\n while(cin.hasNext())\n {\n a = cin.nextInt();\n b = cin.nextInt();\n\n g = gcd(a, b);\n l = 1L * a*b / g;\n System.out.print(g+\" \");\n System.out.println(new Long(l).toString());\n }\n\n }\n}",
"Main",
"static int gcd(int a, int b)\n {\n int t = a % b;\n while(t != 0)\n {\n a = b;\n b = t;\n t = a % b;\n }\n\n return b;\n }",
"gcd",
"{\n int t = a % b;\n while(t != 0)\n {\n a = b;\n b = t;\n t = a % b;\n }\n\n return b;\n }",
"int t = a % b;",
"t",
"a % b",
"a",
"b",
"while(t != 0)\n {\n a = b;\n b = t;\n t = a % b;\n }",
"t != 0",
"t",
"0",
"{\n a = b;\n b = t;\n t = a % b;\n }",
"a = b",
"a",
"b",
"b = t",
"b",
"t",
"t = a % b",
"t",
"a % b",
"a",
"b",
"return b;",
"b",
"int a",
"a",
"int b",
"b",
"public static void main(String[] args)\n {\n int a, b, g;\n\n long l;\n\n Scanner cin = new Scanner(new BufferedInputStream(System.in));\n\n while(cin.hasNext())\n {\n a = cin.nextInt();\n b = cin.nextInt();\n\n g = gcd(a, b);\n l = 1L * a*b / g;\n System.out.print(g+\" \");\n System.out.println(new Long(l).toString());\n }\n\n }",
"main",
"{\n int a, b, g;\n\n long l;\n\n Scanner cin = new Scanner(new BufferedInputStream(System.in));\n\n while(cin.hasNext())\n {\n a = cin.nextInt();\n b = cin.nextInt();\n\n g = gcd(a, b);\n l = 1L * a*b / g;\n System.out.print(g+\" \");\n System.out.println(new Long(l).toString());\n }\n\n }",
"int a",
"a",
"b",
"b",
"g;",
"g",
"long l;",
"l",
"Scanner cin = new Scanner(new BufferedInputStream(System.in));",
"cin",
"new Scanner(new BufferedInputStream(System.in))",
"while(cin.hasNext())\n {\n a = cin.nextInt();\n b = cin.nextInt();\n\n g = gcd(a, b);\n l = 1L * a*b / g;\n System.out.print(g+\" \");\n System.out.println(new Long(l).toString());\n }",
"cin.hasNext()",
"cin.hasNext",
"cin",
"{\n a = cin.nextInt();\n b = cin.nextInt();\n\n g = gcd(a, b);\n l = 1L * a*b / g;\n System.out.print(g+\" \");\n System.out.println(new Long(l).toString());\n }",
"a = cin.nextInt()",
"a",
"cin.nextInt()",
"cin.nextInt",
"cin",
"b = cin.nextInt()",
"b",
"cin.nextInt()",
"cin.nextInt",
"cin",
"g = gcd(a, b)",
"g",
"gcd(a, b)",
"gcd",
"a",
"b",
"l = 1L * a*b / g",
"l",
"1L * a*b / g",
"1L * a*b",
"1L * a*b",
"1L",
"a",
"b",
"g",
"System.out.print(g+\" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"g+\" \"",
"g",
"\" \"",
"System.out.println(new Long(l).toString())",
"System.out.println",
"System.out",
"System",
"System.out",
"new Long(l).toString()",
"new Long(l).toString",
"new Long(l)",
"String[] args",
"args",
"public class Main {\n\n static int gcd(int a, int b)\n {\n int t = a % b;\n while(t != 0)\n {\n a = b;\n b = t;\n t = a % b;\n }\n\n return b;\n }\n public static void main(String[] args)\n {\n int a, b, g;\n\n long l;\n\n Scanner cin = new Scanner(new BufferedInputStream(System.in));\n\n while(cin.hasNext())\n {\n a = cin.nextInt();\n b = cin.nextInt();\n\n g = gcd(a, b);\n l = 1L * a*b / g;\n System.out.print(g+\" \");\n System.out.println(new Long(l).toString());\n }\n\n }\n}",
"public class Main {\n\n static int gcd(int a, int b)\n {\n int t = a % b;\n while(t != 0)\n {\n a = b;\n b = t;\n t = a % b;\n }\n\n return b;\n }\n public static void main(String[] args)\n {\n int a, b, g;\n\n long l;\n\n Scanner cin = new Scanner(new BufferedInputStream(System.in));\n\n while(cin.hasNext())\n {\n a = cin.nextInt();\n b = cin.nextInt();\n\n g = gcd(a, b);\n l = 1L * a*b / g;\n System.out.print(g+\" \");\n System.out.println(new Long(l).toString());\n }\n\n }\n}",
"Main"
] | import java.io.BufferedInputStream;
import java.util.Scanner;
public class Main {
static int gcd(int a, int b)
{
int t = a % b;
while(t != 0)
{
a = b;
b = t;
t = a % b;
}
return b;
}
public static void main(String[] args)
{
int a, b, g;
long l;
Scanner cin = new Scanner(new BufferedInputStream(System.in));
while(cin.hasNext())
{
a = cin.nextInt();
b = cin.nextInt();
g = gcd(a, b);
l = 1L * a*b / g;
System.out.print(g+" ");
System.out.println(new Long(l).toString());
}
}
}
|
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
41,
13,
20,
41,
13,
41,
13,
12,
13,
30,
42,
4,
13,
30,
4,
13,
23,
13,
12,
13,
30,
14,
40,
4,
18,
13,
29,
17,
0,
13,
4,
18,
13,
0,
13,
4,
18,
13,
29,
17,
12,
13,
30,
4,
18,
18,
13,
13,
2,
4,
13,
13,
13,
17,
4,
18,
18,
13,
13,
4,
13,
13,
13,
4,
13,
13,
13,
12,
13,
30,
29,
4,
18,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
4,
18,
4,
18,
13,
13,
13,
23,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
106,
8
],
[
106,
9
],
[
9,
10
],
[
9,
11
],
[
106,
12
],
[
12,
13
],
[
106,
14
],
[
14,
15
],
[
106,
16
],
[
16,
17
],
[
16,
18
],
[
18,
19
],
[
19,
20
],
[
20,
21
],
[
19,
22
],
[
22,
23
],
[
23,
24
],
[
16,
25
],
[
25,
26
],
[
106,
27
],
[
27,
28
],
[
27,
29
],
[
29,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
33,
34
],
[
30,
35
],
[
35,
36
],
[
29,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
29,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
29,
47
],
[
47,
48
],
[
106,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
53,
54
],
[
54,
55
],
[
54,
56
],
[
52,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
58,
61
],
[
57,
62
],
[
51,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
63,
68
],
[
68,
69
],
[
68,
70
],
[
68,
71
],
[
68,
72
],
[
72,
73
],
[
72,
74
],
[
72,
75
],
[
106,
76
],
[
76,
77
],
[
76,
78
],
[
78,
79
],
[
79,
80
],
[
80,
81
],
[
81,
82
],
[
80,
83
],
[
76,
84
],
[
84,
85
],
[
76,
86
],
[
86,
87
],
[
106,
88
],
[
88,
89
],
[
88,
90
],
[
90,
91
],
[
91,
92
],
[
92,
93
],
[
93,
94
],
[
94,
95
],
[
95,
96
],
[
94,
97
],
[
92,
98
],
[
88,
99
],
[
99,
100
],
[
88,
101
],
[
101,
102
],
[
88,
103
],
[
103,
104
],
[
0,
105
],
[
105,
106
],
[
105,
107
]
] | [
"import java.util.*;\nimport java.math.*;\npublic class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic BigInteger a, b;\n\tpublic static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}\n\tstatic boolean read(){\n\t\tif(!sc.hasNext())\n\t\t\treturn false;\n\t\ta = sc.nextBigInteger();\n\t\tb = sc.nextBigInteger();\n\t\treturn true;\n\t}\n\tstatic void solve(){\n\t\tSystem.out.print(gcd(a, b) + \" \");\n\t\tSystem.out.println(lcm(a, b, gcd(a, b)));\n\t}\n\tstatic BigInteger gcd(BigInteger a, BigInteger b){\n\t\treturn a.gcd(b);\n\t}\n\tstatic BigInteger lcm(BigInteger a, BigInteger b, BigInteger gcd){\n\t\treturn a.multiply(b).divide(gcd);\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.math.*;",
"math.*",
"java",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic BigInteger a, b;\n\tpublic static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}\n\tstatic boolean read(){\n\t\tif(!sc.hasNext())\n\t\t\treturn false;\n\t\ta = sc.nextBigInteger();\n\t\tb = sc.nextBigInteger();\n\t\treturn true;\n\t}\n\tstatic void solve(){\n\t\tSystem.out.print(gcd(a, b) + \" \");\n\t\tSystem.out.println(lcm(a, b, gcd(a, b)));\n\t}\n\tstatic BigInteger gcd(BigInteger a, BigInteger b){\n\t\treturn a.gcd(b);\n\t}\n\tstatic BigInteger lcm(BigInteger a, BigInteger b, BigInteger gcd){\n\t\treturn a.multiply(b).divide(gcd);\n\t}\n}",
"Main",
"static Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"static BigInteger a",
"a",
"b;",
"b",
"public static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}",
"main",
"{\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}",
"while(read()){\n\t\t\tsolve();\n\t\t}",
"read()",
"read",
"{\n\t\t\tsolve();\n\t\t}",
"solve()",
"solve",
"String[] args",
"args",
"static boolean read(){\n\t\tif(!sc.hasNext())\n\t\t\treturn false;\n\t\ta = sc.nextBigInteger();\n\t\tb = sc.nextBigInteger();\n\t\treturn true;\n\t}",
"read",
"{\n\t\tif(!sc.hasNext())\n\t\t\treturn false;\n\t\ta = sc.nextBigInteger();\n\t\tb = sc.nextBigInteger();\n\t\treturn true;\n\t}",
"if(!sc.hasNext())\n\t\t\treturn false;",
"!sc.hasNext()",
"sc.hasNext()",
"sc.hasNext",
"sc",
"return false;",
"false",
"a = sc.nextBigInteger()",
"a",
"sc.nextBigInteger()",
"sc.nextBigInteger",
"sc",
"b = sc.nextBigInteger()",
"b",
"sc.nextBigInteger()",
"sc.nextBigInteger",
"sc",
"return true;",
"true",
"static void solve(){\n\t\tSystem.out.print(gcd(a, b) + \" \");\n\t\tSystem.out.println(lcm(a, b, gcd(a, b)));\n\t}",
"solve",
"{\n\t\tSystem.out.print(gcd(a, b) + \" \");\n\t\tSystem.out.println(lcm(a, b, gcd(a, b)));\n\t}",
"System.out.print(gcd(a, b) + \" \")",
"System.out.print",
"System.out",
"System",
"System.out",
"gcd(a, b) + \" \"",
"gcd(a, b)",
"gcd",
"a",
"b",
"\" \"",
"System.out.println(lcm(a, b, gcd(a, b)))",
"System.out.println",
"System.out",
"System",
"System.out",
"lcm(a, b, gcd(a, b))",
"lcm",
"a",
"b",
"gcd(a, b)",
"gcd",
"a",
"b",
"static BigInteger gcd(BigInteger a, BigInteger b){\n\t\treturn a.gcd(b);\n\t}",
"gcd",
"{\n\t\treturn a.gcd(b);\n\t}",
"return a.gcd(b);",
"a.gcd(b)",
"a.gcd",
"a",
"b",
"BigInteger a",
"a",
"BigInteger b",
"b",
"static BigInteger lcm(BigInteger a, BigInteger b, BigInteger gcd){\n\t\treturn a.multiply(b).divide(gcd);\n\t}",
"lcm",
"{\n\t\treturn a.multiply(b).divide(gcd);\n\t}",
"return a.multiply(b).divide(gcd);",
"a.multiply(b).divide(gcd)",
"a.multiply(b).divide",
"a.multiply(b)",
"a.multiply",
"a",
"b",
"gcd",
"BigInteger a",
"a",
"BigInteger b",
"b",
"BigInteger gcd",
"gcd",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic BigInteger a, b;\n\tpublic static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}\n\tstatic boolean read(){\n\t\tif(!sc.hasNext())\n\t\t\treturn false;\n\t\ta = sc.nextBigInteger();\n\t\tb = sc.nextBigInteger();\n\t\treturn true;\n\t}\n\tstatic void solve(){\n\t\tSystem.out.print(gcd(a, b) + \" \");\n\t\tSystem.out.println(lcm(a, b, gcd(a, b)));\n\t}\n\tstatic BigInteger gcd(BigInteger a, BigInteger b){\n\t\treturn a.gcd(b);\n\t}\n\tstatic BigInteger lcm(BigInteger a, BigInteger b, BigInteger gcd){\n\t\treturn a.multiply(b).divide(gcd);\n\t}\n}",
"public class Main {\n\tstatic Scanner sc = new Scanner(System.in);\n\tstatic BigInteger a, b;\n\tpublic static void main(String[] args) {\n\t\twhile(read()){\n\t\t\tsolve();\n\t\t}\n\n\t}\n\tstatic boolean read(){\n\t\tif(!sc.hasNext())\n\t\t\treturn false;\n\t\ta = sc.nextBigInteger();\n\t\tb = sc.nextBigInteger();\n\t\treturn true;\n\t}\n\tstatic void solve(){\n\t\tSystem.out.print(gcd(a, b) + \" \");\n\t\tSystem.out.println(lcm(a, b, gcd(a, b)));\n\t}\n\tstatic BigInteger gcd(BigInteger a, BigInteger b){\n\t\treturn a.gcd(b);\n\t}\n\tstatic BigInteger lcm(BigInteger a, BigInteger b, BigInteger gcd){\n\t\treturn a.multiply(b).divide(gcd);\n\t}\n}",
"Main"
] | import java.util.*;
import java.math.*;
public class Main {
static Scanner sc = new Scanner(System.in);
static BigInteger a, b;
public static void main(String[] args) {
while(read()){
solve();
}
}
static boolean read(){
if(!sc.hasNext())
return false;
a = sc.nextBigInteger();
b = sc.nextBigInteger();
return true;
}
static void solve(){
System.out.print(gcd(a, b) + " ");
System.out.println(lcm(a, b, gcd(a, b)));
}
static BigInteger gcd(BigInteger a, BigInteger b){
return a.gcd(b);
}
static BigInteger lcm(BigInteger a, BigInteger b, BigInteger gcd){
return a.multiply(b).divide(gcd);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
38,
5,
13,
30,
4,
18,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
38,
5,
13,
30,
3,
30,
41,
13,
4,
18,
13,
17,
41,
13,
20,
17,
11,
1,
41,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
0,
18,
13,
13,
4,
18,
13,
18,
13,
13,
4,
18,
13,
18,
13,
17,
18,
13,
17,
23,
13,
12,
13,
30,
41,
13,
13,
41,
13,
13,
41,
13,
17,
42,
2,
2,
2,
13,
17,
17,
2,
2,
13,
17,
17,
30,
0,
13,
2,
13,
17,
0,
13,
2,
13,
17,
0,
13,
2,
13,
17,
42,
2,
2,
2,
13,
17,
17,
2,
2,
13,
17,
17,
30,
0,
13,
2,
13,
17,
0,
13,
2,
13,
17,
0,
13,
2,
13,
17,
41,
13,
4,
13,
13,
13,
41,
13,
17,
11,
1,
41,
13,
17,
2,
13,
4,
18,
13,
13,
1,
40,
13,
30,
30,
42,
2,
2,
2,
13,
13,
17,
2,
2,
13,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
14,
2,
2,
13,
17,
17,
30,
0,
13,
2,
13,
17,
30,
0,
13,
2,
13,
17,
41,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
14,
2,
13,
13,
30,
0,
13,
13,
30,
0,
13,
13,
29,
13,
23,
13,
23,
13,
10,
6,
13
] | [
[
0,
1
],
[
1,
2
],
[
1,
3
],
[
0,
4
],
[
4,
5
],
[
4,
6
],
[
0,
7
],
[
271,
8
],
[
271,
9
],
[
9,
10
],
[
9,
11
],
[
11,
12
],
[
12,
13
],
[
13,
14
],
[
13,
15
],
[
15,
16
],
[
16,
17
],
[
17,
18
],
[
12,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
19,
23
],
[
23,
24
],
[
23,
25
],
[
19,
26
],
[
26,
27
],
[
19,
28
],
[
28,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
29,
35
],
[
28,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
40,
41
],
[
37,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
42,
49
],
[
49,
50
],
[
49,
51
],
[
42,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
58,
59
],
[
58,
60
],
[
53,
61
],
[
61,
62
],
[
62,
63
],
[
53,
64
],
[
65,
65
],
[
65,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
70,
73
],
[
73,
74
],
[
73,
75
],
[
42,
76
],
[
76,
77
],
[
77,
78
],
[
76,
79
],
[
79,
80
],
[
79,
81
],
[
76,
82
],
[
82,
83
],
[
82,
84
],
[
9,
85
],
[
85,
86
],
[
271,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
93,
94
],
[
93,
95
],
[
89,
96
],
[
96,
97
],
[
96,
98
],
[
89,
99
],
[
99,
100
],
[
100,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
101,
105
],
[
100,
106
],
[
106,
107
],
[
107,
108
],
[
107,
109
],
[
106,
110
],
[
99,
111
],
[
111,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
114,
116
],
[
111,
117
],
[
117,
118
],
[
117,
119
],
[
119,
120
],
[
119,
121
],
[
111,
122
],
[
122,
123
],
[
122,
124
],
[
124,
125
],
[
124,
126
],
[
89,
127
],
[
127,
128
],
[
128,
129
],
[
129,
130
],
[
130,
131
],
[
130,
132
],
[
129,
133
],
[
128,
134
],
[
134,
135
],
[
135,
136
],
[
135,
137
],
[
134,
138
],
[
127,
139
],
[
139,
140
],
[
140,
141
],
[
140,
142
],
[
142,
143
],
[
142,
144
],
[
139,
145
],
[
145,
146
],
[
145,
147
],
[
147,
148
],
[
147,
149
],
[
139,
150
],
[
150,
151
],
[
150,
152
],
[
152,
153
],
[
152,
154
],
[
89,
155
],
[
155,
156
],
[
155,
157
],
[
157,
158
],
[
157,
159
],
[
157,
160
],
[
89,
161
],
[
161,
162
],
[
161,
163
],
[
89,
164
],
[
164,
165
],
[
165,
166
],
[
166,
167
],
[
166,
168
],
[
164,
169
],
[
169,
170
],
[
169,
171
],
[
171,
172
],
[
172,
173
],
[
171,
174
],
[
164,
175
],
[
175,
176
],
[
176,
177
],
[
164,
178
],
[
179,
179
],
[
179,
180
],
[
180,
181
],
[
181,
182
],
[
182,
183
],
[
183,
184
],
[
183,
185
],
[
182,
186
],
[
181,
187
],
[
187,
188
],
[
188,
189
],
[
188,
190
],
[
187,
191
],
[
180,
192
],
[
192,
193
],
[
193,
194
],
[
193,
195
],
[
195,
196
],
[
195,
197
],
[
192,
198
],
[
198,
199
],
[
198,
200
],
[
200,
201
],
[
200,
202
],
[
192,
203
],
[
203,
204
],
[
203,
205
],
[
205,
206
],
[
205,
207
],
[
179,
208
],
[
208,
209
],
[
209,
210
],
[
210,
211
],
[
210,
212
],
[
209,
213
],
[
208,
214
],
[
214,
215
],
[
215,
216
],
[
215,
217
],
[
217,
218
],
[
217,
219
],
[
208,
220
],
[
220,
221
],
[
221,
222
],
[
221,
223
],
[
223,
224
],
[
223,
225
],
[
89,
226
],
[
226,
227
],
[
226,
228
],
[
229,
229
],
[
229,
230
],
[
229,
231
],
[
229,
232
],
[
89,
233
],
[
233,
234
],
[
234,
235
],
[
235,
236
],
[
235,
237
],
[
233,
238
],
[
239,
239
],
[
239,
240
],
[
239,
241
],
[
239,
242
],
[
87,
243
],
[
243,
244
],
[
87,
245
],
[
245,
246
],
[
271,
247
],
[
247,
248
],
[
247,
249
],
[
249,
250
],
[
250,
251
],
[
249,
252
],
[
252,
253
],
[
253,
254
],
[
253,
255
],
[
252,
256
],
[
256,
257
],
[
257,
258
],
[
257,
259
],
[
252,
260
],
[
260,
261
],
[
261,
262
],
[
261,
263
],
[
249,
264
],
[
264,
265
],
[
247,
266
],
[
266,
267
],
[
247,
268
],
[
268,
269
],
[
0,
270
],
[
270,
271
],
[
270,
272
]
] | [
"import java.io.BufferedReader;\nimport java.io.InputStreamReader;\n\n//public class Problem0005_GCDandLCM {\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0005_GCDandLCM test = new Problem0005_GCDandLCM();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\tvoid showAnswer(int x, int y) {\n\t\tint oddX = x;\n\t\tint oddY = y;\n\t\tint gcd = 1;\t//Ååöñ\n\t\t\n\t\twhile(oddX % 2 == 0 && oddY % 2 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 2 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 2;\n\t\t\toddY = oddY / 2;\n\t\t\tgcd = gcd * 2;\n\t\t}\n\t\twhile(oddX % 3 == 0 && oddY % 3 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 3 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 3;\n\t\t\toddY = oddY / 3;\n\t\t\tgcd = gcd * 3;\n\t\t}\n\t\t\n\t\tint min = getMin(x, y);\n\t\tint denominator = 5;\t//ªêi±êÅë¤Æ·é)\n\t\tfor(int i = 0; denominator < Math.sqrt(min); i++) {\n\t\t//\tSystem.out.println(\"denominator:\" + denominator + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\twhile(oddX % denominator == 0 && oddY % denominator == 0) {\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}\n\t\t\tif(i % 2 == 1) {\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t} else {\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint lcm = gcd * oddX * oddY;\n\t\tSystem.out.println(gcd + \" \" + lcm);\n\t}\n\tint getMin(int x, int y) {\n\t\tint min;\n\t\tif(x > y) {\t//y¬\n\t\t\tmin = y;\n\t\t} else {\t//x¬\n\t\t\tmin = x;\n\t\t}\n\t\treturn min;\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0005_GCDandLCM test = new Problem0005_GCDandLCM();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\tvoid showAnswer(int x, int y) {\n\t\tint oddX = x;\n\t\tint oddY = y;\n\t\tint gcd = 1;\t//Ååöñ\n\t\t\n\t\twhile(oddX % 2 == 0 && oddY % 2 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 2 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 2;\n\t\t\toddY = oddY / 2;\n\t\t\tgcd = gcd * 2;\n\t\t}\n\t\twhile(oddX % 3 == 0 && oddY % 3 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 3 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 3;\n\t\t\toddY = oddY / 3;\n\t\t\tgcd = gcd * 3;\n\t\t}\n\t\t\n\t\tint min = getMin(x, y);\n\t\tint denominator = 5;\t//ªêi±êÅë¤Æ·é)\n\t\tfor(int i = 0; denominator < Math.sqrt(min); i++) {\n\t\t//\tSystem.out.println(\"denominator:\" + denominator + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\twhile(oddX % denominator == 0 && oddY % denominator == 0) {\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}\n\t\t\tif(i % 2 == 1) {\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t} else {\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint lcm = gcd * oddX * oddY;\n\t\tSystem.out.println(gcd + \" \" + lcm);\n\t}\n\tint getMin(int x, int y) {\n\t\tint min;\n\t\tif(x > y) {\t//y¬\n\t\t\tmin = y;\n\t\t} else {\t//x¬\n\t\t\tmin = x;\n\t\t}\n\t\treturn min;\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0005_GCDandLCM test = new Problem0005_GCDandLCM();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"main",
"{\n\t\ttry {\n\t\t//\tProblem0005_GCDandLCM test = new Problem0005_GCDandLCM();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"try {\n\t\t//\tProblem0005_GCDandLCM test = new Problem0005_GCDandLCM();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}",
"catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}",
"Exception e",
"{\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t//\tProblem0005_GCDandLCM test = new Problem0005_GCDandLCM();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"Main test = new Main();",
"test",
"new Main()",
"BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));",
"reader",
"new BufferedReader(new InputStreamReader(System.in))",
"String line;",
"line",
"while((line = reader.readLine()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"(line = reader.readLine()) != null",
"(line = reader.readLine())",
"line",
"reader.readLine()",
"reader.readLine",
"reader",
"null",
"{\n\t\t\t\ttry {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}",
"try {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"NumberFormatException e",
"{\n\t\t\t\t\tbreak;\n\t\t\t\t}",
"break;",
"{\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t}",
"String[] textArray = line.split(\" \");",
"textArray",
"line.split(\" \")",
"line.split",
"line",
"\" \"",
"int[] numbers = new int[2];",
"numbers",
"new int[2]",
"2",
"for(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"i < 2",
"i",
"2",
"i++",
"i++",
"i",
"{\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}",
"{\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}",
"numbers[i] = Integer.parseInt(textArray[i])",
"numbers[i]",
"numbers",
"i",
"Integer.parseInt(textArray[i])",
"Integer.parseInt",
"Integer",
"textArray[i]",
"textArray",
"i",
"test.showAnswer(numbers[0], numbers[1])",
"test.showAnswer",
"test",
"numbers[0]",
"numbers",
"0",
"numbers[1]",
"numbers",
"1",
"String[] args",
"args",
"void showAnswer(int x, int y) {\n\t\tint oddX = x;\n\t\tint oddY = y;\n\t\tint gcd = 1;\t//Ååöñ\n\t\t\n\t\twhile(oddX % 2 == 0 && oddY % 2 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 2 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 2;\n\t\t\toddY = oddY / 2;\n\t\t\tgcd = gcd * 2;\n\t\t}\n\t\twhile(oddX % 3 == 0 && oddY % 3 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 3 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 3;\n\t\t\toddY = oddY / 3;\n\t\t\tgcd = gcd * 3;\n\t\t}\n\t\t\n\t\tint min = getMin(x, y);\n\t\tint denominator = 5;\t//ªêi±êÅë¤Æ·é)\n\t\tfor(int i = 0; denominator < Math.sqrt(min); i++) {\n\t\t//\tSystem.out.println(\"denominator:\" + denominator + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\twhile(oddX % denominator == 0 && oddY % denominator == 0) {\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}\n\t\t\tif(i % 2 == 1) {\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t} else {\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint lcm = gcd * oddX * oddY;\n\t\tSystem.out.println(gcd + \" \" + lcm);\n\t}",
"showAnswer",
"{\n\t\tint oddX = x;\n\t\tint oddY = y;\n\t\tint gcd = 1;\t//Ååöñ\n\t\t\n\t\twhile(oddX % 2 == 0 && oddY % 2 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 2 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 2;\n\t\t\toddY = oddY / 2;\n\t\t\tgcd = gcd * 2;\n\t\t}\n\t\twhile(oddX % 3 == 0 && oddY % 3 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 3 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 3;\n\t\t\toddY = oddY / 3;\n\t\t\tgcd = gcd * 3;\n\t\t}\n\t\t\n\t\tint min = getMin(x, y);\n\t\tint denominator = 5;\t//ªêi±êÅë¤Æ·é)\n\t\tfor(int i = 0; denominator < Math.sqrt(min); i++) {\n\t\t//\tSystem.out.println(\"denominator:\" + denominator + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\twhile(oddX % denominator == 0 && oddY % denominator == 0) {\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}\n\t\t\tif(i % 2 == 1) {\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t} else {\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint lcm = gcd * oddX * oddY;\n\t\tSystem.out.println(gcd + \" \" + lcm);\n\t}",
"int oddX = x;",
"oddX",
"x",
"int oddY = y;",
"oddY",
"y",
"int gcd = 1;",
"gcd",
"1",
"while(oddX % 2 == 0 && oddY % 2 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 2 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 2;\n\t\t\toddY = oddY / 2;\n\t\t\tgcd = gcd * 2;\n\t\t}",
"oddX % 2 == 0 && oddY % 2 == 0",
"oddX % 2 == 0",
"oddX % 2",
"oddX",
"2",
"0",
"oddY % 2 == 0",
"oddY % 2",
"oddY",
"2",
"0",
"{\n\t\t//\tSystem.out.println(\"denominator:\" + 2 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 2;\n\t\t\toddY = oddY / 2;\n\t\t\tgcd = gcd * 2;\n\t\t}",
"oddX = oddX / 2",
"oddX",
"oddX / 2",
"oddX",
"2",
"oddY = oddY / 2",
"oddY",
"oddY / 2",
"oddY",
"2",
"gcd = gcd * 2",
"gcd",
"gcd * 2",
"gcd",
"2",
"while(oddX % 3 == 0 && oddY % 3 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 3 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 3;\n\t\t\toddY = oddY / 3;\n\t\t\tgcd = gcd * 3;\n\t\t}",
"oddX % 3 == 0 && oddY % 3 == 0",
"oddX % 3 == 0",
"oddX % 3",
"oddX",
"3",
"0",
"oddY % 3 == 0",
"oddY % 3",
"oddY",
"3",
"0",
"{\n\t\t//\tSystem.out.println(\"denominator:\" + 3 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 3;\n\t\t\toddY = oddY / 3;\n\t\t\tgcd = gcd * 3;\n\t\t}",
"oddX = oddX / 3",
"oddX",
"oddX / 3",
"oddX",
"3",
"oddY = oddY / 3",
"oddY",
"oddY / 3",
"oddY",
"3",
"gcd = gcd * 3",
"gcd",
"gcd * 3",
"gcd",
"3",
"int min = getMin(x, y);",
"min",
"getMin(x, y)",
"getMin",
"x",
"y",
"int denominator = 5;",
"denominator",
"5",
"for(int i = 0; denominator < Math.sqrt(min); i++) {\n\t\t//\tSystem.out.println(\"denominator:\" + denominator + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\twhile(oddX % denominator == 0 && oddY % denominator == 0) {\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}\n\t\t\tif(i % 2 == 1) {\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t} else {\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}\n\t\t}",
"int i = 0;",
"int i = 0;",
"i",
"0",
"denominator < Math.sqrt(min)",
"denominator",
"Math.sqrt(min)",
"Math.sqrt",
"Math",
"min",
"i++",
"i++",
"i",
"{\n\t\t//\tSystem.out.println(\"denominator:\" + denominator + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\twhile(oddX % denominator == 0 && oddY % denominator == 0) {\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}\n\t\t\tif(i % 2 == 1) {\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t} else {\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}\n\t\t}",
"{\n\t\t//\tSystem.out.println(\"denominator:\" + denominator + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\twhile(oddX % denominator == 0 && oddY % denominator == 0) {\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}\n\t\t\tif(i % 2 == 1) {\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t} else {\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}\n\t\t}",
"while(oddX % denominator == 0 && oddY % denominator == 0) {\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}",
"oddX % denominator == 0 && oddY % denominator == 0",
"oddX % denominator == 0",
"oddX % denominator",
"oddX",
"denominator",
"0",
"oddY % denominator == 0",
"oddY % denominator",
"oddY",
"denominator",
"0",
"{\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}",
"oddX = oddX / denominator",
"oddX",
"oddX / denominator",
"oddX",
"denominator",
"oddY = oddY / denominator",
"oddY",
"oddY / denominator",
"oddY",
"denominator",
"gcd = gcd * denominator",
"gcd",
"gcd * denominator",
"gcd",
"denominator",
"if(i % 2 == 1) {\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t} else {\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}",
"i % 2 == 1",
"i % 2",
"i",
"2",
"1",
"{\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t}",
"denominator = denominator + 4",
"denominator",
"denominator + 4",
"denominator",
"4",
"{\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}",
"denominator = denominator + 2",
"denominator",
"denominator + 2",
"denominator",
"2",
"int lcm = gcd * oddX * oddY;",
"lcm",
"gcd * oddX * oddY",
"gcd * oddX * oddY",
"gcd",
"oddX",
"oddY",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"int x",
"x",
"int y",
"y",
"int getMin(int x, int y) {\n\t\tint min;\n\t\tif(x > y) {\t//y¬\n\t\t\tmin = y;\n\t\t} else {\t//x¬\n\t\t\tmin = x;\n\t\t}\n\t\treturn min;\n\t}",
"getMin",
"{\n\t\tint min;\n\t\tif(x > y) {\t//y¬\n\t\t\tmin = y;\n\t\t} else {\t//x¬\n\t\t\tmin = x;\n\t\t}\n\t\treturn min;\n\t}",
"int min;",
"min",
"if(x > y) {\t//y¬\n\t\t\tmin = y;\n\t\t} else {\t//x¬\n\t\t\tmin = x;\n\t\t}",
"x > y",
"x",
"y",
"{\t//y¬\n\t\t\tmin = y;\n\t\t}",
"min = y",
"min",
"y",
"{\t//x¬\n\t\t\tmin = x;\n\t\t}",
"min = x",
"min",
"x",
"return min;",
"min",
"int x",
"x",
"int y",
"y",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0005_GCDandLCM test = new Problem0005_GCDandLCM();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\tvoid showAnswer(int x, int y) {\n\t\tint oddX = x;\n\t\tint oddY = y;\n\t\tint gcd = 1;\t//Ååöñ\n\t\t\n\t\twhile(oddX % 2 == 0 && oddY % 2 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 2 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 2;\n\t\t\toddY = oddY / 2;\n\t\t\tgcd = gcd * 2;\n\t\t}\n\t\twhile(oddX % 3 == 0 && oddY % 3 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 3 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 3;\n\t\t\toddY = oddY / 3;\n\t\t\tgcd = gcd * 3;\n\t\t}\n\t\t\n\t\tint min = getMin(x, y);\n\t\tint denominator = 5;\t//ªêi±êÅë¤Æ·é)\n\t\tfor(int i = 0; denominator < Math.sqrt(min); i++) {\n\t\t//\tSystem.out.println(\"denominator:\" + denominator + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\twhile(oddX % denominator == 0 && oddY % denominator == 0) {\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}\n\t\t\tif(i % 2 == 1) {\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t} else {\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint lcm = gcd * oddX * oddY;\n\t\tSystem.out.println(gcd + \" \" + lcm);\n\t}\n\tint getMin(int x, int y) {\n\t\tint min;\n\t\tif(x > y) {\t//y¬\n\t\t\tmin = y;\n\t\t} else {\t//x¬\n\t\t\tmin = x;\n\t\t}\n\t\treturn min;\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\ttry {\n\t\t//\tProblem0005_GCDandLCM test = new Problem0005_GCDandLCM();\n\t\t\tMain test = new Main();\n\t\t\t\n\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(System.in));\n\t\t\t\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null) {\n\t\t\t\ttry {\n\t\t\t\t\tString[] textArray = line.split(\" \");\n\t\t\t\t\tint[] numbers = new int[2];\n\t\t\t\t\tfor(int i = 0; i < 2; i++) {\n\t\t\t\t\t\tnumbers[i] = Integer.parseInt(textArray[i]);\n\t\t\t\t\t}\n\t\t\t\t\ttest.showAnswer(numbers[0], numbers[1]);\n\t\t\t\t} catch(NumberFormatException e) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n\tvoid showAnswer(int x, int y) {\n\t\tint oddX = x;\n\t\tint oddY = y;\n\t\tint gcd = 1;\t//Ååöñ\n\t\t\n\t\twhile(oddX % 2 == 0 && oddY % 2 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 2 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 2;\n\t\t\toddY = oddY / 2;\n\t\t\tgcd = gcd * 2;\n\t\t}\n\t\twhile(oddX % 3 == 0 && oddY % 3 == 0) {\n\t\t//\tSystem.out.println(\"denominator:\" + 3 + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\toddX = oddX / 3;\n\t\t\toddY = oddY / 3;\n\t\t\tgcd = gcd * 3;\n\t\t}\n\t\t\n\t\tint min = getMin(x, y);\n\t\tint denominator = 5;\t//ªêi±êÅë¤Æ·é)\n\t\tfor(int i = 0; denominator < Math.sqrt(min); i++) {\n\t\t//\tSystem.out.println(\"denominator:\" + denominator + \"\\tgcd:\" + gcd + \"\\toddX:\" + oddX + \"\\toddY:\" + oddY);\n\t\t\twhile(oddX % denominator == 0 && oddY % denominator == 0) {\n\t\t\t\toddX = oddX / denominator;\n\t\t\t\toddY = oddY / denominator;\n\t\t\t\tgcd = gcd * denominator;\n\t\t\t}\n\t\t\tif(i % 2 == 1) {\t//2Æ3Ì{ðòη\n\t\t\t\tdenominator = denominator + 4;\n\t\t\t} else {\n\t\t\t\tdenominator = denominator + 2;\n\t\t\t}\n\t\t}\n\t\t\n\t\tint lcm = gcd * oddX * oddY;\n\t\tSystem.out.println(gcd + \" \" + lcm);\n\t}\n\tint getMin(int x, int y) {\n\t\tint min;\n\t\tif(x > y) {\t//y¬\n\t\t\tmin = y;\n\t\t} else {\t//x¬\n\t\t\tmin = x;\n\t\t}\n\t\treturn min;\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.InputStreamReader;
//public class Problem0005_GCDandLCM {
public class Main {
public static void main(String[] args) {
try {
// Problem0005_GCDandLCM test = new Problem0005_GCDandLCM();
Main test = new Main();
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String line;
while((line = reader.readLine()) != null) {
try {
String[] textArray = line.split(" ");
int[] numbers = new int[2];
for(int i = 0; i < 2; i++) {
numbers[i] = Integer.parseInt(textArray[i]);
}
test.showAnswer(numbers[0], numbers[1]);
} catch(NumberFormatException e) {
break;
}
}
} catch(Exception e) {
e.printStackTrace();
}
}
void showAnswer(int x, int y) {
int oddX = x;
int oddY = y;
int gcd = 1; //Ååöñ
while(oddX % 2 == 0 && oddY % 2 == 0) {
// System.out.println("denominator:" + 2 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
oddX = oddX / 2;
oddY = oddY / 2;
gcd = gcd * 2;
}
while(oddX % 3 == 0 && oddY % 3 == 0) {
// System.out.println("denominator:" + 3 + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
oddX = oddX / 3;
oddY = oddY / 3;
gcd = gcd * 3;
}
int min = getMin(x, y);
int denominator = 5; //ªêi±êÅë¤Æ·é)
for(int i = 0; denominator < Math.sqrt(min); i++) {
// System.out.println("denominator:" + denominator + "\tgcd:" + gcd + "\toddX:" + oddX + "\toddY:" + oddY);
while(oddX % denominator == 0 && oddY % denominator == 0) {
oddX = oddX / denominator;
oddY = oddY / denominator;
gcd = gcd * denominator;
}
if(i % 2 == 1) { //2Æ3Ì{ðòη
denominator = denominator + 4;
} else {
denominator = denominator + 2;
}
}
int lcm = gcd * oddX * oddY;
System.out.println(gcd + " " + lcm);
}
int getMin(int x, int y) {
int min;
if(x > y) { //y¬
min = y;
} else { //x¬
min = x;
}
return min;
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
17,
13,
2,
2,
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
],
[
10,
11
],
[
10,
12
],
[
9,
13
],
[
13,
14
],
[
9,
15
],
[
15,
16
],
[
16,
17
],
[
16,
18
],
[
16,
19
],
[
19,
20
],
[
19,
21
],
[
6,
22
],
[
22,
23
],
[
6,
24
],
[
24,
25
],
[
4,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
28,
32
],
[
32,
33
],
[
33,
34
],
[
34,
35
],
[
32,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
36,
42
],
[
42,
43
],
[
42,
44
],
[
44,
45
],
[
45,
46
],
[
36,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
49,
51
],
[
49,
52
],
[
36,
53
],
[
53,
54
],
[
54,
55
],
[
55,
56
],
[
55,
57
],
[
53,
58
],
[
53,
59
],
[
53,
60
],
[
60,
61
],
[
61,
62
],
[
61,
63
],
[
60,
64
],
[
26,
65
],
[
65,
66
]
] | [
"import java.util.Scanner;\n\nclass Main{\n\n static double gcd(double a,double b){\n\tif(b==0) return a;\n\telse return gcd(b,a%b);\n }\n \n public static void main(String[] args){\n\tfinal Scanner sc = new Scanner(System.in);\n\twhile(sc.hasNext()){\n\t double a=sc.nextDouble();\n\t double b=sc.nextDouble();\n\t double g=gcd(a,b);\n\t System.out.printf(\"%.0f %.0f\\n\",g,(a*b)/g);\n\t}\n }\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main{\n\n static double gcd(double a,double b){\n\tif(b==0) return a;\n\telse return gcd(b,a%b);\n }\n \n public static void main(String[] args){\n\tfinal Scanner sc = new Scanner(System.in);\n\twhile(sc.hasNext()){\n\t double a=sc.nextDouble();\n\t double b=sc.nextDouble();\n\t double g=gcd(a,b);\n\t System.out.printf(\"%.0f %.0f\\n\",g,(a*b)/g);\n\t}\n }\n}",
"Main",
"static double gcd(double a,double b){\n\tif(b==0) return a;\n\telse return gcd(b,a%b);\n }",
"gcd",
"{\n\tif(b==0) return a;\n\telse return gcd(b,a%b);\n }",
"if(b==0) return a;\n\telse return gcd(b,a%b);",
"b==0",
"b",
"0",
"return a;",
"a",
"return gcd(b,a%b);",
"gcd(b,a%b)",
"gcd",
"b",
"a%b",
"a",
"b",
"double a",
"a",
"double b",
"b",
"public static void main(String[] args){\n\tfinal Scanner sc = new Scanner(System.in);\n\twhile(sc.hasNext()){\n\t double a=sc.nextDouble();\n\t double b=sc.nextDouble();\n\t double g=gcd(a,b);\n\t System.out.printf(\"%.0f %.0f\\n\",g,(a*b)/g);\n\t}\n }",
"main",
"{\n\tfinal Scanner sc = new Scanner(System.in);\n\twhile(sc.hasNext()){\n\t double a=sc.nextDouble();\n\t double b=sc.nextDouble();\n\t double g=gcd(a,b);\n\t System.out.printf(\"%.0f %.0f\\n\",g,(a*b)/g);\n\t}\n }",
"final Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"while(sc.hasNext()){\n\t double a=sc.nextDouble();\n\t double b=sc.nextDouble();\n\t double g=gcd(a,b);\n\t System.out.printf(\"%.0f %.0f\\n\",g,(a*b)/g);\n\t}",
"sc.hasNext()",
"sc.hasNext",
"sc",
"{\n\t double a=sc.nextDouble();\n\t double b=sc.nextDouble();\n\t double g=gcd(a,b);\n\t System.out.printf(\"%.0f %.0f\\n\",g,(a*b)/g);\n\t}",
"double a=sc.nextDouble();",
"a",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double b=sc.nextDouble();",
"b",
"sc.nextDouble()",
"sc.nextDouble",
"sc",
"double g=gcd(a,b);",
"g",
"gcd(a,b)",
"gcd",
"a",
"b",
"System.out.printf(\"%.0f %.0f\\n\",g,(a*b)/g)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%.0f %.0f\\n\"",
"g",
"(a*b)/g",
"(a*b)",
"a",
"b",
"g",
"String[] args",
"args"
] | import java.util.Scanner;
class Main{
static double gcd(double a,double b){
if(b==0) return a;
else return gcd(b,a%b);
}
public static void main(String[] args){
final Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
double a=sc.nextDouble();
double b=sc.nextDouble();
double g=gcd(a,b);
System.out.printf("%.0f %.0f\n",g,(a*b)/g);
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
41,
13,
41,
13,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
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,
2,
13,
13,
4,
13,
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
],
[
111,
11
],
[
111,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
14,
20
],
[
20,
21
],
[
14,
22
],
[
22,
23
],
[
14,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
26,
28
],
[
28,
29
],
[
29,
30
],
[
25,
31
],
[
24,
32
],
[
32,
33
],
[
33,
34
],
[
33,
35
],
[
35,
36
],
[
36,
37
],
[
35,
38
],
[
32,
39
],
[
39,
40
],
[
39,
41
],
[
41,
42
],
[
42,
43
],
[
41,
44
],
[
44,
45
],
[
44,
46
],
[
32,
47
],
[
47,
48
],
[
47,
49
],
[
49,
50
],
[
50,
51
],
[
49,
52
],
[
52,
53
],
[
52,
54
],
[
32,
55
],
[
55,
56
],
[
56,
57
],
[
57,
58
],
[
57,
59
],
[
55,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
62,
64
],
[
62,
65
],
[
61,
66
],
[
61,
67
],
[
67,
68
],
[
67,
69
],
[
67,
70
],
[
12,
71
],
[
71,
72
],
[
111,
73
],
[
73,
74
],
[
73,
75
],
[
75,
76
],
[
76,
77
],
[
77,
78
],
[
77,
79
],
[
76,
80
],
[
80,
81
],
[
81,
82
],
[
75,
83
],
[
83,
84
],
[
84,
85
],
[
84,
86
],
[
84,
87
],
[
87,
88
],
[
87,
89
],
[
73,
90
],
[
90,
91
],
[
73,
92
],
[
92,
93
],
[
111,
94
],
[
94,
95
],
[
94,
96
],
[
96,
97
],
[
97,
98
],
[
98,
99
],
[
99,
100
],
[
99,
101
],
[
98,
102
],
[
102,
103
],
[
102,
104
],
[
102,
105
],
[
94,
106
],
[
106,
107
],
[
94,
108
],
[
108,
109
],
[
0,
110
],
[
110,
111
],
[
110,
112
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input;\n\t\tlong a, b;\n\t\twhile ((input = br.readLine()) != null) {\n\t\t\tString[] arr = input.split(\" \");\n\t\t\ta = Integer.parseInt(arr[0]);\n\t\t\tb = Integer.parseInt(arr[1]);\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\tprivate static long gcd(long a, long b) {\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n\tprivate static long lcm(long a, long b) {\n\t\treturn a * b / gcd(a, b);\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input;\n\t\tlong a, b;\n\t\twhile ((input = br.readLine()) != null) {\n\t\t\tString[] arr = input.split(\" \");\n\t\t\ta = Integer.parseInt(arr[0]);\n\t\t\tb = Integer.parseInt(arr[1]);\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\tprivate static long gcd(long a, long b) {\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n\tprivate static long lcm(long a, long b) {\n\t\treturn a * b / gcd(a, b);\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input;\n\t\tlong a, b;\n\t\twhile ((input = br.readLine()) != null) {\n\t\t\tString[] arr = input.split(\" \");\n\t\t\ta = Integer.parseInt(arr[0]);\n\t\t\tb = Integer.parseInt(arr[1]);\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input;\n\t\tlong a, b;\n\t\twhile ((input = br.readLine()) != null) {\n\t\t\tString[] arr = input.split(\" \");\n\t\t\ta = Integer.parseInt(arr[0]);\n\t\t\tb = Integer.parseInt(arr[1]);\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String input;",
"input",
"long a",
"a",
"b;",
"b",
"while ((input = br.readLine()) != null) {\n\t\t\tString[] arr = input.split(\" \");\n\t\t\ta = Integer.parseInt(arr[0]);\n\t\t\tb = Integer.parseInt(arr[1]);\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}",
"(input = br.readLine()) != null",
"(input = br.readLine())",
"input",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tString[] arr = input.split(\" \");\n\t\t\ta = Integer.parseInt(arr[0]);\n\t\t\tb = Integer.parseInt(arr[1]);\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}",
"String[] arr = input.split(\" \");",
"arr",
"input.split(\" \")",
"input.split",
"input",
"\" \"",
"a = Integer.parseInt(arr[0])",
"a",
"Integer.parseInt(arr[0])",
"Integer.parseInt",
"Integer",
"arr[0]",
"arr",
"0",
"b = Integer.parseInt(arr[1])",
"b",
"Integer.parseInt(arr[1])",
"Integer.parseInt",
"Integer",
"arr[1]",
"arr",
"1",
"System.out.println(gcd(a, b) + \" \" + lcm(a, b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a, b) + \" \" + lcm(a, b)",
"gcd(a, b) + \" \" + lcm(a, b)",
"gcd(a, b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a, b)",
"lcm",
"a",
"b",
"String[] args",
"args",
"private static long gcd(long a, long b) {\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}",
"gcd",
"{\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}",
"if (b == 0) {\n\t\t\treturn a;\n\t\t}",
"b == 0",
"b",
"0",
"{\n\t\t\treturn a;\n\t\t}",
"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 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 class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input;\n\t\tlong a, b;\n\t\twhile ((input = br.readLine()) != null) {\n\t\t\tString[] arr = input.split(\" \");\n\t\t\ta = Integer.parseInt(arr[0]);\n\t\t\tb = Integer.parseInt(arr[1]);\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\tprivate static long gcd(long a, long b) {\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n\tprivate static long lcm(long a, long b) {\n\t\treturn a * b / gcd(a, b);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException{\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString input;\n\t\tlong a, b;\n\t\twhile ((input = br.readLine()) != null) {\n\t\t\tString[] arr = input.split(\" \");\n\t\t\ta = Integer.parseInt(arr[0]);\n\t\t\tb = Integer.parseInt(arr[1]);\n\t\t\tSystem.out.println(gcd(a, b) + \" \" + lcm(a, b));\n\t\t}\n\t}\n\tprivate static long gcd(long a, long b) {\n\t\tif (b == 0) {\n\t\t\treturn a;\n\t\t}\n\t\treturn gcd(b, a % b);\n\t}\n\tprivate static long lcm(long a, long b) {\n\t\treturn a * b / gcd(a, b);\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String input;
long a, b;
while ((input = br.readLine()) != null) {
String[] arr = input.split(" ");
a = Integer.parseInt(arr[0]);
b = Integer.parseInt(arr[1]);
System.out.println(gcd(a, b) + " " + lcm(a, b));
}
}
private static long gcd(long a, long b) {
if (b == 0) {
return a;
}
return gcd(b, a % b);
}
private static long lcm(long a, long b) {
return a * b / gcd(a, b);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
17,
41,
13,
17,
41,
13,
8,
2,
13,
13,
13,
13,
42,
2,
13,
13,
30,
11,
1,
0,
13,
17,
2,
13,
13,
1,
40,
13,
30,
30,
14,
2,
2,
2,
13,
13,
17,
2,
2,
13,
13,
17,
30,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
0,
13,
2,
13,
13,
3,
41,
13,
2,
2,
13,
13,
13,
4,
18,
18,
13,
13,
17,
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
],
[
16,
17
],
[
17,
18
],
[
15,
19
],
[
19,
20
],
[
20,
21
],
[
20,
22
],
[
22,
23
],
[
23,
24
],
[
19,
25
],
[
25,
26
],
[
25,
27
],
[
27,
28
],
[
28,
29
],
[
19,
30
],
[
30,
31
],
[
30,
32
],
[
19,
33
],
[
33,
34
],
[
33,
35
],
[
19,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
39,
41
],
[
38,
42
],
[
38,
43
],
[
19,
44
],
[
44,
45
],
[
45,
46
],
[
45,
47
],
[
44,
48
],
[
48,
49
],
[
49,
50
],
[
50,
51
],
[
51,
52
],
[
51,
53
],
[
49,
54
],
[
54,
55
],
[
54,
56
],
[
49,
57
],
[
57,
58
],
[
58,
59
],
[
49,
60
],
[
61,
61
],
[
61,
62
],
[
62,
63
],
[
63,
64
],
[
64,
65
],
[
65,
66
],
[
65,
67
],
[
64,
68
],
[
63,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
69,
73
],
[
62,
74
],
[
74,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
74,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
74,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
87,
89
],
[
74,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
74,
95
],
[
19,
96
],
[
96,
97
],
[
96,
98
],
[
99,
99
],
[
99,
100
],
[
99,
101
],
[
99,
102
],
[
19,
103
],
[
103,
104
],
[
104,
105
],
[
105,
106
],
[
105,
107
],
[
103,
108
],
[
103,
109
],
[
103,
110
],
[
9,
111
],
[
111,
112
]
] | [
"import java.util.*;\nimport java.lang.*;\n\nclass Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n \tScanner in = new Scanner(System.in);\n\t\t\n\t\twhile(in.hasNext()) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tint greatCD = 1; // 最大公約数\n\t\t\tint cd = 2; // 公約数\n\t\t\tint min = x < y ? x : y;\n\t\t\t\n\t\t\twhile(cd <= min) { \t\n\t\t\t\tfor(cd = 2; cd <= min; cd++) {\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// 最小公倍数は、最大公約数と最後に算出したxとyの値を掛け合わせることで算出できる。\n\t\t\tint lcd = greatCD * x * y;\n\t\t\t\n\t \t\tSystem.out.printf(\"%d %d\\n\", greatCD, lcd);\n\t\t}\n\t}\n}",
"import java.util.*;",
"util.*",
"java",
"import java.lang.*;",
"lang.*",
"java",
"class Main\n{\n\tpublic static void main (String[] args) throws java.lang.Exception\n\t{\n \tScanner in = new Scanner(System.in);\n\t\t\n\t\twhile(in.hasNext()) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tint greatCD = 1; // 最大公約数\n\t\t\tint cd = 2; // 公約数\n\t\t\tint min = x < y ? x : y;\n\t\t\t\n\t\t\twhile(cd <= min) { \t\n\t\t\t\tfor(cd = 2; cd <= min; cd++) {\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// 最小公倍数は、最大公約数と最後に算出したxとyの値を掛け合わせることで算出できる。\n\t\t\tint lcd = greatCD * x * y;\n\t\t\t\n\t \t\tSystem.out.printf(\"%d %d\\n\", greatCD, lcd);\n\t\t}\n\t}\n}",
"Main",
"public static void main (String[] args) throws java.lang.Exception\n\t{\n \tScanner in = new Scanner(System.in);\n\t\t\n\t\twhile(in.hasNext()) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tint greatCD = 1; // 最大公約数\n\t\t\tint cd = 2; // 公約数\n\t\t\tint min = x < y ? x : y;\n\t\t\t\n\t\t\twhile(cd <= min) { \t\n\t\t\t\tfor(cd = 2; cd <= min; cd++) {\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// 最小公倍数は、最大公約数と最後に算出したxとyの値を掛け合わせることで算出できる。\n\t\t\tint lcd = greatCD * x * y;\n\t\t\t\n\t \t\tSystem.out.printf(\"%d %d\\n\", greatCD, lcd);\n\t\t}\n\t}",
"main",
"{\n \tScanner in = new Scanner(System.in);\n\t\t\n\t\twhile(in.hasNext()) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tint greatCD = 1; // 最大公約数\n\t\t\tint cd = 2; // 公約数\n\t\t\tint min = x < y ? x : y;\n\t\t\t\n\t\t\twhile(cd <= min) { \t\n\t\t\t\tfor(cd = 2; cd <= min; cd++) {\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// 最小公倍数は、最大公約数と最後に算出したxとyの値を掛け合わせることで算出できる。\n\t\t\tint lcd = greatCD * x * y;\n\t\t\t\n\t \t\tSystem.out.printf(\"%d %d\\n\", greatCD, lcd);\n\t\t}\n\t}",
"Scanner in = new Scanner(System.in);",
"in",
"new Scanner(System.in)",
"while(in.hasNext()) {\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tint greatCD = 1; // 最大公約数\n\t\t\tint cd = 2; // 公約数\n\t\t\tint min = x < y ? x : y;\n\t\t\t\n\t\t\twhile(cd <= min) { \t\n\t\t\t\tfor(cd = 2; cd <= min; cd++) {\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// 最小公倍数は、最大公約数と最後に算出したxとyの値を掛け合わせることで算出できる。\n\t\t\tint lcd = greatCD * x * y;\n\t\t\t\n\t \t\tSystem.out.printf(\"%d %d\\n\", greatCD, lcd);\n\t\t}",
"in.hasNext()",
"in.hasNext",
"in",
"{\n\t\t\tint x = in.nextInt();\n\t\t\tint y = in.nextInt();\n\t\t\t\n\t\t\tint greatCD = 1; // 最大公約数\n\t\t\tint cd = 2; // 公約数\n\t\t\tint min = x < y ? x : y;\n\t\t\t\n\t\t\twhile(cd <= min) { \t\n\t\t\t\tfor(cd = 2; cd <= min; cd++) {\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// 最小公倍数は、最大公約数と最後に算出したxとyの値を掛け合わせることで算出できる。\n\t\t\tint lcd = greatCD * x * y;\n\t\t\t\n\t \t\tSystem.out.printf(\"%d %d\\n\", greatCD, lcd);\n\t\t}",
"int x = in.nextInt();",
"x",
"in.nextInt()",
"in.nextInt",
"in",
"int y = in.nextInt();",
"y",
"in.nextInt()",
"in.nextInt",
"in",
"int greatCD = 1;",
"greatCD",
"1",
"int cd = 2;",
"cd",
"2",
"int min = x < y ? x : y;",
"min",
"x < y ? x : y",
"x < y",
"x",
"y",
"x",
"y",
"while(cd <= min) { \t\n\t\t\t\tfor(cd = 2; cd <= min; cd++) {\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"cd <= min",
"cd",
"min",
"{ \t\n\t\t\t\tfor(cd = 2; cd <= min; cd++) {\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}",
"for(cd = 2; cd <= min; cd++) {\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"cd = 2;",
"cd = 2",
"cd",
"2",
"cd <= min",
"cd",
"min",
"cd++",
"cd++",
"cd",
"{\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"{\n\t\t\t\t\t// cdはxとyの公約数か判断。\n\t\t\t\t\tif ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}",
"if ((x % cd) == 0 && (y % cd) == 0) {\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"(x % cd) == 0 && (y % cd) == 0",
"(x % cd) == 0",
"(x % cd)",
"x",
"cd",
"0",
"(y % cd) == 0",
"(y % cd)",
"y",
"cd",
"0",
"{\n\t\t\t\t\t\t//cdが公約数だったら、xとyをcdで割り、次の計算に備える。\n\t\t\t\t\t\tx = x / cd;\n\t\t\t\t\t\ty = y / cd;\n\t\t\t\t\t\tgreatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる\n\t\t\t\t\t\tmin = min / cd;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}",
"x = x / cd",
"x",
"x / cd",
"x",
"cd",
"y = y / cd",
"y",
"y / cd",
"y",
"cd",
"greatCD = greatCD * cd",
"greatCD",
"greatCD * cd",
"greatCD",
"cd",
"min = min / cd",
"min",
"min / cd",
"min",
"cd",
"break;",
"int lcd = greatCD * x * y;",
"lcd",
"greatCD * x * y",
"greatCD * x * y",
"greatCD",
"x",
"y",
"System.out.printf(\"%d %d\\n\", greatCD, lcd)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d %d\\n\"",
"greatCD",
"lcd",
"String[] args",
"args"
] | import java.util.*;
import java.lang.*;
class Main
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner in = new Scanner(System.in);
while(in.hasNext()) {
int x = in.nextInt();
int y = in.nextInt();
int greatCD = 1; // 最大公約数
int cd = 2; // 公約数
int min = x < y ? x : y;
while(cd <= min) {
for(cd = 2; cd <= min; cd++) {
// cdはxとyの公約数か判断。
if ((x % cd) == 0 && (y % cd) == 0) {
//cdが公約数だったら、xとyをcdで割り、次の計算に備える。
x = x / cd;
y = y / cd;
greatCD = greatCD * cd; // 算出した公約数を今まで求めた公約数の値に掛け合わせる
min = min / cd;
break;
}
}
}
// 最小公倍数は、最大公約数と最後に算出したxとyの値を掛け合わせることで算出できる。
int lcd = greatCD * x * y;
System.out.printf("%d %d\n", greatCD, lcd);
}
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
4,
18,
18,
13,
13,
17,
4,
13,
13,
13,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
41,
13,
2,
13,
13,
29,
4,
13,
13,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
13,
13,
13,
41,
13,
2,
13,
13,
41,
13,
2,
13,
13,
29,
2,
13,
2,
13,
13,
23,
13,
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
],
[
13,
14
],
[
14,
15
],
[
12,
16
],
[
16,
17
],
[
17,
18
],
[
17,
19
],
[
19,
20
],
[
20,
21
],
[
16,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
16,
27
],
[
27,
28
],
[
28,
29
],
[
29,
30
],
[
29,
31
],
[
27,
32
],
[
27,
33
],
[
33,
34
],
[
33,
35
],
[
33,
36
],
[
27,
37
],
[
37,
38
],
[
37,
39
],
[
37,
40
],
[
6,
41
],
[
41,
42
],
[
96,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
47,
48
],
[
47,
49
],
[
46,
50
],
[
50,
51
],
[
45,
52
],
[
52,
53
],
[
52,
54
],
[
54,
55
],
[
54,
56
],
[
45,
57
],
[
57,
58
],
[
58,
59
],
[
58,
60
],
[
58,
61
],
[
43,
62
],
[
62,
63
],
[
43,
64
],
[
64,
65
],
[
96,
66
],
[
66,
67
],
[
66,
68
],
[
68,
69
],
[
69,
70
],
[
69,
71
],
[
71,
72
],
[
71,
73
],
[
71,
74
],
[
68,
75
],
[
75,
76
],
[
75,
77
],
[
77,
78
],
[
77,
79
],
[
68,
80
],
[
80,
81
],
[
80,
82
],
[
82,
83
],
[
82,
84
],
[
68,
85
],
[
85,
86
],
[
86,
87
],
[
86,
88
],
[
88,
89
],
[
88,
90
],
[
66,
91
],
[
91,
92
],
[
66,
93
],
[
93,
94
],
[
0,
95
],
[
95,
96
],
[
95,
97
]
] | [
"import java.util.Scanner;\n\npublic class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scn = new Scanner(System.in);\n\t\twhile(scn.hasNext())\n\t\t{\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tSystem.out.printf(\"%d %d\\n\", getCommonDivider(a, b), getCommonMultiplier(a, b));\n\t\t}\n\t}\n\n\tpublic static int getCommonDivider(int a, int b)\n\t{\n\t\tif (b == 0) return a;\n\t\tint q = a % b;\n\t\treturn getCommonDivider(b, q);\n\t}\n\n\tpublic static int getCommonMultiplier(int a, int b)\n\t{\n\t\tint v = getCommonDivider(a, b);\n\t\tint va = a / v;\n\t\tint vb = b / v;\n\t\treturn v*(va*vb);\n\t}\n}",
"import java.util.Scanner;",
"Scanner",
"java.util",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scn = new Scanner(System.in);\n\t\twhile(scn.hasNext())\n\t\t{\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tSystem.out.printf(\"%d %d\\n\", getCommonDivider(a, b), getCommonMultiplier(a, b));\n\t\t}\n\t}\n\n\tpublic static int getCommonDivider(int a, int b)\n\t{\n\t\tif (b == 0) return a;\n\t\tint q = a % b;\n\t\treturn getCommonDivider(b, q);\n\t}\n\n\tpublic static int getCommonMultiplier(int a, int b)\n\t{\n\t\tint v = getCommonDivider(a, b);\n\t\tint va = a / v;\n\t\tint vb = b / v;\n\t\treturn v*(va*vb);\n\t}\n}",
"Main",
"public static void main(String[] args)\n\t{\n\t\tScanner scn = new Scanner(System.in);\n\t\twhile(scn.hasNext())\n\t\t{\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tSystem.out.printf(\"%d %d\\n\", getCommonDivider(a, b), getCommonMultiplier(a, b));\n\t\t}\n\t}",
"main",
"{\n\t\tScanner scn = new Scanner(System.in);\n\t\twhile(scn.hasNext())\n\t\t{\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tSystem.out.printf(\"%d %d\\n\", getCommonDivider(a, b), getCommonMultiplier(a, b));\n\t\t}\n\t}",
"Scanner scn = new Scanner(System.in);",
"scn",
"new Scanner(System.in)",
"while(scn.hasNext())\n\t\t{\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tSystem.out.printf(\"%d %d\\n\", getCommonDivider(a, b), getCommonMultiplier(a, b));\n\t\t}",
"scn.hasNext()",
"scn.hasNext",
"scn",
"{\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tSystem.out.printf(\"%d %d\\n\", getCommonDivider(a, b), getCommonMultiplier(a, b));\n\t\t}",
"int a = scn.nextInt();",
"a",
"scn.nextInt()",
"scn.nextInt",
"scn",
"int b = scn.nextInt();",
"b",
"scn.nextInt()",
"scn.nextInt",
"scn",
"System.out.printf(\"%d %d\\n\", getCommonDivider(a, b), getCommonMultiplier(a, b))",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d %d\\n\"",
"getCommonDivider(a, b)",
"getCommonDivider",
"a",
"b",
"getCommonMultiplier(a, b)",
"getCommonMultiplier",
"a",
"b",
"String[] args",
"args",
"public static int getCommonDivider(int a, int b)\n\t{\n\t\tif (b == 0) return a;\n\t\tint q = a % b;\n\t\treturn getCommonDivider(b, q);\n\t}",
"getCommonDivider",
"{\n\t\tif (b == 0) return a;\n\t\tint q = a % b;\n\t\treturn getCommonDivider(b, q);\n\t}",
"if (b == 0) return a;",
"b == 0",
"b",
"0",
"return a;",
"a",
"int q = a % b;",
"q",
"a % b",
"a",
"b",
"return getCommonDivider(b, q);",
"getCommonDivider(b, q)",
"getCommonDivider",
"b",
"q",
"int a",
"a",
"int b",
"b",
"public static int getCommonMultiplier(int a, int b)\n\t{\n\t\tint v = getCommonDivider(a, b);\n\t\tint va = a / v;\n\t\tint vb = b / v;\n\t\treturn v*(va*vb);\n\t}",
"getCommonMultiplier",
"{\n\t\tint v = getCommonDivider(a, b);\n\t\tint va = a / v;\n\t\tint vb = b / v;\n\t\treturn v*(va*vb);\n\t}",
"int v = getCommonDivider(a, b);",
"v",
"getCommonDivider(a, b)",
"getCommonDivider",
"a",
"b",
"int va = a / v;",
"va",
"a / v",
"a",
"v",
"int vb = b / v;",
"vb",
"b / v",
"b",
"v",
"return v*(va*vb);",
"v*(va*vb)",
"v",
"(va*vb)",
"va",
"vb",
"int a",
"a",
"int b",
"b",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scn = new Scanner(System.in);\n\t\twhile(scn.hasNext())\n\t\t{\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tSystem.out.printf(\"%d %d\\n\", getCommonDivider(a, b), getCommonMultiplier(a, b));\n\t\t}\n\t}\n\n\tpublic static int getCommonDivider(int a, int b)\n\t{\n\t\tif (b == 0) return a;\n\t\tint q = a % b;\n\t\treturn getCommonDivider(b, q);\n\t}\n\n\tpublic static int getCommonMultiplier(int a, int b)\n\t{\n\t\tint v = getCommonDivider(a, b);\n\t\tint va = a / v;\n\t\tint vb = b / v;\n\t\treturn v*(va*vb);\n\t}\n}",
"public class Main\n{\n\tpublic static void main(String[] args)\n\t{\n\t\tScanner scn = new Scanner(System.in);\n\t\twhile(scn.hasNext())\n\t\t{\n\t\t\tint a = scn.nextInt();\n\t\t\tint b = scn.nextInt();\n\t\t\tSystem.out.printf(\"%d %d\\n\", getCommonDivider(a, b), getCommonMultiplier(a, b));\n\t\t}\n\t}\n\n\tpublic static int getCommonDivider(int a, int b)\n\t{\n\t\tif (b == 0) return a;\n\t\tint q = a % b;\n\t\treturn getCommonDivider(b, q);\n\t}\n\n\tpublic static int getCommonMultiplier(int a, int b)\n\t{\n\t\tint v = getCommonDivider(a, b);\n\t\tint va = a / v;\n\t\tint vb = b / v;\n\t\treturn v*(va*vb);\n\t}\n}",
"Main"
] | import java.util.Scanner;
public class Main
{
public static void main(String[] args)
{
Scanner scn = new Scanner(System.in);
while(scn.hasNext())
{
int a = scn.nextInt();
int b = scn.nextInt();
System.out.printf("%d %d\n", getCommonDivider(a, b), getCommonMultiplier(a, b));
}
}
public static int getCommonDivider(int a, int b)
{
if (b == 0) return a;
int q = a % b;
return getCommonDivider(b, q);
}
public static int getCommonMultiplier(int a, int b)
{
int v = getCommonDivider(a, b);
int va = a / v;
int vb = b / v;
return v*(va*vb);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
20,
41,
13,
41,
13,
20,
17,
41,
13,
41,
13,
41,
13,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
0,
13,
4,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
18,
13,
18,
13,
17,
0,
13,
4,
13,
13,
13,
4,
18,
18,
13,
13,
17,
13,
2,
2,
13,
13,
13,
23,
13,
12,
13,
30,
29,
8,
2,
13,
17,
13,
4,
13,
13,
2,
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
],
[
105,
11
],
[
105,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
14,
23
],
[
23,
24
],
[
23,
25
],
[
14,
27
],
[
27,
28
],
[
14,
29
],
[
29,
30
],
[
14,
31
],
[
31,
32
],
[
31,
33
],
[
14,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
35,
41
],
[
34,
42
],
[
42,
43
],
[
43,
44
],
[
43,
45
],
[
45,
46
],
[
46,
47
],
[
45,
48
],
[
42,
49
],
[
49,
50
],
[
49,
51
],
[
51,
52
],
[
52,
53
],
[
51,
54
],
[
54,
55
],
[
54,
56
],
[
42,
57
],
[
57,
58
],
[
57,
59
],
[
59,
60
],
[
60,
61
],
[
59,
62
],
[
62,
63
],
[
62,
64
],
[
42,
65
],
[
65,
66
],
[
65,
67
],
[
67,
68
],
[
67,
69
],
[
67,
70
],
[
42,
71
],
[
71,
72
],
[
72,
73
],
[
73,
74
],
[
73,
75
],
[
71,
76
],
[
71,
77
],
[
71,
78
],
[
78,
79
],
[
79,
80
],
[
79,
81
],
[
78,
82
],
[
12,
83
],
[
83,
84
],
[
105,
85
],
[
85,
86
],
[
85,
87
],
[
87,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
89,
93
],
[
89,
94
],
[
94,
95
],
[
94,
96
],
[
94,
97
],
[
97,
98
],
[
97,
99
],
[
85,
100
],
[
100,
101
],
[
85,
102
],
[
102,
103
],
[
0,
104
],
[
104,
105
],
[
104,
106
]
] | [
"\n\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main{\n\n\tpublic static void main(String argv[]) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\tString Array[] = new String[2];\n\t\tlong a, b;\n\t\tlong kouyaku = 0;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tArray = str.split(\" \");\n\t\t\ta = Long.parseLong(Array[0]);\n\t\t\tb = Long.parseLong(Array[1]);\n\t\t\tkouyaku = gcd(a, b);\n\t\t\tSystem.out.printf(\"%d %d\\n\", kouyaku, a * b / kouyaku);\n\n\t\t}\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\treturn b==0 ? a : gcd(b,a%b);\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",
"public class Main{\n\n\tpublic static void main(String argv[]) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\tString Array[] = new String[2];\n\t\tlong a, b;\n\t\tlong kouyaku = 0;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tArray = str.split(\" \");\n\t\t\ta = Long.parseLong(Array[0]);\n\t\t\tb = Long.parseLong(Array[1]);\n\t\t\tkouyaku = gcd(a, b);\n\t\t\tSystem.out.printf(\"%d %d\\n\", kouyaku, a * b / kouyaku);\n\n\t\t}\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\treturn b==0 ? a : gcd(b,a%b);\n\t}\n\n}",
"Main",
"public static void main(String argv[]) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\tString Array[] = new String[2];\n\t\tlong a, b;\n\t\tlong kouyaku = 0;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tArray = str.split(\" \");\n\t\t\ta = Long.parseLong(Array[0]);\n\t\t\tb = Long.parseLong(Array[1]);\n\t\t\tkouyaku = gcd(a, b);\n\t\t\tSystem.out.printf(\"%d %d\\n\", kouyaku, a * b / kouyaku);\n\n\t\t}\n\t}",
"main",
"{\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\tString Array[] = new String[2];\n\t\tlong a, b;\n\t\tlong kouyaku = 0;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tArray = str.split(\" \");\n\t\t\ta = Long.parseLong(Array[0]);\n\t\t\tb = Long.parseLong(Array[1]);\n\t\t\tkouyaku = gcd(a, b);\n\t\t\tSystem.out.printf(\"%d %d\\n\", kouyaku, a * b / kouyaku);\n\n\t\t}\n\t}",
"InputStreamReader is = new InputStreamReader(System.in);",
"is",
"new InputStreamReader(System.in)",
"BufferedReader br = new BufferedReader(is);",
"br",
"new BufferedReader(is)",
"String str;",
"str",
"String Array[] = new String[2];",
"Array",
"new String[2]",
"2",
"long a",
"a",
"b;",
"b",
"long kouyaku = 0;",
"kouyaku",
"0",
"while ((str = br.readLine()) != null) {\n\t\t\tArray = str.split(\" \");\n\t\t\ta = Long.parseLong(Array[0]);\n\t\t\tb = Long.parseLong(Array[1]);\n\t\t\tkouyaku = gcd(a, b);\n\t\t\tSystem.out.printf(\"%d %d\\n\", kouyaku, a * b / kouyaku);\n\n\t\t}",
"(str = br.readLine()) != null",
"(str = br.readLine())",
"str",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tArray = str.split(\" \");\n\t\t\ta = Long.parseLong(Array[0]);\n\t\t\tb = Long.parseLong(Array[1]);\n\t\t\tkouyaku = gcd(a, b);\n\t\t\tSystem.out.printf(\"%d %d\\n\", kouyaku, a * b / kouyaku);\n\n\t\t}",
"Array = str.split(\" \")",
"Array",
"str.split(\" \")",
"str.split",
"str",
"\" \"",
"a = Long.parseLong(Array[0])",
"a",
"Long.parseLong(Array[0])",
"Long.parseLong",
"Long",
"Array[0]",
"Array",
"0",
"b = Long.parseLong(Array[1])",
"b",
"Long.parseLong(Array[1])",
"Long.parseLong",
"Long",
"Array[1]",
"Array",
"1",
"kouyaku = gcd(a, b)",
"kouyaku",
"gcd(a, b)",
"gcd",
"a",
"b",
"System.out.printf(\"%d %d\\n\", kouyaku, a * b / kouyaku)",
"System.out.printf",
"System.out",
"System",
"System.out",
"\"%d %d\\n\"",
"kouyaku",
"a * b / kouyaku",
"a * b",
"a",
"b",
"kouyaku",
"String argv[]",
"argv",
"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",
"public class Main{\n\n\tpublic static void main(String argv[]) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\tString Array[] = new String[2];\n\t\tlong a, b;\n\t\tlong kouyaku = 0;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tArray = str.split(\" \");\n\t\t\ta = Long.parseLong(Array[0]);\n\t\t\tb = Long.parseLong(Array[1]);\n\t\t\tkouyaku = gcd(a, b);\n\t\t\tSystem.out.printf(\"%d %d\\n\", kouyaku, a * b / kouyaku);\n\n\t\t}\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\treturn b==0 ? a : gcd(b,a%b);\n\t}\n\n}",
"public class Main{\n\n\tpublic static void main(String argv[]) throws IOException {\n\t\tInputStreamReader is = new InputStreamReader(System.in);\n\t\tBufferedReader br = new BufferedReader(is);\n\t\tString str;\n\t\tString Array[] = new String[2];\n\t\tlong a, b;\n\t\tlong kouyaku = 0;\n\t\twhile ((str = br.readLine()) != null) {\n\t\t\tArray = str.split(\" \");\n\t\t\ta = Long.parseLong(Array[0]);\n\t\t\tb = Long.parseLong(Array[1]);\n\t\t\tkouyaku = gcd(a, b);\n\t\t\tSystem.out.printf(\"%d %d\\n\", kouyaku, a * b / kouyaku);\n\n\t\t}\n\t}\n\n\tpublic static long gcd(long a, long b) {\n\t\treturn b==0 ? a : gcd(b,a%b);\n\t}\n\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main{
public static void main(String argv[]) throws IOException {
InputStreamReader is = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(is);
String str;
String Array[] = new String[2];
long a, b;
long kouyaku = 0;
while ((str = br.readLine()) != null) {
Array = str.split(" ");
a = Long.parseLong(Array[0]);
b = Long.parseLong(Array[1]);
kouyaku = gcd(a, b);
System.out.printf("%d %d\n", kouyaku, a * b / kouyaku);
}
}
public static long gcd(long a, long b) {
return b==0 ? a : gcd(b,a%b);
}
} |
[
7,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
4,
13,
13,
20,
18,
13,
13,
23,
13,
12,
13,
30,
42,
4,
18,
13,
30,
41,
13,
4,
18,
13,
41,
13,
4,
18,
13,
41,
13,
4,
13,
13,
13,
41,
13,
2,
2,
13,
13,
13,
4,
18,
13,
4,
18,
13,
17,
13,
13,
23,
13,
23,
13,
23,
13,
12,
13,
30,
41,
13,
4,
18,
13,
13,
13,
41,
13,
4,
18,
13,
13,
13,
42,
17,
30,
41,
13,
2,
13,
13,
14,
2,
13,
17,
30,
29,
13,
0,
13,
13,
0,
13,
13,
23,
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
],
[
12,
15
],
[
12,
16
],
[
16,
17
],
[
16,
18
],
[
9,
19
],
[
19,
20
],
[
7,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
24,
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
],
[
39,
41
],
[
41,
42
],
[
41,
43
],
[
41,
44
],
[
28,
45
],
[
45,
46
],
[
45,
47
],
[
47,
48
],
[
48,
49
],
[
48,
50
],
[
47,
51
],
[
28,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
56,
57
],
[
55,
58
],
[
55,
59
],
[
55,
60
],
[
21,
61
],
[
61,
62
],
[
21,
63
],
[
63,
64
],
[
21,
65
],
[
65,
66
],
[
7,
67
],
[
67,
68
],
[
67,
69
],
[
69,
70
],
[
70,
71
],
[
70,
72
],
[
72,
73
],
[
73,
74
],
[
72,
75
],
[
72,
76
],
[
69,
77
],
[
77,
78
],
[
77,
79
],
[
79,
80
],
[
80,
81
],
[
79,
82
],
[
79,
83
],
[
69,
84
],
[
84,
85
],
[
84,
86
],
[
86,
87
],
[
87,
88
],
[
87,
89
],
[
89,
90
],
[
89,
91
],
[
86,
92
],
[
92,
93
],
[
93,
94
],
[
93,
95
],
[
92,
96
],
[
96,
97
],
[
97,
98
],
[
86,
99
],
[
99,
100
],
[
99,
101
],
[
86,
102
],
[
102,
103
],
[
102,
104
],
[
67,
105
],
[
105,
106
],
[
67,
107
],
[
107,
108
]
] | [
"import java.io.PrintStream;\nimport java.util.Scanner;\n\nclass Main {\n\n public static void main(String[] args) {\n doit(args, new Scanner(System.in), System.out);\n }\n\n static void doit(String[] args, Scanner scanner, PrintStream out) {\n while (scanner.hasNext()) {\n long a = scanner.nextLong();\n long b = scanner.nextLong();\n long gcd = gcd(a, b);\n long lcm = a * b / gcd;\n out.println(String.format(\"%d %d\", gcd, lcm));\n }\n }\n\n static long gcd(long a, long b) {\n long large = Math.max(a, b);\n long small = Math.min(a, b);\n while (true) {\n long r = large % small;\n if (r == 0) {\n return small;\n }\n large = small;\n small = r;\n }\n }\n}",
"import java.io.PrintStream;",
"PrintStream",
"java.io",
"import java.util.Scanner;",
"Scanner",
"java.util",
"class Main {\n\n public static void main(String[] args) {\n doit(args, new Scanner(System.in), System.out);\n }\n\n static void doit(String[] args, Scanner scanner, PrintStream out) {\n while (scanner.hasNext()) {\n long a = scanner.nextLong();\n long b = scanner.nextLong();\n long gcd = gcd(a, b);\n long lcm = a * b / gcd;\n out.println(String.format(\"%d %d\", gcd, lcm));\n }\n }\n\n static long gcd(long a, long b) {\n long large = Math.max(a, b);\n long small = Math.min(a, b);\n while (true) {\n long r = large % small;\n if (r == 0) {\n return small;\n }\n large = small;\n small = r;\n }\n }\n}",
"Main",
"public static void main(String[] args) {\n doit(args, new Scanner(System.in), System.out);\n }",
"main",
"{\n doit(args, new Scanner(System.in), System.out);\n }",
"doit(args, new Scanner(System.in), System.out)",
"doit",
"args",
"new Scanner(System.in)",
"System.out",
"System",
"System.out",
"String[] args",
"args",
"static void doit(String[] args, Scanner scanner, PrintStream out) {\n while (scanner.hasNext()) {\n long a = scanner.nextLong();\n long b = scanner.nextLong();\n long gcd = gcd(a, b);\n long lcm = a * b / gcd;\n out.println(String.format(\"%d %d\", gcd, lcm));\n }\n }",
"doit",
"{\n while (scanner.hasNext()) {\n long a = scanner.nextLong();\n long b = scanner.nextLong();\n long gcd = gcd(a, b);\n long lcm = a * b / gcd;\n out.println(String.format(\"%d %d\", gcd, lcm));\n }\n }",
"while (scanner.hasNext()) {\n long a = scanner.nextLong();\n long b = scanner.nextLong();\n long gcd = gcd(a, b);\n long lcm = a * b / gcd;\n out.println(String.format(\"%d %d\", gcd, lcm));\n }",
"scanner.hasNext()",
"scanner.hasNext",
"scanner",
"{\n long a = scanner.nextLong();\n long b = scanner.nextLong();\n long gcd = gcd(a, b);\n long lcm = a * b / gcd;\n out.println(String.format(\"%d %d\", gcd, lcm));\n }",
"long a = scanner.nextLong();",
"a",
"scanner.nextLong()",
"scanner.nextLong",
"scanner",
"long b = scanner.nextLong();",
"b",
"scanner.nextLong()",
"scanner.nextLong",
"scanner",
"long gcd = gcd(a, b);",
"gcd",
"gcd(a, b)",
"gcd",
"a",
"b",
"long lcm = a * b / gcd;",
"lcm",
"a * b / gcd",
"a * b",
"a",
"b",
"gcd",
"out.println(String.format(\"%d %d\", gcd, lcm))",
"out.println",
"out",
"String.format(\"%d %d\", gcd, lcm)",
"String.format",
"String",
"\"%d %d\"",
"gcd",
"lcm",
"String[] args",
"args",
"Scanner scanner",
"scanner",
"PrintStream out",
"out",
"static long gcd(long a, long b) {\n long large = Math.max(a, b);\n long small = Math.min(a, b);\n while (true) {\n long r = large % small;\n if (r == 0) {\n return small;\n }\n large = small;\n small = r;\n }\n }",
"gcd",
"{\n long large = Math.max(a, b);\n long small = Math.min(a, b);\n while (true) {\n long r = large % small;\n if (r == 0) {\n return small;\n }\n large = small;\n small = r;\n }\n }",
"long large = Math.max(a, b);",
"large",
"Math.max(a, b)",
"Math.max",
"Math",
"a",
"b",
"long small = Math.min(a, b);",
"small",
"Math.min(a, b)",
"Math.min",
"Math",
"a",
"b",
"while (true) {\n long r = large % small;\n if (r == 0) {\n return small;\n }\n large = small;\n small = r;\n }",
"true",
"{\n long r = large % small;\n if (r == 0) {\n return small;\n }\n large = small;\n small = r;\n }",
"long r = large % small;",
"r",
"large % small",
"large",
"small",
"if (r == 0) {\n return small;\n }",
"r == 0",
"r",
"0",
"{\n return small;\n }",
"return small;",
"small",
"large = small",
"large",
"small",
"small = r",
"small",
"r",
"long a",
"a",
"long b",
"b"
] | import java.io.PrintStream;
import java.util.Scanner;
class Main {
public static void main(String[] args) {
doit(args, new Scanner(System.in), System.out);
}
static void doit(String[] args, Scanner scanner, PrintStream out) {
while (scanner.hasNext()) {
long a = scanner.nextLong();
long b = scanner.nextLong();
long gcd = gcd(a, b);
long lcm = a * b / gcd;
out.println(String.format("%d %d", gcd, lcm));
}
}
static long gcd(long a, long b) {
long large = Math.max(a, b);
long small = Math.min(a, b);
while (true) {
long r = large % small;
if (r == 0) {
return small;
}
large = small;
small = r;
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
38,
5,
13,
30,
4,
18,
13,
5,
13,
30,
4,
18,
13,
30,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
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,
41,
13,
13,
0,
13,
13,
0,
13,
13,
41,
13,
41,
13,
13,
41,
13,
13,
42,
2,
0,
13,
2,
13,
13,
17,
30,
0,
13,
13,
0,
13,
13,
41,
13,
13,
41,
13,
2,
13,
2,
13,
13,
4,
18,
18,
13,
13,
2,
2,
13,
17,
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
],
[
126,
11
],
[
126,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
22,
23
],
[
22,
24
],
[
24,
25
],
[
25,
26
],
[
26,
27
],
[
21,
28
],
[
28,
29
],
[
28,
30
],
[
30,
31
],
[
31,
32
],
[
32,
33
],
[
21,
34
],
[
34,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
37,
39
],
[
39,
40
],
[
40,
41
],
[
36,
42
],
[
35,
43
],
[
43,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
43,
50
],
[
50,
51
],
[
50,
52
],
[
52,
53
],
[
53,
54
],
[
52,
55
],
[
55,
56
],
[
55,
57
],
[
43,
58
],
[
58,
59
],
[
58,
60
],
[
60,
61
],
[
61,
62
],
[
60,
63
],
[
63,
64
],
[
63,
65
],
[
43,
66
],
[
66,
67
],
[
67,
68
],
[
67,
69
],
[
66,
70
],
[
70,
71
],
[
71,
72
],
[
71,
73
],
[
70,
74
],
[
74,
75
],
[
74,
76
],
[
70,
77
],
[
77,
78
],
[
77,
79
],
[
43,
80
],
[
80,
81
],
[
43,
82
],
[
82,
83
],
[
82,
84
],
[
43,
85
],
[
85,
86
],
[
85,
87
],
[
43,
88
],
[
88,
89
],
[
89,
90
],
[
90,
91
],
[
90,
92
],
[
92,
93
],
[
92,
94
],
[
89,
95
],
[
88,
96
],
[
96,
97
],
[
97,
98
],
[
97,
99
],
[
96,
100
],
[
100,
101
],
[
100,
102
],
[
43,
103
],
[
103,
104
],
[
103,
105
],
[
43,
106
],
[
106,
107
],
[
106,
108
],
[
108,
109
],
[
108,
110
],
[
110,
111
],
[
110,
112
],
[
43,
113
],
[
113,
114
],
[
114,
115
],
[
115,
116
],
[
115,
117
],
[
113,
118
],
[
119,
119
],
[
119,
120
],
[
119,
121
],
[
119,
122
],
[
12,
123
],
[
123,
124
],
[
0,
125
],
[
125,
126
],
[
125,
127
]
] | [
"import java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()) != null) {\n\t\t\t\tString[] ab = x.split(\" \");\n\t\t\t\tlong a = Integer.parseInt(ab[0]);\n\t\t\t\tlong b = Integer.parseInt(ab[1]);\n\t\t\t\t\n\t\t\t\tif (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong tmp;\n\t\t\t\tlong ta = a;\n\t\t\t\tlong tb = b;\n\t\t\t\twhile ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong gcd = ta;\n\t\t\t\tlong lcm = a * (b / gcd);\n\t\t\t\t\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()) != null) {\n\t\t\t\tString[] ab = x.split(\" \");\n\t\t\t\tlong a = Integer.parseInt(ab[0]);\n\t\t\t\tlong b = Integer.parseInt(ab[1]);\n\t\t\t\t\n\t\t\t\tif (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong tmp;\n\t\t\t\tlong ta = a;\n\t\t\t\tlong tb = b;\n\t\t\t\twhile ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong gcd = ta;\n\t\t\t\tlong lcm = a * (b / gcd);\n\t\t\t\t\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"Main",
"public static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()) != null) {\n\t\t\t\tString[] ab = x.split(\" \");\n\t\t\t\tlong a = Integer.parseInt(ab[0]);\n\t\t\t\tlong b = Integer.parseInt(ab[1]);\n\t\t\t\t\n\t\t\t\tif (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong tmp;\n\t\t\t\tlong ta = a;\n\t\t\t\tlong tb = b;\n\t\t\t\twhile ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong gcd = ta;\n\t\t\t\tlong lcm = a * (b / gcd);\n\t\t\t\t\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"main",
"{\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()) != null) {\n\t\t\t\tString[] ab = x.split(\" \");\n\t\t\t\tlong a = Integer.parseInt(ab[0]);\n\t\t\t\tlong b = Integer.parseInt(ab[1]);\n\t\t\t\t\n\t\t\t\tif (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong tmp;\n\t\t\t\tlong ta = a;\n\t\t\t\tlong tb = b;\n\t\t\t\twhile ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong gcd = ta;\n\t\t\t\tlong lcm = a * (b / gcd);\n\t\t\t\t\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"BufferedReader in = new BufferedReader(new InputStreamReader(System.in));",
"in",
"new BufferedReader(new InputStreamReader(System.in))",
"String x = \"\";",
"x",
"\"\"",
"try {\n\t\t\twhile ((x = in.readLine()) != null) {\n\t\t\t\tString[] ab = x.split(\" \");\n\t\t\t\tlong a = Integer.parseInt(ab[0]);\n\t\t\t\tlong b = Integer.parseInt(ab[1]);\n\t\t\t\t\n\t\t\t\tif (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong tmp;\n\t\t\t\tlong ta = a;\n\t\t\t\tlong tb = b;\n\t\t\t\twhile ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong gcd = ta;\n\t\t\t\tlong lcm = a * (b / gcd);\n\t\t\t\t\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}",
"catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}",
"NumberFormatException e",
"{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}",
"IOException e",
"{\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}",
"e.printStackTrace()",
"e.printStackTrace",
"e",
"{\n\t\t\twhile ((x = in.readLine()) != null) {\n\t\t\t\tString[] ab = x.split(\" \");\n\t\t\t\tlong a = Integer.parseInt(ab[0]);\n\t\t\t\tlong b = Integer.parseInt(ab[1]);\n\t\t\t\t\n\t\t\t\tif (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong tmp;\n\t\t\t\tlong ta = a;\n\t\t\t\tlong tb = b;\n\t\t\t\twhile ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong gcd = ta;\n\t\t\t\tlong lcm = a * (b / gcd);\n\t\t\t\t\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t}",
"while ((x = in.readLine()) != null) {\n\t\t\t\tString[] ab = x.split(\" \");\n\t\t\t\tlong a = Integer.parseInt(ab[0]);\n\t\t\t\tlong b = Integer.parseInt(ab[1]);\n\t\t\t\t\n\t\t\t\tif (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong tmp;\n\t\t\t\tlong ta = a;\n\t\t\t\tlong tb = b;\n\t\t\t\twhile ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong gcd = ta;\n\t\t\t\tlong lcm = a * (b / gcd);\n\t\t\t\t\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}",
"(x = in.readLine()) != null",
"(x = in.readLine())",
"x",
"in.readLine()",
"in.readLine",
"in",
"null",
"{\n\t\t\t\tString[] ab = x.split(\" \");\n\t\t\t\tlong a = Integer.parseInt(ab[0]);\n\t\t\t\tlong b = Integer.parseInt(ab[1]);\n\t\t\t\t\n\t\t\t\tif (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong tmp;\n\t\t\t\tlong ta = a;\n\t\t\t\tlong tb = b;\n\t\t\t\twhile ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong gcd = ta;\n\t\t\t\tlong lcm = a * (b / gcd);\n\t\t\t\t\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}",
"String[] ab = x.split(\" \");",
"ab",
"x.split(\" \")",
"x.split",
"x",
"\" \"",
"long a = Integer.parseInt(ab[0]);",
"a",
"Integer.parseInt(ab[0])",
"Integer.parseInt",
"Integer",
"ab[0]",
"ab",
"0",
"long b = Integer.parseInt(ab[1]);",
"b",
"Integer.parseInt(ab[1])",
"Integer.parseInt",
"Integer",
"ab[1]",
"ab",
"1",
"if (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}",
"a > b",
"a",
"b",
"{\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}",
"long tmp = a;",
"tmp",
"a",
"a = b",
"a",
"b",
"b = tmp",
"b",
"tmp",
"long tmp;",
"tmp",
"long ta = a;",
"ta",
"a",
"long tb = b;",
"tb",
"b",
"while ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}",
"(tmp = tb % ta) != 0",
"(tmp = tb % ta)",
"tmp",
"tb % ta",
"tb",
"ta",
"0",
"{\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}",
"tb = ta",
"tb",
"ta",
"ta = tmp",
"ta",
"tmp",
"long gcd = ta;",
"gcd",
"ta",
"long lcm = a * (b / gcd);",
"lcm",
"a * (b / gcd)",
"a",
"(b / gcd)",
"b",
"gcd",
"System.out.println(gcd + \" \" + lcm)",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd + \" \" + lcm",
"gcd + \" \" + lcm",
"gcd",
"\" \"",
"lcm",
"String[] args",
"args",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()) != null) {\n\t\t\t\tString[] ab = x.split(\" \");\n\t\t\t\tlong a = Integer.parseInt(ab[0]);\n\t\t\t\tlong b = Integer.parseInt(ab[1]);\n\t\t\t\t\n\t\t\t\tif (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong tmp;\n\t\t\t\tlong ta = a;\n\t\t\t\tlong tb = b;\n\t\t\t\twhile ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong gcd = ta;\n\t\t\t\tlong lcm = a * (b / gcd);\n\t\t\t\t\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) {\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in));\n\t \n\t\tString x = \"\";\n\t\ttry {\n\t\t\twhile ((x = in.readLine()) != null) {\n\t\t\t\tString[] ab = x.split(\" \");\n\t\t\t\tlong a = Integer.parseInt(ab[0]);\n\t\t\t\tlong b = Integer.parseInt(ab[1]);\n\t\t\t\t\n\t\t\t\tif (a > b) {\n\t\t\t\t\tlong tmp = a;\n\t\t\t\t\ta = b;\n\t\t\t\t\tb = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong tmp;\n\t\t\t\tlong ta = a;\n\t\t\t\tlong tb = b;\n\t\t\t\twhile ((tmp = tb % ta) != 0) {\n\t\t\t\t\ttb = ta;\n\t\t\t\t\tta = tmp;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tlong gcd = ta;\n\t\t\t\tlong lcm = a * (b / gcd);\n\t\t\t\t\n\t\t\t\tSystem.out.println(gcd + \" \" + lcm);\n\t\t\t}\n\t\t} catch (NumberFormatException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}\n}",
"Main"
] | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) {
BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
String x = "";
try {
while ((x = in.readLine()) != null) {
String[] ab = x.split(" ");
long a = Integer.parseInt(ab[0]);
long b = Integer.parseInt(ab[1]);
if (a > b) {
long tmp = a;
a = b;
b = tmp;
}
long tmp;
long ta = a;
long tb = b;
while ((tmp = tb % ta) != 0) {
tb = ta;
ta = tmp;
}
long gcd = ta;
long lcm = a * (b / gcd);
System.out.println(gcd + " " + lcm);
}
} catch (NumberFormatException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} |
[
7,
15,
13,
17,
15,
13,
17,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
17,
42,
2,
0,
13,
4,
18,
13,
17,
30,
41,
13,
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,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
30,
4,
18,
18,
13,
13,
2,
2,
4,
13,
13,
13,
17,
4,
13,
13,
13,
23,
13,
12,
13,
30,
14,
2,
13,
17,
29,
13,
29,
4,
13,
13,
2,
13,
13,
23,
13,
23,
13,
12,
13,
30,
29,
2,
2,
13,
13,
4,
13,
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
],
[
129,
11
],
[
129,
12
],
[
12,
13
],
[
12,
14
],
[
14,
15
],
[
15,
16
],
[
15,
17
],
[
14,
18
],
[
18,
19
],
[
18,
20
],
[
14,
21
],
[
21,
22
],
[
22,
23
],
[
23,
24
],
[
23,
25
],
[
25,
26
],
[
26,
27
],
[
22,
28
],
[
21,
29
],
[
29,
30
],
[
30,
31
],
[
30,
32
],
[
32,
33
],
[
33,
34
],
[
32,
35
],
[
29,
36
],
[
36,
37
],
[
36,
38
],
[
38,
39
],
[
39,
40
],
[
38,
41
],
[
41,
42
],
[
41,
43
],
[
29,
44
],
[
44,
45
],
[
44,
46
],
[
46,
47
],
[
47,
48
],
[
46,
49
],
[
49,
50
],
[
49,
51
],
[
29,
52
],
[
52,
53
],
[
53,
54
],
[
53,
55
],
[
52,
56
],
[
56,
57
],
[
57,
58
],
[
58,
59
],
[
59,
60
],
[
59,
61
],
[
57,
62
],
[
63,
63
],
[
63,
64
],
[
64,
65
],
[
64,
66
],
[
64,
67
],
[
63,
68
],
[
63,
69
],
[
69,
70
],
[
69,
71
],
[
69,
72
],
[
52,
73
],
[
73,
74
],
[
74,
75
],
[
75,
76
],
[
76,
77
],
[
76,
78
],
[
74,
79
],
[
80,
80
],
[
80,
81
],
[
81,
82
],
[
81,
83
],
[
81,
84
],
[
80,
85
],
[
80,
86
],
[
86,
87
],
[
86,
88
],
[
86,
89
],
[
12,
90
],
[
90,
91
],
[
129,
92
],
[
92,
93
],
[
92,
94
],
[
94,
95
],
[
95,
96
],
[
96,
97
],
[
96,
98
],
[
95,
99
],
[
99,
100
],
[
95,
101
],
[
101,
102
],
[
102,
103
],
[
102,
104
],
[
102,
105
],
[
105,
106
],
[
105,
107
],
[
92,
108
],
[
108,
109
],
[
92,
110
],
[
110,
111
],
[
129,
112
],
[
112,
113
],
[
112,
114
],
[
114,
115
],
[
115,
116
],
[
116,
117
],
[
117,
118
],
[
117,
119
],
[
116,
120
],
[
120,
121
],
[
120,
122
],
[
120,
123
],
[
112,
124
],
[
124,
125
],
[
112,
126
],
[
126,
127
],
[
0,
128
],
[
128,
129
],
[
128,
130
]
] | [
"\nimport java.io.BufferedReader;\nimport java.io.IOException;\nimport java.io.InputStreamReader;\n\npublic class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line=\"\";\n\t\twhile((line = br.readLine())!=null){\n\t\t\tString[] s =line.split(\" \");\n\t\t\tlong a = Long.parseLong(s[0]);\n\t\t\tlong b = Long.parseLong(s[1]);\n\t\t\tif(a>b){\n\t\t\t\tSystem.out.println(gcd(b,a)+\" \"+lcm(b,a));\n\t\t\t}else{\n\t\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t}\n\t\t}\n\t}\n\tpublic static long gcd(long m, long n){\n\t\tif(n == 0)\n\t\t\treturn m;\n\t\telse\n\t\t\treturn gcd(n, m % n);\n\t}\n\tpublic static long lcm(long m, long n){\n\t\treturn m * n / gcd(m, n);\n\t}\n}",
"import java.io.BufferedReader;",
"BufferedReader",
"java.io",
"import java.io.IOException;",
"IOException",
"java.io",
"import java.io.InputStreamReader;",
"InputStreamReader",
"java.io",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line=\"\";\n\t\twhile((line = br.readLine())!=null){\n\t\t\tString[] s =line.split(\" \");\n\t\t\tlong a = Long.parseLong(s[0]);\n\t\t\tlong b = Long.parseLong(s[1]);\n\t\t\tif(a>b){\n\t\t\t\tSystem.out.println(gcd(b,a)+\" \"+lcm(b,a));\n\t\t\t}else{\n\t\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t}\n\t\t}\n\t}\n\tpublic static long gcd(long m, long n){\n\t\tif(n == 0)\n\t\t\treturn m;\n\t\telse\n\t\t\treturn gcd(n, m % n);\n\t}\n\tpublic static long lcm(long m, long n){\n\t\treturn m * n / gcd(m, n);\n\t}\n}",
"Main",
"public static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line=\"\";\n\t\twhile((line = br.readLine())!=null){\n\t\t\tString[] s =line.split(\" \");\n\t\t\tlong a = Long.parseLong(s[0]);\n\t\t\tlong b = Long.parseLong(s[1]);\n\t\t\tif(a>b){\n\t\t\t\tSystem.out.println(gcd(b,a)+\" \"+lcm(b,a));\n\t\t\t}else{\n\t\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t}\n\t\t}\n\t}",
"main",
"{\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line=\"\";\n\t\twhile((line = br.readLine())!=null){\n\t\t\tString[] s =line.split(\" \");\n\t\t\tlong a = Long.parseLong(s[0]);\n\t\t\tlong b = Long.parseLong(s[1]);\n\t\t\tif(a>b){\n\t\t\t\tSystem.out.println(gcd(b,a)+\" \"+lcm(b,a));\n\t\t\t}else{\n\t\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t}\n\t\t}\n\t}",
"BufferedReader br = new BufferedReader(new InputStreamReader(System.in));",
"br",
"new BufferedReader(new InputStreamReader(System.in))",
"String line=\"\";",
"line",
"\"\"",
"while((line = br.readLine())!=null){\n\t\t\tString[] s =line.split(\" \");\n\t\t\tlong a = Long.parseLong(s[0]);\n\t\t\tlong b = Long.parseLong(s[1]);\n\t\t\tif(a>b){\n\t\t\t\tSystem.out.println(gcd(b,a)+\" \"+lcm(b,a));\n\t\t\t}else{\n\t\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t}\n\t\t}",
"(line = br.readLine())!=null",
"(line = br.readLine())",
"line",
"br.readLine()",
"br.readLine",
"br",
"null",
"{\n\t\t\tString[] s =line.split(\" \");\n\t\t\tlong a = Long.parseLong(s[0]);\n\t\t\tlong b = Long.parseLong(s[1]);\n\t\t\tif(a>b){\n\t\t\t\tSystem.out.println(gcd(b,a)+\" \"+lcm(b,a));\n\t\t\t}else{\n\t\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t}\n\t\t}",
"String[] s =line.split(\" \");",
"s",
"line.split(\" \")",
"line.split",
"line",
"\" \"",
"long a = Long.parseLong(s[0]);",
"a",
"Long.parseLong(s[0])",
"Long.parseLong",
"Long",
"s[0]",
"s",
"0",
"long b = Long.parseLong(s[1]);",
"b",
"Long.parseLong(s[1])",
"Long.parseLong",
"Long",
"s[1]",
"s",
"1",
"if(a>b){\n\t\t\t\tSystem.out.println(gcd(b,a)+\" \"+lcm(b,a));\n\t\t\t}else{\n\t\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t}",
"a>b",
"a",
"b",
"{\n\t\t\t\tSystem.out.println(gcd(b,a)+\" \"+lcm(b,a));\n\t\t\t}",
"System.out.println(gcd(b,a)+\" \"+lcm(b,a))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(b,a)+\" \"+lcm(b,a)",
"gcd(b,a)+\" \"+lcm(b,a)",
"gcd(b,a)",
"gcd",
"b",
"a",
"\" \"",
"lcm(b,a)",
"lcm",
"b",
"a",
"{\n\t\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t}",
"System.out.println(gcd(a,b)+\" \"+lcm(a,b))",
"System.out.println",
"System.out",
"System",
"System.out",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)+\" \"+lcm(a,b)",
"gcd(a,b)",
"gcd",
"a",
"b",
"\" \"",
"lcm(a,b)",
"lcm",
"a",
"b",
"String[] args",
"args",
"public static long gcd(long m, long n){\n\t\tif(n == 0)\n\t\t\treturn m;\n\t\telse\n\t\t\treturn gcd(n, m % n);\n\t}",
"gcd",
"{\n\t\tif(n == 0)\n\t\t\treturn m;\n\t\telse\n\t\t\treturn gcd(n, m % n);\n\t}",
"if(n == 0)\n\t\t\treturn m;\n\t\telse\n\t\t\treturn gcd(n, m % n);",
"n == 0",
"n",
"0",
"return m;",
"m",
"return gcd(n, m % n);",
"gcd(n, m % n)",
"gcd",
"n",
"m % n",
"m",
"n",
"long m",
"m",
"long n",
"n",
"public static long lcm(long m, long n){\n\t\treturn m * n / gcd(m, n);\n\t}",
"lcm",
"{\n\t\treturn m * n / gcd(m, n);\n\t}",
"return m * n / gcd(m, n);",
"m * n / gcd(m, n)",
"m * n",
"m",
"n",
"gcd(m, n)",
"gcd",
"m",
"n",
"long m",
"m",
"long n",
"n",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line=\"\";\n\t\twhile((line = br.readLine())!=null){\n\t\t\tString[] s =line.split(\" \");\n\t\t\tlong a = Long.parseLong(s[0]);\n\t\t\tlong b = Long.parseLong(s[1]);\n\t\t\tif(a>b){\n\t\t\t\tSystem.out.println(gcd(b,a)+\" \"+lcm(b,a));\n\t\t\t}else{\n\t\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t}\n\t\t}\n\t}\n\tpublic static long gcd(long m, long n){\n\t\tif(n == 0)\n\t\t\treturn m;\n\t\telse\n\t\t\treturn gcd(n, m % n);\n\t}\n\tpublic static long lcm(long m, long n){\n\t\treturn m * n / gcd(m, n);\n\t}\n}",
"public class Main {\n\tpublic static void main(String[] args) throws IOException {\n\t\t// TODO Auto-generated method stub\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tString line=\"\";\n\t\twhile((line = br.readLine())!=null){\n\t\t\tString[] s =line.split(\" \");\n\t\t\tlong a = Long.parseLong(s[0]);\n\t\t\tlong b = Long.parseLong(s[1]);\n\t\t\tif(a>b){\n\t\t\t\tSystem.out.println(gcd(b,a)+\" \"+lcm(b,a));\n\t\t\t}else{\n\t\t\t\tSystem.out.println(gcd(a,b)+\" \"+lcm(a,b));\n\t\t\t}\n\t\t}\n\t}\n\tpublic static long gcd(long m, long n){\n\t\tif(n == 0)\n\t\t\treturn m;\n\t\telse\n\t\t\treturn gcd(n, m % n);\n\t}\n\tpublic static long lcm(long m, long n){\n\t\treturn m * n / gcd(m, n);\n\t}\n}",
"Main"
] |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
String line="";
while((line = br.readLine())!=null){
String[] s =line.split(" ");
long a = Long.parseLong(s[0]);
long b = Long.parseLong(s[1]);
if(a>b){
System.out.println(gcd(b,a)+" "+lcm(b,a));
}else{
System.out.println(gcd(a,b)+" "+lcm(a,b));
}
}
}
public static long gcd(long m, long n){
if(n == 0)
return m;
else
return gcd(n, m % n);
}
public static long lcm(long m, long n){
return m * n / gcd(m, n);
}
} |
[
7,
15,
13,
17,
6,
13,
12,
13,
30,
41,
13,
20,
41,
13,
4,
18,
4,
18,
13,
11,
1,
41,
13,
2,
18,
13,
13,
17,
2,
13,
17,
1,
40,
13,
30,
30,
4,
18,
18,
13,
13,
18,
13,
13,
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
],
[
16,
17
],
[
17,
18
],
[
8,
19
],
[
19,
20
],
[
20,
21
],
[
21,
22
],
[
21,
23
],
[
23,
24
],
[
24,
25
],
[
24,
26
],
[
23,
27
],
[
19,
28
],
[
28,
29
],
[
28,
30
],
[
19,
31
],
[
31,
32
],
[
32,
33
],
[
19,
34
],
[
35,
35
],
[
35,
36
],
[
36,
37
],
[
37,
38
],
[
38,
39
],
[
38,
40
],
[
36,
41
],
[
41,
42
],
[
41,
43
],
[
8,
44
],
[
44,
45
],
[
45,
46
],
[
46,
47
],
[
46,
48
],
[
44,
49
],
[
6,
50
],
[
50,
51
]
] | [
"import java.util.*;\n\nclass Main {\n public static void main (String [] args) {\n\n Scanner sc = new Scanner(System.in);\n\n char [] str = sc.next().toCharArray();\n for(int x = str.length-1; x >= 0; x--) {\n System.out.print(str[x]);\n }\n\n System.out.print(\"\\n\");\n }\n}",
"import java.util.*;",
"util.*",
"java",
"class Main {\n public static void main (String [] args) {\n\n Scanner sc = new Scanner(System.in);\n\n char [] str = sc.next().toCharArray();\n for(int x = str.length-1; x >= 0; x--) {\n System.out.print(str[x]);\n }\n\n System.out.print(\"\\n\");\n }\n}",
"Main",
"public static void main (String [] args) {\n\n Scanner sc = new Scanner(System.in);\n\n char [] str = sc.next().toCharArray();\n for(int x = str.length-1; x >= 0; x--) {\n System.out.print(str[x]);\n }\n\n System.out.print(\"\\n\");\n }",
"main",
"{\n\n Scanner sc = new Scanner(System.in);\n\n char [] str = sc.next().toCharArray();\n for(int x = str.length-1; x >= 0; x--) {\n System.out.print(str[x]);\n }\n\n System.out.print(\"\\n\");\n }",
"Scanner sc = new Scanner(System.in);",
"sc",
"new Scanner(System.in)",
"char [] str = sc.next().toCharArray();",
"str",
"sc.next().toCharArray()",
"sc.next().toCharArray",
"sc.next()",
"sc.next",
"sc",
"for(int x = str.length-1; x >= 0; x--) {\n System.out.print(str[x]);\n }",
"int x = str.length-1;",
"int x = str.length-1;",
"x",
"str.length-1",
"str.length",
"str",
"str.length",
"1",
"x >= 0",
"x",
"0",
"x--",
"x--",
"x",
"{\n System.out.print(str[x]);\n }",
"{\n System.out.print(str[x]);\n }",
"System.out.print(str[x])",
"System.out.print",
"System.out",
"System",
"System.out",
"str[x]",
"str",
"x",
"System.out.print(\"\\n\")",
"System.out.print",
"System.out",
"System",
"System.out",
"\"\\n\"",
"String [] args",
"args"
] | import java.util.*;
class Main {
public static void main (String [] args) {
Scanner sc = new Scanner(System.in);
char [] str = sc.next().toCharArray();
for(int x = str.length-1; x >= 0; x--) {
System.out.print(str[x]);
}
System.out.print("\n");
}
} |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.