QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#49172#1812. Interesting ColoringCrysflyAC ✓75ms18488kbC++112.5kb2022-09-19 16:12:102022-09-19 16:12:13

Judging History

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

  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2022-09-19 16:12:13]
  • 评测
  • 测评结果:AC
  • 用时:75ms
  • 内存:18488kb
  • [2022-09-19 16:12:10]
  • 提交

answer

// what is matter? never mind. 
#include<bits/stdc++.h>
#define For(i,a,b) for(int i=(a);i<=(b);++i)
#define Rep(i,a,b) for(int i=(a);i>=(b);--i)
//#define int long long 
using namespace std;
inline int read()
{
	char c=getchar();int x=0;bool f=0;
	for(;!isdigit(c);c=getchar())f^=!(c^45);
	for(;isdigit(c);c=getchar())x=(x<<1)+(x<<3)+(c^48);
	if(f)x=-x;return x;
}

#define fi first
#define se second
#define pb push_back
#define mkp make_pair
typedef pair<int,int>pii;
typedef vector<int>vi;

#define maxn 500005
#define inf 0x3f3f3f3f

int n,m;
struct edge{
	int to,nxt,w;
}e[maxn];
int tot=1,head[maxn];
vi out[maxn];
void adde(int u,int v){
	e[++tot]=(edge){v,head[u]};
	head[u]=tot;
}

int col[maxn];
int sz[maxn],fa[maxn],up[maxn],dep[maxn];
void dfs(int u)
{
	sz[u]=1;
	for(int i=head[u];i;i=e[i].nxt){
		int v=e[i].to;
		if((i^1)==up[u])continue;
		if(!dep[v]){
//			cout<<"dfs "<<u<<" "<<v<<" "<<(i/2)<<endl;
			dep[v]=dep[u]+1,fa[v]=u,up[v]=i;
			dfs(v),sz[u]+=sz[v];
		}
	}
}

int cnt;
int rnk[maxn],cnte[maxn];
bool in[maxn]; vi o;
void make(int u,int v){
	while(u!=v){
		++cnte[col[up[u]]];
		if(!in[col[up[u]]])in[col[up[u]]]=1,o.pb(col[up[u]]);
		u=fa[u]; 
	}
}
void clr(){
	for(int x:o)in[x]=cnte[x]=0;
	o.clear();
}
bool cmp(pii x,pii y){
	return sz[x.fi]>sz[y.fi];
}
void solve(int u)
{
	vector<pii>son;
	for(int i=head[u];i;i=e[i].nxt){
		int v=e[i].to;
		if((i^1)==up[u])continue;
		if(dep[v]<dep[u]){
			make(u,v);
			col[i]=col[i^1]=++cnt;
//			cout<<"col: "<<(i/2)<<' '<<cnt<<endl;
			out[i>>1]=o;
			for(int x=u;x!=v;x=fa[x]){
				int j=up[x];
				if(!out[j>>1].size()){
					out[j>>1].pb(cnt);
					--cnte[col[j]];
					for(int _:o)if(cnte[_])out[j>>1].pb(_);
					++cnte[col[j]];
				}
			}
			clr();
		}
		else if(up[v]==i)son.pb(mkp(v,i));
	}
	sort(son.begin(),son.end(),cmp);
	if(fa[u])make(fa[u],1);
	vi tmp; for(auto X:o)if(X!=col[up[u]])tmp.pb(X);else in[X]=cnte[X]=0; o=tmp;
	while(o.size()<son.size())o.pb(++cnt);
//	cout<<"u: "<<u<<endl;
//	cout<<"son: "<<son.size()<<endl;
//	for(auto t:o)cout<<t<<" ";puts("");
	int p=0;
	for(auto t:son){
		int v=t.fi,i=t.se;
		col[i]=col[i^1]=o[p++];
	}
	clr();
	for(auto t:son)solve(t.fi);
}

signed main()
{
	n=read(),m=read();
	For(i,1,m){
		int u=read(),v=read();
		adde(u,v),adde(v,u);
	}
	dep[1]=1,dfs(1);
	solve(1);
	For(i,1,m)cout<<col[i<<1]<<" \n"[i==m];
	For(i,1,m){
		cout<<out[i].size()<<" ";
		for(auto t:out[i])cout<<t<<" \n"[t==out[i].back()];
	}
	return 0;
}
// e1e1e2 d7d7d8 f7f7f7

详细

Test #1:

score: 100
Accepted
time: 2ms
memory: 17288kb

input:

10 11
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10
1 10
1 4

output:

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

result:

ok accepted

Test #2:

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

input:

10 15
3 6
2 10
3 7
6 8
1 6
2 6
4 5
6 10
4 9
5 9
4 8
5 6
6 7
4 6
1 10

output:

10 11 2 9 3 5 8 2 2 1 6 7 4 1 1
2 2 4
2 5 2
2 10 4
2 6 1
2 2 1
2 11 2
2 1 2
2 3 1
2 7 1
3 7 1 2
2 9 1
2 1 2
2 10 2
3 7 1 2
2 3 2

result:

ok accepted

Test #3:

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

input:

10 15
4 10
4 8
4 7
9 10
2 5
3 6
5 8
8 10
3 4
7 10
2 7
1 2
1 7
8 9
6 10

output:

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

result:

ok accepted

Test #4:

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

input:

10 15
1 7
2 4
1 10
6 10
1 5
1 2
1 9
8 9
8 10
5 8
1 3
4 7
1 6
3 6
4 8

output:

8 7 4 2 10 9 11 6 1 5 12 1 1 3 2
2 1 2
3 9 2 1
2 2 1
2 4 1
3 5 1 2
3 7 2 1
3 6 1 2
3 11 1 2
3 8 1 2
3 10 1 2
2 3 1
3 8 1 2
2 4 2
2 12 1
3 8 1 2

result:

ok accepted

Test #5:

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

input:

30 50
16 24
13 30
22 27
6 12
26 30
23 25
19 22
8 24
11 22
5 21
1 5
5 19
5 8
5 6
2 14
7 17
20 22
2 30
5 14
3 21
21 30
20 25
6 9
16 23
25 28
4 22
10 18
5 15
12 26
22 30
11 17
1 3
4 20
2 21
20 28
6 29
12 22
7 30
2 26
13 15
18 22
10 22
5 23
5 24
12 29
9 16
9 24
5 22
3 5
25 27

output:

1 1 17 8 23 1 5 10 24 20 3 28 18 7 1 2 15 22 26 19 2 14 1 2 2 16 1 25 6 21 6 1 2 6 1 2 2 6 2 2 27 4 12 9 1 11 2 1 2 13
2 11 2
4 25 2 1 6
3 13 1 2
2 2 1
2 2 6
3 15 1 2
2 28 1
3 18 2 1
2 6 2
3 6 2 1
2 2 1
2 5 1
3 10 2 1
2 2 1
4 26 1 2 6
3 24 6 2
2 1 2
2 2 6
3 1 2 6
3 6 2 1
3 21 2 6
2 1 2
3 9 2 1
3 12 ...

result:

ok accepted

Test #6:

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

input:

30 50
14 24
8 11
6 16
22 23
20 28
24 30
13 15
4 30
2 25
3 24
10 16
11 18
4 27
21 22
11 22
4 15
11 29
12 13
4 11
11 26
6 22
1 16
13 24
2 24
10 22
13 17
13 29
2 12
11 30
1 21
15 17
4 22
7 15
5 21
1 20
11 27
1 11
9 25
16 18
9 17
19 24
13 14
11 12
3 30
7 30
22 26
19 30
23 27
8 28
5 11

output:

21 3 1 25 3 12 16 11 20 13 2 27 9 2 5 2 22 1 8 29 28 26 15 1 6 2 18 2 10 4 19 1 1 1 30 24 1 2 6 1 2 17 14 23 2 7 1 1 1 2
3 17 1 2
3 30 3 1
3 28 2 6
2 1 9
3 30 3 1
2 2 1
2 1 2
2 2 1
2 2 1
3 23 2 1
4 26 2 6 1
3 6 2 1
3 24 1 2
3 5 2 1
2 2 1
3 10 2 1
3 18 1 2
3 15 1 2
2 1 2
3 7 2 1
3 1 2 6
3 2 6 1
2 1 2...

result:

ok accepted

Test #7:

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

input:

30 50
25 30
15 21
3 26
10 11
13 27
4 11
15 20
14 29
15 28
9 16
10 24
8 27
18 28
12 29
13 20
5 11
22 27
17 20
4 16
25 27
7 27
6 9
2 27
21 27
1 19
10 14
20 25
3 27
5 27
3 29
6 8
12 13
10 16
9 25
18 27
13 18
1 27
27 30
2 11
7 14
19 27
27 29
23 27
17 22
6 28
24 27
12 20
2 3
16 23
26 27

output:

15 2 1 8 22 2 23 2 18 16 9 25 1 1 21 6 27 13 1 14 28 1 5 24 32 1 1 4 31 12 17 20 2 2 19 2 1 26 1 10 3 11 30 2 2 29 2 2 7 2
3 26 1 2
4 24 2 18 1
2 4 2
2 2 1
2 2 1
3 8 2 1
3 18 2 1
3 11 2 1
3 23 2 1
2 2 1
3 29 2 1
3 17 1 2
3 19 1 2
3 14 1 2
2 2 1
3 31 1 2
3 2 13 1
3 27 2 1
2 8 2
2 1 2
3 10 1 2
3 19 1 ...

result:

ok accepted

Test #8:

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

input:

100 180
2 53
55 72
52 58
72 88
53 70
1 89
14 94
42 67
72 85
39 77
79 96
58 75
34 40
75 77
45 88
76 85
61 80
11 28
48 68
68 94
38 47
32 45
30 72
1 99
26 83
72 98
24 31
10 27
7 80
62 72
75 87
70 96
1 82
37 41
2 88
20 35
35 90
9 19
29 69
29 30
22 83
13 18
72 94
28 80
14 27
56 79
11 88
5 94
27 68
34 81
...

output:

1 82 1 3 38 80 60 2 24 28 72 12 20 27 102 83 2 88 1 45 1 10 86 85 98 63 49 57 91 6 103 71 84 67 34 1 2 4 17 2 2 2 44 1 1 32 96 55 2 2 54 26 95 9 78 1 53 75 74 97 2 61 41 1 30 2 2 70 21 68 11 76 2 81 1 1 109 1 33 2 2 93 2 101 16 1 89 40 37 45 7 100 59 2 31 2 8 2 23 52 35 1 58 87 65 29 15 2 62 108 50 ...

result:

ok accepted

Test #9:

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

input:

100 180
34 61
21 95
49 92
52 62
19 27
50 76
35 94
50 78
21 28
20 48
58 85
4 36
47 93
26 50
55 63
41 71
53 94
82 94
37 49
53 82
50 58
29 97
50 67
68 78
1 75
58 84
15 79
66 91
14 59
40 99
9 12
67 98
37 50
26 35
15 84
15 80
24 70
4 64
29 70
24 93
46 83
38 97
13 89
41 54
50 74
51 86
30 61
68 96
18 35
46...

output:

67 86 42 1 23 51 84 15 89 1 87 56 50 60 2 2 1 83 53 77 74 2 94 17 3 2 63 2 62 2 27 1 52 59 72 81 1 1 45 2 65 37 26 32 12 1 1 88 11 80 22 76 57 7 19 54 66 1 30 97 85 96 29 28 1 2 99 1 55 1 2 2 95 2 1 21 16 1 2 41 58 1 1 23 43 10 2 70 90 98 64 1 39 2 2 25 69 71 24 82 100 8 38 20 2 6 33 1 12 36 43 78 2...

result:

ok accepted

Test #10:

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

input:

100 180
14 98
15 79
65 97
25 85
2 65
15 99
16 94
47 87
38 55
10 44
43 98
15 36
41 89
46 76
38 59
15 26
14 85
39 98
67 80
6 14
33 35
11 41
15 69
2 64
15 54
6 40
6 74
20 89
5 15
12 68
19 89
15 96
30 57
15 53
10 81
12 53
15 27
45 98
20 78
22 31
5 9
51 95
42 91
62 86
75 81
17 82
81 85
43 46
20 29
68 99
...

output:

67 83 2 2 1 64 1 17 40 2 42 80 7 75 41 88 90 68 9 32 37 2 110 47 94 1 33 1 56 50 98 103 1 62 1 1 84 2 6 2 1 1 2 93 28 1 27 44 5 1 102 2 2 1 109 13 69 60 38 4 2 1 20 61 11 51 2 53 2 58 1 1 23 1 70 104 57 111 54 2 107 35 18 101 2 26 113 1 50 2 3 1 21 34 66 1 72 2 89 112 86 1 2 1 106 29 1 55 87 97 108 ...

result:

ok accepted

Test #11:

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

input:

100 180
43 90
40 89
36 37
37 66
5 100
37 70
23 73
28 95
37 50
1 37
26 40
47 77
18 37
15 81
23 25
20 37
32 54
67 99
94 99
28 29
5 37
28 37
29 72
35 41
71 77
39 100
48 54
21 40
69 95
15 37
11 89
71 90
17 96
37 41
1 11
24 96
81 83
31 58
52 89
27 94
14 38
27 84
57 71
55 78
59 75
29 38
57 91
37 85
66 67
...

output:

30 60 94 99 1 101 1 22 96 3 1 1 103 63 2 9 2 2 25 82 104 15 38 2 46 16 55 50 91 62 37 45 51 68 1 64 40 67 87 1 85 27 2 41 75 2 43 73 25 36 2 72 23 1 42 2 18 6 80 83 47 95 29 50 59 76 2 1 100 39 2 32 31 56 2 71 52 1 1 2 13 70 57 2 1 89 2 74 1 102 2 93 1 2 2 35 7 1 2 24 4 2 1 77 1 2 10 2 66 106 2 107 ...

result:

ok accepted

Test #12:

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

input:

111 222
1 60
7 55
60 110
42 79
58 61
100 109
30 85
17 59
52 84
30 111
23 87
51 62
17 30
34 55
71 104
65 67
46 99
89 108
1 90
60 99
39 58
101 103
48 84
23 71
88 92
16 97
25 34
11 30
30 60
3 43
16 100
70 110
42 56
9 106
14 84
58 80
82 93
30 86
21 69
36 107
29 95
10 109
26 74
109 110
71 83
24 73
12 48
...

output:

3 27 120 56 135 39 37 33 82 25 66 90 126 131 64 95 2 1 141 99 116 1 2 2 1 101 114 24 23 58 38 121 55 93 76 88 2 80 109 107 44 79 97 119 63 52 74 43 27 31 15 106 89 59 1 54 10 22 20 86 14 100 1 2 2 34 133 1 4 112 102 127 129 1 53 105 16 2 85 110 7 50 1 35 13 123 1 19 51 69 1 73 143 1 36 2 104 138 87 ...

result:

ok accepted

Test #13:

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

input:

111 222
15 50
35 76
12 37
27 30
72 96
6 79
42 77
5 6
49 92
8 26
28 107
10 65
36 52
52 80
14 110
78 96
11 96
6 80
87 96
16 89
1 90
1 74
11 63
41 85
59 81
21 35
66 86
48 49
22 79
21 34
17 103
2 31
109 110
30 98
31 76
85 108
28 39
19 69
68 81
23 70
12 25
45 88
74 110
48 66
40 72
69 96
33 44
96 100
64 8...

output:

2 2 9 79 114 1 94 59 2 1 74 71 51 1 113 115 120 2 36 123 6 14 35 1 46 106 104 49 61 90 116 1 133 1 108 2 2 87 1 92 13 135 16 2 34 86 125 39 122 26 70 100 89 17 73 85 96 23 66 2 1 132 48 44 54 137 103 91 22 112 65 19 8 118 82 2 2 2 99 131 69 33 20 1 48 111 55 21 136 57 5 58 77 32 12 11 56 50 81 76 60...

result:

ok accepted

Test #14:

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

input:

111 222
1 12
1 99
6 80
20 45
11 56
14 31
3 26
13 94
14 65
42 70
12 14
20 111
14 44
46 87
14 63
88 103
40 77
48 102
24 54
58 93
55 70
68 102
46 61
2 56
27 93
63 95
50 105
45 111
42 63
15 84
17 56
1 101
34 93
25 65
13 39
4 71
39 49
12 37
14 62
9 56
29 104
52 86
45 74
14 49
43 45
14 15
19 60
31 55
37 8...

output:

5 122 68 127 91 106 1 1 13 99 12 27 120 4 29 2 61 1 88 136 1 57 6 69 79 98 76 26 2 2 2 134 138 8 83 42 87 117 58 49 33 2 20 11 23 94 38 50 2 65 31 2 75 2 115 50 1 111 137 60 78 17 50 2 100 73 128 132 71 2 1 77 104 105 1 121 1 2 46 90 41 93 2 16 48 40 96 124 95 113 2 1 118 108 123 80 114 1 2 7 55 1 2...

result:

ok accepted

Test #15:

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

input:

111 222
13 110
10 58
13 68
29 101
61 96
43 76
40 55
19 43
73 106
34 89
13 79
13 16
21 56
83 88
3 70
24 94
59 88
69 86
72 88
9 11
24 51
66 93
39 99
30 103
32 91
50 66
21 100
20 48
31 45
5 36
99 101
21 97
13 72
67 76
13 37
31 83
42 81
61 87
81 99
20 66
46 95
1 22
107 111
12 77
13 74
49 65
54 73
75 96
...

output:

93 133 97 1 2 2 2 78 2 52 17 27 83 60 3 47 98 1 59 111 1 6 57 100 24 120 82 41 66 2 89 84 46 70 115 65 124 117 22 4 43 56 49 121 104 2 1 118 74 109 77 45 34 69 1 136 101 139 2 130 2 25 1 2 51 108 1 63 1 64 1 99 37 85 87 91 1 71 134 132 1 1 2 92 2 114 1 38 2 131 88 86 81 2 42 1 80 1 79 137 2 1 1 95 7...

result:

ok accepted

Test #16:

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

input:

111 222
58 79
60 64
46 108
9 68
1 47
13 40
2 52
43 106
22 92
43 86
22 73
87 94
25 44
13 95
2 99
44 83
29 100
6 8
75 101
70 88
22 71
3 62
55 108
69 72
53 98
25 38
5 101
20 42
18 79
14 81
26 79
89 108
23 44
14 44
6 108
33 105
42 56
21 86
50 102
22 106
48 98
1 10
22 35
58 69
46 73
8 35
23 38
23 62
13 9...

output:

107 27 115 1 14 33 98 71 57 94 6 82 91 32 125 36 110 2 84 87 138 95 21 13 1 90 60 101 52 128 55 135 35 127 64 103 25 93 46 70 2 15 63 106 114 68 130 129 31 136 75 51 134 72 18 23 126 1 97 29 34 89 77 132 80 17 37 74 105 79 53 43 1 137 2 1 62 104 118 11 1 78 122 1 72 2 92 59 16 1 2 28 121 1 1 117 24 ...

result:

ok accepted

Test #17:

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

input:

111 222
42 57
29 90
18 68
48 81
45 81
2 47
6 9
81 85
81 86
89 101
34 98
17 20
52 101
20 97
28 96
53 81
51 108
5 65
27 64
62 101
27 89
8 97
77 91
32 102
35 76
31 81
39 65
73 78
22 66
68 91
40 83
47 81
71 91
12 81
21 25
100 103
7 26
79 97
69 101
16 109
35 58
72 88
33 73
95 103
6 92
64 101
17 81
43 81
...

output:

