QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#579173#7226. The Impressive PathUrdAC ✓19ms31524kbC++17958b2024-09-21 10:07:392024-09-21 10:07:39

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

8 8 16

output:

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

result:

ok correct

Test #2:

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

input:

8 8 32

output:

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

result:

ok correct

Test #3:

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

input:

8 8 48

output:

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

result:

ok correct

Test #4:

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

input:

9 8 17

output:

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

result:

ok correct

Test #5:

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

input:

9 8 35

output:

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

result:

ok correct

Test #6:

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

input:

9 8 53

output:

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

result:

ok correct

Test #7:

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

input:

10 8 18

output:

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

result:

ok correct

Test #8:

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

input:

10 8 38

output:

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

result:

ok correct

Test #9:

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

input:

8 10 58

output:

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

result:

ok correct

Test #10:

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

input:

8 10 60

output:

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

result:

ok correct

Test #11:

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

input:

11 8 19

output:

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

result:

ok correct

Test #12:

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

input:

8 11 41

output:

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

result:

ok correct

Test #13:

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

input:

11 8 63

output:

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

result:

ok correct

Test #14:

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

input:

11 8 65

output:

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

result:

ok correct

Test #15:

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

input:

8 12 20

output:

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

result:

ok correct

Test #16:

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

input:

8 12 44

output:

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

result:

ok correct

Test #17:

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

input:

8 12 68

output:

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

result:

ok correct

Test #18:

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

input:

8 12 72

output:

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

result:

ok correct

Test #19:

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

input:

13 8 21

output:

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

result:

ok correct

Test #20:

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

input:

13 8 47

output:

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

result:

ok correct

Test #21:

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

input:

8 13 73

output:

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

result:

ok correct

Test #22:

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

input:

8 13 77

output:

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

result:

ok correct

Test #23:

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

input:

8 14 22

output:

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

result:

ok correct

Test #24:

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

input:

8 14 50

output:

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

result:

ok correct

Test #25:

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

input:

14 8 78

output:

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

result:

ok correct

Test #26:

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

input:

8 14 84

output:

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

result:

ok correct

Test #27:

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

input:

8 15 23

output:

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

result:

ok correct

Test #28:

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

input:

15 8 53

output:

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

result:

ok correct

Test #29:

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

input:

15 8 83

output:

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

result:

ok correct

Test #30:

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

input:

8 15 89

output:

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

result:

ok correct

Test #31:

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

input:

8 16 24

output:

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

result:

ok correct

Test #32:

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

input:

16 8 56

output:

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

result:

ok correct

Test #33:

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

input:

16 8 88

output:

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

result:

ok correct

Test #34:

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

input:

8 16 96

output:

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

result:

ok correct

Test #35:

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

input:

9 9 18

output:

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

result:

ok correct

Test #36:

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

input:

9 9 38

output:

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

result:

ok correct

Test #37:

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

input:

9 9 58

output:

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

result:

ok correct

Test #38:

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

input:

9 9 60

output:

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

result:

ok correct

Test #39:

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

input:

9 10 19

output:

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

result:

ok correct

Test #40:

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

input:

9 10 41

output:

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

result:

ok correct

Test #41:

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

input:

9 10 63

output:

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

result:

ok correct

Test #42:

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

input:

10 9 67

output:

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

result:

ok correct

Test #43:

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

input:

9 11 20

output:

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

result:

ok correct

Test #44:

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

input:

11 9 44

output:

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

result:

ok correct

Test #45:

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

input:

9 11 68

output:

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

result:

ok correct

Test #46:

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

input:

9 11 74

output:

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

result:

ok correct

Test #47:

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

input:

12 9 21

output:

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

result:

ok correct

Test #48:

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

input:

9 12 49

output:

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

result:

ok correct

Test #49:

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

input:

12 9 77

output:

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

result:

ok correct

Test #50:

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

input:

9 12 81

output:

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

result:

ok correct

Test #51:

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

input:

9 13 22

output:

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

result:

ok correct

Test #52:

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

input:

9 13 52

output:

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

result:

ok correct

Test #53:

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

input:

13 9 82

output:

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

result:

ok correct

Test #54:

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

input:

13 9 86

output:

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

result:

ok correct

Test #55:

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

input:

14 9 23

output:

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

result:

ok correct

Test #56:

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

input:

14 9 55

output:

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

result:

ok correct

Test #57:

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

input:

14 9 87

output:

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

result:

ok correct

Test #58:

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

input:

14 9 93

output:

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

result:

ok correct

Test #59:

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

input:

15 9 24

output:

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

result:

ok correct

Test #60:

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

input:

