D. For A Few Dollars More
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

Yazan has two friends that he loves the most. He has got a new job offer, so he wanted to invite them for dinner at a fancy restaurant. As his salary is not so high, Yazan will invite his friends without ordering food for himself to save himself a few dollars.

Yazan will order one dish for each friend. The first friend will be happy if his dish costs at least $$$x$$$ dollars. The second friend will be happy if his dish costs at least $$$y\%$$$ of the total bill.

More formally, if Yazan ordered a dish that costs $$$a$$$ dollars for the first friend and a dish that costs $$$b$$$ dollars for the second friend, two conditions should be satisfied so that both of his friends are happy:

  • $$$a$$$ and $$$b$$$ are integers.
  • $$$a \ge x$$$.
  • $$$b \ge \frac{y}{100}*(a+b)$$$.

Yazan wants both of his friends to be happy. Nevertheless, he also wants to spend as few dollars as possible, what is the minimum sum of costs of dishes he needs to order so that both friends are happy?

Input

The first line of the input contains a single integer number $$$t$$$ $$$(1 \le t \le 100)$$$. The number of test cases.

The first line of each test case contains two space-separated integer numbers $$$x$$$ and $$$y$$$ $$$(1 \le x \le 100, 1 \le y \le 100)$$$. The minimum cost of the first friend's dish and the percentage of the whole bill for the second friend's dish, respectively.

Output

For each test case print a single line containing a single integer number. The minimum sum of costs of the two dishes he needs to order so that both friends are happy. If there is no amount of dollars he can pay so that both friends are happy, print -1.

Example
Input
5
2 40
4 60
2 100
3 50
1 10
Output
4
10
-1
6
2
Note

In the first test case, the first friend wants a dish of at least $$$2$$$ dollars to be happy, the second friend wants a dish of at least $$$40\%$$$ of the bill. If Yazan ordered a dish that costs $$$2$$$ dollars for the first one and a dish that costs $$$2$$$ dollars for the second friend as well, the first friend will be clearly happy, the second one will be happy because $$$2 \ge \frac{40}{100} \times 4$$$. The bill will be the sum of costs of both dishes. Hence, the answer is $$$4$$$.