num = int(input())
if num == 1:
print(num)
else:
x ={}
n = num
for i in range(2,num//2+1):
while n % i == 0:
if i in x:
x[i] = x[i] + 1
else:
x[i] = 1
n //= i
if n > 1:
x[n] = 1
if len(x) == 0:
print(num)
z = ""
for i in x:
if x[i] > 1:
z = f"{z}{i}^{x[i]} * "
else:
z = f"{z}{i} * "
print(z[:-2])