87 31 5 14 136 7 127 35 114 24 81 129 1 48 83 131 1 1 66 25 1 51 67 139 4 17 34 78 91 96 101 6 1 113 29 40 95 1 60 1 134 38 79 11 62 65 128 140 30 1 111 126 57 57 1 1 15 99 70 118 43 2 2 28 2 1 130 1 121 117 61 93 56 19 1 89 37 77 69 115 76 138 47 1 46 10 58 3 1 2 12 2 142 106 2 2 1 135 1 80 55 109 ...

result:

ok accepted

Test #18:

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

input:

111 222
20 33
7 107
73 76
36 96
44 104
5 28
83 85
46 72
5 109
68 98
2 38
60 73
1 13
44 57
33 49
13 39
18 29
42 73
69 76
37 45
4 51
29 111
5 84
83 111
38 62
26 31
14 73
61 70
26 103
30 73
81 85
73 110
73 102
52 73
44 105
17 81
11 29
44 95
5 100
51 60
46 74
43 53
63 107
29 100
27 65
31 92
3 64
44 109
...

output:

64 96 25 2 111 52 66 29 51 37 89 84 5 79 98 82 46 123 2 122 103 68 1 2 1 110 11 101 55 106 21 108 107 139 7 2 45 16 50 83 133 78 95 1 127 34 2 12 10 1 33 1 2 102 53 129 1 76 1 128 2 23 2 4 135 125 30 1 14 121 77 113 38 2 1 44 49 131 94 1 60 2 85 74 1 58 56 65 120 93 24 132 1 1 43 26 104 1 48 2 130 4...

result:

ok accepted

Test #19:

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

input:

111 222
80 86
61 86
10 86
55 73
39 105
21 96
13 39
74 106
15 20
10 17
46 88
7 86
37 106
47 76
44 106
9 41
8 86
105 110
86 92
100 101
102 107
77 81
97 105
29 78
59 86
13 31
24 53
1 49
21 90
86 89
25 96
3 30
21 103
89 98
86 102
4 76
86 98
6 18
56 67
38 43
45 51
71 105
42 95
11 77
10 36
72 86
75 92
41 ...

output:

130 96 67 2 54 86 53 23 94 2 57 31 115 28 22 80 129 105 118 1 2 33 91 116 140 1 1 7 2 90 1 138 85 63 46 21 61 100 2 40 124 121 1 27 66 92 41 79 2 1 32 135 78 1 41 1 128 1 103 26 95 15 30 2 48 2 1 4 5 9 47 93 1 1 131 84 113 39 2 89 65 2 1 1 68 2 112 35 76 1 38 137 57 82 77 83 127 41 19 109 51 81 18 7...

result:

ok accepted

Test #20:

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

input:

111 222
66 107
38 107
17 106
8 65
74 89
46 76
25 33
55 74
10 101
6 70
50 94
5 106
74 77
43 83
74 90
81 103
42 72
66 94
63 82
21 49
12 96
99 101
40 74
13 95
70 76
12 33
4 16
38 45
13 67
17 46
16 66
12 92
98 100
1 78
48 92
35 62
27 44
32 54
85 95
37 74
69 103
52 94
61 105
27 80
47 106
74 94
52 62
49 6...

output:

25 22 33 73 16 69 9 94 37 1 103 104 11 101 114 117 78 2 2 64 59 39 122 52 71 58 2 30 112 90 91 2 1 102 85 135 45 2 1 131 19 24 69 1 92 23 134 80 1 124 49 1 83 38 2 126 69 2 121 1 2 29 57 99 130 8 120 2 1 67 15 132 32 5 1 125 76 2 2 68 2 2 69 62 28 50 111 129 89 53 44 95 1 4 116 127 74 1 34 35 108 1 ...

result:

ok accepted

Test #21:

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

input:

111 222
28 63
77 84
57 76
16 51
9 38
46 64
85 95
30 48
21 22
82 96
80 111
16 73
26 51
63 100
19 108
1 108
76 88
62 75
38 80
15 90
49 58
35 54
16 65
15 107
70 107
55 87
16 57
14 19
38 77
43 49
16 53
64 111
16 87
108 109
30 80
1 16
32 68
74 98
42 65
11 16
16 105
16 82
14 85
68 104
82 98
12 28
21 69
86...

output:

103 37 1 11 92 129 64 126 39 74 31 41 135 83 12 131 2 19 91 77 1 2 34 1 75 1 47 26 90 54 10 128 52 2 1 9 2 60 33 122 43 73 1 68 72 2 2 113 1 2 136 107 50 61 63 2 123 119 80 2 2 14 2 71 44 29 118 1 36 51 2 94 70 30 1 55 81 1 109 115 2 133 4 95 2 15 1 32 89 121 35 2 67 69 25 8 2 5 59 101 49 116 111 2 ...

result:

ok accepted

Test #22:

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

input:

111 222
94 103
29 74
23 42
57 62
33 67
55 57
8 57
56 90
23 57
16 39
1 80
25 33
57 83
25 102
57 102
35 76
36 102
19 87
50 84
57 111
62 84
32 57
15 68
73 110
11 69
69 76
62 105
13 42
57 78
32 62
11 22
99 104
49 73
47 57
1 40
26 57
60 104
42 45
15 17
37 63
82 93
22 60
61 67
51 86
29 57
69 103
88 95
18 ...

output:

62 1 2 20 10 42 122 1 53 75 119 90 43 91 98 25 97 56 12 120 19 81 1 2 37 36 29 84 33 80 1 59 123 44 133 17 58 1 2 94 40 111 3 2 100 69 40 73 31 105 18 115 1 1 68 130 114 118 2 102 1 110 63 52 88 72 1 22 76 1 117 2 30 128 45 83 27 92 135 1 2 8 28 87 61 82 1 1 60 9 127 35 5 41 67 2 2 125 71 129 108 1 ...

result:

ok accepted

Test #23:

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

input:

111 222
35 93
39 107
18 87
35 84
35 73
29 57
91 96
99 103
31 35
30 96
28 48
35 87
51 60
33 40
66 103
35 41
35 74
11 44
15 27
65 66
6 35
9 108
48 95
73 102
7 35
34 35
28 35
54 70
19 60
74 81
19 73
9 35
35 85
21 98
37 74
81 85
80 85
32 71
8 63
23 97
16 30
33 35
48 84
35 67
46 69
35 100
17 102
72 91
35...

output:

106 95 50 10 87 1 90 66 128 1 22 117 81 72 65 119 101 56 2 2 114 94 144 86 89 38 21 1 80 100 1 93 137 36 2 18 136 40 11 2 74 24 145 115 135 132 2 2 127 2 113 2 122 104 112 54 29 1 12 58 109 1 20 1 2 17 108 2 8 1 142 68 83 71 88 77 105 121 125 4 3 2 64 60 45 5 139 62 99 33 61 107 98 2 46 79 1 103 1 9...

result:

ok accepted

Test #24:

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

input:

111 222
44 88
10 26
46 53
35 64
13 97
18 100
44 46
33 45
6 75
6 15
31 84
31 68
59 83
4 104
5 91
35 90
29 44
44 74
33 110
30 96
44 60
92 103
71 86
6 44
44 98
27 98
41 109
79 108
19 22
47 54
32 101
13 41
25 40
40 44
72 93
44 80
18 55
62 89
71 95
44 61
44 87
66 83
23 111
35 63
41 101
47 56
1 90
23 58
3...

output:

121 100 78 84 116 2 77 91 45 1 127 27 110 2 44 74 104 75 30 2 118 25 12 5 9 133 19 2 70 82 98 1 2 66 112 62 69 124 1 50 138 47 51 3 18 2 73 108 2 1 2 15 10 80 87 2 140 1 38 101 139 95 128 2 2 1 58 2 69 43 34 29 68 2 89 30 1 59 71 23 57 72 81 22 117 32 90 114 111 11 137 8 53 36 56 67 1 136 33 65 96 4...

result:

ok accepted

Test #25:

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

input:

111 222
48 79
13 101
17 88
1 104
49 101
13 87
13 71
57 58
25 32
52 78
13 50
36 84
26 69
78 100
21 107
31 66
46 71
14 67
13 45
5 26
13 89
13 107
78 79
44 58
13 73
13 38
13 68
13 55
47 74
35 61
63 73
42 111
29 102
8 29
1 13
38 45
34 95
33 84
29 104
13 86
42 82
18 37
13 59
13 29
21 82
2 13
66 93
50 68
...

output:

80 95 1 122 1 69 103 2 33 2 88 110 1 81 1 49 102 127 9 42 83 52 61 108 145 8 5 96 1 101 4 22 119 38 1 2 39 44 2 56 138 28 71 118 54 84 76 87 2 139 31 2 128 1 121 107 125 64 78 37 1 105 45 98 2 57 62 113 136 13 66 7 14 132 90 2 109 3 106 36 92 2 131 70 30 1 86 82 1 1 2 43 2 137 47 10 74 2 6 124 2 134...

result:

ok accepted

Test #26:

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

input:

111 222
88 100
54 108
56 76
1 89
24 100
19 52
17 57
19 86
15 64
74 85
28 68
31 108
13 83
33 34
28 100
20 65
30 100
37 60
57 71
38 97
44 100
26 72
11 58
90 109
2 37
46 100
24 109
10 100
8 70
71 100
48 50
3 31
40 102
46 80
56 82
13 80
86 100
50 95
33 79
28 96
80 100
34 100
4 26
82 100
58 96
7 81
60 10...

output:

50 123 39 6 92 19 1 1 2 2 89 1 73 2 88 56 8 59 125 81 86 36 80 95 2 18 76 131 27 7 111 122 2 101 40 75 139 2 63 87 100 67 98 128 79 1 2 43 2 133 1 97 90 2 1 65 1 49 1 85 64 1 47 1 48 46 17 2 135 1 32 45 108 34 25 1 1 38 61 124 94 22 84 2 62 58 62 96 130 30 1 110 119 53 1 127 2 106 1 12 1 72 24 129 3...

result:

ok accepted

Test #27:

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

input:

50 60
11 43
8 38
16 29
10 16
29 37
16 28
15 23
16 32
26 38
43 44
5 36
3 4
17 36
22 38
47 49
25 38
23 42
41 45
24 43
10 24
5 11
12 43
7 19
9 50
9 49
12 39
8 47
2 14
33 40
27 32
37 40
1 40
23 27
28 30
19 48
13 36
13 15
20 41
2 31
30 45
35 46
34 48
39 49
4 23
20 49
35 43
34 40
6 22
6 36
31 44
2 18
23 5...

output:

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

result:

ok accepted

Test #28:

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

input:

50 60
10 33
8 18
42 44
7 38
6 29
15 33
39 48
10 20
16 31
12 13
4 31
25 34
6 37
11 46
36 42
3 8
17 19
34 43
4 17
11 24
9 15
12 27
22 49
25 36
21 35
18 41
4 28
27 43
23 29
23 50
14 41
28 30
26 46
22 29
36 50
5 33
43 48
13 49
5 35
21 32
13 40
14 32
24 41
3 19
2 4
21 30
21 37
33 45
38 43
39 46
26 47
3 2...

output:

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

result:

ok accepted

Test #29:

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

input:

58 72
12 40
1 6
6 16
11 12
2 5
17 22
17 53
14 33
21 53
23 31
42 54
3 35
28 56
16 35
43 45
49 52
57 58
10 15
7 55
13 42
7 43
12 36
30 37
3 33
18 48
36 50
38 41
10 56
51 53
12 20
14 52
34 45
31 52
2 10
12 26
9 42
12 29
49 54
27 43
3 32
28 41
1 40
21 29
32 38
6 25
10 34
43 44
18 57
24 43
19 25
19 42
8 ...

output:

2 15 16 28 1 2 25 2 1 2 14 18 1 1 6 21 22 2 2 13 1 30 1 8 1 1 1 24 19 23 26 1 1 17 27 12 1 2 20 1 11 1 2 2 1 29 5 2 4 2 1 1 2 1 1 10 2 1 2 9 1 2 1 1 1 2 7 3 2 2 2 2
3 15 1 2
2 1 2
3 18 1 2
3 1 5 2
3 17 1 2
4 25 2 7 1
3 2 7 1
4 26 2 8 1
3 15 1 2
3 15 1 2
3 21 2 1
3 1 16 2
4 24 1 11 2
4 18 1 16 2
3 29...

result:

ok accepted

Test #30:

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

input:

60 75
50 53
15 43
31 36
46 55
5 48
3 52
19 25
10 56
4 39
40 43
42 58
6 18
23 54
33 60
13 32
38 40
36 46
25 30
22 54
9 12
47 57
54 57
17 29
30 35
44 52
24 36
52 56
11 45
33 53
36 60
20 54
7 40
10 29
22 51
5 55
26 30
4 54
20 45
11 21
15 53
28 49
12 29
27 53
29 47
28 44
5 37
8 49
32 49
6 53
16 21
52 58...

output:

1 2 23 1 6 9 1 2 2 15 1 1 19 1 1 14 28 2 20 2 2 4 16 29 1 2 8 22 3 31 25 1 26 1 5 24 1 7 7 18 1 1 27 30 2 17 2 13 2 2 2 2 2 10 1 1 2 7 2 12 2 7 2 2 1 21 1 1 11 1 7 2 1 1 2
3 10 1 2
4 18 2 15 1
3 7 2 1
4 28 1 5 2
3 29 1 2
3 27 2 1
3 10 1 2
4 26 2 8 1
3 10 1 2
3 18 2 1
3 10 1 2
3 10 1 2
3 1 11 2
4 31 ...

result:

ok accepted

Test #31:

score: 0
Accepted
time: 8ms
memory: 17296kb

input:

62 78
4 15
56 60
21 22
54 58
32 58
7 50
31 32
3 54
34 57
14 16
18 39
31 41
25 48
10 40
38 54
21 54
5 57
12 31
26 54
19 29
31 47
27 51
24 61
24 56
27 49
59 62
17 52
40 55
6 7
33 60
2 57
36 49
10 19
34 35
49 53
37 49
8 61
10 44
1 57
4 18
18 48
12 28
10 25
29 31
11 31
35 45
7 13
45 52
42 47
9 33
9 45
4...

output:

2 6 1 29 1 18 12 20 25 2 31 1 2 19 8 2 30 11 1 1 2 1 33 1 2 2 2 1 1 23 2 32 27 2 22 26 21 2 3 1 34 1 4 10 9 15 17 14 1 2 13 2 1 1 1 28 1 24 1 1 16 1 7 1 1 1 2 2 5 1 2 2 1 2 1 2 2 2
3 3 1 2
3 33 1 2
3 19 1 2
3 1 12 2
4 29 1 12 2
3 22 1 2
3 29 1 2
3 1 16 2
3 2 15 1
3 19 1 2
3 2 8 1
3 19 1 2
4 34 2 4 1...

result:

ok accepted

Test #32:

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

input:

108 141
27 103
36 83
20 81
18 106
79 92
87 95
23 69
50 67
32 85
50 53
50 86
13 52
13 104
20 38
46 89
24 94
12 18
33 98
17 41
14 106
47 96
27 84
30 68
50 98
45 70
45 74
13 16
99 101
41 89
3 35
13 44
51 54
45 82
48 97
69 82
22 101
23 76
4 20
5 83
18 80
41 73
14 27
19 34
44 67
20 90
47 66
10 100
7 75
1...

output:

55 69 16 35 2 2 53 6 1 44 51 57 49 43 1 1 34 1 65 2 2 8 2 2 39 21 38 50 61 25 67 1 20 30 1 1 42 17 63 33 46 41 1 2 1 3 1 2 62 2 2 1 37 2 66 2 2 58 1 2 56 15 32 2 2 40 2 2 1 2 24 23 1 36 1 59 29 54 52 1 47 2 68 7 19 1 13 1 1 2 1 2 31 4 22 48 18 12 2 28 2 64 2 1 2 1 2 1 2 5 1 2 60 1 1 10 1 1 2 27 2 2 ...

result:

ok accepted

Test #33:

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

input:

94 114
14 86
45 79
67 81
30 63
24 93
60 93
40 69
41 88
25 42
6 13
3 87
35 91
85 93
59 79
51 84
43 75
31 57
3 86
48 77
53 82
44 47
33 77
73 81
51 67
1 52
38 71
28 63
7 68
7 18
79 88
40 71
30 70
6 83
66 78
4 31
25 84
10 94
62 89
43 56
9 93
15 57
22 53
50 93
13 91
26 32
66 90
18 78
14 19
58 80
33 41
61...

output:

25 1 1 5 31 22 2 2 1 34 1 2 27 26 2 2 1 2 10 1 1 2 2 10 33 19 28 2 24 32 1 2 2 21 2 10 2 1 14 36 40 3 2 38 1 20 1 2 30 10 15 13 1 39 23 2 42 12 1 1 2 9 2 1 2 1 2 2 1 1 2 1 6 1 1 41 18 4 2 1 35 37 2 2 1 10 7 11 2 8 2 1 1 1 1 2 29 2 2 1 1 1 2 2 2 17 1 1 2 1 1 2 16 1
3 2 18 1
3 22 1 2
3 22 1 2
3 41 2 1...

result:

ok accepted

Test #34:

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

input:

50 60
5 6
1 16
8 15
24 39
11 45
30 44
10 25
22 41
19 39
7 29
3 33
21 28
7 30
6 7
10 17
9 38
35 45
1 46
19 20
7 15
28 31
18 21
11 12
32 37
24 45
23 27
2 3
16 38
14 38
25 27
4 37
20 31
22 25
8 45
40 47
3 42
5 25
4 14
43 46
38 47
36 48
12 13
2 32
34 42
23 37
28 44
33 43
13 17
26 49
41 46
28 48
18 46
46...

output:

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

result:

ok accepted

Test #35:

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

input:

94 120
43 81
79 82
53 76
65 87
3 66
10 51
3 9
10 53
34 77
63 94
43 50
46 72
13 94
11 32
71 76
72 75
56 88
8 60
17 45
31 57
61 77
14 22
49 50
29 65
2 90
4 51
38 45
8 56
23 44
18 61
21 55
45 69
15 74
22 43
21 44
40 44
1 3
25 94
33 94
37 90
58 77
65 79
60 75
36 54
28 86
16 56
75 85
86 88
32 75
20 90
41...

output:

41 1 38 37 2 34 9 16 51 7 46 2 31 2 2 39 25 2 2 2 35 1 2 30 19 16 36 24 1 16 2 32 2 3 26 5 8 42 2 1 44 45 28 2 29 2 49 2 47 18 23 2 1 33 1 22 1 16 4 1 11 40 2 1 2 53 2 10 16 17 2 1 2 52 1 2 27 1 43 1 2 2 21 15 1 1 50 16 1 2 1 1 48 1 2 14 2 2 2 1 1 1 1 1 13 1 1 12 2 2 1 1 2 1 1 2 1 6 2 20
3 2 19 1
4 ...

result:

ok accepted

Test #36:

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

input:

108 135
11 99
32 68
19 22
1 108
29 54
68 91
44 75
17 57
21 50
33 50
15 33
34 97
18 36
40 78
52 73
26 104
3 102
54 103
10 100
43 88
25 63
59 69
58 61
90 106
70 92
73 107
8 57
68 80
41 58
37 64
13 108
51 102
72 85
36 53
24 71
1 54
3 62
83 98
31 38
79 102
29 41
93 97
12 101
48 59
28 33
42 53
26 105
20 ...

output:

2 2 2 50 57 24 1 1 2 35 7 1 2 1 38 37 36 55 2 1 1 29 2 2 49 1 10 23 3 1 1 5 2 1 1 1 1 2 2 4 2 42 14 1 6 21 11 20 34 2 2 2 2 8 13 44 2 19 1 45 1 2 2 1 2 17 1 56 41 16 47 28 53 1 1 1 2 32 51 1 46 39 2 2 2 54 1 2 27 2 33 1 22 48 9 43 40 2 26 1 1 1 1 2 1 2 1 30 9 2 1 1 1 31 1 25 1 2 52 12 1 1 2 1 2 2 1 ...

