QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#305635#4085. 통신망Lynkcat#16 61ms4024kbC++201.6kb2024-01-15 19:07:232024-07-04 03:19:00

Judging History

你现在查看的是最新测评结果

  • [2024-07-04 03:19:00]
  • 评测
  • 测评结果:16
  • 用时:61ms
  • 内存:4024kb
  • [2024-01-15 19:07:23]
  • 提交

answer

#include<bits/stdc++.h>
#include "communication.h"
#define poly vector<int>
#define IOS ios::sync_with_stdio(false)
#define ll long long
#define mp make_pair
#define mt make_tuple
#define pa pair < int,int >
#define fi first
#define se second
#define inf 1e18
#define mod 998244353
#define sz(x) ((int)((x).size()))
// #define int ll
// #define N 
using namespace std;
const int N=2505;
int dfn[N],low[N],DFN,vis[N],vv[N];
poly G[N];
int tot;
void dfs(int k,int fa)
{
	dfn[k]=++DFN;
	low[k]=dfn[k];
	int son=0,bl=0;
	for (auto id:G[k])
	{
		if (vis[id]) continue;
		if (id==fa) continue;
		int u=vv[id]^k;
		// cout<<"edge "<<u<<" "<<k<<endl;
		if (dfn[u]==0)
		{
			son++;
			dfs(u,id);
			if (low[u]>=dfn[k]&&fa!=-1) bl=1; 
			low[k]=min(low[k],low[u]);
		} else
		{
			low[k]=min(low[k],dfn[u]);
		}
	}
	if (fa==-1&&son>=2) bl=1;
	tot+=bl;
	// cout<<k<<" "<<bl<<endl;
}
std::vector<int> find_num_critical(int n, std::vector< std::pair<int, int> > E)
{
	int m = (int)E.size();
	poly ans;
	for (int i=0;i<m;i++)
	{
		auto [u,v]=E[i];
		G[u].push_back(i);
		G[v].push_back(i);
		vv[i]=u^v;
	}
	for (int i=0;i<m;i++)
	{
		for (int j=1;j<=n;j++)
			dfn[j]=low[j]=0;
		vis[i]=1;
		tot=0;DFN=0;
		int tt=0;
		for (int j=1;j<=n;j++)
			if (!dfn[j])
			{
				tt++;
				dfs(j,-1);
				// cout<<endl;
			}
		// cout<<"??"<<tt<<endl;
		if (tt>2)
		{
			tt=n;
		} else
		if (tt==2)
		{
			tot=0;
			for (int j=1;j<=n;j++)
			{
				int u=0;
				for (auto id:G[j])
					if (id!=i) u++;
				if (u) tot++;
			}
		}
		ans.push_back(tot);
		vis[i]=0;
	}
	return ans;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 5
Accepted

Test #1:

score: 5
Accepted
time: 1ms
memory: 3636kb

input:

200 200
29 99
132 153
145 179
144 45
56 28
48 3
89 51
88 127
177 53
26 73
50 151
92 13
93 159
116 135
28 74
100 126
44 91
92 193
187 124
177 25
94 11
27 16
165 37
71 7
152 188
71 189
98 173
94 93
172 81
113 36
131 117
107 23
185 91
20 59
2 121
109 77
48 79
33 69
102 81
128 137
16 190
167 136
10 178
...

output:

Gyojun is handsome
199
199
199
199
200
199
200
200
200
199
200
199
199
101
200
199
200
199
100
199
200
200
200
200
199
199
199
200
199
101
200
199
200
199
199
200
199
200
199
200
200
199
199
200
199
199
200
200
199
200
200
199
200
200
200
200
200
199
199
200
199
199
200
100
200
199
199
200
199
200
2...

result:

ok 202 lines

Test #2:

score: 0
Accepted
time: 1ms
memory: 3780kb

input:

200 200
29 147
132 12
145 83
106 45
56 117
79 3
135 51
88 94
177 160
26 86
142 151
20 13
85 159
116 197
28 131
100 22
69 91
13 193
187 199
150 25
48 11
151 16
165 126
71 153
152 141
132 189
133 173
11 93
172 102
127 36
146 117
107 111
185 33
20 184
2 114
109 55
54 79
33 110
102 2
109 137
176 190
96 ...

output:

Gyojun is handsome
196
196
196
196
196
196
200
200
200
196
200
196
196
200
200
196
200
196
200
196
196
200
196
196
196
196
196
196
196
200
196
199
200
196
196
196
196
200
196
196
200
196
196
196
196
196
196
196
200
200
196
196
200
196
200
200
200
196
196
196
196
196
200
198
200
200
200
200
196
200
1...

result:

ok 202 lines

Test #3:

score: 0
Accepted
time: 1ms
memory: 3812kb

input:

200 200
184 104
196 154
4 105
153 68
120 38
179 82
81 54
74 122
89 169
110 137
172 90
189 121
94 62
153 11
30 47
177 20
51 3
31 70
24 46
21 150
46 41
135 96
16 55
61 189
72 7
56 43
184 79
152 138
198 99
160 5
69 166
29 180
131 143
63 22
123 92
110 199
25 126
70 181
50 139
170 181
171 23
187 133
164 ...

output:

Gyojun is handsome
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
198
1...

result:

ok 202 lines

Test #4:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

200 200
116 6
153 60
106 164
63 191
159 86
46 66
55 122
80 76
21 133
84 189
194 156
23 107
9 7
8 67
14 133
134 133
179 137
154 4
20 125
45 33
4 52
43 144
76 15
190 124
77 56
104 144
8 87
165 131
136 72
1 28
171 192
182 136
126 58
94 167
194 82
108 5
180 133
96 152
84 124
92 156
136 124
162 191
123 1...

output:

Gyojun is handsome
199
199
200
199
200
199
199
199
199
199
200
200
200
199
199
200
199
199
200
200
199
200
200
199
200
200
200
200
200
200
199
200
200
199
200
199
200
200
200
199
200
200
200
200
199
200
199
199
199
199
200
199
199
200
200
199
200
200
200
199
199
199
200
200
199
200
199
199
200
199
2...

result:

ok 202 lines

Test #5:

score: 0
Accepted
time: 1ms
memory: 3788kb

input:

200 200
200 83
85 139
109 103
104 160
31 74
137 193
9 23
58 56
157 70
7 82
184 102
172 107
194 83
47 176
174 185
79 199
43 161
77 74
107 137
169 91
26 186
156 64
192 189
85 95
39 97
22 35
134 56
50 195
129 164
67 200
101 108
52 172
66 29
142 60
28 197
133 48
40 75
81 16
100 192
84 155
16 78
167 48
1...

output:

Gyojun is handsome
200
200
199
199
200
199
200
200
199
200
200
200
200
200
200
199
199
199
200
199
199
199
200
199
199
199
199
200
199
200
199
100
199
199
199
200
199
199
199
199
200
200
199
200
199
200
199
199
199
199
200
200
199
199
199
200
199
199
200
200
199
199
199
199
200
199
199
199
199
200
2...

result:

ok 202 lines

Test #6:

score: 0
Accepted
time: 1ms
memory: 3508kb

input:

200 200
24 136
125 184
186 154
12 126
94 177
128 54
101 78
49 106
28 57
53 107
104 132
107 155
4 197
32 142
141 158
110 16
179 54
125 47
103 188
9 180
58 74
81 49
129 61
96 127
83 182
167 43
131 128
54 116
63 138
57 132
19 133
148 14
65 186
99 40
167 34
112 32
80 39
6 59
84 178
26 86
37 95
145 155
7...

output:

Gyojun is handsome
200
199
199
199
96
200
199
200
199
199
199
200
200
199
199
199
199
199
199
199
199
200
199
199
199
96
199
96
200
200
199
199
96
199
199
199
200
199
199
95
200
199
200
199
200
200
200
200
199
200
199
199
199
200
199
199
200
199
200
199
200
200
200
199
199
199
200
200
199
200
200
19...

result:

ok 202 lines

Test #7:

score: 0
Accepted
time: 1ms
memory: 3628kb

input:

200 200
76 158
134 144
163 131
90 81
101 12
48 146
143 63
193 83
102 92
117 192
97 194
149 40
152 1
3 158
164 38
149 78
150 70
145 54
36 95
144 39
63 56
87 75
149 195
189 149
21 200
184 16
71 65
108 81
18 134
58 128
20 177
66 41
44 75
49 77
151 171
135 138
98 32
42 61
66 29
169 129
68 138
17 140
62 ...

output:

Gyojun is handsome
106
200
199
199
200
105
200
200
106
105
199
199
199
200
199
199
199
105
199
199
199
200
199
199
199
199
200
200
106
199
200
199
105
200
199
105
200
199
200
105
200
199
105
105
199
105
199
104
199
199
199
200
199
199
199
199
105
200
199
199
105
200
199
106
200
199
200
199
105
199
2...

result:

ok 202 lines

Test #8:

score: 0
Accepted
time: 1ms
memory: 3504kb

input:

200 200
196 142
196 40
49 173
104 163
82 15
96 167
73 62
32 33
124 140
114 50
25 190
117 31
96 74
83 162
2 191
152 126
165 115
181 23
1 38
123 66
21 153
200 119
187 111
185 76
131 199
61 194
168 95
31 52
28 187
177 182
163 124
146 196
73 134
91 84
105 48
115 195
30 113
61 13
22 111
197 184
40 25
58 ...

output:

Gyojun is handsome
123
124
199
199
200
122
199
199
199
123
200
199
122
200
124
199
200
124
122
123
199
124
200
124
199
199
122
199
123
123
124
199
123
199
122
123
122
123
199
199
200
123
123
122
122
199
123
199
123
199
199
123
199
199
199
124
199
199
122
200
123
199
122
122
199
199
200
199
124
200
1...

result:

ok 202 lines

Test #9:

score: 0
Accepted
time: 1ms
memory: 3516kb

input:

200 200
88 4
88 144
24 156
116 41
89 146
170 190
6 76
171 98
16 139
158 6
66 133
136 91
187 75
17 122
145 126
140 63
82 27
61 140
180 170
78 14
127 136
127 22
80 186
64 60
196 102
152 125
155 176
186 108
83 74
109 173
110 11
124 25
3 129
183 135
107 52
154 116
26 110
197 117
66 75
192 182
73 198
167...

output:

Gyojun is handsome
183
183
199
183
183
183
183
183
183
183
183
183
184
183
183
183
183
183
184
183
183
183
184
183
184
183
184
183
183
199
199
183
183
183
183
183
184
183
184
183
183
183
183
184
183
199
183
183
184
183
199
183
183
183
183
183
183
183
183
183
183
183
183
183
183
183
199
184
184
184
1...

result:

ok 202 lines

Test #10:

score: 0
Accepted
time: 1ms
memory: 3552kb

input:

200 199
128 61
197 124
163 80
155 173
43 140
42 8
89 4
101 113
33 74
11 85
137 100
189 100
177 175
22 126
169 178
42 25
70 78
159 54
148 189
29 130
13 98
70 108
154 177
76 109
146 187
96 144
159 46
145 109
172 109
15 102
101 168
161 178
40 165
8 156
35 163
99 26
48 65
152 153
32 44
87 55
95 11
4 17
...

output:

Gyojun is handsome
199
200
200
200
200
200
200
199
200
199
200
200
200
200
199
200
199
199
199
200
199
200
199
200
199
200
200
200
200
199
200
200
199
200
200
199
199
199
199
199
200
199
199
199
199
200
200
200
200
199
199
200
200
199
199
199
200
199
200
200
199
199
200
200
199
200
199
200
200
199
2...

result:

ok 201 lines

Test #11:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

200 199
128 94
59 124
163 46
155 195
43 166
155 8
73 4
149 113
181 74
154 85
137 101
189 137
177 90
22 6
169 143
42 173
26 78
10 54
148 18
29 36
13 194
70 99
154 198
95 109
28 187
96 86
159 66
145 172
172 77
17 102
101 199
44 178
67 165
140 156
35 103
50 26
48 151
30 153
32 164
188 55
177 11
45 17
3...

output:

Gyojun is handsome
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
200
199
200
200
200
200
200
200
200
200
200
200
2...

result:

ok 201 lines

Test #12:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

200 354
89 16
104 1
50 139
178 175
33 188
59 14
121 173
17 54
185 189
149 31
74 16
75 41
56 26
154 44
52 91
142 166
53 30
26 101
10 164
112 53
105 127
22 176
90 175
154 47
150 132
29 172
10 160
164 147
145 20
116 25
154 86
183 33
74 28
13 123
87 122
104 4
121 173
90 21
31 111
49 162
112 23
20 43
50 ...

output:

Gyojun is handsome
101
200
101
101
101
101
101
101
101
101
101
101
101
101
101
199
101
101
101
101
199
101
101
101
101
101
101
101
101
101
101
101
101
101
200
200
101
101
101
101
101
101
101
101
101
200
200
200
199
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
101
1...

result:

ok 356 lines

Test #13:

score: 0
Accepted
time: 0ms
memory: 3556kb

input:

200 331
97 67
88 111
156 155
81 177
129 15
30 70
96 94
155 172
42 52
170 22
190 98
146 23
184 197
74 199
157 109
95 166
181 78
45 156
100 70
58 183
164 163
105 134
165 169
85 195
50 9
104 39
146 80
59 103
146 48
165 169
78 181
46 115
168 104
150 135
85 195
168 27
27 196
102 80
46 153
98 126
165 168
...

output:

Gyojun is handsome
98
99
98
98
99
98
99
98
98
200
99
99
98
99
98
98
98
199
98
98
98
200
98
98
98
98
99
98
98
98
98
98
98
98
98
99
98
98
98
99
98
98
200
200
98
98
98
98
99
98
98
98
98
98
98
98
98
98
98
99
98
98
200
98
200
99
98
98
98
98
98
200
200
98
98
98
98
200
98
99
98
98
98
200
199
98
98
98
98
98...

result:

ok 333 lines

Test #14:

score: 0
Accepted
time: 1ms
memory: 3644kb

input:

200 295
117 196
139 1
101 147
95 125
152 164
196 102
152 185
184 29
50 195
198 30
110 21
157 127
140 199
80 7
156 76
111 37
79 113
175 16
134 112
169 119
182 112
125 117
6 154
89 77
196 120
135 65
13 177
80 27
23 167
29 123
19 15
97 173
155 87
85 61
35 177
71 142
180 32
133 170
56 140
117 182
128 13...

output:

Gyojun is handsome
81
80
80
80
80
81
80
81
80
80
82
80
81
81
80
81
80
80
200
80
80
200
80
81
81
81
82
200
81
81
80
81
80
80
82
80
80
80
81
80
81
200
80
81
80
81
82
80
80
80
81
81
80
81
80
81
80
200
80
80
81
82
82
81
80
80
80
80
80
80
81
81
81
80
81
80
82
80
200
81
80
80
80
80
80
81
80
81
200
82
82
8...

result:

ok 297 lines

Test #15:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

200 232
66 134
88 82
120 174
183 198
100 193
153 184
24 53
197 60
147 118
98 3
83 92
112 55
52 1
165 185
83 65
173 19
138 73
193 24
190 176
166 174
86 82
158 190
102 176
37 182
92 79
80 28
189 95
49 125
190 176
11 65
177 166
58 64
36 43
36 148
155 52
49 115
164 27
14 68
113 33
48 112
107 75
106 128
...

output:

Gyojun is handsome
41
40
42
41
38
200
39
39
41
41
34
42
38
39
39
34
38
38
34
43
40
39
41
40
41
40
41
38
34
38
38
41
40
40
38
34
41
39
40
34
38
41
40
41
41
37
42
38
40
39
40
41
41
43
38
34
40
41
41
37
41
39
41
41
40
41
40
34
39
40
42
41
40
38
38
38
34
38
40
39
40
41
40
40
41
39
40
41
34
41
40
38
38
4...

result:

ok 234 lines

Test #16:

score: 0
Accepted
time: 1ms
memory: 3556kb

input:

200 211
108 23
123 119
150 144
147 20
139 100
138 95
103 126
31 128
126 8
105 100
12 95
198 135
36 131
195 181
162 124
88 181
57 56
92 108
34 47
186 91
113 90
11 48
37 200
15 64
48 109
71 164
86 170
172 186
136 185
168 18
63 81
51 27
50 177
53 45
98 40
35 45
137 62
88 51
152 165
82 75
2 82
157 145
8...

output:

Gyojun is handsome
37
40
34
39
38
34
37
40
38
12
34
40
35
37
40
37
39
37
33
35
39
34
40
39
34
33
40
12
34
40
35
37
37
35
33
35
37
37
34
34
34
39
38
35
36
38
39
35
35
41
34
37
40
37
38
33
37
37
35
37
37
35
37
37
35
39
35
33
40
37
40
37
199
37
38
37
38
40
38
39
34
38
37
35
37
34
37
200
33
33
40
37
33
...

result:

ok 213 lines

Test #17:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

200 202
17 111
90 155
15 132
101 45
44 195
129 174
84 1
81 24
2 126
135 198
27 134
197 67
193 32
100 187
181 157
3 145
91 192
68 167
40 175
61 153
184 196
138 159
52 66
187 48
188 77
64 200
129 111
107 54
49 72
171 191
177 102
139 155
22 70
5 58
3 87
118 117
120 177
69 53
116 42
161 18
25 123
76 61
...

output:

Gyojun is handsome
180
180
14
13
180
180
180
13
180
180
180
180
180
180
180
180
180
180
9
180
180
180
180
180
180
180
180
180
9
181
180
180
180
180
180
180
180
180
180
180
180
180
180
180
13
180
180
180
180
180
180
180
180
180
180
180
180
180
180
180
180
180
200
180
180
180
180
180
180
180
180
180
1...

result:

ok 204 lines

Test #18:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

198 200
194 167
31 54
134 61
126 61
80 64
58 20
157 170
27 97
58 38
133 159
124 17
85 12
114 148
128 136
1 157
60 166
62 77
9 167
66 173
50 148
135 75
42 137
156 163
96 43
96 189
157 188
48 40
174 181
187 95
44 46
41 70
72 192
130 3
112 19
33 37
59 71
76 107
90 174
175 185
132 126
196 117
37 139
93 ...

output:

Gyojun is handsome
111
197
197
119
197
112
197
197
112
198
197
198
198
198
197
197
197
198
197
198
117
197
197
198
198
198
198
198
197
198
197
197
198
197
198
198
197
197
197
197
198
197
198
198
198
197
197
197
198
197
198
198
198
118
197
119
198
198
197
197
197
198
198
198
198
197
197
198
198
198
1...

result:

ok 202 lines

Test #19:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

197 205
42 93
186 188
166 82
104 138
158 93
74 133
135 92
22 62
16 188
168 159
70 152
189 162
39 126
192 102
51 22
117 92
66 1
109 47
149 176
189 86
58 169
66 11
21 63
119 54
119 62
34 147
2 59
123 156
85 96
45 61
61 155
151 147
10 37
14 41
9 57
182 170
185 112
55 34
48 1
80 169
182 180
99 191
33 11...

output:

Gyojun is handsome
106
197
196
197
106
197
197
109
196
104
197
196
197
196
197
104
197
196
197
105
196
196
105
104
105
197
196
196
196
196
197
197
197
196
197
197
196
197
197
106
196
197
196
197
197
197
196
105
196
196
196
106
197
196
197
197
196
196
197
197
108
197
197
105
197
196
197
197
197
196
1...

result:

ok 207 lines

Test #20:

score: 0
Accepted
time: 1ms
memory: 3504kb

input:

196 208
146 57
66 173
20 161
195 92
163 112
47 42
146 50
22 131
51 158
46 176
23 110
38 123
143 76
8 94
42 146
180 29
178 151
42 66
3 144
146 136
119 73
123 115
111 97
83 190
85 91
135 71
39 167
68 30
184 93
93 178
38 58
138 30
178 40
31 151
137 100
4 162
159 60
85 161
63 14
90 18
80 133
48 128
42 8...

output:

Gyojun is handsome
89
196
89
196
196
196
90
196
195
195
196
196
92
195
89
195
93
93
196
195
196
195
195
195
90
196
196
196
195
196
196
196
195
93
91
195
91
89
196
90
195
91
90
90
195
195
93
195
90
195
91
89
195
196
196
91
195
93
93
196
196
89
91
91
195
195
90
89
196
195
196
91
195
89
91
196
196
195
...

result:

ok 210 lines

Test #21:

score: 0
Accepted
time: 1ms
memory: 3808kb

input:

197 247
45 5
144 56
120 159
63 30
31 100
143 7
19 112
29 44
27 173
32 19
83 38
20 65
37 57
180 59
165 99
29 18
192 112
57 20
47 138
140 80
168 157
58 92
41 44
73 121
179 12
136 123
108 161
96 69
158 9
36 68
185 125
195 94
49 76
7 155
197 30
1 33
154 119
114 192
125 150
116 179
155 142
1 100
143 136
...

output:

Gyojun is handsome
196
53
54
50
50
51
51
52
196
50
196
50
196
53
50
196
50
51
197
52
51
50
196
51
54
50
196
51
50
51
196
50
53
52
50
51
52
51
50
196
52
50
50
50
50
53
53
51
50
50
53
50
196
51
54
197
50
196
50
197
54
51
50
197
50
51
50
50
51
52
51
50
51
196
196
51
196
196
51
54
50
196
50
196
51
50
51...

result:

ok 249 lines

Test #22:

score: 0
Accepted
time: 0ms
memory: 3516kb

input:

190 387
90 2
97 67
12 86
179 70
174 131
78 33
23 128
97 154
114 149
70 168
20 65
19 126
9 155
60 33
190 29
138 45
61 160
96 57
52 39
162 88
126 178
137 37
117 55
103 141
184 137
145 182
144 31
85 46
41 121
96 30
183 79
4 60
22 94
12 164
66 53
124 125
20 138
189 15
31 40
139 51
144 102
83 34
38 122
9...

output:

Gyojun is handsome
14
14
15
14
14
14
189
14
15
14
14
14
14
14
14
14
14
14
15
14
14
14
14
15
14
15
14
189
15
14
15
14
14
14
14
14
14
15
14
14
15
14
16
14
14
14
14
14
14
14
15
14
14
14
14
15
14
14
14
14
14
14
14
14
14
14
14
14
15
14
14
15
189
14
14
15
14
14
15
14
14
14
14
14
15
14
14
14
15
14
14
15
14...

result:

ok 389 lines

Test #23:

score: 0
Accepted
time: 2ms
memory: 3656kb

input:

197 441
125 110
4 148
78 140
17 104
125 28
75 10
179 102
155 61
142 184
58 190
191 58
94 169
104 139
41 84
23 91
146 43
71 1
142 113
37 120
184 42
8 158
6 129
179 190
80 101
71 13
22 125
163 34
170 15
167 179
162 28
121 170
55 113
102 152
20 162
88 149
16 127
85 174
189 29
98 34
168 28
131 8
121 149...

output:

Gyojun is handsome
7
7
7
7
7
7
7
7
7
7
7
7
7
7
8
8
7
7
7
7
8
7
7
7
7
7
9
7
7
7
7
7
7
7
7
8
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
196
7
7
7
8
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
8
7
7
7
7
7
7
7
7
8
7
7
7
7
7
7
7
7
7
7
7
7
8
8
7
7
7
8
7
7
7
196
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
7
8...

result:

ok 443 lines

Test #24:

score: 0
Accepted
time: 3ms
memory: 3572kb

input:

197 499
47 180
58 68
9 107
98 73
178 135
138 82
43 105
114 73
41 22
165 74
161 140
195 24
189 134
108 46
66 67
78 54
100 186
132 30
115 140
25 158
11 114
60 98
195 18
50 53
183 74
90 160
72 55
135 87
53 5
12 5
21 153
51 64
119 13
145 195
31 172
110 137
134 176
58 186
179 113
148 29
116 1
153 192
117...

output:

Gyojun is handsome
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
196
2
2
3
2
2
2
2
2
2
2
2
2
2
2
2
2
3
2
2
2
2
2
2
2
2
2
2
2
3
2
2
2
2
2
3
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
3
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2...

result:

ok 501 lines

Test #25:

score: 0
Accepted
time: 1ms
memory: 3772kb

input:

200 210
186 151
13 69
186 115
192 32
93 179
67 109
36 129
162 151
142 181
99 31
60 89
179 100
44 2
27 9
91 144
46 166
48 149
125 148
75 152
43 98
124 162
98 33
142 144
138 137
3 5
197 29
18 76
21 126
50 18
94 135
91 172
98 90
70 74
126 110
190 197
14 80
23 51
173 53
87 158
95 73
123 58
55 186
88 9
1...

output:

Gyojun is handsome
86
84
85
200
199
199
199
85
83
199
199
200
86
200
83
199
199
199
84
200
83
199
83
199
86
200
199
85
85
86
84
199
200
85
200
84
199
200
199
200
86
199
200
84
86
200
199
199
199
199
83
200
199
200
85
199
199
200
85
200
199
83
85
86
86
200
199
199
84
199
87
199
83
199
200
85
83
85
19...

result:

ok 212 lines

Test #26:

score: 0
Accepted
time: 2ms
memory: 3628kb

input:

200 350
103 26
89 63
166 134
172 127
55 1
96 33
24 105
184 117
12 92
97 171
23 69
14 198
24 60
30 48
60 63
99 172
146 132
21 148
100 177
77 167
4 99
59 8
103 200
174 105
102 108
94 85
156 28
170 190
104 167
5 196
150 193
81 78
178 184
13 168
190 189
142 192
13 71
138 25
160 38
74 70
116 38
57 187
33...

output:

Gyojun is handsome
18
18
19
18
18
18
18
18
19
18
19
18
18
18
18
18
18
19
18
18
19
18
18
18
18
18
18
18
18
18
18
18
18
19
18
18
18
18
18
19
19
18
18
18
18
19
18
18
18
18
18
19
18
18
19
18
18
18
18
19
199
18
18
18
18
18
18
18
18
18
18
18
18
19
19
18
18
18
18
18
19
18
18
19
19
19
18
18
19
18
18
18
19
1...

result:

ok 352 lines

Test #27:

score: 0
Accepted
time: 2ms
memory: 3636kb

input:

200 500
29 45
62 121
67 106
69 101
17 197
129 57
113 74
27 102
141 40
96 49
172 134
40 125
50 167
58 153
144 185
54 105
165 24
117 14
88 143
99 3
45 158
124 189
69 80
148 92
63 111
16 61
127 166
170 73
38 168
174 165
80 10
122 133
133 57
29 126
140 66
177 104
128 30
188 153
68 97
110 144
197 6
46 19...

output:

Gyojun is handsome
6
6
6
6
6
6
6
6
6
199
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
7
6
6
6
6
199
7
6
6
6
6
6
6
6
6
6
6
7
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
7
6
6
6
6
6
6
6
6
6
6
7
6
6
6
6
6
199
6
6
6
7
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
6
7
6
6
6
6
6
6
6
6
6
6
6
6
7
6
6...

result:

ok 502 lines

Test #28:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

200 210
186 58
21 69
153 115
192 151
93 155
77 109
36 30
180 151
43 181
99 188
60 66
179 8
44 177
85 9
91 142
68 166
61 149
125 120
75 152
67 98
178 162
109 33
142 27
138 154
63 5
163 29
40 76
21 110
50 18
94 102
70 172
33 90
31 74
91 110
182 197
65 80
23 16
141 53
87 34
32 73
123 108
55 115
88 4
35...

output:

Gyojun is handsome
20
54
14
54
33
37
37
54
54
37
200
23
23
54
54
25
17
33
34
22
54
37
54
33
23
19
20
54
13
13
54
37
18
54
54
33
22
19
20
54
25
22
22
16
17
54
33
37
37
25
54
54
37
23
22
16
37
20
13
19
22
54
54
54
37
54
200
33
13
33
18
25
18
199
23
54
33
54
200
16
23
23
22
19
17
54
23
18
54
33
33
22
2...

result:

ok 212 lines

Test #29:

score: 0
Accepted
time: 2ms
memory: 3596kb

input:

200 350
81 26
89 71
187 134
172 127
55 1
96 33
60 105
184 117
12 11
18 171
37 69
14 119
24 60
132 48
20 63
27 172
146 132
7 148
100 177
162 167
4 99
53 8
26 200
174 105
102 29
94 85
156 28
170 190
104 23
116 196
150 193
81 176
178 184
13 168
190 86
142 166
13 103
138 182
160 147
74 146
116 38
57 93
...

output:

Gyojun is handsome
0
1
1
0
0
0
1
0
0
0
0
0
1
0
1
2
0
0
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
1
0
0
1
0
0
1
0
0
0
0
1
2
0
0
0
1
3
0
1
0
0
0
0
0
0
0
2
0
1
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
2
0
2
0
0
1
0
0
0
0
1
0
0
0
1
0
1
1
0
0
1
1
0
0
0
0
0
0
0
1
0
0
0
0
1
0
2
0
0
0
0
0
1
0
2
2
0...

result:

ok 352 lines

Test #30:

score: 0
Accepted
time: 2ms
memory: 3788kb

input:

200 500
29 45
62 121
67 106
69 5
17 197
129 42
113 74
27 102
141 40
86 49
172 134
40 123
50 167
58 153
144 185
54 105
165 24
117 41
63 143
99 3
45 158
124 192
69 80
199 92
63 111
16 61
127 166
170 73
38 168
174 165
80 132
122 133
133 57
19 126
140 114
50 104
195 30
188 52
68 97
110 144
197 128
46 19...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
1
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #31:

score: 0
Accepted
time: 2ms
memory: 3628kb

input:

200 398
42 118
161 5
19 64
103 1
5 117
76 29
34 9
137 5
54 107
81 139
65 178
57 195
19 103
86 110
16 50
154 24
84 138
21 109
78 27
189 166
195 113
28 84
180 107
185 158
185 87
138 65
129 58
197 160
175 13
194 88
140 30
51 193
110 160
23 28
47 87
93 63
174 99
194 89
147 81
61 125
90 92
12 23
185 179
...

output:

Gyojun is handsome
1
2
1
2
1
2
2
1
1
1
1
1
1
1
2
1
2
2
1
1
1
2
1
1
1
1
1
2
2
1
1
1
1
1
1
1
1
2
2
2
1
1
1
2
1
2
1
1
2
1
1
1
2
1
1
2
1
1
2
1
2
1
2
2
1
1
2
2
1
1
1
1
1
1
1
1
1
1
1
1
1
2
2
2
2
2
1
1
1
1
2
1
2
1
2
1
2
2
2
1
2
2
1
2
1
1
1
1
2
2
1
1
1
2
2
2
2
1
1
1
1
2
1
2
2
1
2
1
1
1
2
1
1
1
1
1
1
1
1
1
1...

result:

ok 400 lines

Test #32:

score: 0
Accepted
time: 2ms
memory: 3648kb

input:

200 335
169 10
59 129
176 84
196 116
147 50
4 139
188 18
55 185
79 18
119 198
104 85
27 176
186 88
144 1
122 154
155 114
170 150
162 133
145 158
179 85
125 52
69 47
60 165
153 158
23 100
122 124
156 54
60 170
136 88
58 68
1 126
157 122
108 160
181 15
197 47
91 139
32 140
193 183
32 160
60 185
43 9
7...

output:

Gyojun is handsome
2
1
2
1
1
1
1
3
2
2
3
1
2
1
1
3
1
2
1
3
2
3
1
3
2
1
1
1
1
2
1
1
2
2
3
1
1
1
1
1
2
1
2
1
1
1
1
1
2
2
1
1
1
1
1
1
1
1
1
1
1
2
1
1
1
2
1
1
1
1
1
1
1
1
1
1
2
1
2
1
2
1
2
2
3
2
1
2
3
2
1
3
3
2
1
1
3
1
1
1
1
2
1
2
1
1
2
1
1
1
1
3
1
1
3
3
2
1
1
2
1
1
1
2
1
3
2
1
1
2
1
2
3
1
3
3
3
3
2
1
2...

result:

ok 337 lines

Test #33:

score: 0
Accepted
time: 1ms
memory: 3516kb

input:

200 295
142 57
79 73
70 49
24 159
140 199
88 65
17 2
52 135
24 165
6 37
48 116
114 13
182 159
148 104
74 12
181 186
174 123
8 173
82 190
150 44
92 149
51 135
2 29
38 76
23 104
190 35
156 90
107 133
136 17
108 117
123 3
124 55
123 193
58 84
166 15
106 134
56 67
179 33
169 22
90 24
104 77
159 86
157 1...

output:

Gyojun is handsome
3
2
2
1
2
3
1
1
1
2
1
2
1
3
1
1
3
2
2
4
1
1
2
4
1
2
1
1
2
3
2
3
1
2
2
3
3
4
4
1
1
1
2
1
2
3
2
1
2
1
4
1
2
1
1
2
4
2
2
2
3
2
1
3
1
2
1
2
2
1
3
4
1
1
1
4
4
1
3
3
1
1
2
1
3
4
3
2
3
2
3
2
2
1
4
3
3
3
1
1
1
1
2
3
4
1
3
2
1
1
2
2
4
1
3
2
1
2
3
1
3
2
1
2
1
4
3
3
1
3
1
1
4
1
4
1
2
2
3
1
1...

result:

ok 297 lines

Test #34:

score: 0
Accepted
time: 0ms
memory: 3636kb

input:

200 238
182 123
30 88
58 10
150 134
95 129
73 196
140 81
23 55
17 63
128 174
187 112
159 120
102 118
163 179
82 61
69 195
170 109
120 189
108 162
29 166
140 108
19 35
36 93
58 79
132 146
172 16
99 37
87 134
121 28
149 133
84 68
48 161
83 3
144 122
188 160
52 9
121 167
6 34
137 170
198 171
12 50
41 1...

output:

Gyojun is handsome
1
2
4
0
2
0
8
0
1
2
10
0
5
10
10
4
3
0
3
3
3
0
3
2
2
3
0
3
0
7
2
5
6
10
7
0
1
0
3
0
2
1
1
2
4
1
8
1
0
5
0
5
3
8
2
5
2
1
0
4
8
2
0
10
7
0
0
4
3
0
4
0
1
4
5
4
5
10
8
0
1
1
2
3
2
4
10
10
0
4
5
0
1
4
3
4
0
2
0
0
2
2
8
10
3
0
1
2
10
2
5
3
1
2
0
5
7
1
1
2
1
4
4
3
3
0
10
5
0
0
1
10
10
2
...

result:

ok 240 lines

Test #35:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

200 209
110 80
182 12
87 122
4 127
144 156
107 82
66 198
148 35
33 91
176 196
90 6
138 58
62 39
109 188
168 135
77 32
97 105
13 194
167 86
94 175
96 117
76 180
75 61
62 122
163 123
197 47
34 116
101 140
157 20
66 200
101 65
60 171
2 56
52 145
150 56
174 125
23 61
161 104
166 183
164 127
104 59
132 1...

output:

Gyojun is handsome
17
4
7
6
29
27
29
6
2
17
4
6
7
6
29
4
11
11
6
7
6
21
6
7
21
4
29
27
17
29
27
29
11
4
3
6
6
11
17
6
11
21
6
29
6
4
29
2
4
27
2
11
17
4
27
6
29
29
8
6
2
29
4
1
21
3
27
6
27
6
27
6
4
21
29
17
29
17
21
29
27
8
3
4
29
4
21
17
6
6
7
11
6
4
3
8
2
3
6
29
4
27
6
17
27
11
6
8
2
17
27
8
17
1...

result:

ok 211 lines

Test #36:

score: 0
Accepted
time: 1ms
memory: 3816kb

input:

200 210
131 134
67 173
187 92
128 43
166 97
152 37
112 110
153 92
20 25
87 142
42 8
160 137
144 131
167 53
108 96
94 125
180 1
30 93
200 12
118 47
40 41
11 66
39 51
126 98
181 179
127 100
116 23
55 36
194 110
91 35
144 99
83 33
182 111
181 111
60 115
103 145
13 63
161 141
134 63
19 14
56 18
40 77
13...

output:

Gyojun is handsome
1
6
11
7
14
12
12
11
14
23
1
8
1
24
12
8
24
23
11
12
10
7
4
24
8
14
23
10
12
12
1
8
8
8
11
3
8
12
1
4
24
10
14
23
10
8
24
4
4
6
12
24
4
1
6
5
8
8
23
11
2
23
23
8
12
6
3
12
8
24
8
6
23
4
0
24
14
24
23
6
12
6
14
23
4
7
2
8
3
12
8
4
10
24
2
6
23
8
7
23
23
1
7
8
6
4
5
11
6
23
23
11
24...

result:

ok 212 lines

Test #37:

score: 0
Accepted
time: 0ms
memory: 3856kb

input:

200 204
86 23
170 30
67 20
186 69
88 159
61 38
151 92
24 175
13 194
18 77
195 11
43 18
173 184
64 89
187 11
108 22
65 21
114 71
76 46
2 126
107 60
39 127
80 158
12 131
200 197
32 53
4 153
24 117
173 162
59 198
187 88
75 8
119 41
103 104
52 178
164 145
106 98
200 19
66 181
29 80
199 125
46 175
172 54...

output:

Gyojun is handsome
48
52
52
48
17
17
18
26
10
48
17
48
52
52
17
26
15
26
26
48
52
26
18
15
48
17
52
26
52
52
17
48
48
26
5
18
52
48
26
18
48
26
52
48
26
26
48
48
52
5
52
3
15
5
18
48
48
48
18
15
48
26
52
52
3
10
48
18
18
48
26
48
52
15
48
26
2
48
52
52
52
52
52
2
48
18
48
15
48
17
48
17
10
48
15
18
...

result:

ok 206 lines

Test #38:

score: 0
Accepted
time: 1ms
memory: 3552kb

input:

190 194
38 109
3 38
3 138
138 109
137 8
109 147
8 76
167 76
70 167
93 70
130 93
36 130
36 99
168 99
87 168
87 147
37 77
38 61
37 30
30 102
102 50
26 50
26 187
187 11
85 11
85 141
98 141
61 98
45 46
3 52
156 46
156 114
108 114
83 108
82 83
175 82
175 106
7 106
57 7
57 52
104 122
138 1
104 59
59 125
3...

output:

Gyojun is handsome
1
1
1
1
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
11
12
11
11
11
11
11
...

result:

ok 196 lines

Test #39:

score: 0
Accepted
time: 1ms
memory: 3840kb

input:

200 204
147 70
23 70
23 173
173 147
199 192
147 9
199 31
31 179
179 191
191 137
137 101
135 101
175 135
175 77
165 77
165 9
30 198
90 70
140 30
164 140
164 172
156 172
156 79
51 79
51 55
55 73
73 136
136 90
26 125
23 33
131 26
139 131
139 143
44 143
44 10
10 42
42 89
89 187
187 96
33 96
7 142
92 173...

output:

Gyojun is handsome
1
1
1
1
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
12
11
12
11
11
11
11
11
...

result:

ok 206 lines

Test #40:

score: 0
Accepted
time: 2ms
memory: 3656kb

input:

200 500
67 140
196 67
196 36
25 36
25 44
44 184
184 148
183 148
79 183
32 79
39 32
39 172
180 172
180 192
192 60
60 15
15 112
20 112
129 20
179 129
179 29
135 29
135 164
164 166
166 176
4 176
4 131
41 131
104 41
104 5
181 5
8 181
8 78
78 3
3 90
96 90
96 64
70 64
1 70
1 191
17 191
153 17
7 153
7 68
1...

output:

Gyojun is handsome
1
1
0
0
0
0
0
0
0
0
0
0
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #41:

score: 0
Accepted
time: 0ms
memory: 3488kb

input:

2 2
2 1
2 1

output:

Gyojun is handsome
0
0
This problem is awesome!

result:

ok 4 lines

Test #42:

score: 0
Accepted
time: 0ms
memory: 3496kb

input:

2 1
2 1

output:

Gyojun is handsome
0
This problem is awesome!

result:

ok 3 lines

Test #43:

score: 0
Accepted
time: 0ms
memory: 3608kb

input:

3 2
1 3
2 1

output:

Gyojun is handsome
2
2
This problem is awesome!

result:

ok 4 lines

Test #44:

score: 0
Accepted
time: 0ms
memory: 3616kb

input:

3 2
2 3
1 2

output:

Gyojun is handsome
2
2
This problem is awesome!

result:

ok 4 lines

Test #45:

score: 0
Accepted
time: 0ms
memory: 3612kb

input:

3 2
3 2
1 3

output:

Gyojun is handsome
2
2
This problem is awesome!

result:

ok 4 lines

Test #46:

score: 0
Accepted
time: 0ms
memory: 3620kb

input:

3 3
1 2
3 1
3 2

output:

Gyojun is handsome
1
1
1
This problem is awesome!

result:

ok 5 lines

Test #47:

score: 0
Accepted
time: 1ms
memory: 3556kb

input:

2 500
1 2
2 1
2 1
1 2
2 1
1 2
1 2
2 1
2 1
2 1
1 2
1 2
2 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
2 1
1 2
2 1
2 1
1 2
2 1
1 2
1 2
2 1
2 1
2 1
1 2
1 2
1 2
1 2
2 1
2 1
2 1
1 2
1 2
2 1
1 2
2 1
2 1
2 1
2 1
1 2
1 2
1 2
1 2
2 1
1 2
1 2
1 2
1 2
1 2
2 1
1 2
1 2
2 1
2 1
2 1
2 1
2 1
1 2
1 2
1 2
1 2
2 1
2 1
2 1
1 2
1 2
1 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #48:

score: 0
Accepted
time: 1ms
memory: 3576kb

input:

3 500
1 2
2 1
1 2
1 2
2 1
1 2
2 1
1 2
2 1
2 1
2 1
1 2
2 1
1 2
2 1
2 1
2 1
1 2
1 2
2 1
2 1
1 2
2 1
2 1
1 2
1 2
2 1
1 2
1 2
2 1
1 2
2 1
1 2
1 2
2 1
2 1
1 2
2 1
1 2
1 2
2 1
1 2
2 1
2 1
1 2
1 2
1 2
2 1
2 1
2 1
2 1
2 1
1 2
2 1
1 2
2 1
1 2
2 1
2 1
1 2
2 1
1 2
1 2
2 1
1 2
1 2
2 1
2 1
2 1
1 2
1 2
1 2
1 2
1 ...

output:

Gyojun is handsome
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1...

result:

ok 502 lines

Test #49:

score: 0
Accepted
time: 1ms
memory: 3548kb

input:

3 500
1 2
1 2
2 1
2 1
2 1
2 1
1 2
1 2
2 1
2 1
1 2
2 1
1 2
1 2
1 2
2 1
2 1
2 1
2 1
2 1
1 2
2 1
1 2
1 2
1 2
1 2
1 2
2 1
2 1
1 2
2 1
1 2
1 2
1 2
1 2
2 1
2 1
2 1
2 1
2 1
1 2
1 2
2 1
1 2
1 2
2 1
2 1
1 2
2 1
2 1
1 2
1 2
1 2
1 2
2 1
1 2
2 1
1 2
1 3
1 2
1 2
1 2
1 2
2 1
1 2
1 2
1 2
1 2
2 1
1 2
1 2
2 1
2 1
1 ...

output:

Gyojun is handsome
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1...

result:

ok 502 lines

Test #50:

score: 0
Accepted
time: 1ms
memory: 3776kb

input:

3 500
1 3
1 3
1 2
2 1
1 3
2 1
3 1
2 1
2 1
3 1
1 3
1 3
1 3
3 1
3 1
3 1
3 1
2 1
3 1
2 1
3 1
1 3
2 1
1 2
2 1
2 1
1 2
2 1
3 1
2 1
3 1
1 3
1 2
1 2
1 3
3 1
1 3
2 1
1 2
3 1
1 3
1 2
3 1
3 1
2 1
2 1
3 1
2 1
1 3
2 1
3 1
1 3
1 3
2 1
1 3
1 2
1 3
2 1
3 1
2 1
1 2
1 3
3 1
2 1
2 1
1 2
1 2
3 1
3 1
3 1
3 1
1 2
1 2
2 ...

output:

Gyojun is handsome
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1...

result:

ok 502 lines

Test #51:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

3 500
2 1
1 2
2 1
1 2
1 2
1 2
2 1
1 2
2 1
1 2
1 2
2 1
1 2
2 1
2 1
2 1
1 2
1 2
1 2
1 2
2 1
2 1
1 2
1 2
2 1
2 1
2 1
1 2
2 1
2 1
1 2
1 2
2 1
2 1
1 2
1 2
2 1
2 1
2 1
2 1
2 1
1 2
2 1
2 1
2 1
2 1
1 2
1 2
2 1
1 2
1 2
2 1
1 2
1 2
2 1
2 1
2 1
1 2
1 2
2 1
2 1
1 2
1 2
1 2
1 2
2 1
1 2
1 2
1 2
2 1
2 1
1 2
2 1
2 ...

output:

Gyojun is handsome
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1...

result:

ok 502 lines

Test #52:

score: 0
Accepted
time: 1ms
memory: 3608kb

input:

3 500
2 1
1 2
2 1
1 2
1 2
1 2
1 2
1 2
1 2
2 1
1 2
1 2
2 1
1 2
1 2
1 2
2 1
2 1
1 2
2 1
1 2
1 2
2 1
1 2
2 1
2 1
1 2
1 2
1 2
1 2
1 2
1 2
2 1
1 2
1 2
2 1
2 1
2 1
1 2
2 1
2 1
2 1
2 1
1 2
2 1
1 2
1 2
2 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
1 2
2 1
2 1
1 2
1 2
2 1
1 2
1 2
2 1
2 1
1 2
1 2
2 1
2 1
1 2
1 2
2 1
2 1
2 ...

output:

Gyojun is handsome
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1...

result:

ok 502 lines

Test #53:

score: 0
Accepted
time: 1ms
memory: 3644kb

input:

3 500
1 3
1 2
3 1
1 3
1 2
1 2
3 1
3 1
1 2
1 3
1 3
2 1
2 1
1 2
3 1
1 2
2 1
2 1
1 3
2 1
3 1
1 3
1 2
2 1
1 2
1 3
1 2
1 2
2 1
2 1
1 3
1 2
2 1
2 1
1 3
2 1
2 1
3 1
3 1
1 2
1 2
3 1
3 1
2 1
1 2
1 2
1 3
1 3
3 1
3 1
2 1
2 1
3 1
2 1
1 3
1 3
1 3
1 2
2 1
1 3
3 1
1 2
3 1
2 1
1 3
2 1
1 3
1 3
2 1
3 1
1 2
1 2
1 2
1 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #54:

score: 0
Accepted
time: 1ms
memory: 3620kb

input:

3 500
1 2
2 1
1 2
2 1
2 1
2 1
2 1
1 2
1 2
1 2
2 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
1 2
1 2
1 2
2 1
2 1
2 1
2 1
2 1
1 2
2 1
2 1
2 1
1 2
2 1
2 1
2 1
1 2
1 2
2 1
2 1
2 1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
2 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
2 1
1 2
2 1
1 2
2 1
1 2
1 2
2 1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
2 1
2 1
1 2
2 1
1 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #55:

score: 0
Accepted
time: 1ms
memory: 3616kb

input:

3 500
2 1
2 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
2 1
1 2
1 2
2 1
1 2
2 1
1 2
1 2
1 2
1 2
2 1
2 1
2 1
1 2
1 2
2 1
1 2
1 2
1 2
2 1
2 1
1 2
1 2
1 2
1 2
2 1
1 2
1 2
1 2
1 2
2 1
1 2
1 2
1 2
1 2
2 1
2 1
2 1
2 1
2 1
1 2
1 2
2 1
2 1
1 2
1 2
1 2
2 1
1 2
1 2
2 1
1 2
2 1
2 1
2 1
1 2
1 2
2 1
2 1
2 1
1 2
1 2
1 2
1 2
2 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #56:

score: 0
Accepted
time: 1ms
memory: 3856kb

input:

3 500
1 3
2 1
1 2
2 1
3 1
3 1
1 2
3 1
2 1
2 1
3 1
2 1
1 3
2 1
2 1
1 3
1 3
1 3
1 2
3 1
2 1
1 3
2 1
1 2
1 2
1 2
3 1
3 1
1 3
3 1
3 1
2 1
1 2
3 1
1 3
1 3
2 1
1 2
2 1
1 2
1 3
1 2
1 3
1 2
1 3
1 2
3 1
3 1
3 1
1 2
1 2
1 3
3 1
1 3
1 3
1 2
2 1
1 2
1 3
2 1
1 2
3 1
2 1
2 1
2 1
1 3
1 3
1 2
3 1
1 2
1 2
1 2
1 2
3 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #57:

score: 0
Accepted
time: 0ms
memory: 3632kb

input:

3 500
2 1
2 1
1 2
2 1
2 1
2 1
1 2
2 1
2 1
1 2
2 1
2 1
1 2
2 1
2 1
2 1
2 1
2 1
1 2
1 2
1 2
2 1
1 2
2 1
1 2
1 2
2 1
1 2
1 2
1 2
2 1
2 1
2 1
2 1
1 2
2 1
1 2
1 2
2 1
1 2
1 2
1 2
2 1
2 1
2 1
1 2
1 2
1 2
2 3
1 2
1 2
1 2
1 2
2 1
1 2
2 1
1 2
1 2
1 2
1 2
2 1
1 2
1 2
1 2
1 2
2 1
2 1
2 1
1 2
1 2
1 2
2 1
1 2
2 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #58:

score: 0
Accepted
time: 1ms
memory: 3632kb

input:

3 500
2 1
1 2
1 2
1 2
2 1
2 1
2 1
1 2
2 1
1 2
2 1
2 1
2 1
2 1
1 2
1 2
2 1
1 2
1 2
1 2
1 2
1 2
2 1
1 2
2 1
1 2
1 2
1 2
2 1
2 1
1 2
1 2
1 2
2 1
1 2
1 2
1 2
2 1
3 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
1 2
2 1
1 2
1 2
1 2
2 1
1 2
2 1
1 2
1 2
1 2
1 2
2 1
2 1
1 2
1 2
1 2
2 1
1 2
1 2
2 1
1 2
1 2
1 2
1 2
2 1
3 2
1 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #59:

score: 0
Accepted
time: 1ms
memory: 3508kb

input:

3 500
1 2
2 1
1 2
2 1
2 1
2 1
2 1
1 2
2 1
2 1
2 1
1 2
1 2
1 2
1 2
1 2
1 2
2 1
1 2
2 1
2 1
1 2
2 1
2 1
1 2
1 2
2 1
1 2
2 1
1 2
1 2
2 1
1 2
1 2
1 2
2 1
1 2
1 2
2 1
1 2
1 2
2 1
1 2
2 1
1 2
1 2
2 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
2 1
2 1
1 2
1 2
2 1
1 2
2 1
1 2
2 1
1 2
2 1
1 2
1 2
2 1
1 2
2 1
2 1
1 2
2 1
2 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #60:

score: 0
Accepted
time: 1ms
memory: 3624kb

input:

3 500
1 3
1 2
1 3
1 3
3 1
2 1
3 1
3 1
1 3
1 3
3 1
1 2
1 2
1 2
1 2
2 1
1 2
3 1
1 2
3 1
2 1
2 1
2 1
2 1
2 1
2 1
1 2
2 1
2 1
3 1
1 3
1 3
1 2
2 1
1 2
1 2
3 1
1 2
2 1
3 1
1 3
1 3
2 1
3 1
3 1
2 1
1 2
2 1
2 1
1 3
2 1
1 2
3 1
2 1
3 1
1 2
1 2
1 2
1 2
1 2
1 2
1 2
1 3
1 2
1 2
2 1
2 1
1 3
3 1
1 3
3 1
1 2
1 2
1 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #61:

score: 0
Accepted
time: 1ms
memory: 3640kb

input:

3 500
3 1
3 1
1 2
2 1
3 1
2 1
1 2
3 1
1 2
1 2
1 2
1 2
1 2
1 3
3 1
1 2
1 2
2 1
3 1
1 3
1 3
1 2
3 1
1 3
2 1
2 1
1 2
2 1
2 1
1 2
1 2
3 1
3 1
2 1
1 2
2 1
1 3
1 3
2 1
1 3
3 1
1 3
3 1
3 1
2 1
2 1
3 1
1 2
1 3
1 3
1 3
2 1
1 3
3 1
1 3
1 3
1 3
1 2
1 3
3 1
2 1
1 2
1 2
3 1
2 1
2 1
2 1
2 1
1 2
2 1
2 3
1 2
1 2
1 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #62:

score: 0
Accepted
time: 1ms
memory: 3636kb

input:

3 500
3 1
1 2
1 2
1 3
2 1
2 1
2 1
3 1
1 3
3 1
2 1
2 1
2 1
3 1
2 1
3 1
1 2
1 2
1 2
1 3
1 3
1 3
1 3
1 2
1 2
3 1
2 1
3 1
3 1
2 1
3 1
2 1
2 1
1 2
1 2
1 3
1 3
3 1
1 3
3 1
2 1
1 3
1 3
1 2
3 1
3 1
1 2
3 1
1 2
1 3
3 1
3 1
3 1
2 1
1 3
2 1
2 1
1 3
2 1
1 2
2 1
1 3
3 1
2 1
3 1
1 3
1 3
1 3
1 3
3 1
2 1
1 3
3 1
1 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #63:

score: 0
Accepted
time: 1ms
memory: 3648kb

input:

3 500
1 2
3 1
2 3
1 3
3 1
3 1
3 1
2 3
2 1
3 1
1 3
3 1
1 3
3 2
2 3
2 3
1 3
3 2
1 3
3 1
1 3
1 3
1 2
3 1
1 2
1 2
2 1
2 1
3 1
3 1
1 3
2 3
1 3
1 2
1 3
2 3
1 2
3 2
3 2
3 2
2 3
2 1
1 2
2 1
3 1
1 3
3 2
3 1
1 2
2 1
2 3
3 1
3 2
1 2
2 1
2 1
2 1
3 1
1 3
3 1
1 3
3 1
1 3
2 3
3 2
2 1
2 3
3 2
2 1
2 3
1 2
3 2
1 3
3 ...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 502 lines

Test #64:

score: 0
Accepted
time: 0ms
memory: 3540kb

input:

5 5
1 5
5 2
2 3
2 4
2 5

output:

Gyojun is handsome
4
2
4
4
2
This problem is awesome!

result:

ok 7 lines

Test #65:

score: 0
Accepted
time: 0ms
memory: 3604kb

input:

9 13
3 5
3 7
9 8
9 1
6 4
1 4
9 8
4 9
6 5
7 8
1 8
1 6
1 2

output:

Gyojun is handsome
4
4
1
1
1
1
1
1
4
4
1
1
8
This problem is awesome!

result:

ok 15 lines

Test #66:

score: 0
Accepted
time: 0ms
memory: 3496kb

input:

23 50
23 10
8 10
23 22
6 12
20 3
1 3
1 14
18 4
1 13
16 23
22 3
9 23
22 14
10 19
17 11
18 15
16 2
20 8
17 21
9 14
6 12
15 1
11 6
6 16
5 6
7 9
21 17
5 19
20 1
16 19
18 3
21 5
17 1
10 11
17 1
3 1
13 12
11 12
17 2
12 9
18 21
8 15
21 16
21 7
3 7
22 12
12 20
7 14
9 17
5 17

output:

Gyojun is handsome
1
1
1
1
1
1
1
22
2
1
1
1
1
1
1
1
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
2
1
2
1
1
1
1
1
1
1
1
1
1
1
This problem is awesome!

result:

ok 52 lines

Subtask #2:

score: 11
Accepted

Dependency #1:

100%
Accepted

Test #67:

score: 11
Accepted
time: 10ms
memory: 3656kb

input:

1000 1000
195 461
791 137
418 324
583 412
286 368
637 417
469 160
733 161
671 146
903 338
587 247
823 380
473 888
793 939
511 121
515 839
85 934
124 189
921 686
79 617
616 823
191 305
789 305
321 421
6 148
84 672
278 824
162 843
716 469
13 539
524 830
738 978
535 648
408 178
325 246
446 869
295 63
6...

output:

Gyojun is handsome
1000
999
1000
1000
999
999
1000
999
1000
999
1000
1000
1000
999
1000
1000
999
999
1000
999
1000
999
1000
1000
1000
999
999
1000
1000
999
1000
999
999
1000
1000
1000
999
1000
999
1000
1000
1000
999
999
1000
999
999
999
1000
1000
1000
999
999
999
1000
999
999
999
1000
1000
999
999
9...

result:

ok 1002 lines

Test #68:

score: 0
Accepted
time: 21ms
memory: 3756kb

input:

1000 1000
195 248
991 137
418 188
583 473
286 833
637 658
924 160
209 161
829 146
5 338
587 99
823 872
473 474
793 747
841 121
515 890
131 934
124 378
300 686
79 105
616 648
191 71
786 305
294 421
6 771
84 107
278 273
344 843
713 469
31 539
524 618
738 361
535 601
740 178
325 63
446 617
295 896
85 9...

output:

Gyojun is handsome
996
996
996
996
1000
996
996
1000
1000
996
996
996
996
1000
996
996
1000
996
996
996
996
996
996
1000
996
1000
996
1000
996
996
996
996
996
996
996
996
1000
996
996
1000
996
1000
1000
996
1000
1000
999
996
996
996
1000
1000
996
1000
996
996
1000
1000
996
996
1000
1000
996
996
996
...

result:

ok 1002 lines

Test #69:

score: 0
Accepted
time: 17ms
memory: 3784kb

input:

1000 1000
169 14
593 919
538 54
852 580
753 541
32 8
73 562
336 962
233 952
150 460
332 235
298 840
662 549
561 141
412 701
813 898
8 380
219 553
356 141
87 670
268 487
676 159
808 366
278 289
856 357
283 345
90 269
64 163
660 235
325 877
663 465
752 69
77 17
431 969
55 477
24 226
745 416
978 604
54...

output:

Gyojun is handsome
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
998
9...

result:

ok 1002 lines

Test #70:

score: 0
Accepted
time: 10ms
memory: 3628kb

input:

1000 1000
634 383
228 943
741 131
797 475
153 27
178 16
682 342
644 810
578 983
31 219
704 907
936 499
730 221
803 489
946 758
489 902
794 600
6 73
849 132
730 219
433 964
860 301
357 167
445 945
36 241
214 558
162 866
663 58
812 926
926 273
671 839
245 354
713 150
993 242
670 452
487 855
834 895
19...

output:

Gyojun is handsome
999
1000
999
1000
1000
1000
1000
999
1000
1000
1000
1000
1000
1000
999
999
1000
999
1000
1000
999
1000
1000
999
999
999
1000
1000
999
1000
999
1000
1000
1000
999
999
999
999
999
1000
999
1000
1000
999
1000
999
1000
1000
1000
999
999
999
1000
1000
999
1000
1000
999
999
999
1000
999...

result:

ok 1002 lines

Test #71:

score: 0
Accepted
time: 10ms
memory: 3696kb

input:

1000 1000
200 658
227 451
114 495
529 908
707 474
290 412
532 514
355 333
244 520
805 963
335 765
731 601
133 768
244 550
848 746
74 827
337 885
183 647
487 298
135 529
459 697
10 677
744 172
842 801
140 505
997 445
536 408
174 735
193 382
636 784
426 899
408 887
503 919
485 354
9 140
748 598
262 96...

output:

Gyojun is handsome
1000
999
999
1000
999
999
999
999
1000
999
1000
999
1000
999
1000
1000
999
1000
1000
1000
999
999
1000
1000
999
999
1000
999
999
1000
1000
1000
1000
1000
999
1000
1000
1000
1000
999
999
999
1000
1000
1000
999
1000
999
1000
999
999
999
999
1000
999
1000
1000
999
999
1000
1000
999
1...

result:

ok 1002 lines

Test #72:

score: 0
Accepted
time: 10ms
memory: 3936kb

input:

1000 1000
140 467
113 642
666 660
430 113
19 307
336 763
157 761
688 416
41 998
501 760
825 28
423 162
245 359
759 414
379 209
829 160
936 824
837 447
175 691
62 88
858 701
549 653
565 79
132 444
790 456
371 134
705 923
268 413
458 121
739 542
491 573
339 604
452 594
963 39
381 74
918 779
361 740
54...

output:

Gyojun is handsome
1000
1000
999
999
999
999
999
508
999
999
999
1000
1000
999
999
1000
999
999
999
1000
999
1000
999
1000
999
1000
1000
999
1000
1000
1000
1000
999
1000
999
999
1000
999
1000
999
1000
1000
999
1000
999
1000
1000
1000
999
999
1000
1000
1000
999
999
999
1000
1000
1000
1000
999
999
100...

result:

ok 1002 lines

Test #73:

score: 0
Accepted
time: 10ms
memory: 3748kb

input:

1000 1000
779 162
898 752
745 391
914 183
415 193
345 4
998 559
246 454
412 740
842 411
88 214
306 251
276 649
926 305
672 292
988 787
82 235
873 41
929 50
520 209
581 409
464 551
401 8
318 131
222 976
849 618
217 850
343 88
148 825
674 466
382 809
714 520
678 250
276 898
974 228
826 555
779 503
571...

output:

Gyojun is handsome
1000
1000
1000
999
999
999
1000
999
1000
1000
999
999
1000
999
1000
1000
999
495
999
999
999
999
1000
999
999
999
999
1000
1000
999
999
495
999
1000
999
1000
1000
999
1000
1000
1000
1000
1000
999
999
1000
999
999
999
1000
999
1000
999
494
999
999
999
1000
999
999
1000
999
1000
999...

result:

ok 1002 lines

Test #74:

score: 0
Accepted
time: 11ms
memory: 3596kb

input:

1000 1000
442 639
4 451
430 827
938 433
560 452
45 160
174 804
188 108
827 134
961 401
471 374
621 472
876 655
344 977
654 870
175 321
757 551
116 695
221 441
313 562
109 317
767 762
406 679
46 792
927 250
520 163
195 732
196 506
727 799
895 816
712 66
191 509
310 818
892 225
133 746
624 262
811 799...

output:

Gyojun is handsome
1000
999
1000
1000
999
999
1000
1000
1000
999
999
1000
999
999
1000
999
999
1000
501
999
999
1000
1000
1000
999
1000
999
999
999
1000
999
1000
500
1000
500
999
501
999
999
999
1000
1000
999
999
999
999
1000
1000
999
999
999
999
1000
999
999
1000
1000
999
1000
1000
1000
1000
1000
1...

result:

ok 1002 lines

Test #75:

score: 0
Accepted
time: 9ms
memory: 3728kb

input:

1000 1000
760 642
999 643
267 954
549 86
957 234
215 534
541 232
135 22
289 152
737 27
374 707
958 771
332 263
690 43
355 649
205 712
643 532
113 238
696 218
570 507
581 933
63 272
631 959
980 219
313 839
389 106
544 397
879 742
805 760
100 224
863 598
942 960
438 560
888 461
500 734
994 918
377 463...

output:

Gyojun is handsome
544
543
543
999
1000
545
1000
999
999
1000
999
1000
545
1000
1000
544
544
1000
999
545
999
999
1000
1000
545
999
1000
544
1000
1000
545
999
544
544
544
999
1000
999
999
544
999
545
999
1000
544
545
999
999
999
999
1000
1000
999
999
1000
1000
999
1000
545
999
543
999
545
999
1000
5...

result:

ok 1002 lines

Test #76:

score: 0
Accepted
time: 15ms
memory: 3664kb

input:

1000 1000
309 690
45 800
698 949
691 925
234 779
571 617
880 228
609 490
294 225
226 658
845 97
509 551
261 73
847 912
178 494
824 714
778 315
376 501
407 595
859 18
528 407
161 680
46 400
400 730
837 681
781 628
485 579
177 873
742 530
941 16
332 807
960 202
91 276
125 379
663 282
814 95
900 2
332 ...

output:

Gyojun is handsome
636
999
635
635
634
635
1000
999
1000
635
636
636
999
634
1000
999
999
999
634
636
635
999
999
635
999
999
634
635
999
635
635
636
999
635
634
1000
1000
636
636
999
999
636
999
999
999
999
999
634
634
999
999
999
634
636
634
636
1000
999
635
1000
999
635
999
999
634
999
999
999
99...

result:

ok 1002 lines

Test #77:

score: 0
Accepted
time: 19ms
memory: 3712kb

input:

1000 1000
49 123
617 410
546 474
566 308
715 716
249 931
619 94
942 102
730 952
879 750
532 441
790 86
727 164
974 761
438 96
635 606
229 646
325 298
963 394
974 465
973 17
964 160
815 701
81 874
563 648
324 919
530 272
296 174
865 564
985 347
362 580
744 620
819 65
703 595
846 293
71 246
428 600
39...

output:

Gyojun is handsome
860
860
860
860
860
860
861
860
999
860
860
999
860
860
860
861
860
861
860
860
861
860
999
861
860
861
861
861
861
860
860
860
860
861
861
999
860
860
861
860
860
860
860
860
860
860
860
999
860
861
861
861
860
860
860
861
860
999
860
861
861
860
860
860
860
861
860
860
860
861
8...

result:

ok 1002 lines

Test #78:

score: 0
Accepted
time: 20ms
memory: 3744kb

input:

1000 1000
21 639
807 275
930 856
497 16
477 189
245 363
983 368
931 366
439 724
729 515
662 255
593 971
71 533
549 522
645 592
939 131
516 659
148 757
98 975
788 765
34 621
512 746
611 266
438 627
188 523
526 978
622 632
4 497
9 667
344 575
884 738
36 303
793 461
499 286
387 172
207 649
775 165
243 ...

output:

Gyojun is handsome
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
961
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
999
960
960
960
960
961
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
960
999
960
960
960
960
960
960
960
960
960
9...

result:

ok 1002 lines

Test #79:

score: 0
Accepted
time: 10ms
memory: 3620kb

input:

1000 999
246 855
292 373
384 653
862 411
641 49
10 158
46 829
882 919
257 2
464 322
544 734
801 868
596 579
599 379
191 699
617 149
235 72
636 817
4 887
621 969
203 30
292 361
292 666
204 875
361 133
321 104
634 503
451 890
160 964
571 212
239 132
546 904
320 627
397 84
16 336
108 762
164 297
840 57...

output:

Gyojun is handsome
1000
1000
1000
1000
999
999
999
1000
1000
999
1000
999
1000
999
1000
1000
1000
1000
999
999
999
1000
1000
1000
999
999
1000
999
999
1000
999
1000
1000
1000
1000
1000
999
1000
999
1000
999
999
999
1000
1000
999
999
999
1000
1000
999
999
999
1000
999
999
999
1000
1000
1000
1000
999
...

result:

ok 1001 lines

Test #80:

score: 0
Accepted
time: 18ms
memory: 3748kb

input:

1000 999
246 137
604 373
27 653
709 411
853 49
605 158
46 309
366 919
257 76
464 938
544 50
672 868
596 708
599 567
191 166
617 53
235 364
574 817
95 887
621 586
203 385
373 361
292 136
204 510
684 133
126 104
634 491
195 890
160 628
258 212
239 597
534 904
897 627
397 864
965 336
108 243
164 114
84...

output:

Gyojun is handsome
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1000
1...

result:

ok 1001 lines

Test #81:

score: 0
Accepted
time: 19ms
memory: 3736kb

input:

1000 1746
307 633
374 991
609 193
438 442
520 678
699 556
718 245
341 243
812 778
463 332
467 177
535 472
68 988
677 617
981 797
899 419
339 780
407 360
824 435
183 232
359 744
542 742
442 468
981 797
752 706
606 602
163 588
418 715
382 385
575 20
678 520
639 196
40 740
695 63
191 635
992 402
434 16...

output:

Gyojun is handsome
505
999
505
505
505
505
999
505
505
505
505
505
505
505
505
1000
505
505
505
505
505
505
505
505
505
505
505
999
505
505
505
505
999
505
505
1000
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
505
999
505
505
505
505
505
505...

result:

ok 1748 lines

Test #82:

score: 0
Accepted
time: 15ms
memory: 3612kb

input:

1000 1656
494 11
786 165
617 106
498 78
614 116
310 100
791 1000
359 112
963 14
26 976
541 484
845 846
743 147
174 185
484 840
257 259
536 644
441 599
418 985
719 858
174 734
894 111
6 904
118 713
140 447
142 47
224 576
151 516
362 321
892 401
991 307
58 851
543 274
591 799
168 1000
539 318
263 43
8...

output:

Gyojun is handsome
507
1000
508
507
507
507
507
507
507
507
507
507
507
507
507
507
507
507
507
507
508
507
508
999
508
508
507
507
507
1000
507
508
507
508
507
507
507
1000
507
507
1000
507
507
507
507
1000
507
507
507
507
507
507
999
507
507
507
508
507
507
507
507
507
1000
507
507
507
507
508
507...

result:

ok 1658 lines

Test #83:

score: 0
Accepted
time: 18ms
memory: 3732kb

input:

1000 1509
744 536
197 625
709 742
515 45
561 823
298 72
735 575
629 602
496 144
432 910
830 225
182 57
475 754
457 998
50 538
686 72
462 688
542 974
544 565
233 566
931 945
409 652
81 727
762 970
361 578
429 756
489 643
201 513
798 699
964 460
423 832
509 494
663 350
821 164
725 887
10 383
949 44
10...

output:

Gyojun is handsome
428
429
428
429
428
429
428
429
428
429
428
428
429
430
430
429
429
428
430
428
429
428
428
428
429
428
428
428
428
428
429
428
428
429
428
429
428
430
429
429
430
428
428
429
428
429
428
428
429
428
428
429
428
429
429
428
429
430
429
428
428
428
428
428
428
1000
429
429
429
429
...

result:

ok 1511 lines

Test #84:

score: 0
Accepted
time: 15ms
memory: 3948kb

input:

1000 1142
631 308
569 591
301 472
648 973
265 29
112 885
196 643
910 223
614 91
283 205
639 545
541 730
791 290
170 702
994 142
129 876
64 519
932 138
276 344
416 601
840 237
411 576
480 656
454 357
55 440
308 684
714 305
980 54
159 795
191 860
816 638
68 586
895 796
608 964
276 841
649 351
346 457
...

output:

Gyojun is handsome
156
154
155
156
155
158
156
158
158
157
151
158
153
156
155
156
155
156
155
151
159
154
155
158
157
156
155
152
158
156
156
158
158
159
155
157
158
156
156
157
156
154
159
158
156
151
158
154
157
157
158
155
155
155
159
151
157
157
151
155
158
151
156
155
155
157
155
156
156
157
1...

result:

ok 1144 lines

Test #85:

score: 0
Accepted
time: 18ms
memory: 3732kb

input:

1000 1045
600 376
89 766
718 616
150 98
301 802
652 942
899 81
879 555
368 629
809 805
90 262
537 817
59 445
280 202
197 499
361 327
71 864
214 358
638 763
308 819
697 250
720 679
150 841
169 115
623 303
539 599
234 818
743 512
371 275
86 311
730 970
764 687
418 397
31 852
608 256
338 261
143 912
12...

output:

Gyojun is handsome
73
70
71
70
71
71
71
73
71
73
74
73
71
75
71
72
73
72
73
69
48
75
70
72
71
74
75
71
68
75
74
75
74
73
72
72
72
70
71
48
76
68
74
70
72
72
69
72
75
71
72
73
74
70
71
74
73
73
75
71
72
73
72
75
48
71
76
75
73
72
74
71
71
48
48
75
71
75
71
73
70
73
73
73
70
73
75
69
71
71
75
73
71
75...

result:

ok 1047 lines

Test #86:

score: 0
Accepted
time: 20ms
memory: 3956kb

input:

1000 1016
25 315
710 900
948 462
217 574
815 966
859 781
536 554
656 657
516 351
843 276
403 181
845 124
285 771
996 686
894 838
788 108
428 336
303 69
717 691
770 753
241 674
875 277
610 262
497 737
361 305
499 879
538 939
616 20
579 306
39 608
544 201
837 59
509 851
864 890
167 412
508 203
985 816...

output:

Gyojun is handsome
42
110
108
113
112
112
113
113
114
108
108
113
112
111
112
112
113
110
108
114
110
110
110
114
108
108
42
108
108
112
107
110
107
107
110
113
113
18
110
110
114
113
108
110
108
110
114
108
112
112
110
113
113
113
113
111
112
114
110
112
113
113
112
113
112
107
18
107
108
18
110
10...

result:

ok 1018 lines

Test #87:

score: 0
Accepted
time: 20ms
memory: 3924kb

input:

1000 1010
249 101
680 24
712 794
818 243
852 135
759 271
578 52
179 670
934 102
29 680
327 719
50 849
76 10
913 359
866 597
171 305
192 773
265 996
212 420
361 136
357 750
277 89
124 262
631 420
71 79
373 158
909 965
844 508
13 883
981 30
12 59
260 89
448 654
37 51
857 804
580 887
730 43
558 727
749...

output:

Gyojun is handsome
336
355
355
355
355
336
355
355
98
355
336
355
10
355
355
355
127
336
98
336
336
127
355
98
98
127
355
14
127
355
336
127
336
336
336
355
336
355
355
336
355
355
98
355
336
19
355
336
336
19
336
86
127
336
86
355
12
336
127
98
11
355
336
336
86
336
355
355
355
336
355
355
355
355
...

result:

ok 1012 lines

Test #88:

score: 0
Accepted
time: 17ms
memory: 3756kb

input:

1000 1003
189 382
190 634
201 211
652 446
745 441
54 296
808 742
541 78
175 329
732 205
203 185
625 787
22 288
167 210
339 765
224 115
164 986
472 956
132 42
168 444
124 465
864 326
661 925
835 770
625 753
143 11
599 570
56 426
955 379
173 525
459 679
615 995
445 923
80 712
561 102
89 546
577 950
80...

output:

Gyojun is handsome
483
501
483
483
501
501
483
501
501
483
483
501
483
501
501
502
483
483
501
501
483
501
483
501
501
501
483
501
483
501
483
483
483
501
483
501
483
501
483
483
483
483
483
12
501
483
501
501
483
483
501
501
483
501
483
501
483
501
501
483
501
483
483
483
501
501
501
501
501
501
48...

result:

ok 1005 lines

Test #89:

score: 0
Accepted
time: 20ms
memory: 3908kb

input:

1000 1003
251 638
210 612
415 272
257 846
433 709
926 587
362 173
320 874
277 479
716 45
403 543
140 753
127 383
508 645
478 128
811 636
351 509
284 128
646 799
904 893
159 898
181 685
189 511
110 259
600 986
516 631
423 969
36 484
178 727
770 843
813 387
120 212
113 954
852 9
464 463
690 291
838 53...

output:

Gyojun is handsome
849
849
849
97
97
849
849
97
849
849
849
97
849
849
849
54
97
849
849
849
849
54
849
849
849
849
849
849
849
849
849
849
98
97
97
849
849
849
849
54
849
849
849
849
849
849
849
849
849
849
849
849
849
849
849
849
849
97
849
849
849
849
849
849
849
849
849
849
849
849
849
849
849
5...

result:

ok 1005 lines

Test #90:

score: 0
Accepted
time: 20ms
memory: 3764kb

input:

1000 1007
661 487
193 809
128 148
331 484
140 90
319 167
442 112
167 529
280 858
146 835
537 832
278 542
42 16
213 435
279 40
187 778
857 474
923 702
972 333
760 906
494 547
822 557
770 830
605 540
288 18
681 774
869 146
872 496
474 671
66 413
913 120
173 657
934 309
615 603
412 700
803 224
561 585
...

output:

Gyojun is handsome
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
16
961
961
961
961
961
961
961
961
961
962
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
961
17
961
961
961...

result:

ok 1009 lines

Test #91:

score: 0
Accepted
time: 11ms
memory: 3716kb

input:

986 988
168 58
107 806
5 914
195 65
99 837
441 580
466 652
982 412
396 753
962 231
601 354
677 36
37 728
12 160
747 763
106 89
640 326
209 788
181 406
74 347
703 684
46 982
661 310
209 277
872 619
497 118
968 941
92 737
599 481
792 154
882 178
372 302
253 938
468 771
836 111
26 470
438 65
285 769
37...

output:

Gyojun is handsome
986
985
986
986
586
985
986
985
986
986
586
986
985
581
985
986
986
986
986
986
985
986
985
986
986
986
985
986
985
985
581
986
985
985
985
986
985
985
986
986
986
985
985
986
986
986
986
985
986
582
582
986
986
986
985
580
985
579
986
986
583
986
986
985
986
985
583
985
985
986
9...

result:

ok 990 lines

Test #92:

score: 0
Accepted
time: 11ms
memory: 3852kb

input:

984 1004
201 242
146 153
58 602
480 679
335 735
528 60
927 144
18 759
82 282
384 518
497 894
98 491
582 262
248 252
312 649
362 899
431 217
597 636
795 639
720 837
500 29
257 761
680 855
955 374
100 623
819 518
778 33
266 391
913 723
679 575
151 971
102 361
287 840
701 918
956 626
189 290
700 473
68...

output:

Gyojun is handsome
984
984
529
984
984
983
531
984
529
984
983
984
984
984
527
984
984
530
529
983
984
983
983
984
984
984
983
984
530
984
528
983
983
533
984
983
534
983
983
528
983
984
984
984
531
984
984
529
983
983
983
984
984
983
530
983
984
984
983
983
984
984
984
983
984
983
983
983
984
984
9...

result:

ok 1006 lines

Test #93:

score: 0
Accepted
time: 11ms
memory: 3696kb

input:

989 995
724 470
670 337
896 362
184 156
320 208
68 494
517 501
252 345
60 521
760 244
834 208
323 886
45 577
509 668
317 745
63 704
734 616
575 204
393 238
780 544
304 23
275 726
152 469
653 560
431 803
551 786
281 385
656 899
451 846
610 572
917 44
823 557
871 755
65 406
401 184
977 830
864 631
441...

output:

Gyojun is handsome
988
988
563
989
559
988
988
988
562
989
559
989
559
988
989
989
989
988
988
988
989
989
989
989
988
988
989
989
988
989
989
988
989
988
988
989
988
989
989
989
988
989
989
989
988
989
989
989
988
989
989
988
989
989
989
989
988
989
988
988
988
988
988
989
989
559
988
988
989
989
9...

result:

ok 997 lines

Test #94:

score: 0
Accepted
time: 14ms
memory: 3736kb

input:

991 1067
480 896
220 137
521 275
676 605
556 668
743 403
459 205
214 127
569 5
864 585
80 712
166 615
649 549
347 23
30 989
787 903
540 639
923 139
96 382
709 398
725 49
274 801
866 748
811 615
406 805
502 784
969 294
319 868
371 91
708 198
376 858
639 940
733 909
593 194
752 468
86 660
774 573
469 ...

output:

Gyojun is handsome
991
440
440
991
991
439
439
991
440
990
991
990
440
990
990
441
990
443
990
990
990
443
991
439
440
990
990
442
443
991
990
991
440
439
991
990
444
990
445
440
440
441
991
990
990
439
440
440
990
991
439
991
440
443
441
439
990
990
439
990
439
442
991
440
441
990
990
990
990
990
9...

result:

ok 1069 lines

Test #95:

score: 0
Accepted
time: 43ms
memory: 3724kb

input:

971 1979
601 141
391 896
464 76
510 235
377 42
606 189
366 936
670 99
389 357
676 521
420 616
868 200
828 330
293 298
331 60
802 610
683 796
143 665
668 844
529 40
272 437
837 253
941 739
31 82
419 416
569 395
14 34
649 233
188 688
208 422
533 27
303 157
414 896
363 81
215 721
868 681
494 799
950 58...

output:

Gyojun is handsome
63
63
63
63
64
64
64
63
63
63
64
63
63
63
63
63
63
63
63
64
64
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
63
64
63
63
64
63
63
63
63
63
63
63
63
63
63
63
63
64
63
63
63
63
63
63
63
63
63
63
63
63
64
63
63
63
63
63
63
64
63
63
63
63
64
63
63
63
97...

result:

ok 1981 lines

Test #96:

score: 0
Accepted
time: 61ms
memory: 3832kb

input:

999 2481
210 237
542 759
793 877
885 263
985 366
683 391
668 321
135 44
362 235
867 747
721 220
581 594
60 680
252 954
404 322
638 296
512 237
935 198
399 104
755 391
92 475
858 703
807 730
886 801
583 134
324 995
507 568
946 656
705 270
437 264
890 290
852 369
487 115
250 966
57 955
559 628
427 559...

output:

Gyojun is handsome
26
26
26
26
26
26
26
26
26
26
26
26
26
26
26
26
26
998
26
26
26
26
26
27
26
26
26
26
26
26
26
26
26
26
26
26
26
26
26
26
27
26
26
26
27
26
26
27
27
26
26
26
27
26
26
26
26
26
26
26
26
26
26
26
26
26
26
26
26
27
26
26
26
27
26
26
26
26
26
998
26
26
26
26
26
26
26
26
26
27
27
26
26
...

result:

ok 2483 lines

Test #97:

score: 0
Accepted
time: 7ms
memory: 3716kb

input:

1000 1010
736 86
624 895
883 142
101 163
906 299
226 631
164 802
586 126
784 775
139 794
493 93
971 471
525 570
111 592
498 938
918 245
667 408
891 257
19 788
389 559
998 48
626 613
869 267
989 191
368 870
535 407
156 61
385 63
674 65
151 645
657 295
28 49
248 234
363 140
997 251
718 31
25 672
365 7...

output:

Gyojun is handsome
999
999
1000
1000
999
999
999
999
1000
999
1000
999
1000
1000
999
999
1000
1000
1000
1000
999
999
999
482
999
1000
483
1000
1000
999
999
999
999
999
484
999
999
1000
999
999
1000
484
1000
1000
999
483
484
999
1000
999
484
999
1000
1000
999
484
485
999
999
1000
999
1000
1000
1000
1...

result:

ok 1012 lines

Test #98:

score: 0
Accepted
time: 25ms
memory: 3920kb

input:

1000 1500
915 527
653 759
770 274
303 536
857 46
328 850
493 224
738 355
487 515
677 403
877 637
968 988
626 211
136 916
118 512
269 459
280 285
992 932
788 250
586 969
946 288
591 545
241 633
606 215
113 419
52 231
124 853
448 274
912 920
234 425
124 744
821 977
671 309
440 228
421 384
223 726
607 ...

output:

Gyojun is handsome
170
170
171
170
170
171
170
171
170
170
172
170
170
999
999
170
171
170
170
171
999
170
170
170
172
999
171
170
170
1000
170
170
170
170
170
999
170
171
170
170
170
170
999
171
170
170
170
170
171
170
170
170
171
170
171
170
172
171
170
170
170
172
170
171
170
170
999
170
171
999
...

result:

ok 1502 lines

Test #99:

score: 0
Accepted
time: 60ms
memory: 3772kb

input:

1000 2500
748 410
461 262
184 178
491 334
354 967
84 588
687 952
727 127
339 744
257 783
389 42
740 362
713 721
137 141
103 875
221 792
259 606
938 983
152 889
831 168
823 390
587 131
549 97
357 896
343 654
51 470
645 203
692 572
310 381
834 70
158 103
180 673
546 895
85 373
913 232
723 96
46 545
13...

output:

Gyojun is handsome
25
25
25
25
25
25
25
25
25
999
26
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
25
26
25
25
25
25
26
25
25
25
25
25
26
25
25
25
25
25
25
25
25
25
25
25
25
25
25
26
25
25
25
25
25
25
25
25
25
25
25
25
26
25
25
25
25
25
25
25
25
25
25
25
25
25
2...

result:

ok 2502 lines

Test #100:

score: 0
Accepted
time: 20ms
memory: 3752kb

input:

1000 1010
976 86
624 957
883 813
101 46
247 299
932 631
560 802
586 290
784 816
255 794
493 686
971 986
240 570
111 273
503 938
982 245
667 358
891 7
19 862
282 559
740 48
626 235
869 855
989 67
56 870
535 899
107 61
287 63
674 937
151 464
657 807
28 815
248 155
363 463
652 251
269 31
25 782
365 162...

output:

Gyojun is handsome
309
309
207
207
111
84
111
128
207
84
101
309
207
45
111
309
207
65
207
88
309
309
309
1000
84
53
1000
207
48
84
309
309
84
84
1000
128
309
55
111
309
207
101
207
101
111
84
49
309
99
84
88
309
51
88
309
54
59
309
84
99
309
1000
207
99
207
207
207
101
309
309
1000
207
101
111
101
...

result:

ok 1012 lines

Test #101:

score: 0
Accepted
time: 41ms
memory: 3808kb

input:

1000 1800
556 253
902 370
603 750
793 248
730 266
19 961
61 582
63 509
147 181
75 671
491 440
86 822
931 493
746 62
285 75
708 357
197 213
928 15
186 436
957 863
841 54
399 193
190 602
7 939
934 367
122 77
610 828
1000 369
226 372
473 93
194 345
219 423
535 545
45 819
537 14
598 897
94 418
763 963
6...

output:

Gyojun is handsome
2
2
2
2
3
3
2
2
2
2
2
2
2
2
2
2
3
3
3
2
2
2
3
2
2
2
2
2
2
2
3
2
2
2
2
2
2
2
4
3
3
2
3
2
3
3
3
2
2
2
2
2
2
5
3
2
2
2
2
2
2
2
3
3
2
2
4
2
2
2
2
2
2
2
2
2
2
2
2
2
3
2
2
2
2
3
2
2
2
3
2
2
2
2
2
2
2
2
4
2
2
2
4
2
2
2
2
3
3
4
3
2
3
2
2
2
2
2
2
2
2
2
2
3
2
2
2
2
2
2
2
2
2
2
2
2
2
2
6
2
2...

result:

ok 1802 lines

Test #102:

score: 0
Accepted
time: 59ms
memory: 3860kb

input:

1000 2500
748 410
461 262
184 178
491 334
354 967
84 588
687 952
587 127
339 744
257 644
389 42
740 362
830 721
137 141
399 875
221 100
42 606
753 983
152 889
729 168
823 390
587 131
549 97
357 896
343 654
51 470
645 203
692 281
310 381
834 70
158 103
180 673
546 895
85 373
913 254
319 96
46 545
137...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 2502 lines

Test #103:

score: 0
Accepted
time: 42ms
memory: 3724kb

input:

1000 1998
578 931
534 428
568 841
196 701
372 481
131 804
939 791
559 545
481 14
743 755
783 523
831 777
56 225
474 23
174 651
856 621
121 780
204 58
265 709
875 724
799 58
666 337
270 320
1000 705
668 975
869 702
715 804
510 923
976 415
177 117
446 846
187 496
71 169
166 999
574 128
117 726
686 540...

output:

Gyojun is handsome
0
1
0
1
1
0
0
0
1
0
0
0
0
1
0
0
0
0
0
1
0
0
0
0
1
0
1
0
0
0
1
1
1
1
1
0
1
0
1
0
0
1
0
0
1
1
0
0
1
0
1
0
0
1
0
1
0
0
0
0
1
0
0
0
1
1
1
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
0
0
1
1
0
0
0
1
0
0
0
0
0
0
1
0
0
0
0
0
1
0
1
1
1
1
0
1
0
1
0
1
1
0
0
0
0
0
1
0...

result:

ok 2000 lines

Test #104:

score: 0
Accepted
time: 29ms
memory: 3708kb

input:

1000 1656
870 337
260 89
313 898
400 355
13 64
595 525
223 814
769 905
637 958
413 547
888 7
493 781
211 276
963 50
99 530
889 548
722 204
345 223
218 440
999 994
130 883
249 144
568 936
89 298
751 882
72 474
812 380
750 946
309 282
349 692
61 909
953 500
485 983
187 620
871 791
426 191
592 410
947 ...

output:

Gyojun is handsome
2
1
1
2
1
2
1
3
1
2
2
1
3
2
2
1
2
2
1
2
1
2
2
1
2
3
1
1
1
1
1
1
1
2
1
2
2
2
1
1
1
2
1
2
2
1
1
1
1
2
1
1
1
3
1
1
1
1
1
1
1
2
2
2
1
2
2
1
1
1
1
3
3
1
1
2
1
1
1
2
3
2
1
3
2
2
3
1
3
2
1
2
1
1
1
1
1
2
2
1
2
1
1
1
1
1
2
1
2
1
2
1
1
2
2
1
2
1
1
1
1
2
1
1
1
1
2
1
1
3
1
1
3
1
1
1
1
3
1
2
1...

result:

ok 1658 lines

Test #105:

score: 0
Accepted
time: 29ms
memory: 3764kb

input:

1000 1495
203 88
703 529
691 535
994 86
649 524
756 259
156 703
268 997
903 151
38 230
490 213
191 827
394 840
276 52
163 359
473 700
396 155
944 206
105 219
975 433
224 93
342 899
270 170
166 791
838 601
882 867
695 274
152 435
747 590
462 520
658 928
1 644
951 579
202 312
270 573
78 178
388 860
27...

output:

Gyojun is handsome
1
1
0
1
0
0
1
2
0
1
0
1
3
0
3
1
0
0
1
1
1
0
0
0
2
0
0
1
2
0
0
0
0
0
0
0
3
0
3
0
0
1
0
0
0
0
2
3
2
2
1
0
3
0
2
0
2
3
3
0
0
2
0
0
3
3
2
3
3
1
2
3
1
1
1
1
0
1
3
3
1
3
2
0
1
2
1
0
1
2
0
1
1
1
0
0
1
1
0
2
0
1
2
0
3
0
2
1
0
2
0
0
1
2
1
3
1
1
0
3
2
0
0
3
1
0
0
0
0
2
2
0
0
3
0
0
3
2
2
3
0...

result:

ok 1497 lines

Test #106:

score: 0
Accepted
time: 18ms
memory: 3988kb

input:

1000 1176
588 711
146 702
413 950
131 897
916 282
5 810
964 807
221 516
13 85
150 445
455 612
939 778
719 59
422 845
96 665
77 430
278 23
726 829
195 19
227 762
109 651
235 860
334 565
801 574
895 467
173 373
150 682
399 62
212 292
791 939
261 582
681 918
25 915
874 934
632 445
48 178
766 206
461 77...

output:

Gyojun is handsome
2
1
7
0
1
0
2
2
2
8
1
6
5
5
5
5
5
5
2
2
3
1
2
4
9
2
1
2
4
6
5
5
10
1
8
1
0
4
5
2
8
2
0
7
7
3
6
0
4
3
5
1
1
8
5
2
2
0
2
2
3
1
8
2
1
4
1
2
2
3
8
0
5
7
0
2
8
3
0
4
3
1
0
5
4
2
1
7
1
2
8
8
0
3
0
4
4
2
5
4
1
6
0
1
4
6
1
1
6
3
2
0
1
1
0
3
2
6
4
2
6
4
5
10
4
0
8
0
0
3
1
0
3
4
8
8
1
3
0
1...

result:

ok 1178 lines

Test #107:

score: 0
Accepted
time: 19ms
memory: 3744kb

input:

1000 1046
431 330
518 491
351 257
713 627
138 635
225 121
908 499
692 780
856 531
525 718
825 949
981 292
222 545
743 698
697 981
943 888
512 144
373 637
203 685
971 748
989 138
253 747
363 576
819 150
393 402
286 225
512 4
105 917
260 819
770 625
623 816
16 589
556 970
403 591
528 282
170 605
140 9...

output:

Gyojun is handsome
18
20
3
40
3
3
20
1
33
18
17
20
12
13
20
30
2
5
31
8
3
11
7
2
0
10
33
2
2
9
33
10
7
33
19
6
10
5
31
10
33
30
2
10
33
5
30
13
11
6
18
12
26
1
4
4
0
33
10
7
1
10
1
2
12
28
12
9
40
7
5
13
33
6
1
17
8
2
10
21
7
5
33
3
6
5
31
11
28
33
30
6
9
30
10
30
1
28
33
5
30
40
11
12
33
21
2
34
33...

result:

ok 1048 lines

Test #108:

score: 0
Accepted
time: 20ms
memory: 3756kb

input:

1000 1019
964 913
528 59
986 781
739 604
863 824
162 510
116 320
505 929
901 218
21 458
498 976
800 89
883 587
552 235
383 78
759 297
834 169
632 115
197 221
80 960
181 269
260 855
96 75
38 113
576 997
627 583
324 534
721 625
204 56
470 928
349 611
375 211
84 475
191 635
68 160
763 273
428 214
417 9...

output:

Gyojun is handsome
14
63
18
14
70
16
15
21
63
88
88
70
68
63
68
58
58
17
18
68
88
26
11
14
9
58
68
9
7
14
18
28
3
63
88
63
21
63
9
88
4
88
63
16
4
18
25
58
16
40
7
63
9
3
88
7
9
70
7
58
28
21
0
63
88
63
88
8
88
63
18
28
18
88
88
88
18
18
63
63
26
68
88
63
21
68
58
12
68
88
26
28
58
40
12
68
70
63
16...

result:

ok 1021 lines

Test #109:

score: 0
Accepted
time: 16ms
memory: 3672kb

input:

1000 1013
757 579
791 457
923 328
769 256
20 448
859 39
295 912
242 646
467 944
563 72
756 779
700 609
701 745
772 337
420 989
852 474
55 904
477 395
172 18
718 423
746 317
987 895
382 144
874 778
906 165
633 309
287 327
808 935
834 653
213 600
189 7
743 448
349 357
277 925
283 296
571 484
151 907
7...

output:

Gyojun is handsome
42
29
20
37
112
12
30
112
37
91
3
19
100
66
42
100
112
20
38
100
48
19
31
91
48
91
100
31
91
32
66
112
4
19
32
91
37
37
28
32
112
91
91
32
66
48
30
112
112
91
112
100
30
18
48
100
91
28
30
91
30
14
66
112
91
14
19
91
91
20
66
112
38
19
31
48
48
28
37
29
100
6
6
42
12
100
30
100
11...

result:

ok 1015 lines

Test #110:

score: 0
Accepted
time: 20ms
memory: 3776kb

input:

1000 1007
85 480
830 836
484 287
682 503
374 217
312 245
457 436
620 919
680 720
567 329
400 369
610 48
227 269
198 375
33 281
265 420
936 633
364 160
395 281
988 415
609 402
132 702
299 284
879 920
76 229
784 122
580 930
961 24
588 140
676 833
430 414
192 792
965 949
40 238
456 174
198 288
598 572
...

output:

Gyojun is handsome
30
6
41
238
238
41
41
32
113
19
113
113
140
113
238
113
7
140
238
113
30
133
32
133
133
28
48
24
28
19
24
133
238
238
133
113
113
140
140
30
140
140
238
140
20
133
238
41
113
48
238
238
140
238
238
20
140
238
238
20
133
133
238
133
238
41
238
140
30
238
58
24
140
48
19
24
25
113
1...

result:

ok 1009 lines

Test #111:

score: 0
Accepted
time: 20ms
memory: 3896kb

input:

1000 1006
913 374
908 479
648 477
532 662
456 192
458 245
603 67
307 669
651 899
828 674
258 131
475 565
250 659
370 228
546 693
725 884
707 684
670 728
515 817
925 518
299 573
839 18
931 267
453 413
903 825
177 392
808 811
738 789
142 692
727 469
93 352
171 122
344 524
466 724
11 30
71 174
418 72
5...

output:

Gyojun is handsome
171
171
146
146
33
39
171
125
146
171
146
171
146
26
125
75
171
33
39
171
33
123
146
123
39
171
171
75
125
171
33
94
146
94
123
125
171
123
123
33
33
81
33
33
125
75
125
146
171
125
171
125
123
123
171
75
81
75
171
146
146
125
171
146
33
146
146
146
39
123
94
123
171
33
75
123
33
...

result:

ok 1008 lines

Test #112:

score: 0
Accepted
time: 20ms
memory: 3756kb

input:

1000 1005
258 677
907 150
611 167
183 316
824 565
490 215
384 89
629 367
535 722
183 889
919 866
482 177
800 84
998 776
818 869
750 821
20 680
132 68
614 946
508 296
339 774
965 928
857 424
900 906
647 617
537 30
273 861
844 423
953 122
567 304
660 632
701 718
670 255
71 69
607 617
552 123
311 922
5...

output:

Gyojun is handsome
190
356
171
190
190
171
23
356
23
190
190
9
13
356
70
356
16
356
190
356
356
70
171
356
43
171
190
190
356
190
190
356
13
356
11
356
356
70
356
190
171
171
190
356
190
190
171
190
190
190
190
356
171
356
70
171
43
13
356
190
171
356
171
190
171
43
190
356
71
9
70
356
356
71
356
17...

result:

ok 1007 lines

Test #113:

score: 0
Accepted
time: 16ms
memory: 3720kb

input:

1000 1285
983 576
863 89
644 969
730 231
554 51
53 935
589 11
449 440
246 336
801 279
625 941
971 253
397 520
567 405
197 911
448 880
176 190
406 884
410 586
201 777
58 548
768 671
147 494
375 370
723 273
486 255
608 728
600 528
945 364
201 385
629 254
436 497
962 440
167 943
309 646
3 908
22 749
39...

output:

Gyojun is handsome
82
78
86
78
86
80
79
79
79
78
80
80
78
78
82
79
83
78
78
78
82
84
81
81
79
84
82
79
84
78
79
83
78
82
82
82
85
78
78
81
87
83
87
80
79
79
78
86
82
82
86
81
81
78
83
83
78
87
79
78
85
79
78
78
79
79
80
81
84
79
84
78
84
80
81
80
84
80
86
84
85
79
81
78
85
84
81
83
89
79
78
80
84
83...

result:

ok 1287 lines

Test #114:

score: 0
Accepted
time: 24ms
memory: 3756kb

input:

1000 1724
235 308
728 252
166 216
627 750
932 930
185 876
154 848
358 271
152 405
331 910
346 479
800 147
12 556
635 824
218 144
313 234
785 28
235 544
945 170
55 752
232 335
747 885
128 247
965 49
847 561
164 128
706 447
230 462
519 607
938 483
389 829
37 17
697 631
189 281
395 1
177 138
371 923
79...

output:

Gyojun is handsome
81
84
81
84
81
80
81
81
80
83
80
83
81
83
82
80
85
81
82
83
81
82
80
80
82
80
80
84
82
82
87
80
83
84
80
86
82
86
85
81
80
84
84
80
80
81
86
80
80
81
80
80
80
81
81
80
81
80
80
83
83
80
80
81
82
83
80
80
83
80
80
83
80
81
80
80
83
82
80
80
80
88
80
80
80
84
80
88
80
80
84
81
80
83...

result:

ok 1726 lines

Test #115:

score: 0
Accepted
time: 32ms
memory: 3772kb

input:

1000 2209
395 104
269 666
233 52
933 522
327 466
566 906
976 743
35 234
235 449
13 793
965 602
513 567
749 445
54 792
952 716
875 150
918 390
338 693
720 34
539 555
958 227
298 969
390 953
200 443
38 456
499 433
993 695
343 348
530 199
707 268
173 266
654 287
674 186
307 48
361 318
284 128
817 619
8...

output:

Gyojun is handsome
76
76
82
76
76
76
77
76
77
76
76
79
77
76
78
76
76
80
80
79
76
76
76
82
76
76
76
76
76
79
76
76
76
76
76
76
76
76
76
76
76
78
76
76
76
77
76
76
76
76
76
77
76
76
76
76
76
80
76
76
76
76
78
76
80
76
77
76
76
76
76
79
76
76
81
76
76
76
76
1000
76
76
76
76
76
76
76
76
76
76
76
76
77
...

result:

ok 2211 lines

Test #116:

score: 0
Accepted
time: 39ms
memory: 3756kb

input:

1000 2276
140 23
519 815
949 713
542 919
345 432
892 47
457 196
738 733
527 810
748 760
179 484
404 282
352 354
758 226
664 279
585 555
983 833
332 880
221 295
190 961
534 86
147 154
881 110
256 382
408 329
615 180
883 329
309 803
565 635
933 745
359 628
560 890
206 77
321 202
571 974
858 856
297 98...

output:

Gyojun is handsome
60
60
60
60
60
60
60
63
60
60
60
60
60
79
60
61
60
80
60
60
64
75
82
63
60
74
60
62
60
60
64
61
60
60
64
61
60
60
60
60
60
60
60
60
63
60
61
60
60
60
60
61
60
61
60
60
60
60
60
60
60
60
60
60
60
61
60
60
63
60
61
63
64
61
80
60
60
62
61
60
60
61
60
60
61
60
73
60
60
61
60
63
60
60...

result:

ok 2278 lines

Test #117:

score: 0
Accepted
time: 40ms
memory: 3668kb

input:

1000 2305
557 421
114 162
922 536
392 816
872 553
971 927
187 822
610 304
826 847
227 605
87 608
323 616
76 615
928 734
513 701
458 102
675 526
698 793
709 156
435 997
440 731
39 423
981 541
86 322
634 629
32 351
926 285
216 426
30 845
908 769
243 948
253 445
957 901
102 178
687 551
440 341
183 995
...

output:

Gyojun is handsome
66
66
67
66
66
66
66
66
66
66
66
66
66
66
66
66
66
82
66
83
86
66
66
66
66
66
66
67
86
66
66
66
66
66
66
86
66
66
66
66
67
66
83
66
66
66
84
66
66
66
66
66
66
66
66
66
66
66
66
85
66
66
66
66
66
66
66
83
66
66
66
66
66
66
66
66
66
66
66
66
66
67
66
84
66
66
85
81
66
66
66
66
66
66...

result:

ok 2307 lines

Test #118:

score: 0
Accepted
time: 4ms
memory: 3668kb

input:

500 504
431 446
61 446
388 61
388 431
262 453
403 431
453 394
439 394
478 439
93 478
93 392
392 467
467 242
242 336
233 336
233 352
492 352
245 492
245 151
74 151
421 74
371 421
378 371
34 378
437 34
297 437
142 297
60 142
60 307
307 367
90 367
230 90
368 230
81 368
121 81
121 26
26 235
235 59
28 59...

output:

Gyojun is handsome
4
4
4
4
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
65
...

result:

ok 506 lines

Test #119:

score: 0
Accepted
time: 34ms
memory: 4024kb

input:

500 2500
374 343
333 374
39 333
39 343
32 161
410 343
229 161
99 229
99 45
471 45
471 295
295 208
208 252
252 300
337 300
28 337
421 28
421 439
192 439
283 192
340 283
175 340
215 175
215 168
322 168
322 224
150 224
150 496
499 496
499 33
11 33
214 11
214 267
230 267
231 230
231 272
443 272
336 443
...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 2502 lines

Test #120:

score: 0
Accepted
time: 18ms
memory: 3744kb

input:

990 994
786 351
351 38
273 38
786 273
669 231
372 786
872 231
872 687
492 687
492 122
953 122
256 953
256 163
99 163
99 357
929 357
495 929
618 495
271 618
601 271
601 698
526 698
526 366
128 366
146 128
146 688
990 688
421 990
617 421
617 760
760 373
373 5
143 5
619 143
780 619
398 780
398 814
814 ...

output:

Gyojun is handsome
14
14
14
14
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
135
1...

result:

ok 996 lines

Test #121:

score: 0
Accepted
time: 59ms
memory: 3780kb

input:

990 2500
150 632
735 632
412 735
150 412
697 982
150 789
650 982
650 104
347 104
770 347
99 770
189 99
108 189
108 780
780 182
518 182
327 518
327 423
701 423
904 701
407 904
512 407
512 796
796 836
836 890
174 890
174 330
552 330
681 552
681 145
426 145
426 421
421 217
565 217
565 851
444 851
622 4...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
2
2
2
0
0
0
0
0
0
0
2
2
2
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
1
1...

result:

ok 2502 lines

Test #122:

score: 0
Accepted
time: 5ms
memory: 3692kb

input:

500 501
262 431
446 449
66 262
461 431
66 61
61 497
497 388
453 388
394 453
439 394
439 478
478 93
93 392
392 467
242 467
242 336
233 336
352 233
352 492
245 492
151 245
74 151
421 74
371 421
378 371
34 378
437 34
297 437
297 142
142 60
307 60
367 307
90 367
230 90
368 230
368 81
81 121
121 26
235 2...

output:

Gyojun is handsome
253
252
253
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
252
2...

result:

ok 503 lines

Test #123:

score: 0
Accepted
time: 34ms
memory: 3692kb

input:

500 2500
343 32
259 374
345 32
343 70
333 345
281 333
281 39
39 161
161 229
229 99
45 99
45 471
471 295
208 295
208 252
300 252
337 300
28 337
421 28
421 439
439 192
192 283
340 283
175 340
175 215
168 215
168 322
322 224
224 150
150 496
499 496
33 499
11 33
11 214
267 214
230 267
231 230
272 231
44...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 2502 lines

Test #124:

score: 0
Accepted
time: 18ms
memory: 3948kb

input:

990 991
669 786
729 351
865 669
786 140
865 38
38 966
273 966
273 231
872 231
872 687
492 687
122 492
122 953
256 953
256 163
99 163
357 99
929 357
495 929
618 495
618 271
601 271
601 698
526 698
366 526
366 128
146 128
688 146
990 688
990 421
421 617
617 760
373 760
5 373
143 5
619 143
619 780
780 ...

output:

Gyojun is handsome
497
496
497
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
496
4...

result:

ok 993 lines

Test #125:

score: 0
Accepted
time: 61ms
memory: 3876kb

input:

990 2500
150 697
632 943
697 386
726 150
386 735
206 735
412 206
982 412
982 650
104 650
347 104
347 770
99 770
189 99
108 189
780 108
182 780
182 518
518 327
423 327
701 423
701 904
407 904
512 407
796 512
836 796
836 890
890 174
174 330
552 330
552 681
145 681
426 145
426 421
217 421
217 565
565 8...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0...

result:

ok 2502 lines

Test #126:

score: 0
Accepted
time: 13ms
memory: 3716kb

input:

990 994
786 351
351 38
273 38
786 273
669 231
707 786
872 231
872 687
492 687
492 122
953 122
256 953
256 163
99 163
99 357
929 357
495 929
618 495
271 618
601 271
601 698
526 698
526 366
128 366
146 128
146 688
990 688
421 990
617 421
617 760
760 373
373 5
143 5
619 143
780 619
398 780
398 814
814 ...

output:

Gyojun is handsome
1
1
1
1
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
...

result:

ok 996 lines

Test #127:

score: 0
Accepted
time: 13ms
memory: 3608kb

input:

1000 1004
422 585
585 528
528 900
422 900
891 323
887 422
891 337
504 337
22 504
22 326
263 326
263 625
35 625
35 815
637 815
637 831
291 831
812 291
475 812
117 475
639 117
639 164
460 164
460 153
823 153
823 254
910 254
910 240
240 173
780 173
336 780
647 336
647 89
89 75
75 520
520 646
646 642
64...

output:

Gyojun is handsome
1
1
1
1
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
62
...

result:

ok 1006 lines

Test #128:

score: 0
Accepted
time: 60ms
memory: 3876kb

input:

1000 2500
677 913
677 903
264 903
714 264
2 714
2 496
496 319
319 556
556 263
263 155
155 447
821 447
821 864
869 864
29 869
818 29
818 152
400 152
400 991
991 346
346 770
977 770
269 977
269 484
116 484
116 225
225 360
133 360
214 133
708 214
708 50
50 145
145 109
109 438
381 438
932 381
176 932
17...

output:

Gyojun is handsome
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
2
2
2
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
0
1
1
0
0
1...

result:

ok 2502 lines

Subtask #3:

score: 0
Runtime Error

Test #129:

score: 0
Runtime Error

input:

8000 8000
3334 4850
3702 6021
2278 2531
3485 5926
4321 314
4357 2816
4319 5050
1156 2107
4081 7202
6243 2320
7047 851
991 7155
1633 6760
3727 1879
2911 2993
4844 268
3467 5932
7915 7713
4183 4309
7329 1750
540 4486
6665 5370
7505 1560
1033 5053
2424 5725
5532 1809
2943 5853
4037 2466
3482 7480
410 5...

output:

Unauthorized output

result:


Subtask #4:

score: 0
Runtime Error

Test #185:

score: 0
Runtime Error

input:

8000 7999
6715 5630
5399 1611
522 5896
5200 288
4783 2611
5206 1534
1491 5946
2860 984
5854 7761
7173 2988
4855 7410
3295 451
457 2349
7896 6105
7685 6007
6778 7505
5872 2713
6470 1380
4248 3888
6388 2792
1047 3549
5226 97
509 409
4856 7396
4149 2439
5406 2518
3230 6097
6050 5856
2346 5118
3521 6541...

output:

Unauthorized output

result:


Subtask #5:

score: 0
Runtime Error

Dependency #2:

100%
Accepted

Test #238:

score: 0
Runtime Error

input:

7937 7961
6853 973
1269 4217
3076 6689
849 3322
4837 649
6023 3330
6616 5622
7693 2683
1677 5068
2953 4180
3325 822
6608 1896
1670 1144
3470 6278
7384 2164
6358 7339
3102 5701
6937 5758
6379 3738
2420 6651
5346 6567
3671 3562
3064 7160
3005 6666
1342 2248
300 6548
6216 4643
6181 4142
6904 2610
5925 ...

output:

Unauthorized output

result:


Subtask #6:

score: 0
Skipped

Dependency #5:

0%

Subtask #7:

score: 0
Skipped

Dependency #1:

100%
Accepted

Dependency #2:

100%
Accepted

Dependency #3:

0%