Problem: Polycarp has decided to do a problemsolving marathon. He wants to solve problems in days. Let be the number of problems he solves during the -th day. He wants to find a distribution of problems into days such that:
- is an integer value for all from to ;
- for all from to ;
- for all from to ;
- for all from to ;
- is maximized.
Note that can be arbitrarily large.
What is the largest value of Polycarp can obtain?
Input Format: The first line contains a single integer () — the number of testcases.
Then the descriptions of testcases follow.
The only line of each testcase contains two integers and () — the number of days and the number of problems Polycarp wants to solve.
It's guaranteed that the distribution always exists within the given constraints.
Output Format: For each testcase print a single integer — the maximum value of .
Note: In the first testcase there is only one distribution: .
In the second testcase the distribution that maximizes is: .
In the third testcase the distribution that maximizes is: . is a valid distribution but which is smaller than . is not a valid distribution because .