result:

ok accepted

Test #37:

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

input:

105 135
50 65
60 77
55 85
48 65
22 94
10 65
13 97
28 70
87 98
70 73
7 40
7 90
5 89
64 81
47 61
59 84
43 86
82 84
92 101
39 65
2 13
25 77
29 34
24 84
34 63
1 45
9 51
51 58
63 85
2 18
18 56
55 97
32 87
5 31
41 93
52 77
20 42
61 76
1 55
47 99
42 72
8 21
83 96
26 75
34 99
2 54
2 43
84 105
5 104
2 36
65 ...

output:

40 1 59 58 1 26 2 1 42 23 35 25 14 1 13 15 2 34 2 55 11 47 45 1 3 48 38 16 2 10 2 53 1 17 1 57 29 2 1 1 28 1 17 14 50 2 9 2 19 24 37 2 4 2 2 52 1 1 17 2 15 22 44 56 43 2 2 39 16 2 8 16 2 2 1 2 51 2 2 1 6 1 1 14 1 18 2 46 1 49 16 12 27 2 2 2 2 1 5 2 30 16 36 1 15 41 54 2 15 20 1 31 15 33 2 21 1 1 2 7...

result:

ok accepted

Test #38:

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

input:

30 37
4 24
3 25
2 13
12 21
16 29
2 12
6 18
2 14
22 28
3 12
10 11
1 20
9 19
1 14
4 21
7 17
28 30
26 29
9 24
19 20
6 26
10 16
15 18
9 17
8 23
11 15
18 30
21 27
7 29
5 27
3 16
19 25
13 22
5 28
8 20
25 30
10 23

output:

1 4 10 8 6 1 2 2 2 2 11 3 7 1 2 2 9 2 2 2 1 2 5 1 2 1 1 1 1 2 1 1 1 1 1 2 1
3 8 2 1
2 1 2
2 1 2
2 2 1
2 2 1
3 3 1 2
3 6 2 1
3 3 1 2
3 10 1 2
3 3 1 2
3 1 5 2
2 1 2
2 1 2
3 3 1 2
3 8 2 1
3 7 1 2
2 1 2
3 6 2 1
3 8 2 1
3 4 1 2
3 6 2 1
3 3 1 2
3 11 1 2
3 7 1 2
3 3 1 2
4 11 1 5 2
3 6 2 1
3 9 1 2
3 7 1 2
3...

result:

ok accepted

Test #39:

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

input:

110 137
2 35
15 99
22 82
58 64
63 70
30 55
12 97
19 80
1 40
15 56
58 99
66 84
79 83
10 87
12 37
22 42
33 62
14 72
18 109
98 102
16 24
20 79
54 64
7 96
78 92
18 93
43 110
14 57
15 27
28 56
34 61
68 84
41 109
47 101
68 83
52 54
37 78
36 101
40 69
4 20
9 35
32 87
73 80
41 53
44 67
100 110
31 44
58 66
4...

output:

1 39 34 26 1 1 9 2 30 2 1 20 6 1 1 1 2 23 2 1 1 1 14 36 1 1 2 1 38 1 2 19 12 3 2 27 2 2 13 2 22 2 17 32 1 29 2 2 5 37 2 1 10 2 2 1 2 14 21 2 2 1 7 14 14 2 7 2 2 1 14 24 1 2 1 11 2 1 1 1 1 1 2 1 1 2 1 16 33 2 31 25 1 1 2 2 2 2 2 28 35 1 1 2 2 2 7 18 2 4 2 1 1 2 1 2 2 15 8 1 2 1 7 1 2 1 1 1 2 1 1 2 1 ...

result:

ok accepted

Test #40:

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

input:

110 137
2 7
28 38
41 109
32 51
79 100
16 94
52 56
34 98
57 65
3 59
90 102
9 78
57 94
39 61
22 24
62 84
12 96
82 99
13 68
2 53
17 72
7 20
84 90
6 44
47 97
34 83
66 71
1 59
14 54
33 67
9 14
69 94
60 76
22 105
65 104
24 101
5 42
56 81
4 97
29 89
47 76
11 110
10 25
28 48
3 21
63 87
10 61
75 80
59 101
19...

output:

28 1 2 38 2 36 34 2 1 1 2 1 35 29 20 2 16 5 10 27 32 2 18 7 12 6 2 19 10 17 2 8 30 2 2 1 2 9 2 4 1 2 10 2 2 15 1 15 2 2 1 33 31 5 1 13 2 2 2 37 1 2 1 2 2 1 1 3 2 22 18 24 1 23 1 1 2 1 2 1 1 1 1 1 1 2 1 2 1 25 11 1 26 14 2 2 2 2 2 2 21 2 14 1 1 1 14 1 1 1 18 1 2 1 1 2 1 1 1 5 1 2 1 2 2 1 2 1 15 2 2 1...

result:

ok accepted

Test #41:

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

input:

62 77
53 60
19 29
11 54
15 24
38 43
4 31
8 36
12 60
5 41
28 35
29 39
46 56
38 40
20 42
17 58
23 49
24 58
10 16
27 36
13 48
22 40
17 21
25 61
26 41
31 32
22 55
26 52
12 25
27 48
18 53
17 36
9 62
2 52
3 13
32 45
23 52
1 58
1 16
11 15
20 35
19 26
33 51
32 59
50 61
27 43
3 50
44 57
8 42
18 59
7 57
21 51...

output:

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

result:

ok accepted

Test #42:

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

input:

62 77
6 17
20 60
40 51
23 49
6 26
3 30
12 29
36 55
13 14
3 38
21 60
20 42
37 39
8 9
24 49
32 33
7 48
17 52
7 62
9 58
4 10
1 19
26 59
35 47
5 41
18 42
27 52
5 33
22 36
53 61
23 56
22 50
47 55
32 52
28 50
19 44
25 53
41 51
10 30
33 37
38 48
6 25
16 54
34 42
7 16
36 62
4 41
2 16
29 34
8 31
1 23
1 17
37...

output:

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

result:

ok accepted

Test #43:

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

input:

62 77
26 39
35 42
25 47
19 29
16 36
52 58
10 18
22 61
3 16
60 62
45 50
3 62
26 46
6 12
1 31
18 28
14 50
48 54
10 40
28 55
48 56
5 24
17 37
12 16
7 47
9 15
32 53
3 54
41 57
9 41
11 46
25 44
17 47
33 58
27 39
24 42
8 51
57 59
21 40
1 34
2 7
15 30
2 40
30 45
36 38
44 51
1 6
15 21
21 61
5 13
23 49
24 55...

output:

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

result:

ok accepted

Test #44:

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

input:

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

output:

2 2 6 10 8 2 4 3 2 5 1 11 2 7 2 1 1 9 1 1 1 2 1 2 1
4 9 2 5 1
3 3 1 2
3 10 2 1
3 2 6 1
2 1 2
3 8 1 2
3 11 1 2
2 1 2
3 7 1 2
3 9 2 1
3 7 1 2
3 1 4 2
3 3 1 2
2 1 2
3 7 1 2
3 3 1 2
3 8 1 2
3 2 5 1
4 11 1 4 2
3 7 1 2
3 7 1 2
4 10 2 6 1
3 3 1 2
3 7 1 2
3 3 1 2

result:

ok accepted

Test #45:

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

input:

68 91
33 46
33 35
6 36
38 57
40 58
2 12
15 26
21 54
2 49
12 46
26 67
9 40
1 16
1 23
27 47
29 55
2 68
15 40
37 40
39 66
34 60
14 21
63 68
27 31
32 56
17 37
2 62
9 48
29 34
19 53
21 43
32 59
21 32
7 29
5 44
18 29
10 26
10 53
24 65
13 22
45 51
33 36
18 54
16 59
32 33
7 23
51 61
2 11
56 60
3 58
15 27
11...

output:

25 1 2 36 2 17 1 2 16 1 2 28 35 1 3 21 2 10 29 13 2 39 1 24 18 13 1 13 23 38 30 1 12 33 2 2 8 2 2 1 1 14 1 11 2 32 37 15 20 1 9 2 2 1 7 22 34 2 1 4 5 2 26 19 2 1 2 1 40 1 31 1 13 2 2 2 2 2 1 1 2 1 1 27 2 2 6 13 1 2 2
3 1 17 2
3 15 1 2
4 34 2 14 1
3 2 6 1
3 9 1 2
3 25 1 2
3 9 1 2
3 4 1 2
3 24 1 2
4 2...

result:

ok accepted

Test #46:

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

input:

110 149
74 88
34 77
51 71
21 79
8 98
62 64
16 108
76 96
25 37
2 17
10 65
14 68
8 70
5 14
36 78
13 61
27 58
46 98
17 57
75 76
6 22
24 101
56 99
76 82
56 90
41 97
52 98
66 91
33 49
7 86
5 23
29 69
4 99
10 102
20 49
78 109
4 21
10 101
5 72
57 103
84 97
30 53
11 105
28 98
9 63
31 38
29 50
32 89
45 70
38...

output:

36 2 47 46 27 1 1 58 1 66 31 1 26 2 2 1 1 61 54 1 18 1 2 65 1 60 2 34 1 2 48 14 13 2 62 39 45 30 3 22 1 53 40 49 63 44 59 1 2 10 2 56 17 1 19 2 43 25 2 2 1 24 35 29 2 2 2 38 1 7 2 52 67 4 9 1 50 16 15 1 12 2 1 23 2 33 1 42 22 1 32 1 37 1 28 1 1 2 41 1 21 2 2 5 1 1 51 68 2 2 1 2 2 2 2 1 20 36 64 55 2...

result:

ok accepted

Test #47:

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

input:

64 94
16 39
5 35
3 44
25 45
4 30
17 29
21 54
2 25
15 28
31 48
16 42
6 63
55 57
24 25
35 40
15 62
20 25
14 19
22 44
25 58
27 52
34 40
25 52
13 63
28 43
17 28
7 28
42 63
6 27
25 46
25 50
14 42
26 36
22 28
28 53
1 49
1 37
36 40
23 44
23 47
16 50
29 43
23 57
33 34
1 60
25 38
12 30
25 56
13 49
26 62
32 4...

output:

3 6 1 38 1 11 2 27 23 1 1 1 2 41 1 2 40 1 9 32 3 7 35 3 12 13 24 2 2 39 30 3 8 18 22 36 42 2 2 9 2 2 1 2 1 1 10 28 1 1 3 5 16 1 1 2 15 9 34 3 25 1 29 2 33 3 2 20 2 31 2 19 2 2 2 3 17 1 14 2 1 8 21 37 4 1 1 26 3 2 1 2 8 1
4 31 3 1 2
3 26 2 1
4 19 1 2 9
3 3 2 1
4 15 1 10 2
3 13 1 2
3 28 2 3
3 5 2 1
3 ...

result:

ok accepted

Test #48:

score: 0
Accepted
time: 8ms
memory: 16492kb

input:

104 154
31 46
86 100
81 84
51 58
17 100
28 59
6 13
21 34
43 100
82 88
23 29
13 42
36 62
87 100
52 63
22 77
46 92
32 88
88 94
76 100
3 100
70 88
24 104
3 20
20 91
37 93
61 74
31 88
11 72
21 100
27 56
47 48
34 101
25 100
25 34
9 100
70 100
59 100
98 100
65 88
55 100
12 66
88 99
13 30
12 42
73 80
35 75...

output:

1 65 1 3 45 1 2 1 58 32 13 1 2 52 10 1 14 36 20 41 53 2 15 2 3 2 2 19 3 62 66 3 2 61 4 59 1 43 46 29 51 1 22 12 2 1 2 49 3 1 2 17 2 21 18 2 24 1 1 6 3 11 28 1 11 7 3 1 33 44 2 1 3 1 12 2 34 30 1 2 2 3 64 2 2 5 1 2 1 48 35 1 63 2 13 3 11 12 60 57 1 27 3 2 38 1 1 2 10 2 16 2 1 56 2 25 50 1 39 1 1 1 2 ...

result:

ok accepted

Test #49:

score: 0
Accepted
time: 8ms
memory: 16068kb

input:

104 154
77 93
42 47
56 71
38 91
54 88
34 66
51 102
21 88
21 62
12 29
27 58
30 104
6 104
5 104
25 101
71 104
46 103
39 40
4 21
21 83
21 69
1 14
33 54
14 53
21 93
64 104
96 104
43 52
15 21
79 104
32 47
34 70
15 19
21 31
8 21
21 98
68 75
7 13
25 89
20 99
18 26
23 30
28 73
35 66
7 61
18 65
3 72
100 103
...

output:

1 3 2 2 2 3 2 26 20 1 3 60 1 40 12 42 2 7 37 34 32 62 10 4 24 47 56 10 15 50 2 1 13 6 21 31 3 9 1 3 2 1 1 2 2 11 8 9 49 2 1 9 39 36 2 57 1 1 17 2 1 48 63 2 1 46 3 1 1 3 3 2 2 38 2 2 44 2 9 3 1 23 2 33 22 2 9 11 1 58 41 1 1 1 8 2 1 14 1 54 2 18 1 1 1 10 45 2 16 3 1 29 61 2 2 1 2 28 53 1 64 2 35 59 2 ...

result:

ok accepted

Test #50:

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

input:

104 154
37 46
9 50
16 44
49 104
35 95
24 68
4 68
1 73
43 68
41 95
15 47
50 62
73 96
31 90
30 62
31 54
60 68
47 73
32 68
12 68
52 68
27 42
8 67
5 8
8 29
7 81
65 98
64 92
10 61
40 89
33 47
8 17
2 36
25 64
46 85
8 100
42 75
8 40
48 74
22 53
38 93
68 102
8 28
44 54
66 72
23 68
33 35
68 70
9 68
15 20
8 1...

output:

2 3 10 2 2 52 63 55 39 1 3 1 1 8 3 1 53 2 48 42 40 1 36 38 18 2 1 3 2 1 1 27 1 2 10 30 2 31 3 2 1 60 29 2 1 61 3 1 43 2 34 7 2 1 13 1 2 1 22 1 8 37 54 9 47 32 25 1 10 56 2 3 50 3 2 2 24 51 9 1 64 1 19 1 17 2 3 2 1 12 1 1 15 20 1 1 2 26 1 3 62 41 9 2 44 11 1 33 5 4 11 1 6 2 2 2 57 16 3 14 2 2 3 2 1 2...

result:

ok accepted

Test #51:

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

input:

104 154
28 64
15 102
90 103
52 75
14 28
47 50
24 30
18 28
31 60
70 100
9 40
28 67
5 28
28 41
43 71
6 56
75 88
3 33
49 69
83 84
75 82
2 38
75 103
26 38
75 96
29 98
44 75
17 32
75 104
2 28
66 94
5 51
12 75
28 59
52 71
51 97
32 98
19 95
28 62
41 61
7 25
19 30
6 86
72 95
57 75
40 78
61 74
1 63
28 49
28 ...

output:

49 1 16 25 47 1 3 42 1 2 13 8 62 64 2 1 34 10 66 12 39 3 18 2 23 1 35 1 17 60 15 4 21 46 1 61 2 1 43 5 2 2 2 51 20 1 63 65 7 55 14 14 1 12 1 3 1 19 2 2 2 2 50 28 59 2 30 40 2 2 22 32 67 13 27 44 33 3 1 1 31 2 2 1 5 1 4 2 1 1 2 3 38 12 2 1 3 56 1 1 9 52 1 2 3 2 2 45 1 1 29 2 2 48 1 6 11 24 2 3 58 2 2...

result:

ok accepted

Test #52:

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

input:

44 66
12 33
22 36
6 35
17 40
6 42
18 26
9 10
24 34
17 26
1 25
9 44
36 40
9 32
34 36
8 37
9 30
3 11
6 16
27 37
9 19
24 26
23 44
11 36
3 4
15 23
23 39
9 39
10 25
31 41
4 36
36 38
1 9
17 21
19 25
2 33
28 41
2 9
27 43
28 33
5 37
21 36
25 35
3 27
9 15
7 33
32 36
9 12
18 43
9 29
23 28
6 30
8 36
20 24
9 42...

output:

34 22 3 18 26 1 40 6 7 38 33 21 24 23 14 41 10 1 8 39 2 30 13 9 29 1 31 1 3 12 11 1 1 3 3 1 36 1 28 2 20 27 2 32 1 4 37 2 2 3 25 17 1 42 1 5 1 1 2 16 35 1 3 19 15 2
4 37 28 1 3
3 5 1 2
3 31 1 3
4 21 7 2 1
3 42 1 3
3 11 1 2
3 1 27 3
3 23 1 2
3 19 2 1
3 27 3 1
3 30 3 1
4 18 7 2 1
3 4 1 2
3 6 1 2
4 17 ...

result:

ok accepted

Test #53:

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

input:

104 170
24 100
76 101
7 56
68 69
36 70
11 31
38 69
1 73
6 72
37 78
3 22
11 41
34 100
42 69
38 76
32 87
40 51
6 43
5 91
17 21
40 97
2 3
48 69
40 45
54 69
69 86
4 51
19 69
64 91
46 69
20 69
40 103
91 93
4 59
84 93
60 69
47 95
12 44
19 76
69 71
30 87
74 97
95 99
4 37
13 87
36 80
63 78
17 57
62 69
30 69...

output:

95 78 21 91 97 15 81 83 1 39 33 14 108 94 77 103 51 3 1 41 31 1 61 24 93 115 47 80 8 2 85 55 2 46 1 73 10 72 3 98 102 27 32 2 1 96 52 40 110 106 112 88 45 67 12 3 1 25 9 16 22 2 82 11 4 1 1 28 2 60 66 1 3 100 75 76 89 1 1 1 113 3 84 86 1 58 35 1 66 1 2 53 30 67 99 1 109 48 56 43 9 59 71 1 66 9 26 7 ...

result:

ok accepted

Test #54:

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

input:

104 170
98 101
67 103
87 98
46 65
10 89
60 71
14 54
32 89
14 56
46 104
75 89
4 42
14 87
26 78
80 89
17 68
68 83
9 48
14 85
14 70
89 102
95 98
4 11
27 78
37 68
12 89
25 45
29 37
14 28
60 85
14 47
14 42
33 89
8 89
25 30
1 14
84 91
34 89
14 17
69 89
14 16
3 9
27 39
5 103
43 99
14 82
29 62
31 86
18 49
2...

output:

71 97 70 16 63 1 84 21 94 15 33 83 74 4 26 77 76 43 93 99 29 2 1 1 2 40 102 1 87 90 103 86 27 39 2 3 14 54 81 46 79 1 4 96 19 88 4 1 10 1 36 4 61 31 20 13 72 89 44 75 2 78 101 64 35 82 32 68 60 9 95 42 55 2 6 1 8 57 5 58 38 1 51 67 2 4 4 98 25 2 2 111 85 1 1 50 48 80 2 23 59 91 66 100 92 13 30 2 2 1...

result:

ok accepted

Test #55:

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

input:

104 170
19 61
6 58
85 92
70 81
45 47
31 47
28 47
29 47
47 72
60 81
42 69
81 101
16 94
22 81
37 80
68 83
17 75
47 104
42 59
77 96
47 71
25 51
14 61
47 78
38 55
13 47
32 57
36 81
70 83
81 86
11 88
5 85
7 50
81 91
35 47
32 52
34 103
1 81
7 16
24 87
20 81
55 81
47 69
72 87
8 83
23 81
33 40
42 100
47 97
...

output:

