Given three positive integers x, y, and z, compute their greatest common divisor (GCD) and least common multiple (LCM). The GCD of two or more numbers is the largest positive integer that can divide each of those numbers. The LCM of two or more numbers is the smallest positive integer that can be divided by each of those numbers.
The first line contains a positive integer T (T<=1000), which indicates the number of test cases in the input. In the next T lines, each line contains three positive integers x, y, and z, each of which is not greater than 10^6.
For each case, print the GCD and LCM of x, y, and z in a line. Note that you have to add '\n' at the end of each line.