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 the numbers without a reminder. The LCM of two or more numbers is the smallest positive integer that can be divided by all of the numbers without a reminder.
hint : gcd(a,b,c) = gcd(gcd(a,b),c)
The first line contains a positive integer N (N<=3000), which indicates the number of test cases in the input. In the next N lines, each line contains three positive integers x, y, and z, each of which is not greater than 10^6.
case 1 : 1<=numbers <= 10^2
case 2 : 1<=numbers <= 10^3
case 3 : 1<=numbers <= 10^5
case 4 : 1<=numbers <= 10^6
For each case, output the GCD and LCM of x, y, and z in a line.