QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#539085#7226. The Impressive Pathucup-team1005#AC ✓91ms11664kbC++205.3kb2024-08-31 13:57:222024-08-31 13:57:22

详细

Test #1:

score: 100
Accepted
time: 0ms
memory: 5824kb

input:

8 8 16

output:

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

result:

ok correct

Test #2:

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

input:

8 8 32

output:

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

result:

ok correct

Test #3:

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

input:

8 8 48

output:

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

result:

ok correct

Test #4:

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

input:

9 8 17

output:

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

result:

ok correct

Test #5:

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

input:

9 8 35

output:

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

result:

ok correct

Test #6:

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

input:

9 8 53

output:

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

result:

ok correct

Test #7:

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

input:

10 8 18

output:

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

result:

ok correct

Test #8:

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

input:

10 8 38

output:

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

result:

ok correct

Test #9:

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

input:

8 10 58

output:

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

result:

ok correct

Test #10:

score: 0
Accepted
time: 47ms
memory: 5616kb

input:

8 10 60

output:

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

result:

ok correct

Test #11:

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

input:

11 8 19

output:

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

result:

ok correct

Test #12:

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

input:

8 11 41

output:

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

result:

ok correct

Test #13:

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

input:

11 8 63

output:

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

result:

ok correct

Test #14:

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

input:

11 8 65

output:

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

result:

ok correct

Test #15:

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

input:

8 12 20

output:

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

result:

ok correct

Test #16:

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

input:

8 12 44

output:

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

result:

ok correct

Test #17:

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

input:

8 12 68

output:

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

result:

ok correct

Test #18:

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

input:

8 12 72

output:

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

result:

ok correct

Test #19:

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

input:

13 8 21

output:

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

result:

ok correct

Test #20:

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

input:

13 8 47

output:

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

result:

ok correct

Test #21:

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

input:

8 13 73

output:

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

result:

ok correct

Test #22:

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

input:

8 13 77

output:

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

result:

ok correct

Test #23:

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

input:

8 14 22

output:

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

result:

ok correct

Test #24:

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

input:

8 14 50

output:

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

result:

ok correct

Test #25:

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

input:

14 8 78

output:

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

result:

ok correct

Test #26:

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

input:

8 14 84

output:

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

result:

ok correct

Test #27:

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

input:

8 15 23

output:

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

result:

ok correct

Test #28:

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

input:

15 8 53

output:

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

result:

ok correct

Test #29:

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

input:

15 8 83

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 ...

result:

ok correct

Test #30:

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

input:

8 15 89

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 ...

result:

ok correct

Test #31:

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

input:

8 16 24

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
5 9
7 10
8 12
7 14
8 16

result:

ok correct

Test #32:

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

input:

16 8 56

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
15 6
16 8

result:

ok correct

Test #33:

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

input:

16 8 88

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #34:

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

input:

8 16 96

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #35:

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

input:

9 9 18

output:

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

result:

ok correct

Test #36:

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

input:

9 9 38

output:

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

result:

ok correct

Test #37:

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

input:

9 9 58

output:

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

result:

ok correct

Test #38:

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

input:

9 9 60

output:

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

result:

ok correct

Test #39:

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

input:

9 10 19

output:

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

result:

ok correct

Test #40:

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

input:

9 10 41

output:

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

result:

ok correct

Test #41:

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

input:

9 10 63

output:

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

result:

ok correct

Test #42:

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

input:

10 9 67

output:

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

result:

ok correct

Test #43:

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

input:

9 11 20

output:

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

result:

ok correct

Test #44:

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

input:

11 9 44

output:

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

result:

ok correct

Test #45:

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

input:

9 11 68

output:

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

result:

ok correct

Test #46:

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

input:

9 11 74

output:

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

result:

ok correct

Test #47:

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

input:

12 9 21

output:

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

result:

ok correct

Test #48:

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

input:

9 12 49

output:

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

result:

ok correct

Test #49:

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

input:

12 9 77

output:

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

result:

ok correct

Test #50:

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

input:

9 12 81

output:

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

result:

ok correct

Test #51:

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

input:

9 13 22

output:

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

result:

ok correct

Test #52:

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

input:

9 13 52

output:

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

result:

ok correct

Test #53:

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

input:

13 9 82

output:

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

result:

ok correct

Test #54:

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

input:

13 9 86