9 15 58

output:

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

result:

ok correct

Test #61:

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

input:

15 9 92

output:

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

result:

ok correct

Test #62:

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

input:

15 9 100

output:

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

result:

ok correct

Test #63:

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

input:

9 16 25

output:

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

result:

ok correct

Test #64:

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

input:

16 9 61

output:

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

result:

ok correct

Test #65:

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

input:

9 16 97

output:

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

result:

ok correct

Test #66:

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

input:

9 16 107

output:

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

result:

ok correct

Test #67:

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

input:

10 10 20

output:

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

result:

ok correct

Test #68:

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

input:

10 10 46

output:

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

result:

ok correct

Test #69:

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

input:

10 10 72

output:

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

result:

ok correct

Test #70:

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

input:

10 10 74

output:

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

result:

ok correct

Test #71:

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

input:

11 10 21

output:

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

result:

ok correct

Test #72:

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

input:

10 11 49

output:

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

result:

ok correct

Test #73:

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

input:

10 11 77

output:

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

result:

ok correct

Test #74:

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

input:

10 11 81

output:

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

result:

ok correct

Test #75:

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

input:

10 12 22

output:

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

result:

ok correct

Test #76:

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

input:

12 10 52

output:

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

result:

ok correct

Test #77:

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

input:

10 12 82

output:

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

result:

ok correct

Test #78:

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

input:

12 10 90

output:

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

result:

ok correct

Test #79:

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

input:

10 13 23

output:

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

result:

ok correct

Test #80:

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

input:

10 13 55

output:

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

result:

ok correct

Test #81:

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

input:

10 13 87

output:

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

result:

ok correct

Test #82:

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

input:

13 10 97

output:

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

result:

ok correct

Test #83:

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

input:

10 14 24

output:

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

result:

ok correct

Test #84:

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

input:

10 14 60

output:

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

result:

ok correct

Test #85:

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

input:

10 14 96

output:

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

result:

ok correct

Test #86:

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

input:

10 14 104

output:

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

result:

ok correct

Test #87:

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

input:

10 15 25

output:

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

result:

ok correct

Test #88:

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

input:

15 10 63

output:

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

result:

ok correct

Test #89:

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

input:

10 15 101

output:

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

result:

ok correct

Test #90:

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

input:

15 10 111

output:

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

result:

ok correct

Test #91:

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

input:

16 10 26

output:

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

result:

ok correct

Test #92:

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

input:

10 16 66

output:

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

result:

ok correct

Test #93:

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

input:

10 16 106

output:

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

result:

ok correct

Test #94:

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

input:

16 10 120

output:

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

result:

ok correct

Test #95:

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

input:

11 11 22

output:

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

result:

ok correct

Test #96:

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

input:

11 11 52

output:

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

result:

ok correct

Test #97:

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

input:

11 11 82

output:

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

result:

ok correct

Test #98:

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

input:

11 11 90

output:

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

result:

ok correct

Test #99:

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

input:

12 11 23

output:

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

result:

ok correct

Test #100:

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

input:

12 11 57

output:

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

result:

ok correct

Test #101:

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

input:

11 12 91

output:

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

result:

ok correct

Test #102:

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

input:

11 12 99

output:

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

result:

ok correct

Test #103:

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

input:

11 13 24

output:

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

result:

ok correct

Test #104:

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

input:

13 11 60

output:

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

result:

ok correct

Test #105:

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

input:

11 13 96

output:

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

result:

ok correct

Test #106:

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

input:

13 11 106

output:

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

result:

ok correct

Test #107:

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

input:

11 14 25

output:

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

result:

ok correct

Test #108:

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

input:

11 14 63

output:

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

result:

ok correct

Test #109:

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

input:

14 11 101

output:

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

result:

ok correct

Test #110:

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

input:

14 11 115

output:

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

result:

ok correct

Test #111:

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

input:

11 15 26

output:

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

result:

ok correct

Test #112:

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

input:

11 15 68

output:

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

result:

ok correct

Test #113:

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

input:

11 15 110

output:

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

result:

ok correct

Test #114:

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

input:

11 15 122

output:

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

result:

ok correct

Test #115:

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

input:

11 16 27

output:

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

result:

ok correct

Test #116:

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

input:

16 11 71

output:

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

result:

ok correct

Test #117:

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

input:

16 11 115

output:

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

result:

ok correct

Test #118:

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

input:

11 16 131

output:

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

result:

ok correct

Test #119:

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

input:

12 12 24

output:

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

result:

ok correct

Test #120:

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

input:

12 12 60

output:

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

result:

ok correct

Test #121:

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

input:

12 12 96

output:

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

