The official statement of a problem is always the one
in the PDF document. The HTML version of the statement
is also given to help you, but may contain some content
that is not well displayed. In case of doubt, always use the PDF.
Public test cases
Input
12
36
48
84
0
Output
12 = 2 x 2 x 3
36 = 2 x 2 x 3 x 3
48 = 2 x 2 x 2 x 2 x 3
84 = 2 x 2 x 3 x 7
The greatest common divisor is 2 x 2 x 3 = 12
The least common multiples is 2 x 2 x 2 x 2 x 3 x 3 x 7 = 1008
Input
12
36
48
84
0
Output
12 = 2 x 2 x 3
36 = 2 x 2 x 3 x 3
48 = 2 x 2 x 2 x 2 x 3
84 = 2 x 2 x 3 x 7
The greatest common divisor is 2 x 2 x 3 = 12
The least common multiples is 2 x 2 x 2 x 2 x 3 x 3 x 7 = 1008