3 6
2 1
3 2
5 1
1 10
1 10
4 8
2 1
2 1
2 1
2 1
10 100
1 10
1 10
1 10
1 10
1 10
1 10
1 10
1 10
1 10
1 10
5 100
1 10
1 10
1 10
1 10
1 10
5 10
5 5
4 4
3 3
2 2
1 1
5 10
0 10
0 10
0 10
0 10
10 1
1 100
1 10
1 10
1 10
10 10
0 10
0 10
0 10
0 10
0 10
0 10
0 10
0 10
0 10
0 10
0 0
