Two integers a and b are given. Find GCD and LCM of a and b.
The first line contains the number of testcases t. Then follow t lines, each line contains two integers a and b (1≤a,b≤109).
For each test case print on a separate line the GCD and LCM of a and b.