output:

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

result:

ok correct

Test #55:

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

input:

14 9 23

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
10 4
12 5
13 7
14 9

result:

ok correct

Test #56:

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

input:

14 9 55

output:

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

result:

ok correct

Test #57:

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

input:

14 9 87

output:

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

result:

ok correct

Test #58:

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

input:

14 9 93

output:

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

result:

ok correct

Test #59:

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

input:

15 9 24

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
10 2
12 3
13 5
14 7
15 9

result:

ok correct

Test #60:

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

input:

9 15 58

output:

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

result:

ok correct

Test #61:

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

input:

15 9 92

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 ...

result:

ok correct

Test #62:

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

input:

15 9 100

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 ...

result:

ok correct

Test #63:

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

input:

9 16 25

output:

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

result:

ok correct

Test #64:

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

input:

16 9 61

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
12 7
14 8
16 9

result:

ok correct

Test #65:

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

input:

9 16 97

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #66:

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

input:

9 16 107

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #67:

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

input:

10 10 20

output:

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

result:

ok correct

Test #68:

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

input:

10 10 46

output:

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

result:

ok correct

Test #69:

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

input:

10 10 72

output:

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

result:

ok correct

Test #70:

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

input:

10 10 74

output:

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

result:

ok correct

Test #71:

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

input:

11 10 21

output:

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

result:

ok correct

Test #72:

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

input:

10 11 49

output:

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

result:

ok correct

Test #73:

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

input:

10 11 77

output:

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

result:

ok correct

Test #74:

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

input:

10 11 81

output:

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

result:

ok correct

Test #75:

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

input:

10 12 22

output:

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

result:

ok correct

Test #76:

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

input:

12 10 52

output:

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

result:

ok correct

Test #77:

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

input:

10 12 82

output:

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

result:

ok correct

Test #78:

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

input:

12 10 90

output:

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

result:

ok correct

Test #79:

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

input:

10 13 23

output:

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

result:

ok correct

Test #80:

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

input:

10 13 55

output:

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

result:

ok correct

Test #81:

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

input:

10 13 87

output:

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

result:

ok correct

Test #82:

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

input:

13 10 97

output:

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

result:

ok correct

Test #83:

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

input:

10 14 24

output:

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

result:

ok correct

Test #84:

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

input:

10 14 60

output:

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

result:

ok correct

Test #85:

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

input:

10 14 96

output:

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

result:

ok correct

Test #86:

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

input:

10 14 104

output:

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

result:

ok correct

Test #87:

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

input:

10 15 25

output:

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

result:

ok correct

Test #88:

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

input:

15 10 63

output:

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

result:

ok correct

Test #89:

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

input:

10 15 101

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 ...

result:

ok correct

Test #90:

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

input:

15 10 111

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 ...

result:

ok correct

Test #91:

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

input:

16 10 26

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
11 2
13 3
15 4
16 6
15 8
16 10

result:

ok correct

Test #92:

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

input:

10 16 66

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
8 8
9 10
10 12
9 14
1...

result:

ok correct

Test #93:

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

input:

10 16 106

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #94:

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

input:

16 10 120

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #95:

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

input:

11 11 22

output:

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

result:

ok correct

Test #96:

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

input:

11 11 52

output:

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

result:

ok correct

Test #97:

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

input:

11 11 82

output:

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

result:

ok correct

Test #98:

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

input:

11 11 90

output:

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

result:

ok correct

Test #99:

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

input:

12 11 23

output:

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

result:

ok correct

Test #100:

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

input:

12 11 57

output:

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

result:

ok correct

Test #101:

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

input:

11 12 91

output:

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

result:

ok correct

Test #102:

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

input:

11 12 99

output:

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

result:

ok correct

Test #103:

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

input:

11 13 24

output:

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

result:

ok correct

Test #104:

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

input:

13 11 60

output:

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

result:

ok correct

Test #105:

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

input:

11 13 96

output:

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

result:

ok correct

Test #106:

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

input:

13 11 106

output:

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

result:

ok correct

Test #107:

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

input:

11 14 25

output:

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

result:

ok correct

Test #108:

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

input:

11 14 63

output:

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

result:

ok correct

Test #109:

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

input:

14 11 101

output:

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

result:

ok correct

Test #110:

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

input:

14 11 115

output:

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

result:

ok correct

Test #111:

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

