10161

Ant on a Chessboard
Type: Math  
Diff: 3.0

Input

5
6
7
8
9
10
11
12
13
14
15
16
2000000000
1999999999
1999999998
1999999997
0

Output of The Input

3 1
3 2
3 3
2 3
1 3
1 4
2 4
3 4
4 4
4 3
4 2
4 1
32159 44722
32158 44722
32157 44722
32156 44722

If you have any advice, complements 

or proposal, please  Send mail to Author

Submit

 

1