14 4 17 78 30 56 36 19 57 90 34 82 1 70 85 75 66 26 12 96 55 43 29 25 65 59 86 105 74 83 23 16 80 72 38 1 69 3 67 54 63 108 40 2 4 98 109 1 18 92 15 20 5 2 1 58 1 50 51 1 32 35 1 21 73 2 52 94 6 42 33 27 1 22 88 49 8 28 2 24 41 1 95 106 101 2 77 4 68 12 87 93 2 2 1 1 37 2 39 79 2 2 91 1 1 48 44 4 45...

result:

ok accepted

Test #56:

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

input:

3 3
2 3
1 2
1 3

output:

2 3 1
2 3 1
2 2 1
2 3 2

result:

ok accepted

Test #57:

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

input:

1000 1800
259 399
188 963
159 354
133 905
437 589
188 803
402 605
70 120
349 815
321 984
18 396
462 931
120 563
649 830
453 819
167 314
120 315
421 839
581 737
59 542
691 751
210 560
319 684
519 560
202 243
446 727
49 70
489 843
188 471
259 434
224 568
498 881
345 908
283 953
105 902
252 886
84 454
...

output:

360 1029 588 1 2 860 610 686 185 1008 1 466 76 1003 954 836 827 2 501 326 496 945 685 706 1 785 2 2 178 1 165 219 202 372 1 1 40 326 2 234 392 538 302 470 743 372 938 394 842 318 413 2 23 214 846 52 703 126 1 140 916 1005 11 764 2 2 249 254 313 476 314 412 536 1 851 371 683 618 768 564 732 504 236 3...

result:

ok accepted

Test #58:

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

input:

1000 1800
520 781
370 885
613 785
224 946
588 964
348 394
269 288
71 145
6 961
89 678
415 823
109 778
10 967
561 784
610 947
663 979
212 872
281 974
440 497
104 909
377 440
169 954
926 963
439 832
479 912
380 551
466 566
508 809
649 978
553 730
180 861
268 790
161 616
184 343
397 635
88 467
367 645
...

output:

988 1 103 599 2 2 683 1022 658 648 210 87 151 550 585 1 249 80 747 238 882 403 504 835 2 1 293 159 1039 805 1 432 676 472 640 2 1 399 341 28 541 2 686 990 454 1 1 696 2 2 819 1038 390 1 808 1 624 743 933 725 1 183 29 149 2 691 661 329 139 523 960 253 366 349 1 774 236 147 1 220 448 878 338 359 612 4...

result:

ok accepted

Test #59:

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

input:

1000 1800
359 869
621 627
104 820
156 917
72 398
43 893
453 525
567 728
613 618
445 947
165 166
33 613
357 955
419 839
207 914
54 1000
628 967
488 874
4 747
808 893
328 615
364 977
267 970
335 422
500 728
867 893
429 863
728 864
355 841
318 858
293 893
654 987
125 721
741 797
28 795
160 770
275 496
...

output:

1 385 272 407 312 112 474 2 658 246 2 238 1 948 2 597 476 859 1 571 741 720 488 1 162 600 2 160 188 590 67 2 395 635 183 1 416 708 1 949 898 1043 809 157 374 2 1 80 874 267 843 559 772 856 1 1 215 881 2 12 374 917 706 908 2 322 273 500 763 306 891 418 533 245 421 2 642 1 611 104 449 510 2 96 1 354 7...

result:

ok accepted

Test #60:

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

input:

1000 1800
732 925
670 828
49 851
29 127
929 987
722 858
319 595
224 313
140 898
539 959
173 730
263 643
202 615
21 582
127 128
332 344
107 123
359 790
21 993
530 670
21 610
420 484
751 883
275 733
55 896
643 952
60 718
387 670
143 429
589 677
92 438
670 688
151 491
491 670
150 882
365 670
129 221
32...

output:

145 905 689 2 2 1 758 740 2 573 344 51 420 714 877 1043 2 1 486 462 916 182 560 2 490 50 1 553 769 334 328 1056 2 893 713 1026 28 1067 2 225 281 2 417 184 436 1033 13 1057 268 1 678 597 2 931 126 381 763 1 619 48 1 409 15 844 1 559 181 343 708 345 1 109 2 155 1 818 625 309 2 2 563 1004 415 431 583 4...

result:

ok accepted

Test #61:

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

input:

1000 1800
449 743
134 197
140 917
575 773
19 917
172 913
243 595
256 750
39 960
45 114
409 919
369 874
364 578
100 307
617 863
276 985
134 793
237 465
573 917
22 79
379 456
196 983
106 863
59 112
420 994
290 711
549 771
422 485
28 552
161 919
71 149
422 917
118 863
712 987
382 821
319 917
343 840
81...

output:

682 683 883 291 949 134 20 616 748 1 427 2 285 2 806 2 390 2 674 2 2 257 800 2 1 983 725 1 632 426 459 307 244 224 382 863 715 807 199 2 2 552 1 1 1003 2 1 397 417 75 887 1061 1014 251 1 987 677 618 1056 446 1075 837 403 310 631 19 178 2 875 387 410 417 751 207 2 610 466 1 706 43 759 999 817 524 750...

result:

ok accepted

Test #62:

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

input:

1000 1800
71 337
173 565
922 925
235 893
822 932
247 404
625 672
26 235
300 417
122 895
553 684
235 665
465 680
828 982
235 610
681 976
442 807
428 444
55 235
315 391
558 792
98 221
57 697
178 235
36 147
310 312
785 916
205 558
235 838
775 816
224 310
456 679
147 799
235 909
235 360
151 248
302 577
...

output:

475 2 404 723 157 957 564 496 1 150 1 710 2 985 636 426 299 243 1012 358 204 173 357 761 299 274 201 2 635 922 567 812 1 529 911 35 2 149 1038 2 386 638 112 237 601 1 2 358 2 1002 632 2 803 855 1 701 582 194 943 444 316 373 665 633 375 899 338 951 241 662 1026 2 623 146 270 1 229 1 168 462 1073 828 ...

result:

ok accepted

Test #63:

score: 0
Accepted
time: 64ms
memory: 18488kb

input:

5555 9999
142 3105
3769 4712
2737 5484
1028 2311
3424 4648
1315 2280
5041 5102
1210 4076
2966 3603
1874 5183
358 4184
741 5507
1455 1512
61 886
58 2702
1268 3162
2307 2532
555 1307
3948 4851
1354 3579
2293 4154
102 777
280 3997
3677 4201
271 2381
4256 4377
1780 5041
5046 5413
689 4184
3440 3618
1308...

output:

180 1 1743 1 3075 2 5811 4342 2 4458 5306 3905 5582 2 4242 4136 5108 1 4482 1590 5238 5803 1640 4642 1 5650 2201 217 3766 410 2 2408 2 2 1 4776 1009 2291 3368 3226 2 1 86 1 1370 868 4229 3949 407 525 1288 1485 5378 2037 2840 1605 1360 1 4128 4536 5565 5475 1 2 5348 5377 368 3634 2045 1936 5220 908 1...

result:

ok accepted

Test #64:

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

input:

5555 9999
1262 4959
1894 3341
2140 5396
1363 3021
752 1194
2391 2897
806 4916
2455 2827
2752 3431
3736 5009
2904 5272
3235 3526
970 1025
966 1448
3450 4943
1614 3152
3462 3876
3440 4980
2140 4576
3097 3654
342 1663
3874 5313
2910 3626
2140 2304
1234 5543
486 3819
690 835
1352 1857
1041 1933
2969 477...

output:

1371 4476 3234 5188 31 4169 1 3900 5770 2925 1961 3505 2189 1 174 1288 5103 1092 5116 4006 4224 5084 2799 1704 3246 2 1689 2 5278 1565 1025 3684 88 1 2634 2411 316 2 1951 5517 2 2 2 4814 1623 1735 2444 3812 4893 737 2167 1 5219 5299 4917 691 4290 2027 3547 3526 967 5448 522 2291 4471 2 1543 2 1984 2...

result:

ok accepted

Test #65:

score: 0
Accepted
time: 65ms
memory: 17748kb

input:

5555 9999
2052 3622
2954 3331
3929 3974
293 592
520 2404
1076 4201
805 5495
1614 2626
2832 3089
3630 4484
904 2074
823 3343
239 5129
1053 2865
476 3206
2332 3763
242 3023
2623 4634
2049 2585
3226 5469
912 1216
2816 5250
1112 1998
2954 3661
656 4170
569 5003
1252 4412
662 5262
213 1564
4114 4929
1746...

output:

766 4246 4393 2042 152 907 3447 5023 1189 420 4754 5039 5545 1 104 5759 307 1243 1 4760 4190 4064 3874 84 1971 1 4375 1 2315 508 3474 2 2 2101 2472 4076 2490 811 1115 3740 4079 1535 4099 432 1430 1604 2 2948 2 3944 2599 374 2 1536 1341 823 1 2 5537 4913 1411 4481 1217 2917 5734 2741 2217 4 3184 2 31...

result:

ok accepted

Test #66:

score: 0
Accepted
time: 53ms
memory: 17920kb

input:

5555 9999
1143 5042
4102 4810
1483 4150
2735 4011
586 3881
1203 1722
2462 3887
525 2261
637 3076
871 3697
2387 2668
1124 1839
392 5505
2520 2843
4467 4639
4007 4068
1379 4355
3436 4835
3316 5122
2644 5058
3926 5090
3321 5049
1788 3153
4436 5469
1162 4857
1645 1761
145 4386
2404 4060
433 4727
2645 49...

output:

4316 3148 3333 2718 1297 1 2271 2176 4378 2 1349 4363 2 2352 1989 1054 2175 1551 3955 2467 4725 4624 3230 3341 4790 2 4604 4812 770 559 1404 5060 1 5548 1053 1 1 1745 1 1698 2 3196 1583 4784 2 3930 2 488 2443 703 4541 2 3117 2 2668 2 771 4795 3041 2 1649 4069 3597 4821 2520 2175 2743 1305 5059 4404 ...

result:

ok accepted

Test #67:

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

input:

5555 9999
1695 3975
1608 5240
1005 1500
4086 4842
829 4977
52 5212
162 4602
1471 4603
1551 2075
912 4369
2406 4745
2845 3030
3189 4898
2505 3442
2944 4391
523 1953
2037 4778
1415 1868
998 4556
690 2291
1045 1527
1581 2557
321 954
235 4886
3495 5528
1672 2154
3765 4763
973 5489
4635 5201
1337 4648
43...

output:

1 5309 4385 3280 1 5194 5400 2922 1016 1 4551 5221 1995 2070 314 1861 1455 4975 1 2 2860 2 2 3125 2 3295 4019 1 1 3496 3005 1 2452 3633 2259 4412 3680 808 2490 1168 1944 3380 5031 2214 2006 5117 1 2352 1 4846 5682 1 1148 3742 2031 2702 3719 761 4862 2183 1 1 3918 5586 5263 1 3820 2 5443 689 3910 221...

result:

ok accepted

Test #68:

score: 0
Accepted
time: 66ms
memory: 18320kb

input:

5555 9999
1024 4311
1168 2599
961 3445
3511 4455
356 3352
2326 4819
305 2927
4461 4787
961 4533
4796 5248
1020 3418
3019 3231
410 2401
331 2088
267 4042
607 2886
1437 1777
2341 3615
2877 3670
587 3413
1174 1972
351 4883
413 3429
3173 5194
1679 5005
43 5028
456 5300
3029 4497
2795 4966
2900 3985
1238...

output:

1 4627 3912 1941 5194 2690 2726 1 3003 2211 4176 4246 2 1 1 4237 3569 1799 2923 828 3492 1591 1 886 1686 1 2132 1 2 2 5291 4123 3198 2 1993 1 1780 1987 178 1 2 1 2441 2977 4465 527 2 4561 67 4060 1361 1 4301 2 2 2 2070 2 97 592 1769 2 2 4483 3685 733 2 4645 2794 1 4470 1 2392 1 5593 1 4943 2408 3079...

result:

ok accepted

Test #69:

score: 0
Accepted
time: 64ms
memory: 18108kb

input:

5555 9999
2683 2778
377 1237
4128 5303
875 4026
3397 4602
3164 5447
824 3280
2233 3301
282 3297
1063 4201
1393 2016
1089 2699
829 4363
1992 3929
978 4662
938 5172
2287 4933
377 418
2355 4365
38 954
1475 2056
485 3274
2767 3053
3950 5432
3309 4387
503 723
978 3003
1530 3618
2849 2894
2871 5260
2217 2...

output:

2332 4863 4209 4696 1 1 2416 1 2 2 1 2184 5753 1264 1 3180 2 4932 2 5133 658 5584 4938 2878 2024 2 314 227 2952 1343 747 2330 712 4603 2021 1950 1754 4559 5858 2 2564 205 1888 3917 1392 2616 2069 1 77 3685 4548 1 5399 453 2 2 955 4043 3018 2511 5849 3057 2 1003 5238 4124 2899 3740 2591 3801 1 3862 1...

result:

ok accepted

Test #70:

score: 0
Accepted
time: 66ms
memory: 17996kb

input:

5555 9999
1930 3502
1040 1448
2624 2954
393 2511
804 2385
1868 5188
5 2229
1567 2921
244 2825
750 4656
650 2429
2450 5031
1139 4494
1960 3761
911 4277
3525 4069
1746 1982
68 2421
481 5234
978 3926
596 3092
997 1128
2486 4719
2366 4065
1940 2796
439 1774
1493 3040
1262 3022
2729 4637
1690 2912
2818 4...

output:

2022 170 4432 2 4617 3554 711 3854 312 1 219 2173 2206 1 3298 1 4022 431 2173 2 2 5021 2237 5052 3707 118 1978 610 5325 3284 3924 5588 3187 4807 2 1938 1 1316 3267 4640 4570 5756 2806 3303 2042 2131 2 1 4063 1 1524 1 215 2566 1573 5040 877 2 498 1822 5545 2547 3814 975 2032 3219 2886 1 5116 1603 426...

result:

ok accepted

Test #71:

score: 0
Accepted
time: 70ms
memory: 16852kb

input:

5555 9999
1789 3512
230 4431
417 3865
5335 5368
4749 5520
1543 3237
1708 2648
4256 5249
5106 5335
2479 2549
383 3118
2358 3768
1920 4619
964 3811
2916 5303
3012 5335
2524 4659
141 1711
159 3458
2253 4392
1253 5346
760 1559
1073 1153
59 4731
4943 5335
3346 3848
784 3141
3593 5546
1897 3408
146 958
21...

output:

4582 1 1 2418 1 1 3863 1754 5642 1928 2357 1 3881 1 1949 2721 4170 3459 2558 2249 348 743 3722 1 781 2 4867 3335 4767 3656 1415 66 2930 3654 3286 3526 5828 2261 2 2520 2726 3744 1 2 2069 718 2455 1527 237 2310 3592 2 5576 453 1 5320 2 2 724 2 1 4147 3864 1869 1057 2 5607 1723 2 2 3188 3462 3668 2 1 ...

result:

ok accepted

Test #72:

score: 0
Accepted
time: 65ms
memory: 17524kb

input:

5555 9999
2304 5256
1016 4317
175 5340
438 5354
4202 5117
583 2387
1140 3712
2643 5234
1266 2296
1913 5294
3512 3829
2371 3791
4890 5294
619 2582
301 4652
1854 2816
1582 3957
1407 2264
1795 4566
1422 4644
1992 3580
5253 5439
2673 4315
456 768
4075 4641
4397 4917
3990 4376
1882 1904
2381 4693
1683 32...

output:

5038 731 5050 1 1690 978 2162 3658 1 5300 2289 1053 3544 3023 2 2320 1309 1 2 4242 2 1454 3519 3073 1006 2809 1 1 4355 5007 2965 568 2024 1 195 1509 2471 2 1 5655 2428 5369 3038 796 685 2629 1 2 1666 2246 1503 5689 2 5781 765 3314 2872 1 2348 345 1716 5429 967 1 1981 2814 1 2 5654 943 1322 1260 5487...

result:

ok accepted

Test #73:

score: 0
Accepted
time: 69ms
memory: 17928kb

input:

5555 9999
1022 4933
839 1665
1534 5295
3097 5549
3387 5232
2976 4873
2089 4779
31 3171
4154 4444
3588 3674
2984 3014
352 2736
863 2885
2393 3620
1444 1562
143 4312
2764 3519
283 2089
1421 3209
1995 4534
2338 4534
2982 3760
4812 5242
2089 3592
951 1345
1208 4867
1870 3817
86 3694
623 1534
1534 4304
2...

output:

3821 2741 3271 4638 2989 3995 5463 15 1712 2 4307 1 1553 1 3882 970 4578 2921 4776 3065 4376 5360 4802 43 4715 3456 538 1586 1594 4055 4869 97 4434 1557 2 1347 1014 4330 2 3360 1 1036 4007 2 5430 3855 1986 2 2 5814 1541 349 2877 2 2413 5280 1 1 2912 1 2 2754 2744 1 5154 3184 5543 4691 1934 827 2 257...

result:

ok accepted

Test #74:

score: 0
Accepted
time: 66ms
memory: 16604kb

input:

5555 9999
3889 5549
959 3112
1159 3380
1177 5282
1319 1505
3362 3734
1605 3889
3134 3763
149 1752
580 1999
291 4664
3882 3889
1287 2599
3411 3902
490 3245
1343 2673
824 5373
115 4798
423 2719
2059 3944
1386 5222
4604 5175
698 1627
908 5309
1711 2281
269 1752
1632 3889
1419 3439
830 5319
1670 3889
28...

output:

5866 4267 529 1061 1 4181 3487 1349 3461 2 1477 3733 1511 1 4614 2905 1 472 4452 2058 851 1 2002 2 2 2005 167 2 2 3465 4576 1913 1402 3964 1 4515 1 2 2363 3293 3593 2293 5694 554 2 189 33 1 945 1 4532 5441 2293 3362 1379 2 2464 2967 2 2 4497 1 973 2 1 3788 3622 5418 1588 551 3070 3131 2 2143 2753 46...

result:

ok accepted

Test #75:

score: 0
Accepted
time: 75ms
memory: 17096kb

input:

5555 9999
777 3919
105 1264
4091 4458
575 2432
2295 3559
319 2692
329 4520
804 5403
5002 5208
1864 2692
1155 4856
1153 4358
3074 5142
2392 4511
36 1457
1640 4581
760 1386
1151 4755
1003 4395
5308 5394
655 4521
2583 3778
53 2282
1065 5137
3074 3480
252 3201
1045 5020
2644 3058
286 4997
3017 4973
1563...

output:

1 3653 1981 676 5107 3151 2235 4511 4148 4773 2 3915 5080 1 1463 2 674 1 2073 2 1538 2 5227 5447 3261 3005 4366 2 703 2 3882 4458 3838 3536 2 5142 1414 2 1267 2 378 2740 1 1 662 2057 2770 2490 5119 1552 1144 2360 1662 5417 4396 2 1 4327 3543 2785 4600 3545 5298 2 1508 3652 4614 1391 1234 1929 790 42...

result:

ok accepted

Test #76:

score: 0
Accepted
time: 66ms
memory: 16424kb

input:

5555 9999
2927 5071
3301 4461
1938 2143
4132 4918
4443 4742
1982 3553
3854 5000
2931 4742
1588 4976
2973 3271
2038 2526
866 4095
1983 2590
3393 3953
3955 4540
4145 4742
1595 2273
2909 3153
1901 4478
1730 4742
1339 3329
2092 2964
415 3711
2610 3100
2882 5415
1495 5131
4742 5454
1310 1901
1702 3875
65...

output:

2999 228 1381 2266 3305 5763 2 5731 471 1119 1 1 1 2 3587 5657 2134 2690 377 5161 5793 1861 1 5498 3888 1 4965 5572 571 3546 1699 3592 3250 5482 17 1832 1317 986 1242 1670 5262 327 4010 2231 2149 3679 4973 3461 3549 934 2531 1 2 2134 2 1 3790 1 3870 1055 2134 2411 5729 2 1 2 3193 2 4100 1119 2 1 576...