input:

11 15 26

output:

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

result:

ok correct

Test #112:

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

input:

11 15 68

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
7 9
9 10
11 11
10 ...

result:

ok correct

Test #113:

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

input:

11 15 110

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 ...

result:

ok correct

Test #114:

score: 0
Accepted
time: 35ms
memory: 5632kb

input:

11 15 122

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 ...

result:

ok correct

Test #115:

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

input:

11 16 27

output:

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

result:

ok correct

Test #116:

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

input:

16 11 71

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #117:

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

input:

16 11 115

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #118:

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

input:

11 16 131

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #119:

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

input:

12 12 24

output:

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

result:

ok correct

Test #120:

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

input:

12 12 60

output:

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

result:

ok correct

Test #121:

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

input:

12 12 96

output:

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

result:

ok correct

Test #122:

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

input:

12 12 108

output:

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

result:

ok correct

Test #123:

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

input:

13 12 25

output:

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

result:

ok correct

Test #124:

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

input:

13 12 65

output:

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

result:

ok correct

Test #125:

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

input:

12 13 105

output:

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

result:

ok correct

Test #126:

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

input:

13 12 117

output:

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

result:

ok correct

Test #127:

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

input:

12 14 26

output:

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

result:

ok correct

Test #128:

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

input:

14 12 68

output:

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

result:

ok correct

Test #129:

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

input:

14 12 110

output:

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

result:

ok correct

Test #130:

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

input:

14 12 126

output:

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

result:

ok correct

Test #131:

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

input:

15 12 27

output:

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

result:

ok correct

Test #132:

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

input:

12 15 73

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
8 ...

result:

ok correct

Test #133:

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

input:

15 12 119

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 ...

result:

ok correct

Test #134:

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

input:

15 12 135

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 ...

result:

ok correct

Test #135:

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

input:

12 16 28

output:

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

result:

ok correct

Test #136:

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

input:

12 16 76

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #137:

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

input:

12 16 124

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #138:

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

input:

16 12 144

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #139:

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

input:

13 13 26

output:

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

result:

ok correct

Test #140:

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

input:

13 13 68

output:

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

result:

ok correct

Test #141:

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

input:

13 13 110

output:

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

result:

ok correct

Test #142:

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

input:

13 13 126

output:

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

result:

ok correct

Test #143:

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

input:

14 13 27

output:

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

result:

ok correct

Test #144:

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

input:

13 14 73

output:

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

result:

ok correct

Test #145:

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

input:

14 13 119

output:

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

result:

ok correct

Test #146:

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

input:

14 13 135

output:

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

result:

ok correct

Test #147:

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

input:

15 13 28

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
11 4
13 5
14 7
15 9
14 11
15 13

result:

ok correct

Test #148:

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

input:

13 15 76

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 ...

result:

ok correct

Test #149:

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

input:

13 15 124

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 ...

result:

ok correct

Test #150:

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

input:

15 13 146

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 ...

result:

ok correct

Test #151:

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

input:

16 13 29

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
11 3
12 5
13 7
14 9
15 11
16 13

result:

ok correct

Test #152:

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

input:

16 13 81

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #153:

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

input:

13 16 133

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #154:

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

input:

13 16 155

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #155:

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

input:

14 14 28

output:

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

result:

ok correct

Test #156:

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

input:

14 14 78

output:

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

result:

ok correct

Test #157:

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

input:

14 14 128

output:

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

result:

ok correct

Test #158:

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

input:

14 14 146

output:

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

result:

ok correct

Test #159:

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

input:

14 15 29

output:

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

result:

ok correct

Test #160:

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

input:

15 14 81

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 ...

result:

ok correct

Test #161:

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

input:

14 15 133

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 ...

result:

ok correct

Test #162:

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

input:

15 14 157

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
7 6
6 4
8 5
6 6
5 4
7 5
5 6
4 ...

result:

ok correct

Test #163:

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

input:

14 16 30

output:

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

result:

ok correct

Test #164:

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

input:

16 14 86

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #165:

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

input:

16 14 142

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #166:

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

input:

16 14 168

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #167:

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

input:

15 15 30

output:

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

result:

ok correct

Test #168:

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

input:

15 15 86

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 ...

result:

ok correct

Test #169:

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

input:

15 15 142

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 ...

result:

ok correct

Test #170:

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

input:

15 15 168

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
6 7
4 6
5 8
6 6
4 5
5 7
6 5
4 ...

result:

ok correct

Test #171:

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

input:

16 15 31

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 5
12 7
13 9
14 11
15 13
16 15

result:

ok correct

Test #172:

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

input:

16 15 91

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #173:

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

input:

15 16 151

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #174:

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

input:

16 15 179

output:

2 3
3 1
1 2
3 3
4 1
2 2
4 3
5 1
3 2
5 3
6 1
4 2
6 3
7 1
5 2
7 3
8 1
6 2
8 3
9 1
7 2
9 3
10 1
8 2
10 3
11 1
9 2
11 3
12 1
10 2
12 3
13 1
11 2
13 3
14 1
12 2
14 3
15 1
13 2
15 3
16 1
14 2
16 3
14 4
16 5
14 6
13 4
15 5
13 6
12 4
14 5
12 6
11 4
13 5
11 6
10 4
12 5
10 6
9 4
11 5
9 6
8 4
10 5
8 6
7 4
9 5
...

result:

ok correct

Test #175:

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

input:

16 16 32

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
5 9
7 10
9 11
11 12
13 13
15 14
16 16

result:

ok correct

Test #176:

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

input:

16 16 96

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #177:

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

input:

16 16 160

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #178:

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

input:

16 16 192

output:

3 2
1 3
2 1
3 3
1 4
2 2
3 4
1 5
2 3
3 5
1 6
2 4
3 6
1 7
2 5
3 7
1 8
2 6
3 8
1 9
2 7
3 9
1 10
2 8
3 10
1 11
2 9
3 11
1 12
2 10
3 12
1 13
2 11
3 13
1 14
2 12
3 14
1 15
2 13
3 15
1 16
2 14
3 16
4 14
5 16
6 14
4 13
5 15
6 13
4 12
5 14
6 12
4 11
5 13
6 11
4 10
5 12
6 10
4 9
5 11
6 9
4 8
5 10
6 8
4 7
5 9
...

result:

ok correct

Test #179:

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

input:

323 247 59834

output:

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

result:

ok correct

Test #180:

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

input:

285 117 12034

output:

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

result:

ok correct

Test #181:

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

input:

439 147 1666

output:

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

result:

ok correct

Test #182:

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

input:

396 185 9667

output:

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

result:

ok correct

Test #183:

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

input:

120 244 3128

output:

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

result:

ok correct

Test #184:

score: 0
Accepted
time: 33ms
memory: 6476kb

input:

235 415 650

output:

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

result:

ok correct

Test #185:

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

input:

125 434 15913

output:

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

result:

ok correct

Test #186:

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

input:

111 379 17872

output:

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

result:

ok correct

Test #187:

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

input:

144 195 16053

output:

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

result:

ok correct

Test #188:

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

input:

496 192 20610

output:

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

result:

ok correct

Test #189:

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

input:

291 133 29026

output:

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

result:

ok correct

Test #190:

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

input:

369 297 16842

output:

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

result:

ok correct

Test #191:

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

input:

247 325 13376

output:

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

result:

ok correct

Test #192:

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

input:

162 311 23279

output:

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

result:

ok correct

Test #193:

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

input:

277 461 80956

output:

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

result:

ok correct

Test #194:

score: 0
Accepted
time: 30ms
memory: 6316kb

input:

235 368 603

output:

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

result:

ok correct

Test #195:

score: 0
Accepted
time: 35ms
memory: 10332kb

input:

495 476 170741

output:

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

result:

ok correct

Test #196:

score: 0
Accepted
time: 27ms
memory: 7912kb

input:

339 374 75011

output:

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

result:

ok correct

Test #197:

score: 0
Accepted
time: 36ms
memory: 6524kb

input:

256 401 1153

output:

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

result:

ok correct

Test #198:

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

input:

260 194 14690

output:

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

result:

ok correct

Test #199:

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

input:

255 289 55270

output:

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

result:

ok correct

Test #200:

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

input:

307 115 2488

output:

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

result:

ok correct

Test #201:

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

input:

469 180 44711

output:

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

result:

ok correct

Test #202:

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

input:

155 406 46461

output:

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

result:

ok correct

Test #203:

score: 0
Accepted
time: 36ms
memory: 7876kb

input:

402 376 73902

output:

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

result:

ok correct

Test #204:

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

