1042: Greatest common divisor and least common multiple

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:75 Solved:43

Description

Write a C program to compute the greast common divisor (gcd) and the least common multiple of two integers m and n which are both less than 65536. 
Input: 
m n
Output: 
p q 
where p is the greatest common divisor and q is the least common multiple

Input

1420 5325

Output

355 21300

Sample Input Copy

289 6052

Sample Output Copy

17 102884