Given
Input Specification
The first line will contain an integer
Output Specification
Output
Sample Input
Copy
5
5 20
3 12
3 3
5 8
0 2
Sample Output
Copy
2
32
1
65
15
Given
The first line will contain an integer
Output
5
5 20
3 12
3 3
5 8
0 2
2
32
1
65
15
Comments