input:

149 431 580

output:

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

result:

ok correct

Test #205:

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

input:

344 138 21038

output:

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

result:

ok correct

Test #206:

score: 0
Accepted
time: 58ms
memory: 7148kb

input:

497 351 16170

output:

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

result:

ok correct

Test #207:

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

input:

103 231 4292

output:

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

result:

ok correct

Test #208:

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

input:

114 319 24783

output:

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

result:

ok correct

Test #209:

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

input:

109 280 22889

output:

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

result:

ok correct

Test #210:

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

input:

429 123 19796

output:

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

result:

ok correct

Test #211:

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

input:

360 437 86581

output:

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

result:

ok correct

Test #212:

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

input:

217 425 64418

output:

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

result:

ok correct

Test #213:

score: 0
Accepted
time: 47ms
memory: 7684kb

input:

356 464 52174

output:

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

result:

ok correct

Test #214:

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

input:

348 204 552

output:

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

result:

ok correct

Test #215:

score: 0
Accepted
time: 30ms
memory: 9524kb

input:

450 450 150260

output:

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

result:

ok correct

Test #216:

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

input:

312 254 18728

output:

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

result:

ok correct

Test #217:

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

input:

204 481 19601

output:

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

result:

ok correct

Test #218:

score: 0
Accepted
time: 27ms
memory: 7040kb

input:

365 278 40221

output:

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

result:

ok correct

Test #219:

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

input:

309 429 99420

output:

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

result:

ok correct

Test #220:

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

input:

253 383 72490

output:

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

result:

ok correct

Test #221:

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

input:

307 473 25994

output:

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

result:

ok correct

Test #222:

score: 0
Accepted
time: 38ms
memory: 8648kb

input:

405 476 106539

output:

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

result:

ok correct

Test #223:

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

input:

124 330 18088

output:

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

result:

ok correct

Test #224:

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

input:

300 144 444

output:

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

result:

ok correct

Test #225:

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

input:

270 385 31647

output:

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

result:

ok correct

Test #226:

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

input:

398 255 4481

output:

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

result:

ok correct

Test #227:

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

input:

457 276 2177

output:

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

result:

ok correct

Test #228:

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

input:

366 257 28801

output:

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

result:

ok correct

Test #229:

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

input:

378 314 89018

output:

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

result:

ok correct

Test #230:

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

input:

119 237 4640

output:

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

result:

ok correct

Test #231:

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

input:

291 220 23825

output:

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

result:

ok correct

Test #232:

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

input:

333 297 18462

output:

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

result:

ok correct

Test #233:

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

input:

288 289 60091

output:

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

result:

ok correct

Test #234:

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

input:

177 204 381

output:

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

result:

ok correct

Test #235:

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

input:

258 100 7790

output:

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

result:

ok correct

Test #236:

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

input:

260 215 27701

output:

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

result:

ok correct

Test #237:

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

input:

380 230 26882

output:

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

result:

ok correct

Test #238:

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

input:

246 407 33169

output:

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

result:

ok correct

Test #239:

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

input:

100 226 16950

output:

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

result:

ok correct

Test #240:

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

input:

335 157 7422

output:

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

result:

ok correct

Test #241:

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

input:

214 493 12027

output:

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

result:

ok correct

Test #242:

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

input:

454 118 15182

output:

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

result:

ok correct

Test #243:

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

input:

285 229 46456

output:

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

result:

ok correct

Test #244:

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

input:

263 202 465

output:

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

result:

ok correct

Test #245:

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

input:

217 343 14182

output:

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

result:

ok correct

Test #246:

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

input:

267 247 37292

output:

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

result:

ok correct

Test #247:

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

input:

295 203 7268

output:

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

result:

ok correct

Test #248:

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

input:

403 248 32413

output:

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

result:

ok correct

Test #249:

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

input:

158 359 42541

output:

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

result:

ok correct

Test #250:

score: 0
Accepted
time: 33ms
memory: 7372kb

input:

306 430 33284

output:

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

result:

ok correct

Test #251:

score: 0
Accepted
time: 30ms
memory: 6824kb

input:

432 273 12763

output:

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

result:

ok correct

Test #252:

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

input:

197 420 17477

output:

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

result:

ok correct

Test #253:

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

input:

131 180 12589

output:

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

result:

ok correct

Test #254:

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

input:

