import java.util.Scanner;
public class main {
public static void main(String[] args){
Scanner sc=new Scanner(System.in);
int a=sc.nextInt();
int b=0;
int c=a;
int sum=0;
for(int i=2;i<=a;i++){
if(a%(i*i)==0 && a!=i) {
sum+=i;
b=1; }
else if(a%i==0 && a!=i) {
sum+=i;
b=2; }
else {
b=3; }
}
if(b==1)
System.out.println(sum+"^"+sum+" * "+c/(sum*sum));
else if(b==2)
System.out.println(sum+" * "+c/sum);
else
System.out.println(a);
}
}