Given an integer n where 2 ≤ n < 1012, factorize it into its prime factors.
A single integer, n
For 100% of the testcases, n < 1012
For 50% of the testcases, n < 106
For 30% of the testcases, n < 103
On each line, output the prime factors of n in sorted order, with its power indicated. (See Sample Output)
120
2^3 3^1 5^1
331
331^1
Subtask | Score |
---|---|
1 | 100 |
2 | 0 |