GCD and LCM
Print the greatest common divisor and the least common multiple of and .
Hint: Euclid's algorithm — — and .
Input
Two positive integers and .
Output
and separated by a space.
Constraints
— the LCM can need 64 bits.
Sample 1
Input
12 18
Output
6 36
Sample 2
Input
7 5
Output
1 35