12657: 求最大公约数和最小公倍数
Memory Limit:128 MB
Time Limit:1.000 S
Judge Style:Text Compare
Creator:
Submit:4
Solved:0
Description
给出两个正整数,求出它们的最大公约数和最小公倍数。
Input
第一行输入一个整数n(0<n<=10000),表示有n组测试数据;
随后的n行输入两个整数i,j(0<i,j<=32767)。
随后的n行输入两个整数i,j(0<i,j<=32767)。
Output
输出每组测试数据的最大公约数和最小公倍数。
Sample Input Copy
3
6 6
12 11
33 22
Sample Output Copy
6 6
1 132
11 66