KCARRY

5
3 2
4 4
2 1
5 3
3 1 
5
1000 999
1000 1000
100 88
34 23
999 767
1
6 2
1
1 1
1
5 5
1
1000 1000
1
1 5
1
2 5
1
999 999
1
1 2
1
999 1
1
999 2
1
5 2
7
1 1
2 1
2 2
3 1
3 2
3 3
3 4
9
4 1
4 2
4 3
4 4
5 1
5 2
5 3
5 4
5 5