result:

ok correct

Test #122:

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

input:

12 12 108

output:

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

result:

ok correct

Test #123:

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

input:

13 12 25

output:

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

result:

ok correct

Test #124:

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

input:

13 12 65

output:

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

result:

ok correct

Test #125:

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

input:

12 13 105

output:

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

result:

ok correct

Test #126:

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

input:

13 12 117

output:

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

result:

ok correct

Test #127:

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

input:

12 14 26

output:

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

result:

ok correct

Test #128:

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

input:

14 12 68

output:

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

result:

ok correct

Test #129:

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

input:

14 12 110

output:

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

result:

ok correct

Test #130:

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

input:

14 12 126

output:

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

result:

ok correct

Test #131:

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

input:

15 12 27

output:

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

result:

ok correct

Test #132:

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

input:

12 15 73

output:

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

result:

ok correct

Test #133:

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

input:

15 12 119

output:

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

result:

ok correct

Test #134:

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

input:

15 12 135

output:

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

result:

ok correct

Test #135:

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

input:

12 16 28

output:

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

result:

ok correct

Test #136:

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

input:

12 16 76

output:

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

result:

ok correct

Test #137:

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

input:

12 16 124

output:

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

result:

ok correct

Test #138:

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

input:

16 12 144

output:

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

result:

ok correct

Test #139:

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

input:

13 13 26

output:

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

result:

ok correct

Test #140:

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

input:

13 13 68

output:

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

result:

ok correct

Test #141:

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

input:

13 13 110

output:

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

result:

ok correct

Test #142:

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

input:

13 13 126

output:

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

result:

ok correct

Test #143:

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

input:

14 13 27

output:

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

result:

ok correct

Test #144:

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

input:

13 14 73

output:

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

result:

ok correct

Test #145:

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

input:

14 13 119

output:

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

result:

ok correct

Test #146:

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

input:

14 13 135

output:

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

result:

ok correct

Test #147:

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

input:

15 13 28

output:

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

result:

ok correct

Test #148:

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

input:

13 15 76

output:

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

result:

ok correct

Test #149:

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

input:

13 15 124

output:

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

result:

ok correct

Test #150:

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

input:

15 13 146

output:

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

result:

ok correct

Test #151:

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

input:

16 13 29

output:

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

result:

ok correct

Test #152:

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

input:

16 13 81

output:

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

result:

ok correct

Test #153:

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

input:

13 16 133

output:

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

result:

ok correct

Test #154:

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

input:

13 16 155

output:

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

result:

ok correct

Test #155:

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

input:

14 14 28

output:

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

result:

ok correct

Test #156:

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

input:

14 14 78

output:

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

result:

ok correct

Test #157:

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

input:

14 14 128

output:

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

result:

ok correct

Test #158:

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

input:

14 14 146

output:

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

result:

ok correct

Test #159:

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

input:

14 15 29

output:

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

result:

ok correct

Test #160:

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

input:

15 14 81

output:

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

result:

ok correct

Test #161:

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

input:

14 15 133

output:

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

result:

ok correct

Test #162:

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

input:

15 14 157

output:

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

result:

ok correct

Test #163:

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

input:

14 16 30

output:

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

result:

ok correct

Test #164:

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

input:

16 14 86

output:

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

result:

ok correct

Test #165:

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

input:

16 14 142

output:

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

result:

ok correct

Test #166:

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

input:

16 14 168

output:

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

result:

ok correct

Test #167:

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

input:

15 15 30

output:

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

result:

ok correct

Test #168:

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

input:

15 15 86

output:

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

result:

ok correct

Test #169:

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

input:

15 15 142

output:

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

result:

ok correct

Test #170:

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

input:

15 15 168

output:

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

result:

ok correct

Test #171:

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

input:

16 15 31

output:

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

result:

ok correct

Test #172:

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

input:

16 15 91

output:

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

result:

ok correct

Test #173:

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

input:

15 16 151

output:

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

result:

ok correct

Test #174:

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

input:

16 15 179

output:

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

result:

ok correct

Test #175:

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

input:

16 16 32

output:

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

result:

ok correct

Test #176:

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

input:

16 16 96

output:

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

result:

ok correct

Test #177:

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

input:

16 16 160

output:

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

result:

ok correct

Test #178:

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

input:

16 16 192

output:

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

result:

ok correct

Test #179:

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

input:

323 247 59834

output:

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

result:

ok correct

Test #180:

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

input:

285 117 12034

output:

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

result:

ok correct

Test #181:

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

input:

439 147 1666

output:

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

result:

ok correct

Test #182:

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

input:

396 185 9667

output:

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

