The input consists of several test cases and is terminated by the end-of-file. For each test case, there are one character and two fractions. If the character is '', answer the gcd of the two fractions. If the character is '
', answer the lcm of the two fractions. It is guaranteed that the sum of the test cases could not exceed
.
.
For each test case, print a fraction in one line representing the answer. If the fraction's denominator is equal to one, output the numerator only. Otherwise, print a fraction likewhere
and
are relatively prime.