When Euclid invented his Euclid Algorithm to calculate the greatest common divisor of two integers, he also wanted to solve a more complex problem of greatest common fractional divisor(GCFD).
That is to say, You will be given two fractions. Please find the largest fraction which can be divided by both of the two fractions.
The first line contains an integer T (T <= 100) indicating the number of test cases.
For each test case, there are one line contains two fractions described by standard form. The standard form is "numerater/denominator" and GCD(numerater,denominator) is equal to 1. For example, 2/1, 4/3 are in standard form.
(0 < numerater <= 1000, 0 < denominator <= 1000)
For each test case, please output one line of the GCFD in standard form.