result:

ok accepted

Test #77:

score: 0
Accepted
time: 62ms
memory: 16580kb

input:

5555 9999
14 1063
526 5120
775 5520
882 5106
4883 5106
3042 5497
477 3880
1685 2528
1670 1854
2875 3607
4343 5057
4630 4997
2914 3139
577 2682
2259 2875
2674 4405
4148 4405
2875 5378
170 2271
282 2875
1685 1837
1359 1445
1428 2044
3087 3388
2506 2875
4282 4731
2489 2875
3084 3109
1915 2831
1080 2875...

output:

2012 2076 2088 1 774 1779 4641 4162 5523 5332 723 3036 1 3299 2346 5021 1168 4425 2025 4758 5706 2 294 3965 5490 2211 4203 2494 5654 3580 5565 1 2713 4822 1 103 3310 4975 1942 5639 692 4342 4513 1 3759 1278 3860 4557 1 78 1064 2 5726 5750 118 4552 2709 1575 2145 4710 3389 5087 2280 1 2711 5157 4647 ...

result:

ok accepted

Test #78:

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

input:

2522 3678
1665 2057
294 1330
788 1415
146 1494
273 1419
593 2267
383 1356
1488 2179
1204 1741
404 1392
811 2070
1079 1463
240 636
1000 2158
1171 2421
465 979
814 927
369 2402
693 1830
286 1543
565 1221
375 1824
567 2431
1020 2178
327 1577
880 1719
365 2201
465 1666
207 2454
1278 1349
1412 2025
550 2...

output:

1 2 38 1076 1652 1 1362 1659 2227 2233 1214 1908 1354 2 2158 2026 1528 2093 2297 1 2 1633 1 1109 1971 1373 2 1904 1 511 212 2238 816 980 1564 1695 818 244 1 102 1597 467 1 557 875 1181 101 488 1 1 534 1623 293 734 1228 1606 2 876 1075 2 605 2 2 1 2015 2 1 1759 1477 245 2068 1227 490 2 1 761 1 184 1 ...

result:

ok accepted

Test #79:

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

input:

3246 4746
1629 3038
37 2425
736 2561
65 310
2591 3150
217 2256
547 2658
644 1617
2763 3194
1577 1611
158 2290
537 1882
439 2922
1048 1516
94 2930
2999 3073
201 1613
325 2153
260 2523
23 1458
485 2103
2575 2874
1617 2141
370 898
1959 2550
1810 1841
149 1541
125 559
2290 3019
146 3147
389 2763
325 788...

output:

2 1 1654 2606 1 2 2468 911 530 1484 1411 1 2537 1207 1 552 2 281 2682 2215 447 2860 912 1 1 429 970 2254 1410 333 531 1667 2 1273 1850 2493 1076 1 430 2852 2 1109 1 775 2445 648 599 1 1108 1 2 2770 800 1753 1 1107 1719 1430 1376 1 2347 1 672 1 2157 99 1341 2 408 1 1 2262 2002 913 1 2212 999 1272 26 ...

result:

ok accepted

Test #80:

score: 0
Accepted
time: 6ms
memory: 16364kb

input:

3446 5046
850 3446
1095 1118
1453 1470
1365 2819
361 2173
1930 2611
1105 3242
286 1593
1201 2108
2527 2766
2120 2566
1704 2805
2260 2781
962 3384
456 3360
55 3263
1056 1594
438 2480
898 2506
1507 2220
105 3135
945 3427
1782 2038
39 3253
757 2020
674 2231
1181 1900
2200 2295
375 2066
580 3440
2527 32...

output:

1 2 2 2 3118 2 1354 1246 1 260 158 2989 1706 112 102 1838 2227 1 2372 1176 1704 1582 1428 681 2 293 1 1281 1391 655 261 3084 1544 1011 2883 2 404 1 1 2133 630 83 2894 1 2699 212 3105 365 2 2 2897 3095 1175 1 2 18 1834 1 2 3026 789 949 2688 2 1543 2 1 2954 2 2 2904 1912 1738 2649 2 511 1955 2 2773 1 ...

result:

ok accepted

Test #81:

score: 0
Accepted
time: 6ms
memory: 16888kb

input:

4070 5970
804 3176
1834 4029
1214 3459
1992 3207
1707 1743
1327 2031
1431 2635
1351 2446
2459 3180
551 711
3103 4012
980 3110
626 2297
1630 3079
452 1951
3588 3898
713 3603
711 2594
3675 3862
140 3741
1153 1304
561 3807
1022 2669
632 1852
1602 1603
231 2729
70 272
793 1491
1201 3452
541 1751
1633 23...

output:

3720 3794 2 1 3316 2121 2 1 2 825 2 1 3587 1614 2936 2 2 827 1695 2 957 1 2 2 1 1 1438 2172 2 1592 640 3238 477 1631 1882 3342 1117 3554 1 1151 743 2059 167 1 3 166 1 2 1084 1591 1 828 1384 1 303 1 1 2650 2 1 1 1 855 1552 2378 567 988 2560 2436 3656 1630 2133 1629 3583 3181 2642 3240 1255 2181 1 1 5...

result:

ok accepted

Test #82:

score: 0
Accepted
time: 12ms
memory: 17380kb

input:

4142 6078
616 667
2441 2752
1396 2690
369 3340
1407 2506
82 3706
3769 3964
922 3454
327 1297
1298 2421
27 684
633 2831
1158 1978
519 2761
565 3930
660 2263
416 2690
738 3945
325 3563
932 2030
3112 3124
593 3956
1541 3445
2824 3030
1227 3945
1204 1765
1398 2761
1541 3216
784 3588
1575 3438
2882 3516
...

output:

1 83 3263 2550 2637 2440 1 92 2034 1664 3370 2326 2 424 2638 2 2747 1075 1705 445 3453 979 604 1874 1074 1 2843 605 2 1 2 2 2837 733 3226 2299 3811 123 2987 2373 1 3800 2 705 1 2 2871 404 1 3408 276 2 1 1 1 2165 3687 978 2072 1141 1788 2 1 446 2103 2 2075 1830 2 2452 2816 1746 2217 2376 1544 2 2929 ...

result:

ok accepted

Test #83:

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

input:

5106 7506
2203 2553
74 3604
3894 4857
1309 3814
689 3836
799 1414
2645 4186
3539 4357
1215 3206
18 1946
255 4807
570 760
2147 3286
4612 4860
292 3549
3190 5078
1206 5043
230 4696
740 4440
1766 2742
1555 4789
23 43
1585 4071
1312 3593
2431 4999
1069 1987
581 3444
4630 5060
40 760
1831 2287
1206 2790
...

output:

1336 1 2 3646 4431 2578 3759 1 1430 1248 1 2694 1 606 1 2331 4593 4510 2239 1909 2148 1761 1 6 2 1 4566 1 4387 2378 4298 192 2 3716 2512 3189 2617 631 2 2193 1 1081 3078 3184 3958 2 4044 869 3319 682 2882 656 3988 4409 2 1 1560 971 3410 1 3894 2 4228 2698 2547 2 301 733 3805 4384 234 1 2 2976 2104 1...

result:

ok accepted

Test #84:

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

input:

5306 7806
108 3527
2459 5250
2995 3535
801 1038
1429 2809
1900 3252
255 759
692 1939
508 2347
364 2020
242 5212
329 3297
4689 5259
1392 4921
2189 2217
739 1041
110 5158
154 2283
1072 2247
1311 1626
647 3963
763 4969
1395 2257
1561 3321
633 1395
30 364
2992 5161
1569 1878
872 1648
1067 3652
880 1900
...

output:

2 4359 74 2236 1 2703 2933 2 1 4123 2 681 2142 1 4505 2477 2 2006 4344 1727 3096 1 4462 227 310 2538 533 2 1 134 4284 311 2552 1 2283 1 4199 3110 158 1917 4792 3572 3555 2 3920 212 260 2926 1211 4106 2051 4148 2 1 2 2920 2331 1 2189 1391 4487 2 488 2 1317 2 3792 2777 2 2476 1 1 4921 4847 1 1 3039 30...

result:

ok accepted

Test #85:

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

input:

5330 7830
2125 5242
90 2315
704 1885
3374 3691
1274 4632
692 4517
344 1040
1013 1948
1149 4884
2604 4971
2957 4425
3004 3443
1487 3782
2913 4608
115 1800
227 1132
4145 5186
4258 5267
2181 3318
1619 4940
1256 2127
2320 4633
692 4852
1823 4759
1895 3517
3448 3888
517 1956
1565 2283
517 4218
883 1883
1...

output:

3314 4306 2 1 206 2293 1 4699 1 701 165 1108 2 680 2 1 2 1914 2 4673 2 2 2 1422 4603 1722 3062 4126 4696 1 4821 2 2 1 779 179 2 2 3785 4136 2 2945 1317 2 32 4784 2 881 1683 2742 2 3735 1 930 1139 2 1 3771 1 2 495 1953 395 4770 3138 1 1952 1 4101 3284 2526 205 3190 4760 2574 2705 3699 1951 2 178 2979...

result:

ok accepted

Test #86:

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

input:

5006 7206
1656 4438
2643 4881
559 4674
192 1053
1410 3407
625 3614
378 3515
2918 4915
517 2912
1757 4741
1943 3211
1012 4861
1725 3070
3326 3515
2204 3977
1024 2319
1338 2783
2731 3311
74 2456
1677 3866
2140 3611
2930 2991
1079 4565
2799 3660
122 1693
276 4103
1884 2736
1031 2567
938 2207
1294 4533
...

output:

664 3823 2606 1190 1 2951 2417 1 943 565 1041 428 834 1432 2 2073 755 2344 4378 1 1 1 474 1 2 2873 3213 1 1787 392 2 2 663 2213 1927 1 2 2 2 3078 1683 1 785 211 3159 3356 899 1 4275 2 833 3847 2772 1283 3737 2739 13 3211 1 4257 977 4238 3729 2 1838 1996 3208 178 1318 3338 3936 1 1319 3705 102 2 2 30...

result:

ok accepted

Test #87:

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

input:

2880 4032
274 2051
41 659
2005 2580
1778 2759
301 818
716 2455
274 2398
1586 2780
1102 1192
639 1148
456 1846
637 1619
1076 2129
931 1884
182 203
995 2346
827 1274
1319 2574
2005 2064
2018 2375
379 1393
865 1806
865 2872
2119 2341
1487 2863
51 1173
299 1375
2707 2769
2127 2155
290 569
566 2572
118 6...

output:

200 2 714 1407 334 1192 1867 347 2 1 1488 1 1635 1865 487 1253 1180 537 1005 1132 95 1 723 1 1384 1042 1542 435 385 2 871 1611 2 2 1728 363 2106 2 750 1 1 599 1 2 1381 1430 1534 1572 1086 36 2 587 1 2 2 1623 2204 1 2 1854 2102 1 1690 1777 2 659 794 1 852 56 1059 912 2 1 530 499 118 517 1 1315 1809 9...

result:

ok accepted

Test #88:

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

input:

2880 4032
713 1045
609 2781
1060 2155
1305 1432
342 1177
25 2257
1313 2875
545 1875
765 913
237 1729
14 308
466 467
216 1742
989 2721
570 639
1538 2438
658 1922
398 1794
1782 2182
1177 1608
900 929
988 1755
381 1632
1282 2044
2381 2629
2037 2420
502 1045
135 1379
1302 1542
971 2692
1805 1891
978 110...

output:

2207 127 1 413 838 1 1 426 1968 2 2 2 2 2 1 1288 620 1 1676 1 329 66 1 638 1476 1 2021 1734 1 1 1515 2 352 1196 2 896 2 1765 374 2040 2 1500 26 276 797 1 2 1 117 126 2 2026 639 1287 1739 1 227 2 1499 1055 2 1 1226 198 996 541 1058 1 1347 235 225 2 1 1 1 2128 1713 1 1994 1 1718 2 1203 1 2134 439 2285...

result:

ok accepted

Test #89:

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

input:

2496 3648
881 907
738 1029
948 2152
1032 1399
1603 1874
447 2186
700 729
429 1841
1856 2473
153 2007
67 1711
368 2473
1263 1368
548 1779
1538 2066
1007 1147
1630 2097
119 1297
1963 2121
1575 2272
1891 2247
890 2039
429 609
1297 1665
367 1400
1923 2021
1175 1258
1023 1925
759 1826
828 1175
578 1480
2...

output:

1075 1614 170 1096 494 1368 2 1 2049 637 1 217 1353 2 774 1240 1 19 1275 2 1154 1891 146 1229 226 850 1485 546 1 1490 241 1 2237 1277 25 1248 1291 2266 1740 1 1237 2 2189 354 1587 836 2 827 865 1553 1144 1521 1443 1344 1 1449 1603 1177 509 192 705 1718 895 1733 764 1 1 2 1214 602 1 479 2168 2 1022 1...

result:

ok accepted

Test #90:

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

input:

2496 3648
1114 2437
874 1679
1458 2376
1818 1928
565 1720
240 1098
322 2087
651 1565
357 1610
320 1078
235 729
34 2308
264 800
1308 1427
333 1143
1499 1855
1130 1558
1832 1994
534 805
331 2114
1990 2217
1055 2096
151 1640
877 1969
1554 2215
1837 2474
468 2373
1434 2169
11 1570
1023 2161
55 2495
26 1...

output:

2161 758 3 1858 943 1 490 1105 1 116 154 780 1 1549 2 1 1813 2 1 1 898 2 1951 2207 1540 122 1 1 1908 1621 1736 1876 2 168 2 1198 1 617 2192 2 294 1 1320 1 2 2084 586 1 938 1219 2 1322 328 2 1425 904 2002 415 1634 1677 1 891 1581 1504 937 2 838 577 1799 2138 1 1655 1267 1718 2133 1247 118 395 426 860...

result:

ok accepted

Test #91:

score: 0
Accepted
time: 26ms
memory: 18016kb

input:

4094 5117
790 2907
3216 4028
2442 2460
1094 4030
1548 3460
2226 2290
993 1814
1592 1791
1011 3833
1736 2155
168 1834
738 3990
1683 2970
2034 2550
423 3013
960 1316
130 2039
2351 2718
9 2376
2701 3801
3697 3923
17 2874
5 1506
1250 3639
1417 2966
1 1914
894 2457
836 3220
1030 4068
238 3319
845 1500
93...

output:

1 1250 38 1 1 786 432 1183 1172 331 78 234 1 1 264 702 1 1120 391 329 1 2 1 1 699 3 1 1170 764 2 2 135 256 2 2 2 1 2 2 1 660 1 2 1 1 1113 1090 835 303 2 1 2 697 507 483 1206 1116 1037 230 1 2 945 1 2 1 2 481 301 2 991 19 1 2 358 249 1 745 1067 2 815 1 2 1 455 137 25 254 332 453 114 2 1 443 80 1149 8...

result:

ok accepted

Test #92:

score: 0
Accepted
time: 23ms
memory: 18040kb

input:

4094 5117
1746 4080
631 3599
162 383
2789 3200
214 2735
2470 2512
2396 3557
2600 3634
94 385
853 1028
248 2600
119 4053
3238 3886
290 825
141 3047
107 2318
1039 3392
336 2689
2565 3141
294 3335
1100 2239
72 459
776 1685
1825 1976
169 294
2591 3443
774 2696
436 2857
2946 3896
3005 3782
3432 3699
1037...

output:

510 2 961 2 221 2 1024 225 2 2 1 103 183 423 1 2 145 1 450 295 132 604 1 52 1034 589 1094 2 2 1226 742 189 1 1 181 2 368 1 1 1199 2 513 450 1 616 1025 2 2 160 733 1 30 1 1 501 1 1 214 829 907 513 890 1164 1175 67 962 1 513 147 2 1 1 1 1 1288 274 1 1 710 1116 765 320 902 415 2 1 817 2 1268 730 502 52...

result:

ok accepted

Test #93:

score: 0
Accepted
time: 28ms
memory: 16980kb

input:

4094 5117
732 2622
47 3291
2243 4022
31 3945
677 2613
2187 2914
1647 2753
2196 2436
155 1966
607 1833
2528 2563
1919 3092
134 512
633 1637
1351 1848
19 246
2321 3771
1388 1555
463 2899
2947 3641
3184 3323
209 2287
977 3774
3540 3983
1199 3877
2012 2726
1677 3773
987 3048
3222 3502
1597 3568
3390 359...

output:

376 1 1 925 106 2 142 1189 2 1 1042 262 2 2 389 2 328 2 617 1 562 32 2 1023 266 668 691 1 2 2 2 1 282 665 694 1 1 2 313 1 295 545 952 241 1094 1 2 62 546 433 130 1 1 2 1141 1 1 783 2 2 2 1 2 709 649 1 2 304 1 1221 1 1 2 1 2 149 2 375 1036 1 1 323 130 1 2 1019 1184 809 285 2 2 716 720 2 1 363 1 253 4...

result:

ok accepted

Test #94:

score: 0
Accepted
time: 28ms
memory: 17596kb

input:

4094 5117
2360 2913
2799 3896
785 3717
1631 4068
679 914
760 830
1816 2201
1519 2357
1955 2533
1994 3577
900 957
769 2983
201 1813
1760 2736
1851 3076
1404 2282
2195 2850
1482 2087
163 3324
113 3447
1051 3911
3396 3903
854 2917
570 2220
2352 2656
1133 1420
2990 3527
2086 3601
2249 3840
2189 3877
276...

output:

132 226 1 463 971 1 374 347 735 1 461 417 800 1141 614 470 2 1207 1088 516 1 1 521 1 2 286 1091 801 2 925 78 1 499 1 2 487 1 215 597 2 1 2 987 1213 1 1 1 2 1 2 647 2 1 13 1 1 1216 514 544 1 2 2 46 420 2 388 305 753 2 1 143 366 715 2 1 1 341 2 749 2 1159 119 1 1047 420 618 1142 1 437 2 529 2 620 625 ...

result:

ok accepted

Test #95:

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

input:

4094 5117
591 663
2135 3803
3323 3335
2485 3571
1172 3797
1412 2710
1731 3530
2312 2888
103 439
3118 3458
2983 3261
485 3528
3377 4026
2 1124
183 1581
331 1532
509 1440
388 949
390 3743
1210 1273
862 2436
1347 4069
1362 4075
384 2639
2744 3848
1135 2973
531 781
346 3970
1913 2889
157 999
1096 3169
1...

output:

1 1 1124 1 407 918 1 69 609 2 468 295 980 374 246 1 475 1 70 1248 375 2 439 1 2 399 399 661 1003 719 1081 1 2 2 940 708 227 1 469 750 2 2 611 1260 2 1 2 298 1 1279 2 1 317 34 2 2 475 2 2 1071 450 1 2 1 1 2 1 112 307 469 390 1100 1 1036 2 813 1 486 2 316 1 188 399 1020 2 2 481 2 1 1105 682 2 1 1 453 ...

result:

ok accepted

Test #96:

score: 0
Accepted
time: 6ms
memory: 16576kb

input:

1748 2467
27 663
608 995
216 1724
342 1449
933 1300
1124 1203
121 1081
959 1474
425 1065
973 1586
226 1378
730 1154
789 884
621 1180
260 289
235 1456
382 693
614 1017
1096 1456
642 1194
724 1228
141 1390
823 1661
158 780
44 385
149 319
898 1485
100 503
854 1249
434 1706
178 1057
427 846
118 273
741 ...

output:

622 669 1 1 587 2 134 1 1 673 2 1003 2 1078 1 88 241 2 87 2 423 2 1 1012 1215 551 570 2 2 359 2 580 314 629 2 1 1209 688 559 337 289 1 2 1 2 316 371 472 1 628 638 395 820 1 13 2 1 706 235 830 581 19 1048 1086 2 1087 859 653 277 1 1034 534 2 701 2 1 379 1175 84 729 670 503 804 1108 680 687 315 240 95...

result:

ok accepted

Test #97:

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

input:

1748 2467
203 365
970 1478
289 782
445 1495
1343 1651
1022 1352
558 1427
291 425
450 851
887 1328
292 1007
1041 1431
279 337
148 776
578 1408
46 252
717 1737
854 1166
31 312
999 1445
966 1108
997 1162
359 577
546 1232
982 1633
551 1009
760 1350
1407 1502
1119 1320
14 1711
792 854
392 1307
542 805
10...

output:

1171 328 834 2 1 352 285 715 2 496 887 830 214 599 870 963 2 1170 2 1 999 1088 726 66 578 1 2 2 653 301 100 1 2 433 2 750 1066 126 948 1166 1 973 1099 1 2 1147 506 1 382 1 2 2 690 623 907 762 2 927 1007 763 1 529 780 1154 899 417 1121 976 1 136 422 844 1104 1 1 1 1143 365 1 1 510 431 1000 604 2 528 ...

result:

ok accepted

Test #98:

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

input:

5554 7904
3264 4958
2397 5370
775 5234
2745 4122
544 837
1035 1534
1088 5338
3651 3704
684 707
1476 4623
371 1144
1993 3704
2976 3209
4605 5018
1530 3673
1551 3617
4920 4989
1915 4725
1216 4937
727 5007
1591 1924
4231 4241
1264 2619
552 2050
332 2564
5231 5431
3144 3760
321 1127
5218 5476
644 917
28...

output:

2204 382 2 1078 2 2 1236 1924 1022 2 1 1923 1520 1 2642 1 1693 2876 298 1 1079 1970 1575 3250 1 2979 2 4032 128 2419 700 586 1 3870 3210 1548 341 4020 1042 2127 1051 1940 2 2 654 3427 2 484 2 2 2 1 3468 885 1 2928 1477 2 3940 2 2772 2 3262 2 1 542 1097 2770 1185 1 3600 2 1 1718 3928 1991 2 2 1 2533 ...

result:

ok accepted

Test #99:

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

input:

1748 2467
547 1049
1067 1513
319 1015
300 816
34 546
141 1232
409 513
168 997
2 1442
232 273
754 925
934 1444
553 1075
1331 1652
299 1171
1136 1398
680 1137
228 1377
854 1322
1406 1620
62 1368
31 796
83 1511
671 1581
53 1576
264 985
33 1555
613 1535
232 640
298 1655
1223 1561
464 1514
29 434
195 991...

output:

1138 472 452 595 1 287 144 123 1201 213 233 2 769 287 837 2 107 226 1 2 719 2 830 1 1 588 1 1 611 380 1 287 378 667 88 1049 2 120 1 775 783 1 545 332 507 1063 785 451 2 1 1 415 264 2 2 2 1 992 469 2 1 1 143 784 1 2 394 148 1 581 2 2 634 1129 950 1180 113 2 644 631 2 1159 391 1 1 439 1136 287 218 1 1...

result:

ok accepted

Test #100:

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

input:

1748 2467
663 841
1279 1497
34 883
379 1330
1174 1247
1183 1692
28 98
70 1354
525 1511
680 888
746 1072
1442 1690
42 65
430 1517
620 785
407 1028
971 1001
837 1256
429 517
808 1413
644 1565
452 611
460 1467
168 669
689 1380
15 1733
342 820
900 1366
566 1021
265 337
49 610
466 1706
297 1636
734 961
2...

output:

1008 704 946 2 103 94 491 967 462 1 752 8 923 477 555 381 2 480 1 387 142 1035 99 853 84 2 1 1 1 1 573 2 1108 2 377 97 916 1017 236 488 1 1 362 734 381 372 733 990 244 989 2 837 2 510 1 434 1050 2 1101 2 1 476 708 1197 1 711 1180 568 1 1186 198 251 920 200 613 1 296 383 2 2 2 806 1095 856 658 2 223 ...

result:

ok accepted

Test #101:

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

input:

1748 2467
583 1381
182 322
192 1021
838 1082
280 995
822 1586
93 338
1313 1630
348 1569
696 838
571 1549
155 693
308 763
828 1614
709 1168
1156 1673
129 458
386 1207
489 1704
68 1053
1214 1545
129 1115
593 967
894 1240
1578 1705
99 1713
314 799
227 1585
274 1511
785 1214
54 270
361 1575
712 831
839 ...

output:

362 1 492 384 729 367 1123 468 1171 383 198 692 908 1088 583 560 479 385 2 2 1087 1181 2 352 1200 2 826 1 1053 456 950 457 524 2 178 609 947 928 1151 872 1 1041 1 1 270 1 317 244 1013 603 1 1 1187 2 1 1049 457 476 283 637 2 1128 1 215 1 711 306 1 120 749 1 326 1089 388 125 461 2 701 1 1196 1 584 728...

result:

ok accepted

Test #102:

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

input:

4096 6142
2311 3854
766 3200
414 1836
277 1773
2335 2363
1260 3646
1057 1894
1348 3895
2425 2626
1142 2763
324 3968
454 3540
1048 3671
766 2495
1650 2424
764 2975
766 1526
277 3135
2776 2788
2257 3572
277 1502
277 4030
1674 2182
277 1959
1833 3299
2245 2957
2162 2885
174 277
969 2901
360 766
1823 19...

output:

14 605 1 1748 1 2 2 1 2 1 1053 11 1056 420 1057 1056 180 1738 2 1056 1134 1218 1 1872 1056 13 1056 1206 1 234 14 894 1 3 1733 14 1 1056 1061 1 1756 1 1061 1361 710 265 2009 988 1474 1471 1 11 1061 1055 714 1055 2 1193 725 308 122 379 389 949 1 1052 1 1526 1 13 13 3 544 3 1 2 1 1 1464 1 1 2 1 1727 2 ...

result:

ok accepted

Test #103:

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

input:

4096 6142
2358 3071
3011 3076
357 4026
2647 2904
2015 2795
1717 3595
361 1234
905 2676
932 2992
2451 2556
1351 2891
244 488
1984 3192
1729 3474
3588 3765
1757 2599
2567 3595
401 1172
281 2777
904 3255
2023 3835
935 3595
3240 3450
2362 2992
176 476
2550 3149
1757 2900
894 3814
2888 3610
372 3856
1388...

output:

14 3 1 1 12 1745 1056 1 13 1055 1055 12 2 1 3 104 1206 1 3 3 1 2039 2 2 3 3 70 1 11 12 2 1706 616 1117 1985 1386 421 555 750 1 1540 745 1837 1314 1 583 2058 14 1 1079 1 194 1056 600 2 1 1 13 3 1 3 1735 2 1269 1067 1 2 3 1113 1 1053 12 1053 425 1093 1 77 15 2 1763 3 1165 126 1056 2065 29 1 710 1 1662...

result:

ok accepted

Test #104:

score: 0
Accepted
time: 6ms
memory: 15964kb

input:

4096 6142
1170 3885
1090 3302
2111 2784
418 3658
444 3532
865 4022
439 1670
439 941
1622 3500
439 503
1412 1662
1504 3932
1211 3039
1056 3736
2635 3202
506 3892
837 1791
1020 1135
3251 3358
654 2252
1435 3240
25 2252
275 2252
104 2502
1575 2243
2252 3598
709 1265
2004 2163
1368 2526
439 864
205 3237...

output:

22 2 2 3 2 2 57 229 23 645 3 4 24 1 25 25 3 2 2 1993 2 1068 1850 2 1 1195 19 19 2 661 1 84 2 1 1 1269 1149 4 453 2 2 803 1 3 1314 2 3 2 1264 1 1 2 4 1 3 2 1 1925 1 2 22 114 1 722 2 1408 20 1083 1 3 1 2029 741 1865 1 1 945 1 2 1 2076 1 998 843 1167 21 1475 22 520 1 2 610 136 2 1 1 1 21 1543 1082 1793...

result:

ok accepted

Test #105:

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

input:

4096 6142
511 3111
2485 3036
3036 3656
3111 3335
2040 2647
2516 3036
3036 3686
1801 3349
400 1582
2560 3998
2551 3036
1343 3861
1149 4092
2472 3934
3835 3920
638 2567
671 4028
3111 3907
1567 2207
357 1651
773 2059
805 1187
168 2775
819 1995
769 1247
1021 3036
1243 2078
545 3111
1615 3036
63 834
2555...

output:

1262 1001 299 1550 3 70 570 19 3 2 56 2 21 2 17 1 1 1134 3 20 3 1 2 1 1 747 1 1683 1040 15 21 745 2 454 20 19 21 3 2 2 1477 21 876 1381 1 740 96 2 2 1542 1 789 1 3 16 325 23 3 2 1 748 1 794 2 255 2 30 1 83 1 1631 1 3 18 3 1 2 18 1 1152 2 1 1 3 1 355 1498 1 3 852 755 3 883 1 1088 667 1801 589 2 1391 ...

result:

ok accepted

Test #106:

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

input:

4096 6142
3326 3857
508 964
3084 3231
978 1588
2106 2609
2106 3600
906 2071
183 3084
3588 3750
2106 4023
3084 4033
674 1529
1227 3084
728 3697
584 2940
233 2106
1264 2086
2595 3084
115 3084
981 3882
212 2106
3084 3400
44 312
2620 2670
383 486
1248 4040
94 2106
3621 3733
2106 3395
2106 2823
630 2965
...

output:

2 2 1161 24 46 741 4 1903 1 319 1306 2 1267 1 2 908 4 1604 1812 24 492 1685 4 1 25 4 350 4 692 434 4 1830 4 4 2 1770 1 87 178 399 1 2 1 1 1183 1045 2 1 2 4 2 315 2 633 23 2 1482 326 1 22 1533 2 2 1 2 2 4 1 1 23 25 2 645 1407 2 1997 4 1 1 4 1914 95 1062 822 2 25 1 535 4 745 768 23 1675 1050 2 289 1 1...

result:

ok accepted

Test #107:

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

input:

4096 6142
2442 3579
1412 3249
1459 2456
1022 2990
3249 3950
3325 3590
1560 1828
678 1746
2783 2878
457 2456
1890 2625
3249 3934
860 2418
3456 3812
1157 2456
3542 3599
295 3249
421 1829
2365 3564
2456 3575
2447 3249
1978 3601
1919 2493
2105 2463
1031 1661
870 2681
2456 3753
421 3249
789 2219
303 3249...

output:

4 1633 155 19 1442 4 2 1 16 921 4 1414 4 17 70 1 1644 4 1 30 1808 4 17 2 4 4 216 1511 19 1484 883 2 32 4 696 733 2 2 4 1 16 17 18 17 16 2 1 1 1458 1591 4 1 596 2 15 2 1 1179 726 15 16 2 989 4 1684 97 1075 1177 1316 876 897 1 1708 2 1 15 798 2 1813 2 4 1220 324 1 4 2 457 1 4 156 2 4 1 2 1121 2 16 1 1...

result:

ok accepted

Test #108:

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

input:

5448 8170
1255 1724
1485 2151
3319 3431
2089 2421
1313 4594
2151 2849
157 4621
630 2151
2151 4359
9 2391
2867 4621
1918 3610
2151 4373
1030 4621
2151 3539
2008 2151
4455 5448
2151 2602
1823 4850
1296 5350
2151 5151
4240 4621
419 1300
745 4200
2151 5251
1100 4621
3348 4662
961 2579
1789 4621
2521 461...

output:

2 1667 4 1 2 2525 266 1545 1699 4 300 2 2022 610 2108 1917 1 1650 1 21 2373 170 1 1 2002 1049 2 2 667 2 2427 2 1 1653 1 2038 1893 351 2 4 2 2727 1 20 2 1 1626 2 1692 1 1 1 2 2 22 1952 20 2 424 1981 438 1 18 1 2 2 2 2 2 4 20 18 1276 20 3 1 4 978 1 2 1573 1 1899 20 1518 1 37 2 2307 1107 1156 1 98 20 2...

result:

ok accepted

Test #109:

score: 0
Accepted
time: 6ms
memory: 18420kb

input:

5448 8170
1263 1939
485 1582
1133 1855
1939 1978
1588 4235
732 2821
1751 2795
485 1947
1939 3952
164 485
295 4481
1774 5224
2379 4905
738 3031
272 3263
119 1851
1650 2341
1588 1601
5148 5201
485 1418
521 2356
1731 4342
485 2335
485 4350
1457 3483
4557 4959
645 3452
1346 2222
3727 4889
478 4955
183 4...

output:

560 1714 2 842 18 1 1 1571 727 2256 3 17 3 3 17 1 2 2 2 1937 20 2 2546 1730 3 2 2 1 3 1 1 13 3 21 1 492 2 1 2 554 3 1 1 2 19 1294 1 2065 2 1184 1 3 2732 1 373 2548 1682 2 1638 1 2 2024 1289 19 1449 1076 17 2474 2 1 913 2010 2109 3 2 1 956 2 1620 270 2047 16 3 207 878 2 434 1293 2128 3 1770 2 1 1 161...

result:

ok accepted

Test #110:

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

input:

5448 8170
3776 5172
3040 4931
3165 3887
694 4931
3954 4212
2499 3042
1277 2234
4641 5170
600 3119
3514 4523
3634 4931
208 1141
2223 4212
245 5112
137 4481
2322 4693
1396 5317
1003 4931
3238 4931
940 4212
246 4212
197 4623
1346 2157
3820 3959
825 3517
371 1599
402 3709
754 3259
2641 4212
3734 5035
31...

output:

1 802 1 303 2390 2 3 1 3 2 426 2 1449 17 3 1 1 659 48 2708 1615 2 2 2 1 3 2 2 1773 1 3 2 410 1622 1 5 1 2 2 18 2409 1 19 1619 2 2 2 18 1 2 232 337 17 1066 306 1 1 3 323 1 1 19 1 141 2 1 620 1363 362 3 2 2 3 2325 2 2 125 2 13 1 1393 1728 16 525 1036 17 1 3 2 512 2427 364 815 3 2 3 996 2 1469 19 3 14 ...

result:

ok accepted

Test #111:

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

input:

5448 8170
4045 5029
275 4337
957 4045
1806 2140
2742 4298
531 2140
630 2555
1476 4681
593 2125
2314 2790
1895 4045
1244 3856
564 3850
4045 4666
2665 4098
725 791
575 1063
2459 3786
1023 2517
273 2381
5072 5298
1438 4659
4045 5366
617 2140
376 5139
1758 4045
1181 4596
268 4405
1351 2310
1142 4045
175...

output:

1260 4 324 1900 1 1542 4 16 1 1 740 1 2 829 2 1 18 17 2 4 4 1 890 2028 2 1082 4 1 1 374 1372 1 531 4 1 4 860 2 117 2568 1002 1 138 1603 2 2 1 15 22 1 17 14 912 17 1 2510 2 2 16 2 16 1 9 4 1 16 2338 1 17 263 14 2 668 252 1 1804 2 906 1 1 974 1745 2 2521 2549 2 1721 1303 4 2025 2 2 846 1 2 15 1 368 1 ...

result:

ok accepted

Test #112:

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

input:

5448 8170
118 4442
1299 3982
1299 1517
1082 3897
3261 3804
4110 4772
1216 3568
881 2572
1680 4959
711 946
2222 4442
1421 4442
520 4442
4442 5349
2710 3370
2641 4442
380 4048
1422 4924
1299 4838
3611 4442
2643 2847
2405 3017
309 1299
1299 2337
1486 4533
1794 3054
3001 5260
2424 4240
4296 5238
1299 14...

output:

684 1586 1911 4 1 1 15 1 17 1 345 1029 594 785 16 1369 1 4 1722 1375 2 1 1623 1976 1 1 2 15 2 2391 16 1 1 2 2 15 698 2 1 1 1442 1 1 1 1 1 2 1 2 68 4 4 2 2 1 2 1 15 1 1 2 1392 1 4 1 2053 1 2 1134 1 1 2 1 1183 4 4 710 196 1 1734 2 171 2 2280 2 1629 15 4 1 2 2 2 1393 274 1 2 2 1 1 565 1759 2 16 1 2 136...

result:

ok accepted

Test #113:

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

input:

5448 8170
1678 4795
756 2740
1919 2033
3899 5319
668 2349
449 4600
502 546
1919 2622
1919 2350
853 5014
539 3536
704 2349
1913 2265
236 1304
2349 5121
1618 3655
721 4693
1956 5435
526 5236
1572 2349
291 650
3019 5067
1194 4335
806 5185
1998 3229
293 5288
2878 5102
2343 4471
3700 4824
1795 2349
2349 ...

output:

2 4 2097 2 83 4 1 2268 1515 2 17 715 2 2 268 2 2 2 2 518 1 2 2 20 1 4 1 2 1 946 486 1309 4 4 2 20 2330 2129 2443 2 111 1698 1933 2 246 631 2335 1 1744 1 1 136 20 1 1892 811 2 1 4 2 4 2 1 2 19 2 21 1 1 18 2 16 4 2339 1 1456 997 468 1562 4 2235 2 1 1084 1288 1 1 294 21 2 1818 1 2 2 2 1 2 4 2 4 1 435 1...

result:

ok accepted

Test #114:

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

input:

5448 8170
2416 4341
2186 4812
561 959
1140 1365
1377 2888
2186 2778
2183 3810
786 5273
948 3184
1260 4417
1460 5273
1064 4967
4289 4421
2186 2815
1612 2024
2711 3556
2302 2595
2655 4469
453 5273
4431 5104
1248 5273
2186 2373
4231 5273
1914 3814
599 2701
3657 3783
1990 3103
933 2664
747 1036
369 3305...

output:

2 631 2 2 1 862 15 2450 1 2 1907 17 2 587 3 1 3 1 2295 1 1732 505 2082 16 1 1 15 1 2 2 1803 3 1 2321 1 1610 1560 2 2 18 1 20 1 2 2 1 10 3 13 1413 19 2 18 15 1289 1 2670 859 2088 2 2 1 18 1 1 3 15 16 1 436 16 1 2 1 2 1 1 812 3 2614 815 1 2 1852 1 2125 2741 1897 1385 2 914 16 2701 1 3 2 1 1 1 18 2 248...

result:

ok accepted

Test #115:

score: 0
Accepted
time: 6ms
memory: 17196kb

input:

5448 8170
1425 2806
1458 2959
928 4234
3485 4010
5170 5396
2447 3429
3249 4666
32 2903
2703 5236
2229 3593
92 1155
212 3146
935 1576
3697 4234
32 4024
1965 5396
1019 3361
1206 5180
1584 5396
2381 4312
472 1255
3889 4386
4 2954
50 2981
3506 5142
2200 3637
2231 5313
3666 5020
378 3575
845 5396
1640 38...

output:

2 3 2676 2 615 13 1 2 3 3 2 2 1 2655 1 123 2 2 664 15 1 1 1 15 2 15 14 1 2 711 2 1 1583 2 1141 13 914 838 1 1850 1 1712 3 1739 1202 361 1180 1949 3 2 2 14 2 2 2580 2615 1633 3 2 1521 946 2 14 2004 1536 3 2372 1 1 3 2 2 1862 220 1 2 1 1 3 2520 3 2 1190 2 2221 1 2 9 1 2 491 779 281 2 925 2 14 2 400 2 ...

result:

ok accepted

Test #116:

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

input:

5448 8170
240 374
723 4337
2378 2575
1766 4310
888 1371
2142 2575
1371 4373
3822 4406
2609 4580
2853 4897
1371 3648
1279 1492
691 1126
793 4588
200 4438
1220 4668
2575 5361
1371 5292
1709 2552
1321 1458
916 2629
2176 4589
1502 3137
2575 5238
1337 2391
2090 4963
1220 4920
2797 3961
2499 3028
1008 137...

output:

2 1 697 1396 1676 1298 2183 3 3 13 2348 1 1 2 3 1 994 1852 13 1 1397 1 1398 459 1 2 1395 3 1396 1896 1 1 1 15 1 3 2490 2 1 14 150 813 2 1955 129 13 1 1 1 1 1219 2039 13 1038 1 1 3 3 1397 1887 1 14 2583 1 2 13 3 319 999 614 13 13 3 1397 1 857 3 2019 2 2706 1736 2283 1309 1 1701 1261 1 1425 311 1370 1...

result:

ok accepted

Test #117:

score: 0
Accepted
time: 8ms
memory: 17404kb

input:

5448 8170
3432 4467
1292 4501
3291 4153
3154 3929
4055 4153
2844 3077
2368 3130
978 4763
1440 2844
2685 4153
2844 3418
4153 4491
1048 1922
1959 4153
3207 5409
710 4153
4153 4531
2244 3178
2366 3804
1601 2849
3745 3838
2672 2678
4085 4498
3209 5084
3309 5039
819 1860
210 4831
1286 2844
616 2526
337 9...

output:

1 2 1584 3 2622 1175 3 1 1330 1872 155 2662 2 2200 13 2350 2488 1 15 2 1 2 16 1 1 14 1 1123 3 2 654 1 1 14 3 2 1930 2337 14 2018 3 3 3 3 2003 1 1 1 1818 1 3 3 1 660 554 2721 2 3 1 1 2 1 979 2 2 600 29 1737 103 1 2647 12 14 210 351 1 1 2599 2 707 3 1 2 1024 1 2252 1116 2 16 3 880 1 1 1934 2 2 3 2171 ...

result:

ok accepted

Test #118:

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

input:

5444 8660
643 1855
2330 3281
807 1295
3281 4277
50 3281
1295 3761
1817 3183
1137 3641
1295 3779
509 5229
272 3095
1283 3458
52 4769
1024 4502
1295 4368
5 5434
1582 3557
971 5249
2318 5430
102 1295
1699 3035
2352 3660
1072 1295
2318 4655
3289 3477
1295 3763
4067 4557
1295 2590
1055 1295
2070 4339
360...

output:

2 2535 238 3508 4196 211 2 4 1569 2 17 2 1 16 310 1 1 2886 780 478 2 2 1329 781 1 1236 1 1826 1957 2 2 2 1933 3426 2 2887 2 1 2 2 2888 1311 1 782 4077 2889 783 2 4 1816 1590 2 2345 2264 2 554 2 2211 2 13 1695 594 4186 2890 151 2891 48 2 19 4 2 4 13 16 1532 4160 1782 22 2699 2 1 2001 2892 341 2 2628 ...

result:

ok accepted

Test #119:

score: 0
Accepted
time: 6ms
memory: 16828kb

input:

5444 8660
597 1411
1470 2032
1273 2505
2159 3662
1335 3077
2011 3493
1273 4279
2667 2929
4476 5155
1335 1532
929 5321
1273 5285
1509 5077
1273 4714
1273 3063
76 1273
2677 4546
1775 2501
1509 3337
2056 3353
2701 2799
1401 4735
3493 5168
1335 5265
1509 2399
1273 5003
1347 3181
3566 4946
353 1335
1335 ...

output:

3 3 4212 3 836 2283 3114 3 1 1967 2 3105 166 3042 3978 3260 2 1 167 1 2 2 2284 1129 168 4165 1 507 1851 890 3886 4027 2 169 2 508 708 4213 1 1394 871 1 507 3577 1 1736 4073 2 699 2 170 508 2804 2 2 2 508 2 3 1136 2 171 1 1623 1 1512 2 507 3299 815 2 2047 172 964 513 1 1 173 2822 3 174 1217 1 3 175 1...

result:

ok accepted

Test #120:

score: 0
Accepted
time: 8ms
memory: 16064kb

input:

5444 8660
1849 5175
616 4864
1471 5175
5063 5175
841 1387
4516 5230
1752 4517
1836 4499
2240 2991
3391 3473
2941 5175
401 3397
3535 5175
1474 4516
1703 4556
1074 4516
1447 1742
1671 5175
1053 1398
2371 4516
1106 1836
4151 4516
1847 2587
909 4153
4075 5070
1836 3005
761 2065
3145 4516
1836 2650
4287 ...

output:

3907 3 3579 2152 1 1835 17 693 2 3 3239 1 3924 491 2799 1268 1 3416 1 328 694 309 1 14 1 695 16 1081 696 270 4017 2800 3 697 3 3 2092 3 3 1 3 3 1574 1 1 21 2 3266 79 1 3758 2801 1650 1 1684 3440 2802 3694 2 3 2 3 2 698 2 699 2 1 1761 4167 428 700 3413 2 4229 18 2287 701 3389 702 2267 181 1652 1655 3...

result:

ok accepted

Test #121:

score: 0
Accepted
time: 6ms
memory: 16112kb

input:

5444 8660
3405 4344
1885 4617
3344 4344
2224 4992
2318 5005
969 4344
1412 2327
2318 5302
2318 5215
2318 3179
1168 2318
1253 3780
2318 2611
192 565
1937 4344
7 4065
2934 4344
3734 4344
2238 2318
594 3335
1876 4344
2076 4344
1570 1768
1336 2820
2318 4010
673 1099
1885 2180
2869 3183
4327 4966
2784 441...

output:

2300 2897 2615 1 1027 3850 162 1867 1649 1382 1174 1 669 1 3528 1 2574 2394 1024 2131 2580 3581 2135 1 1825 1 2898 1 1 2 3353 2899 1 4000 2 1 2 2900 2230 1609 2046 1147 4109 1 1842 3540 3545 1 163 2901 503 3 1819 504 2131 164 634 2133 715 2029 1 2533 3534 2130 1 3407 1 2 3 815 2023 603 2 2 1637 1 50...

result:

ok accepted

Test #122:

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

input:

5444 8660
2322 3638
1798 3255
2389 4782
1745 4019
2059 2104
821 4808
579 4167
3082 3647
431 2933
4847 5380
1546 2104
3086 4063
1783 3206
1847 3274
2011 3206
2548 3398
3299 4337
4516 5177
3206 4974
3206 5324
579 2787
48 2933
579 4916
2661 2886
3206 4272
3206 3995
2249 3212
2104 3491
579 1156
1258 442...

output:

3 24 2 1 3613 1 693 14 2287 2 3664 16 1715 2 1164 10 1 2 1941 481 694 2288 695 1 1371 398 3 3515 696 3 1 1 2 2 1839 1968 1 697 2 4064 3149 2 2937 3479 1869 13 3517 101 2289 1 335 1157 1 2 3755 2 1 380 3 365 2290 698 3826 1855 2 2915 16 181 271 2 1 16 1 1 2 18 2636 2 1 1589 2 699 700 2 3 1 701 3952 7...

result:

ok accepted

Test #123:

score: 0
Accepted
time: 8ms
memory: 16332kb

input:

5444 8660
2284 4147
893 1063
1483 3467
1444 2605
2151 2457
1937 3183
2056 2151
3965 4430
2757 3377
2268 2960
3304 4210
127 1717
2284 3989
976 2284
125 2284
1168 1579
2749 5075
1904 3495
1350 2481
4807 5030
1186 1578
1453 1600
1704 2284
3141 4372
1562 5075
1222 1991
231 1553
799 2151
506 2209
364 507...

output:

2286 1 1 1 2791 506 2792 1 1 2 1 2 3322 3243 2459 1 1612 2 2 1 2 1 3839 506 961 506 1 2793 508 863 508 508 3643 2794 4071 1706 2 4172 3313 2 1812 2 2298 3559 2 2 2 1 2 1678 3152 3330 2 1 2 507 1482 2 614 4196 3503 1867 2 1434 3984 1 1 1 2 1 2795 2 165 2 1 4 166 508 2149 1489 507 3708 4 167 511 168 2...

result:

ok accepted

Test #124:

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

input:

5444 8660
560 715
3716 5077
2583 4928
1929 2167
758 3551
284 2341
3198 4108
958 3140
2593 5181
359 1475
2668 3551
2001 4121
778 1106
2184 3404
416 3786
2341 3623
1285 4020
1836 3551
3513 3551
3153 5193
2341 4292
1951 4179
3061 4926
1629 3348
2341 4167
2341 5387
505 3570
1153 4523
2341 3954
2582 2690...

output:

2626 503 1 1 519 3793 1 503 503 1 1594 2 162 3 3 3301 2625 1223 1640 2 3246 1 1 1 3726 3010 2621 1 4080 2280 2281 1 1 163 2621 2282 2 1 4153 3450 2103 506 592 1 1 2784 3 4202 164 503 3 3 505 2625 856 3 787 2106 3522 3985 1 2283 2093 3 504 1 1 3596 2621 1 3355 3 1047 505 1126 1 1 506 165 2284 3 3575 ...

result:

ok accepted

Test #125:

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

input:

5444 8660
41 1596
329 3277
710 1596
329 4163
97 4869
2840 3879
329 3287
3639 4950
1596 1893
329 1123
571 1584
1037 1596
1993 4782
493 4267
2587 3964
329 623
627 2733
620 5203
1596 1789
68 1338
24 419
109 2814
2612 5060
329 4127
202 329
1235 1307
1596 4490
329 1762
1671 4863
1301 4388
398 1141
3531 3...

output:

1205 2198 410 3741 1 3 3736 12 1257 4002 3 1774 2139 2141 1 3810 779 1 1374 2139 3 3 2139 2422 3664 16 90 3897 2 1 3 24 2620 1 2142 3 2 2 13 2905 1 2 1990 2073 17 98 1 1549 1 3 2 2141 4080 1 1 1 1 205 2141 446 3252 3837 3 2137 1129 2256 2 4225 3624 2703 341 1 1200 2 1 2906 11 1 2139 1 1997 13 2145 1...

result:

ok accepted

Test #126:

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

input:

5444 8660
2493 3680
2211 3565
2493 4150
3755 3857
3857 5166
2414 4767
2472 4767
4219 4882
224 534
4547 5057
3461 3857
1094 2218
1840 4964
1220 2088
1419 2196
1220 3992
727 3068
2350 3615
2493 5133
2545 3780
1220 4339
912 2802
1677 4078
1517 4734
2493 4820
550 1893
3153 4068
3857 5087
1365 2493
3857 ...

output:

2427 2 2624 2101 1583 693 694 1 1 2 2090 2147 2142 2819 2 2820 13 2142 3569 2 2821 3 2 1 4126 2 1 1751 3805 1696 3 2498 2139 1 2822 4177 170 2142 2399 2462 319 3 2 1355 1 3 16 2140 695 2137 1 3 1979 1 3788 2823 2142 2435 2139 1945 1595 4023 2 3175 2142 1 1 3921 2137 2508 696 4176 1515 1914 2824 1986...

result:

ok accepted

Test #127:

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

input:

5444 8660
452 2239
1671 3615
2488 3912
2952 3057
4491 4721
1428 2152
2143 3452
781 2140
3096 3615
183 619
1761 3952
1694 4740
537 2429
3615 5015
1428 4149
176 2879
60 3273
2 2552
2137 3615
3615 5234
2874 4095
4018 5436
1522 2307
1562 2552
3615 4671
2294 2552
2552 2999
1342 4152
940 2552
3615 5383
57...

output:

2 4235 25 3 3 788 29 1 2195 30 1 1 2 2487 789 2 1 1765 4053 3598 1 3 25 1851 3508 476 288 2 196 3329 1 3 1 2894 2895 3860 3 3 2 1 3 2731 790 2896 3421 25 3733 1 3618 1 2 1 2574 2897 1331 22 1 52 2 1 4202 3921 3 3378 791 3409 3486 1195 3456 2629 2898 2 1500 1420 1 3857 2 3970 2 24 1 2605 3 3753 2139 ...

result:

ok accepted

Test #128:

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

input:

140 234
31 124
12 83
33 118
12 39
65 111
30 69
26 63
24 123
16 88
11 131
27 94
31 57
74 124
3 22
12 47
40 116
27 89
15 35
35 135
12 20
3 53
12 109
12 112
58 88
86 101
104 124
41 127
48 62
35 94
62 91
35 108
21 35
12 107
91 121
56 93
45 56
35 41
28 118
6 52
83 88
35 122
11 35
4 131
46 71
12 82
12 55
...

output:

9 82 121 74 53 51 1 108 7 149 96 8 76 87 72 132 95 98 161 66 1 1 37 1 115 75 138 33 100 1 129 117 49 41 155 89 142 1 13 6 147 153 148 130 44 43 131 156 42 39 57 1 1 28 59 110 27 64 71 70 143 83 139 105 2 55 40 137 109 19 102 111 134 65 114 127 101 2 3 3 12 86 126 1 1 125 54 22 119 68 60 26 32 35 162...

result:

ok accepted

Test #129:

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

input:

3500 6378
2829 3009
1168 2173
765 941
234 3150
2306 2412
652 3190
463 941
19 881
463 3456
2685 2953
787 1782
1699 2185
361 3049
1299 2431
990 2037
463 794
2957 3203
2470 3406
715 2488
155 1794
1037 3106
1588 1966
510 2766
463 755
361 2564
229 611
361 1035
879 1211
361 3024
1141 2102
463 2067
463 346...

output:

3993 2879 3753 2299 14 3054 3759 2846 4225 2049 4493 1314 216 2074 1186 3408 3587 2740 2579 2552 2893 1126 1028 3744 1311 3491 1042 4110 1537 1571 2840 3529 3113 129 3363 4501 741 3807 3961 3795 2321 122 2935 1966 3833 2351 1735 373 211 1271 192 772 1236 3853 3523 3284 2984 1425 1852 1510 1060 1308 ...

result:

ok accepted

Test #130:

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

input:

3500 6378
573 2510
289 768
152 3355
729 3256
680 2097
505 2421
573 634
1889 2555
1380 3256
2195 3256
2930 3475
1200 3095
1047 1049
2154 2571
725 1054
827 1148
884 1228
3256 3415
275 3256
899 3005
975 2299
2971 3463
1755 2600
797 1502
2039 3296
573 1325
1658 3256
1515 3256
1422 1769
1900 3256
573 131...

output:

3426 2722 3572 1665 1151 368 2520 4205 398 773 4250 2210 4509 322 3122 1979 1285 934 1689 2428 18 1288 1469 3271 3772 4209 2090 554 4268 1030 2799 3621 2510 455 4156 4128 574 2493 745 2103 1002 3920 27 2314 1679 208 1837 4354 4016 3332 2132 871 4439 2011 1010 1468 1646 930 3301 4464 1608 1442 1428 2...

result:

ok accepted

Test #131:

score: 0
Accepted
time: 6ms
memory: 17128kb

input:

3500 6378
1097 3294
1293 2103
346 1013
1293 1712
363 461
516 1818
363 2929
1293 2532
1293 2041
995 1202
363 2181
363 3346
738 1385
1567 2197
2619 2648
1219 3342
363 2759
363 903
2027 2128
1293 3427
1293 1897
1050 1293
860 2121
1293 3200
1718 2468
2571 3288
1293 3277
1293 1686
363 962
457 1608
206 11...

output:

1292 1302 2649 207 2510 1674 4008 1459 1900 4356 2621 3257 4498 3566 4457 3326 4214 4078 1204 2231 1916 1051 1922 1149 4189 29 1450 2287 3999 2006 1861 839 1814 2773 3543 258 2886 2743 3841 3776 4268 526 885 1396 3558 3297 3034 3271 128 3547 524 1767 2651 4224 2509 483 3608 1505 121 3249 1263 3655 1...

result:

ok accepted

Test #132:

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

input:

3500 6378
738 2555
790 2533
1461 1473
738 1563
920 1478
797 2394
790 3224
1589 3224
145 3480
472 1795
738 3414
1570 2026
1341 3345
1002 2974
1993 2113
1798 3437
747 3064
191 3437
790 2963
269 790
1955 2047
2357 3133
790 2344
393 1900
1255 1923
790 3182
821 2546
790 1885
790 1200
50 862
11 738
489 15...

output:

3804 784 351 4315 2785 1167 2166 2160 1342 648 3427 272 1 523 1845 2767 313 2766 1631 171 2457 4526 1058 2119 3370 2023 3853 1595 1000 331 4404 2930 3303 3329 1109 2640 2838 1108 3018 4139 1126 4376 4336 1972 4525 769 1695 908 3099 1652 1942 1310 670 1866 3975 704 2696 3747 4230 3645 3382 1724 620 1...

result:

ok accepted

Test #133:

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

input:

3500 6378
907 2305
1371 1672
1269 1441
1419 3312
1768 2304
2422 3094
262 3312
118 3094
2569 2997
1581 3094
1849 3312
2277 3142
236 2047
2284 3222
1596 2745
931 3312
1917 3312
872 2927
989 1063
512 3094
1778 1792
323 3312
854 3062
2138 3312
2822 3312
796 2260
1069 3256
1162 1397
1412 2840
1160 3312
1...

output:

3458 1439 3694 2120 882 3325 595 2577 1353 2634 1605 3835 475 1780 3336 962 1204 3635 1238 3223 222 509 2572 1415 914 2162 571 3818 3617 1072 4353 3245 3693 362 3456 3643 3328 3895 1125 1352 941 484 2676 2189 4230 1491 4429 1092 1771 172 4252 2262 3737 310 3982 2812 410 2815 1403 71 3189 1100 1563 2...

result:

ok accepted

Test #134:

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

input:

5448 9994
2334 4357
353 1968
2766 4357
140 4357
3952 4105
2420 5221
352 2608
1144 1900
4677 4924
3881 4357
1700 4970
908 1684
3474 4357
2031 3694
4785 4924
2918 4245
2828 4357
3661 4924
4357 4949
1548 4924
2955 3016
178 1512
3830 4924
373 4038
1397 3667
1836 3999
1207 4924
2657 4924
2192 4392
4357 5...

output:

5591 2666 3952 6815 1441 1353 3687 5673 1576 5361 2907 5933 6418 6718 776 1633 5404 2159 5580 3727 4041 902 1573 5312 6872 819 704 2427 3971 7237 6962 5314 6479 5983 3569 399 4597 3025 1806 4972 6219 2409 4352 3191 727 4862 4408 2 7226 4326 2772 6227 1572 4348 6841 2375 5056 141 4107 3519 4851 1596 ...

result:

ok accepted

Test #135:

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

input:

5448 9994
871 2738
1301 2738
1828 4036
1184 5041
39 1313
712 3588
39 2902
959 1401
123 4546
39 4836
2941 3590
2738 3178
1451 2738
1380 2738
2398 2641
1165 2738
1022 2984
643 3018
2539 2738
3574 5370
3155 4780
39 4560
39 1808
1702 2738
2573 2844
2362 2738
39 4509
2359 5256
776 931
2018 3073
830 4949
...

output:

3246 2560 591 2072 6737 2117 6469 549 5413 5523 3294 2134 1788 3136 1640 2399 7224 1701 1789 1602 1079 5921 4818 662 5175 2701 7127 5484 5356 6230 6537 1484 2183 1046 5559 3828 6800 2843 2503 2657 4358 3118 884 5835 5020 1846 3888 5841 3163 3673 1913 4154 1217 5164 4433 2259 6082 7216 6066 4781 7314...

result:

ok accepted

Test #136:

score: 0
Accepted
time: 6ms
memory: 16392kb

input:

5448 9994
3121 4487
1327 2951
513 3721
2829 3513
1569 4361
1621 4269
3438 3595
1569 3092
2971 4783
1327 3239
86 4570
1759 1857
3649 4197
3552 4423
644 3570
1327 4686
1327 1650
444 3788
3531 4460
879 1600
1327 3934
1569 2177
1569 4177
1746 1754
912 2435
724 3914
3034 4857
1327 2923
2628 2729
1569 537...

output:

2509 7261 2189 5332 995 2748 4981 3283 6601 3808 1999 4571 26 6092 4386 5902 5023 3463 853 5049 5416 2125 2157 7001 5761 5774 1048 6739 2316 2935 1704 1105 1670 2203 3867 2686 2851 3807 2435 7056 4051 1334 7250 1425 6972 106 3124 2295 597 814 6283 3242 2180 1407 2633 692 386 2635 4474 4244 3943 551 ...

result:

ok accepted

Test #137:

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

input:

5448 9994
4128 5171
981 1122
3110 4999
4453 5199
660 2580
1122 2880
2913 5352
660 1959
2251 3015
1122 3231
660 1353
1122 1616
660 4916
4863 4968
1697 2981
660 1091
304 660
4449 5028
1234 2357
146 2826
356 1876
167 4059
1122 1254
827 2408
355 2597
660 3719
660 3596
2552 5229
766 2551
1122 3717
4903 4...

output:

6553 5325 6109 792 3649 4110 6959 1053 2087 3801 1674 7230 1864 6828 1022 2979 1087 6413 3441 3286 6258 6903 7030 3297 4232 1962 2095 3465 5891 7188 7193 5868 3986 6003 2096 5454 7276 6571 1773 5231 2561 7071 5736 4254 1278 5116 3040 6482 1145 1214 5902 1306 4547 3020 3030 436 1728 643 5420 1772 199...

result:

ok accepted

Test #138:

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

input:

5448 9994
2740 4317
134 1419
2340 4405
588 1526
1516 3001
632 3573
3573 4806
157 402
2008 3573
3573 4877
134 5131
892 3184
2102 2197
1416 2969
2220 5235
683 3906
134 5336
3573 5147
134 804
134 2876
134 667
134 1405
939 4376
1498 4936
3708 5017
1406 4351
2903 3573
134 237
482 4937
1637 3573
3705 3944...

output:

4497 426 402 1747 4623 5152 5674 2774 6338 5185 838 4130 1099 943 6453 6123 1976 6069 3299 2186 710 484 5639 4119 3233 3534 6414 2591 2784 6438 5376 1407 4839 2931 4926 7164 809 1536 4919 2482 4661 307 1988 3811 2768 1701 1672 4679 7201 5431 5313 7333 6334 6621 7224 1921 3634 3603 4820 298 6107 6876...

result:

ok accepted

Test #139:

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

input:

5448 9994
2304 5194
799 3155
518 3155
482 3068
338 2053
1122 3155
3155 4129
3155 4713
3135 4514
1675 3683
3683 5034
2525 3683
877 4513
111 5427
354 3155
3155 4450
6 1111
465 3683
1866 2788
3140 5189
1212 5054
2807 3155
1620 5153
1971 2850
897 3416
1541 4066
1467 3683
3155 4651
1291 5123
2301 3155
46...

output:

333 1519 2523 1269 4942 3639 1372 2389 266 7126 4504 4957 7169 250 760 2936 4910 6353 1114 2758 830 799 2670 673 5135 6264 4199 2483 5714 509 4164 3481 6607 4818 3922 3923 7409 1977 5779 500 7408 2032 6031 3330 4732 4802 6062 40 1376 6071 5025 185 383 58 6925 3427 5665 4586 973 5331 5838 480 4345 20...

result:

ok accepted

Test #140:

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

input:

5448 9994
1275 4544
959 5119
514 3926
3891 4205
48 3280
3551 3891
48 1023
3891 4214
359 5052
48 792
3812 4713
48 1755
48 1031
1217 3891
3119 3891
3891 4675
1749 4707
48 2153
3261 3891
706 3891
48 3667
2682 3891
4170 4831
1352 4317
48 5234
48 4139
1868 4021
2817 3891
48 1763
48 3084
156 3143
285 2979...

output:

5557 2661 4601 5434 251 6106 3313 5360 3586 401 2325 3143 942 4987 7206 4556 4169 3720 3879 6381 1900 6718 300 3162 2690 3198 1425 4652 3092 3194 1909 2891 7343 2268 100 6838 4060 5590 4956 5007 1314 6405 2101 4395 6303 7342 5486 3344 40 4237 4387 2169 3294 1755 6143 3275 427 6416 3381 400 2880 1298...

result:

ok accepted

Test #141:

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

input:

5448 9994
2189 2783
2783 4114
1218 2632
1218 2562
2714 3273
174 381
453 2783
2806 4563
1772 3941
1218 2641
2933 3063
195 3121
1727 4705
1218 1981
2343 2862
61 2783
1218 4393
2259 4147
214 2883
927 1017
1333 2101
2137 4560
1943 4336
1218 3403
122 3974
964 3360
1218 1872
1218 4450
2295 2783
1842 3309
...

output:

6341 6926 1255 207 1899 2178 4263 6621 436 3193 1357 7071 289 3704 4046 5749 1748 3282 6632 3455 5798 2623 3217 2253 6585 6753 389 3671 6232 972 3549 4859 820 5698 3735 4600 6471 911 2890 2748 5357 1270 5697 1992 1150 4215 5606 7158 2955 617 4213 3381 6419 2220 5068 1470 5644 7137 6785 4588 691 2010...

result:

ok accepted

Test #142:

score: 0
Accepted
time: 12ms
memory: 16192kb

input:

5448 9994
1264 3482
1264 3496
1264 4911
186 1633
227 486
951 1264
1264 1947
1712 4857
111 2372
625 1332
1055 4009
4081 5012
198 2726
4 4669
1112 2799
1264 4013
4041 4653
415 1147
186 5122
1501 2354
2902 5230
3792 5292
1264 4454
1050 1414
2987 3384
695 3736
186 2292
311 4928
2318 2401
186 1763
2834 4...

output:

2459 3364 2506 5348 7001 53 351 7026 6313 5536 2154 3222 3197 7103 5642 3638 1234 1045 3893 4978 3043 5242 1808 1079 4497 1676 6003 4443 3718 5597 2492 6779 7350 338 3441 1 5305 236 1176 3371 4281 6433 2767 1128 4141 2305 4529 6641 4351 5070 6418 7061 6681 6063 5260 747 5638 1884 5603 3238 3295 2803...

result:

ok accepted

Test #143:

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

input:

5448 9994
607 3583
893 4375
1269 3218
1506 1777
103 893
893 3604
3873 4476
3837 5041
893 4988
893 3103
2879 4709
1524 1666
952 3837
971 1103
3837 4860
1462 3111
395 2068
144 3837
893 3814
3837 5362
2278 4416
525 625
2550 3837
872 893
544 4643
1784 3837
112 2074
1212 3774
935 3778
2127 4622
266 3586
...

output:

4620 3614 4142 2994 1079 1025 1246 4333 2866 3312 4492 6752 4288 5763 4371 3148 3253 4278 1971 5299 5825 2847 4782 853 6840 5210 6038 7103 1536 1028 583 6235 6589 1179 5442 5988 4953 4048 2803 4506 3359 6502 475 7193 4880 2283 5923 2904 2927 4252 6707 6436 5871 6028 3119 5017 787 6724 2402 4760 6284...

result:

ok accepted

Test #144:

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

input:

5204 9740
647 4293
3193 3873
2144 2202
1487 4133
3612 4342
2144 2806
657 1707
2146 5101
3612 4276
2141 2144
36 3612
3442 5136
1592 2416
2313 4607
1881 4576
2144 5024
2144 2512
2144 3822
3612 3641
124 508
843 4938
2144 3130
271 2719
784 2090
3220 3904
2144 2912
1780 2144
583 4543
2481 3531
2144 4442
...

output:

4447 4999 592 6807 6262 2308 1138 4095 5245 2845 7074 1074 6746 1583 36 2456 2594 3885 5185 3536 7432 974 1008 1257 7686 897 1215 5498 4012 2972 168 4179 1584 5193 633 2808 4934 3398 3 2527 1585 2732 6524 7829 5004 932 6343 2556 6175 1044 7376 3267 1586 4289 5499 3713 5875 820 7828 3592 4145 4195 34...

result:

ok accepted

Test #145:

score: 0
Accepted
time: 8ms
memory: 17668kb

input:

5204 9740
1894 2408
280 3276
2408 3257
280 462
2408 4006
1990 2408
3250 5183
1137 2137
280 801
280 1845
1701 2012
1375 1459
66 3648
2701 3267
361 1834
66 656
4523 4775
518 2408
280 4277
57 2408
327 661
681 2408
2408 3780
13 4291
634 2408
2761 4153
80 1711
280 3669
280 3508
1080 2408
2345 4294
2408 2...

output:

4707 2293 5005 516 5178 5318 493 2853 2120 963 1 5832 5632 7578 481 5631 5294 4826 175 6481 190 6981 6954 1589 4952 4113 7269 3384 2501 7326 7683 5183 4114 6762 1004 1590 6334 1591 6256 2386 6085 6343 7592 5319 1010 6217 307 3260 1592 4725 4115 7160 2262 1090 1593 1594 5822 7699 4116 7421 4454 4117 ...

result:

ok accepted

Test #146:

score: 0
Accepted
time: 8ms
memory: 17884kb

input:

5204 9740
3845 4275
1951 2740
516 4747
1622 2303
51 1492
3513 3550
1372 1484
1372 5039
1372 4534
154 4765
3452 5064
4173 4890
941 3569
1345 5176
1937 1951
696 1951
233 1372
1372 3337
1951 2718
1951 2683
3127 3832
1860 2791
1485 2427
1372 2596
2557 3111
1969 3849
1421 2968
1137 1372
1372 2193
1372 47...

output:

7661 4541 2890 5245 5133 3782 2306 3504 1877 1703 6786 5485 1127 1537 6945 6141 2448 2814 4436 7095 3005 4767 7639 3058 7272 1322 2848 2339 1655 1848 5321 3403 1274 4844 6778 2472 1631 2522 6692 6566 4778 1669 3396 6356 7769 5913 3390 3203 3493 3800 5486 5018 2038 5487 1878 5488 2479 4 6726 5969 413...

result:

ok accepted

Test #147:

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

input:

5204 9740
1608 3609
351 1052
3699 3721
2068 3609
1136 3699
3609 3791
2176 3699
1415 3609
3457 3740
370 2156
1529 3119
3102 3609
782 4086
1964 4496
3796 5072
3699 4457
991 4374
3564 3961
1073 3609
3609 4014
3609 4928
1457 1705
1235 3018
2777 3948
3699 4034
311 4086
882 3647
2815 3128
3699 4065
346 42...

output:

3193 1867 5898 2896 4487 3588 5484 3973 5443 6713 4086 2722 7360 1013 7168 4592 6541 4801 656 3509 1717 6524 4517 5674 6419 7568 5434 1558 5960 6646 3961 2087 6217 6540 7590 7552 6389 4489 4864 4225 6899 4794 2088 3091 6829 2089 6249 3310 1768 4746 5910 1740 1252 5573 5744 4184 3829 7247 3951 3603 1...

result:

ok accepted

Test #148:

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

input:

5204 9740
2579 3402
62 1384
2089 2391
538 1675
1588 3203
3402 3418
158 1510
3402 5141
2341 3402
3203 4903
902 1568
3234 3402
547 2820
638 2296
1675 1760
609 3203
1675 2105
3078 3477
3402 3590
3203 3337
1377 3203
377 2198
2967 3402
2260 3402
1146 3402
973 5118
2686 4335
673 3604
1322 1579
2418 3402
2...

output:

1492 5675 5989 4077 4664 2212 3447 3070 780 4739 6252 587 5058 2812 4078 6491 4079 6988 1789 6490 6696 5307 2156 3018 1014 1239 188 7441 2599 1677 895 6297 3477 650 189 3291 190 5984 1748 6577 3015 3036 1415 6048 2378 4965 671 6531 1245 7311 4566 191 5114 642 6834 2 1647 192 1614 7401 2257 2064 2947...

result:

ok accepted

Test #149:

score: 0
Accepted
time: 12ms
memory: 17020kb

input:

5204 9740
771 1797
771 2972
1703 3977
2142 4026
2142 3982
984 2342
722 3693
771 1331
2142 2647
2142 2751
311 2375
64 2261
64 4452
3375 4578
2005 2142
2292 5158
2142 3636
1913 2684
1494 1696
771 5161
847 2807
2743 3855
771 4227
2321 3672
771 1213
35 2142
64 4750
42 1081
2142 3441
771 3996
622 771
214...

output:

3330 1583 6174 6234 5073 2951 1139 640 7415 4667 2792 4079 4080 7757 6425 3061 4612 1172 6138 2668 2879 7203 2419 6513 922 7284 4081 183 4632 962 3101 5823 568 2168 1581 757 7283 6224 936 7236 3704 5049 184 1432 7287 6797 5718 2155 4082 1766 3117 1801 4910 6782 1359 2534 1082 2216 6754 4083 7535 572...

result:

ok accepted

Test #150:

score: 0
Accepted
time: 12ms
memory: 17224kb

input:

5204 9740
1209 2446
1880 4350
4350 5041
2117 3280
480 4476
1123 2282
290 1840
1279 2117
464 2117
1747 2117
1402 5102
706 1003
787 4343
2117 3709
2117 3312
41 2470
923 4350
1643 4525
4350 4748
2673 2683
2482 4876
4350 4885
79 4350
224 938
38 2127
4012 4726
2763 4402
787 1236
638 3132
3833 4350
787 52...

output:

2777 6511 7388 2848 3091 4807 6278 2080 935 1812 2917 1381 188 1027 642 4062 6992 1248 6860 5855 3513 7283 6417 1225 4966 1582 1436 189 2572 6672 190 1556 4661 5058 2906 2272 5192 804 3348 2783 1210 3294 6625 3781 2416 4063 5957 2283 4691 5512 4757 2323 5050 7124 2989 5673 5731 4796 1534 1786 643 12...

result:

ok accepted

Test #151:

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

input:

5204 9740
2942 3674
3684 4309
3325 4156
2599 3072
36 2599
1987 2044
125 1343
2176 2809
971 4916
1135 3841
2680 4916
2008 4096
4172 4916
2206 3336
551 1313
2186 4916
2599 3137
2016 4693
3062 4916
480 980
446 4250
1214 3857
2599 3049
2223 4916
2957 4916
2599 3861
2599 4079
3040 4069
3200 4916
2599 282...

output:

3278 5070 7151 2905 2969 5994 633 4097 4502 2957 6668 1594 5295 6194 190 4709 124 2911 6507 3613 6264 2842 1943 4547 5696 772 2658 5595 4665 3694 2499 6995 6587 831 5679 6753 1595 4098 733 7150 3495 4099 6692 6493 520 4100 4101 3287 562 7217 5719 4444 2951 2077 1378 5089 2439 179 5785 5502 2775 6498...

result:

ok accepted

Test #152:

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

input:

5204 9740
3718 5059
795 4220
432 4437
2570 4200
642 3174
432 2993
642 2981
432 2952
642 752
4052 4618
4000 4802
1024 4692
3781 4198
642 5125
642 755
530 3951
323 1770
1592 2488
2545 5066
903 1397
1174 3105
3192 3829
2119 2229
432 3109
1442 4170
2173 3718
642 4544
432 1642
4543 5088
157 642
3986 4028...

output:

1546 3224 2022 6256 5391 2278 4992 569 5403 6434 6857 1818 5829 4816 7430 5406 6898 2758 3727 4089 4975 3677 1798 3811 6098 1545 5754 722 1373 7292 6532 6012 1181 6501 1940 7028 6354 6138 4090 5804 5424 3782 7404 3771 2761 2219 2802 4091 2556 4092 200 7447 1350 6994 3246 6193 5872 2573 555 2479 6776...

result:

ok accepted

Test #153:

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

input:

5204 9740
59 1951
1928 3654
1366 5072
1951 4011
203 1928
2411 2642
1951 4190
1601 3880
1951 2067
398 1951
2480 3182
1928 2817
3978 4922
30 3236
2893 3432
1951 4609
561 2363
1833 4606
562 1928
766 2776
1951 3560
1780 1951
1179 1951
3368 3542
3603 4002
1731 1928
2007 3354
372 1928
1927 1928
2441 4383
...

output:

7163 1557 1936 162 3747 4729 5750 7200 163 6442 4998 3675 7708 4260 6465 6489 685 4827 1815 1042 164 165 4571 6370 5743 2028 5451 2406 1548 5288 5702 3011 1809 1494 166 6690 3398 3718 3012 531 4158 1513 1555 2008 2693 5298 5879 2676 3013 4733 6756 167 4138 6603 2358 960 5978 3668 6798 1925 585 6746 ...

result:

ok accepted

Test #154:

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

input:

5204 9740
2927 3048
1969 4375
2170 2712
740 2795
2795 3874
185 4316
2795 2845
2915 5052
4554 5052
2239 2407
2333 2795
2783 3810
159 185
1466 2795
164 185
886 3017
102 2492
2012 4301
348 2795
2690 2795
513 2691
1468 5052
185 2679
3552 4207
185 2832
644 1484
3333 3541
854 4537
1532 2795
1728 2726
185 ...

output:

6751 4647 2853 1679 3815 5704 1915 4062 4063 1472 1712 5288 4875 2005 6630 2360 6334 6382 1007 1857 1647 4064 6982 1316 4605 5115 188 5002 2025 5728 6749 4065 1639 7642 1796 6909 3091 1715 3831 2545 5834 5789 6354 5772 2840 7598 5604 7476 4066 5012 936 5175 4 1690 5393 7644 7544 7428 3798 2078 5254 ...

result:

ok accepted

Test #155:

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

input:

5204 9740
2286 2957
1010 1638
652 1486
272 462
1176 2048
272 1721
2048 3009
272 5005
3916 4900
744 2771
272 1355
2048 2519
2048 4370
272 5203
272 4246
272 2101
2048 4879
2048 4896
2833 3624
243 3312
2048 2615
1529 2544
2048 3760
272 4974
315 2823
86 272
272 5035
1529 5036
1529 2202
557 4145
3495 447...

output:

2966 556 6890 1251 6333 2652 5833 3325 4447 6767 1602 6004 4946 3593 3826 3413 5896 4324 3002 5413 7387 171 7492 2478 2120 2678 1984 172 173 1107 7488 2635 7613 6744 7691 174 4792 3532 874 6079 5201 1835 175 5863 6631 6386 3085 632 5101 7612 2119 1340 7661 4393 2450 1219 6589 1896 176 6565 4818 6171...

result:

ok accepted

Test #156:

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

input:

5204 9740
1320 2577
2658 4715
1078 4917
1320 4751
1643 3836
2078 4017
583 4889
2909 4618
2369 2813
1320 2182
4715 4728
583 1892
1832 3646
80 1320
717 5081
789 1320
3485 4715
1571 1726
1320 2276
544 2163
2002 3461
618 2492
2927 4917
53 4715
705 904
3352 4623
692 1025
2423 2895
2297 4026
1077 2705
369...

output:

3013 6122 6545 713 1078 5139 4079 6868 5318 3392 6652 4080 2364 2365 3061 2885 5402 1735 1106 6199 2726 7494 6544 5571 7088 7130 183 3051 1761 3588 5040 6791 3203 6648 5766 5089 909 6606 1882 7381 4687 184 3399 4997 836 5436 3649 1209 4081 4831 185 5272 3863 671 6713 7002 6489 3815 3050 5515 6546 60...

result:

ok accepted