Written on the board two positive integers a and b. Peter clears the smaller of these numbers and the number of records instead (note that it may not be an integer). From the resulting pair of numbers he is doing the same operation, and so on, until you get two matching value for the number. Free Pete from his exhausting work - write a program that the numbers a and b will give the total value of the final pair of numbers.
The first line of the input file contains the number of test cases, t (1 ≤ t ≤ 100000).
Each test contains two positive integers a and b (1 ≤ a, b ≤ 2·10^9).
For each test case output the answer to the problem. In the case of a result, output it as an irreducible fraction x/y. If the algorithm will run forever, output -1.