#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <algorithm>
#include <cmath>
#include <cctype>
using namespace std;
typedef long long ll;
int isPrime(ll num){
if(num <= 1) return 0;
ll sqr = (ll)sqrt(1.0*num);
for(int i = 2; i <= sqr; i++){
if(num%i == 0) return 0;
}
return 1;
}
int main(){
ll n, pn = 0;
scanf("%lld", &n);
if(n != 1){
printf("%lld=", n);
for(ll i = 2; i <= n && n!= 1; i++){
if(n%i == 0 && isPrime(i)){
if(pn >= 1) printf("*");
pn++; printf("%lld", i);
ll count = 0, fac = i;
while(n%fac == 0){
n /= fac;
count++;
}
if(count > 1) printf("^%d", count);
}
}
}else{
printf("1=1");
}
return 0;
}