Calculate the least common multiple and greatest common divisor of two integers.
Greatest Common Divisor (GCD) of two or more integers, which are not all zero, is the largest positive integer that divides each of the integers. For two integers x, y, the greatest common divisor of x and y is denoted .
For example, the GCD of 8 and 12 is 4, that is,
LCM is the short form for “Least Common Multiple.” The least common multiple is defined as the smallest multiple that two or more numbers have in common.
For example: Take two integers, 2 and 3.
Multiples of 2: 2, 4, 6, 8, 10, 12, 14, 16, 18, 20….
Multiples of 3: 3, 6, 9, 12, 15, 18, 21, 24, 27, 30 ….
6, 12, and 18 are common multiples of 2 and 3. The number 6 is the smallest. Therefore, 6 is the least common multiple of 2 and 3.
Two integers x, y
1 < x, y< 10000
Output the least common multiple and greatest common divisor separated by space.
Don't forget to include '\n'