题目描述
Two integers A and B are the inputs. Write a program to find GCD and LCM of A and B.
-----Input-----
The first line contains an integer T, total number of testcases. Then follow T lines, each line contains an integer A and B.
-----Output-----
Display the GCD and LCM of A and B separated by space respectively. The answer for each test case must be displayed in a new line.
-----Constraints-----
- 1 ≤ T ≤ 1000
- 1 ≤ A,B ≤ 1000000
-----Example-----
Input
3
120 140
10213 312
10 30
Output
20 840
1 3186456
10 30
输入格式
见题面
输出格式
见题面
样例输入
['3', '120 140', '10213 312', '10 30']
样例输出
['20 840', '1 3186456', '10 30']