#P1916B. Two Divisors
Two Divisors
No submission language available for this problem.
Description
A certain number is chosen. You are given two integers and , which are the two largest divisors of the number . At the same time, the condition is satisfied.
For the given numbers , , you need to find the value of .
The number is a divisor of the number if there is an integer such that .
Each test consists of several test cases. The first line contains a single integer () — the number of test cases. Then follows the description of the test cases.
The only line of each test cases contains two integers , ().
It is guaranteed that , are the two largest divisors for some number .
For each test case, output the number , such that and are the two largest divisors of the number .
If there are several answers, print any of them.
Input
Each test consists of several test cases. The first line contains a single integer () — the number of test cases. Then follows the description of the test cases.
The only line of each test cases contains two integers , ().
It is guaranteed that , are the two largest divisors for some number .
Output
For each test case, output the number , such that and are the two largest divisors of the number .
If there are several answers, print any of them.
Note
For the first test case, all divisors less than are equal to , among them the two largest will be and .
For the third test case, all divisors less than are equal to , among them the two largest will be and .
For the fifth test case, all divisors less than are equal to , among them the two largest will be and .
For the sixth test case, all divisors less than are equal to , among them the two largest will be and .