104 2 s 128 MB
In sixth grade, students are presented with different ways to calculate the Least Common Multiple (LCM) and the Greatest Common Factor (GCF) of two integers. The LCM of two integers
For this problem you will write a program that determines both the LCM and GCF for positive integers.
The first line of input contains a single integer $N$, $(1 \leq N \leq 1000)$
For each data set, you should generate one line of output with the following values: The data set number as a decimal integer (start counting at one), a space, the LCM, a space, and the GCF.
3 5 10 7 23 42 56
1 10 5 2 161 1 3 168 14