Given three positive integers x, y, and z, compute their greatest common divisor (GCD) and least common multiple (LCM).
The first line contains a positive integer N, which indicates the number of test cases in each input.
In the next N lines, each line contains three positive integer x, y, z.
Level 1: x, y, z < 10
Level 2: x, y, z < 10^2
Level 3: x, y, z < 10^3
Level 4: x, y, z < 10^4
For each test case, output the GCD and LCM of x, y, and z in a line.
Note that you have to add '\n' at the end of output.