result:

ok correct

Test #183:

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

input:

120 244 3128

output:

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

result:

ok correct

Test #184:

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

input:

235 415 650

output:

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

result:

ok correct

Test #185:

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

input:

125 434 15913

output:

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

result:

ok correct

Test #186:

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

input:

111 379 17872

output:

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

result:

ok correct

Test #187:

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

input:

144 195 16053

output:

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

result:

ok correct

Test #188:

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

input:

496 192 20610

output:

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

result:

ok correct

Test #189:

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

input:

291 133 29026

output:

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

result:

ok correct

Test #190:

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

input:

369 297 16842

output:

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

result:

ok correct

Test #191:

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

input:

247 325 13376

output:

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

result:

ok correct

Test #192:

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

input:

162 311 23279

output:

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

result:

ok correct

Test #193:

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

input:

277 461 80956

output:

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

result:

ok correct

Test #194:

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

input:

235 368 603

output:

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

result:

ok correct

Test #195:

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

input:

495 476 170741

output:

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

result:

ok correct

Test #196:

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

input:

339 374 75011

output:

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

result:

ok correct

Test #197:

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

input:

256 401 1153

output:

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

result:

ok correct

Test #198:

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

input:

260 194 14690

output:

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

result:

ok correct

Test #199:

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

input:

255 289 55270

output:

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

result:

ok correct

Test #200:

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

input:

307 115 2488

output:

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

result:

ok correct

Test #201:

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

input:

469 180 44711

output:

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

result:

ok correct

Test #202:

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

input:

155 406 46461

output:

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

result:

ok correct

Test #203:

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

input:

402 376 73902

output:

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

result:

ok correct

Test #204:

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

input:

149 431 580

output:

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

result:

ok correct

Test #205:

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

input:

344 138 21038

output:

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

result:

ok correct

Test #206:

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

input:

497 351 16170

output:

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

result:

ok correct

Test #207:

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

input:

103 231 4292

output:

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

result:

ok correct

Test #208:

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

input:

114 319 24783

output:

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

result:

ok correct

Test #209:

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

input:

109 280 22889

output:

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

result:

ok correct

Test #210:

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

input:

429 123 19796

output:

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

result:

ok correct

Test #211:

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

input:

360 437 86581

output:

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

result:

ok correct

Test #212:

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

input:

217 425 64418

output:

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

result:

ok correct

Test #213:

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

input:

356 464 52174

output:

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

result:

ok correct

Test #214:

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

input:

348 204 552

output:

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

result:

ok correct

Test #215:

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

input:

450 450 150260

output:

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

result:

ok correct

Test #216:

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

input:

312 254 18728

output:

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

result:

ok correct

Test #217:

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

input:

204 481 19601

output:

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

result:

ok correct

Test #218:

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

input:

365 278 40221

output:

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

result:

ok correct

Test #219:

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

input:

309 429 99420

output:

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

result:

ok correct

Test #220:

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

input:

253 383 72490

output:

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

result:

ok correct

Test #221:

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

input:

307 473 25994

output:

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

result:

ok correct

Test #222:

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

input:

405 476 106539

output:

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

result:

ok correct

Test #223:

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

input:

124 330 18088

output:

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

result:

ok correct

Test #224:

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

input:

300 144 444

output:

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

result:

ok correct

Test #225:

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

input:

270 385 31647

output:

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

result:

ok correct

Test #226:

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

input:

398 255 4481

output:

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

result:

ok correct

Test #227:

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

input:

457 276 2177

output:

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

result:

ok correct

Test #228:

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

input:

366 257 28801

output:

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

result:

ok correct

Test #229:

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

input:

378 314 89018

output:

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

result:

ok correct

Test #230:

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

input:

119 237 4640

output:

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

result:

ok correct

Test #231:

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

input:

291 220 23825

output:

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

result:

ok correct

Test #232:

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

input:

333 297 18462

output:

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

result:

ok correct

Test #233:

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

input:

288 289 60091

output:

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

result:

ok correct

Test #234:

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

input:

177 204 381

output:

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

result:

ok correct

Test #235:

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

input:

258 100 7790

output:

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

result:

ok correct

Test #236:

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

input:

260 215 27701

output:

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

result:

ok correct

Test #237:

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

input:

380 230 26882

output:

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

result:

ok correct

Test #238:

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

input:

246 407 33169

output:

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

result:

ok correct

Test #239:

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

input:

100 226 16950

output:

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

result:

ok correct

Test #240:

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

input:

335 157 7422

output:

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

result:

ok correct

Test #241:

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

input:

214 493 12027

output:

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

result:

ok correct

Test #242:

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