400 220 620

output:

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

result:

ok correct

Test #255:

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

input:

233 158 10757

output:

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

result:

ok correct

Test #256:

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

input:

376 250 40126

output:

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

result:

ok correct

Test #257:

score: 0
Accepted
time: 22ms
memory: 8860kb

input:

480 379 124733

output:

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

result:

ok correct

Test #258:

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

input:

274 449 14675

output:

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

result:

ok correct

Test #259:

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

input:

349 471 123284

output:

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

result:

ok correct

Test #260:

score: 0
Accepted
time: 35ms
memory: 7808kb

input:

410 379 66159

output:

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

result:

ok correct

Test #261:

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

input:

470 140 47196

output:

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

result:

ok correct

Test #262:

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

input:

150 271 26727

output:

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

result:

ok correct

Test #263:

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

input:

418 246 19172

output:

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

result:

ok correct

Test #264:

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

input:

130 121 251

output:

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

result:

ok correct

Test #265:

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

input:

476 224 58118

output:

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

result:

ok correct

Test #266:

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

input:

258 196 33492

output:

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

result:

ok correct

Test #267:

score: 0
Accepted
time: 27ms
memory: 8800kb

input:

364 460 121026

output:

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

result:

ok correct

Test #268:

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

input:

451 440 132277

output:

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

result:

ok correct

Test #269:

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

input:

451 101 34162

output:

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

result:

ok correct

Test #270:

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

input:

105 380 21955

output:

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

result:

ok correct

Test #271:

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

input:

174 149 9803

output:

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

result:

ok correct

Test #272:

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

input:

220 325 14811

output:

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

result:

ok correct

Test #273:

score: 0
Accepted
time: 38ms
memory: 7672kb

input:

283 488 41381

output:

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

result:

ok correct

Test #274:

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

input:

108 450 558

output:

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

result:

ok correct

Test #275:

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

input:

224 495 49749

output:

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

result:

ok correct

Test #276:

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

input:

211 190 425

output:

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

result:

ok correct

Test #277:

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

input:

110 293 6669

output:

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

result:

ok correct

Test #278:

score: 0
Accepted
time: 37ms
memory: 6824kb

input:

465 260 21825

output:

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

result:

ok correct

Test #279:

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

input:

303 452 102717

output:

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

result:

ok correct

Test #280:

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

input:

207 241 7580

output:

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

result:

ok correct

Test #281:

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

input:

100 499 35393

output:

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

result:

ok correct

Test #282:

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

input:

271 287 40346

output:

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

result:

ok correct

Test #283:

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

input:

125 341 17724

output:

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

result:

ok correct

Test #284:

score: 0
Accepted
time: 27ms
memory: 6376kb

input:

248 342 590

output:

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

result:

ok correct

Test #285:

score: 0
Accepted
time: 48ms
memory: 8196kb

input:

415 474 71875

output:

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

result:

ok correct

Test #286:

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

input:

273 320 53023

output:

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

result:

ok correct

Test #287:

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

input:

139 354 23163

output:

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

result:

ok correct

Test #288:

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

input:

229 353 17304

output:

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

result:

ok correct

Test #289:

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

input:

466 456 159372

output:

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

result:

ok correct

Test #290:

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

input:

204 360 46412

output:

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

result:

ok correct

Test #291:

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

input:

492 220 73404

output:

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

result:

ok correct

Test #292:

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

input:

480 167 57251

output:

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

result:

ok correct

Test #293:

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

input:

239 398 63187

output:

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

result:

ok correct

Test #294:

score: 0
Accepted
time: 56ms
memory: 9436kb

input:

500 500 125000

output:

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

result:

ok correct

Test #295:

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

input:

500 500 187500

output:

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

result:

ok correct

Test #296:

score: 0
Accepted
time: 83ms
memory: 7612kb

input:

500 500 1000

output:

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

result:

ok correct

Test #297:

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

input:

500 499 187125

output:

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

result:

ok correct

Test #298:

score: 0
Accepted
time: 86ms
memory: 7660kb

input:

500 499 999

output:

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

result:

ok correct

Test #299:

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

input:

499 499 186750

output:

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

result:

ok correct

Test #300:

score: 0
Accepted
time: 91ms
memory: 7876kb

input:

499 499 998

output:

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

result:

ok correct

Extra Test:

score: 0
Extra Test Passed