Easy

49.18%

A seminar of Artificial Intelligence is going on,and the number of participants from Foreign is A, while from India is B. All the participants would be staying in the same hotel.In each room equal number of participants have to stay( can be 1 in a room).Also foreign and Indian cannot stay in the same room. Find the minimum number of rooms required,if in each room the same number of participants are to be seated.

**Input:**

First line consists of T test cases. Only line of every test case consists of 2 integers A and B.

**Output:**

Print the value of no of rooms required.

**Constraints:**

1<=T<=200

1<=A,B<=1000

**Example:
Input:**

5

60 84

50 30

8 11

6 10

1 2

12

8

0

8

3