SP4948 FACT2 - Integer Factorization (29 digits)

Description

This is a problem to test the robustness of your Integer Factorization algorithm. Given some integers, you need to factor them into product of prime numbers. The largest integer given in the input file has 29 digits. You may need to use a general factorization algorithm since no special numbers (e.g. Fermat numbers) are considered when designing the input data.

Input Format

There are several numbers given, each one in a line. The input ends with a number 0. The number of test cases is about 10.

Output Format

For each number, print in a line the factorization of it. See examples below for the output format.