409824: GYM103800 A Ginger's number
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
A. Ginger's numbertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
Ginger have two positive integers $$$x, y$$$, you have to do exactly one operation:
Choose two positive integers $$$a, b$$$, change $$$x$$$ to $$$\dfrac{x}{a}$$$, and change $$$y$$$ to $$$\dfrac{y}{b}$$$, ($$$a$$$ must be a divisor of $$$x$$$, $$$b$$$ must be a divisor of $$$y$$$ and $$$\gcd(\dfrac{x}{a}, \dfrac{y}{b}) = 1$$$).
Find the minimum value of $$$a \times b$$$.
InputThe first line of input contains a single integer $$$T$$$ $$$(1 \le T \le 10 ^ 5)$$$ — the number of input test cases.
For each test case, the only line of input contains two positive integers $$$x, y$$$ $$$(1 \le x,y \le 10 ^ 9)$$$.
OutputPrint the minimum value of $$$a \times b$$$.
ExampleInput1 114514 1919810Output
2