GCD and LCM

EasyMath
Next
MathNumber Theory

Find the greatest common divisor (GCD) and the least common multiple (LCM) of two positive integers. The LCM can be as large as 10^18, so use a 64-bit or arbitrary-precision type.

Input

A single line with two integers a and b.

Output

Print the GCD and the LCM separated by a space.

Constraints

1 <= a, b <= 10^9

Example 1
Input
12 18
Output
6 36

gcd is 6 and lcm is 36.

Hints

GCD and LCM - Easy Math Problem | Skill Shiksha