#a010
n = int(input())
mf = int((n**(1/2))//1) + 1
factor = []
ans = ''
for i in range(2, mf, +1):
if n % i == 0:
count = 0
while n%i == 0:
n = n//i
count += 1
if ans == '':
if count != 1:
opp = n
ans += f"{i}^{count}"
else:
ans += f"{i}"
else:
if count != 1:
ans += f" * {i}^{count}"
else:
ans += f" * {i}"
if n != 1 and ans == '':
ans += f"{n}"
elif n != 1:
ans += f" * {n}"
print(ans)