input:

454 118 15182

output:

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

result:

ok correct

Test #243:

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

input:

285 229 46456

output:

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

result:

ok correct

Test #244:

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

input:

263 202 465

output:

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

result:

ok correct

Test #245:

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

input:

217 343 14182

output:

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

result:

ok correct

Test #246:

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

input:

267 247 37292

output:

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

result:

ok correct

Test #247:

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

input:

295 203 7268

output:

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

result:

ok correct

Test #248:

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

input:

403 248 32413

output:

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

result:

ok correct

Test #249:

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

input:

158 359 42541

output:

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

result:

ok correct

Test #250:

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

input:

306 430 33284

output:

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

result:

ok correct

Test #251:

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

input:

432 273 12763

output:

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

result:

ok correct

Test #252:

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

input:

197 420 17477

output:

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

result:

ok correct

Test #253:

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

input:

131 180 12589

output:

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

result:

ok correct

Test #254:

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

input:

400 220 620

output:

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

result:

ok correct

Test #255:

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

input:

233 158 10757

output:

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

result:

ok correct

Test #256:

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

input:

376 250 40126

output:

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

result:

ok correct

Test #257:

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

input:

480 379 124733

output:

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

result:

ok correct

Test #258:

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

input:

274 449 14675

output:

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

result:

ok correct

Test #259:

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

input:

349 471 123284

output:

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

result:

ok correct

Test #260:

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

input:

410 379 66159

output:

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

result:

ok correct

Test #261:

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

input:

470 140 47196

output:

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

result:

ok correct

Test #262:

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

input:

150 271 26727

output:

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

result:

ok correct

Test #263:

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

input:

418 246 19172

output:

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

result:

ok correct

Test #264:

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

input:

130 121 251

output:

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

result:

ok correct

Test #265:

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

input:

476 224 58118

output:

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

result:

ok correct

Test #266:

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

input:

258 196 33492

output:

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

result:

ok correct

Test #267:

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

input:

364 460 121026

output:

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

result:

ok correct

Test #268:

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

input:

451 440 132277

output:

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

result:

ok correct

Test #269:

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

input:

451 101 34162

output:

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

result:

ok correct

Test #270:

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

input:

105 380 21955

output:

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

result:

ok correct

Test #271:

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

input:

174 149 9803

output:

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

result:

ok correct

Test #272:

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

input:

220 325 14811

output:

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

result:

ok correct

Test #273:

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

input:

283 488 41381

output:

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

result:

ok correct

Test #274:

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

input:

108 450 558

output:

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

result:

ok correct

Test #275:

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

input:

224 495 49749

output:

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

result:

ok correct

Test #276:

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

input:

211 190 425

output:

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

result:

ok correct

Test #277:

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

input:

110 293 6669

output:

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

result:

ok correct

Test #278:

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

input:

465 260 21825

output:

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

result:

ok correct

Test #279:

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

input:

303 452 102717

output:

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

result:

ok correct

Test #280:

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

input:

207 241 7580

output:

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

result:

ok correct

Test #281:

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

input:

100 499 35393

output:

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

result:

ok correct

Test #282:

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

input:

271 287 40346

output:

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

result:

ok correct

Test #283:

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

input:

125 341 17724

output:

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

result:

ok correct

Test #284:

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

input:

248 342 590

output:

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

result:

ok correct

Test #285:

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

input:

415 474 71875

output:

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

result:

ok correct

Test #286:

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

input:

273 320 53023

output:

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

result:

ok correct

Test #287:

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

input:

139 354 23163

output:

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

result:

ok correct

Test #288:

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

input:

229 353 17304

output:

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

result:

ok correct

Test #289:

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

input:

466 456 159372

output:

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

result:

ok correct

Test #290:

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

input:

204 360 46412

output:

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

result:

ok correct

Test #291:

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

input:

492 220 73404

output:

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

result:

ok correct

Test #292:

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

input:

480 167 57251

output:

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

result:

ok correct

Test #293:

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

input:

239 398 63187

output:

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

result:

ok correct

Test #294:

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

input:

500 500 125000

output:

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

result:

ok correct

Test #295:

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

input:

500 500 187500

output:

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

result:

ok correct

Test #296:

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

input:

500 500 1000

output:

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

result:

ok correct

Test #297:

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

input:

500 499 187125

output:

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

result:

ok correct

Test #298:

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

input:

500 499 999

output:

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

result:

ok correct

Test #299:

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

input:

499 499 186750

output:

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

result:

ok correct

Test #300:

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

input:

499 499 998

output:

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

result:

ok correct

Extra Test:

score: 0
Extra Test Passed