I. Inifinitus Sequence
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

In the realm of Calculus, the legendary mathematician Infinitus is fascinated by a peculiar infinite sequence. The sequence begins with an endless series of the number $$$X$$$. In each iteration, Infinitus inserts the sum of each consecutive pair of numbers between them, transforming the sequence as follows:

- Initially in iteration one, if $$$X = 5$$$ the sequence looks like this: $$$5, 5, 5, 5, \ldots $$$

- After the second iteration: $$$5, 10, 5, 10, 5, 10, \ldots$$$

- After the third iteration: $$$5, 15, 10, 15, 5, 15, 10, 15, 5, \ldots $$$

Your task is to answer $$$Q$$$ queries. For each query, given two numbers $$$X$$$ and $$$K$$$, determine the first iteration in which a number greater or equal to $$$K$$$ appears in the sequence starting with $$$X$$$.

Input

- The first line contains an integer $$$Q$$$ $$$1 \leq Q \leq 1,000$$$, the number of queries.

- Each of the next $$$Q$$$ lines contains two integers $$$X$$$ and $$$K$$$ $$$( 1 \leq X \leq 1,000 ), ( 1 \leq K \leq 10^9 )$$$.

Output

For each query, output a single integer representing the first iteration where a number greater than $$$K$$$ appears in the sequence.

Examples
Input
3
5 1
5 10
5 15
Output
1
2
3
Input
1
1 5
Output
4
Note

This statement has been modified to include the clarifications made during the competition.