LearnPy Hub
← Arena
IntermediateRating 1100

Prime Factors

Print the prime factorisation of n as p^e terms joined by * , primes increasing; omit ^1. For n = 360 print 2^3 * 3^2 * 5.

Input

One integer n (2 ≤ n ≤ 10¹²).

Output

One line.

Sample 1

Input
360
Output
2^3 * 3^2 * 5

Sample 2

Input
2
Output
2
solution.py
Output appears here
Prime Factors · Python Arena problem · LearnPy Hub