Problem1003--GCD and LCM of three integers

1003: GCD and LCM of three integers

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

 Please output the GCD(a,b,c) and LCM(a,b,c)
    1<= a, b, c <= 1000000000  and 1<= LCM(a,b,c) <= 10000000000000000

Input

one line contains a, b and c

Output

two integers, the first one is GCD(a,b,c) and the second one is LCM(a,b,c)

Sample Input Copy

3 5 7

Sample Output Copy

1 105

Source/Category