Problem C
Fundamental Neighbors
The fundamental theorem of arithmetic says that any natural
number greater than one can be written uniquely as the product
of prime numbers. For example:
for prime numbers
For this problem, given an integer
For example, if
Input
Input is a sequence of up to
Output
For each
Sample Input 1 | Sample Output 1 |
---|---|
2 3 4 5 6 7 8 9 10 72 200 |
2 1 3 1 4 4 5 1 6 1 7 1 8 9 9 8 10 1 72 72 200 288 |