410193: GYM103973 C Roll the Circle
Description
Walk Alone has two circles. The two circles are externally tangent, and are of radius $$$a$$$ and $$$b$$$ respectively. He keeps the first circle of radius $$$a$$$ stationary, and rotates the second one around the first one, keeping the point of contact without slipping. He wants to know how many times will the second circle revolve after rolling it exactly one trip back to its starting point.
The input consists of multiple test cases.
The first line contains an integer $$$T\ (1 \leq T\leq 10^5)$$$, the number of test cases.
For each test case, the first and the only line contains two integers $$$a$$$ and $$$b\ (1 \leq a, b \leq 10^{18})$$$, denoting the radius of two circles.
OutputFor each test case output the answer in a line. The answer should be expressed as a minimal fraction $$$p/q$$$ where $$$\gcd(p,q)=1$$$.
ExampleInput2 2 1 4 6Output
3/1 5/3