For two integers a and b, their least common multiple is the smallest positive integer that is a multiple of both numbers, and their greatest common divisor is the largest positive integer that divides both numbers.
For several test cases, write a program that finds the least common multiple and greatest common divisor of each given pair.
The first line contains the number of test cases T. T is between 1 and 1,000, inclusive.
Each of the next T lines contains two integers a and b separated by a space. Each integer is between 1 and 1,000, inclusive.
For each test case, print the least common multiple followed by the greatest common divisor on one line.