Problems
Write a program that, given two natural numbers, outputs their greatest common divisor and their least common multiple.
Input
The first line of input contains two natural numbers separated by a space.
Both numbers are natural numbers not exceeding 10,000.
Output
Print the greatest common divisor of the two numbers on the first line, and their least common multiple on the second line.
Example
24 18
6
72
Tag
Source
KOI 본선 2004 중1/고1