Given a positive fraction $$$\frac{p}{q}$$$, you should find two positive integers $$$a,b$$$ that $$$\frac{p}{q} = \frac{a}{b} + \frac{b}{a}$$$. If no such integers, report it.
The first line contains one integer $$$T\,(1\le T \le 10^5)$$$, denoting the number of test cases.
For each test case:
Input one line containing two integers $$$p,q\,(1\le p,q \le 10^7)$$$, denoting the given fraction.
For each test case:
If solution exists, output one line containing two integers $$$a,b\,(1\le a,b \le 10^9)$$$, or print two zeros in one line if no solution.
2 5 2 5 1
1 2 0 0
For the first case, $$$\frac{5}{2} = \frac{1}{2} + \frac{2}{1}$$$ holds. So one possible solution is $$$a=1,b=2$$$.
| Name |
|---|


