1.

/*
*    Markus Mohr, Rolf Schirm, Franz Mathauser
*    Datum: 24.03.09
*    IFB 2C
*    ACCEPTED: 583, 2.750
*/

//583 Prime Factors

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main {


public static boolean isPrim(int n) {

if(n == 1 || n%2 == 0)
return false;

short root = (short)Math.sqrt(n);
for (int i = 3; i <= root; i=i+2) {
if (n % i == 0)
return false;
}
return true;
}


public static void main(String...args) throws Exception{

BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int zahl = Integer.parseInt(reader.readLine());
int buf = zahl;
int[] prime = new int[4793];
prime[0]=2;
int anz=1;

for(int i = 3; i<=46349; i+=2) {
if(isPrim(i)) {
prime[anz]=i;
anz+=1;
}
}



while(true) {

int[] numbers = new int[32];
byte count=0;

if(zahl < 0 ) {
numbers[count]=-1;
count+=1;
buf *= -1;
}

if(zahl == 0 )
break;

if(buf == 1) {
numbers[count]=1;
count+=1;
}

int root = (int)Math.sqrt(buf);
for (int i = 0; prime[i] <= root; i++) {
while(buf % prime[i] == 0) {
buf/=prime[i];
root = (int)Math.sqrt(buf);
numbers[count]=prime[i];
count+=1;
}
}

if (buf != 1) {
numbers[count]=buf;
count+=1;
}

StringBuilder str = new StringBuilder(zahl+" = "+numbers[0]);
for(byte i = 1; i < count; i++) {
str.append(" x "+numbers[i]);
}

do {
System.out.println(str);
buf=Integer.parseInt(reader.readLine());
} while (zahl == buf);

zahl = buf;

}

}

}