#include <iostream>
#include<vector>
using namespace std;
#define maxn 10000007
vector<int>Primes(maxn);
void least_prime_factor()
{
Primes[1]=1;
for(int i=2;i<=maxn;i++)
{
Primes[i]=i;
}
for(int i=4;i<=maxn;i+=2)
{
Primes[i]=2;
}
for(int i=3;i*i<=maxn;i++)
{
if(Primes[i]==i)
{
for(int j=i*i;j<=maxn;j+=2*i)
{
if(Primes[j]==j)
Primes[j]=i;
}
}
}
}
vector<int>factorise(int x)
{
vector<int>ret;
while(x!=1)
{
ret.push_back(Primes[x]);
x=x/Primes[x];
}
return ret;
}
int main() {
least_prime_factor();
int n;
while(scanf("%d", &n) == 1)
if(n==1)
{
printf("1\n");
}
else{
vector<int>ans=factorise(n);
printf("1 x");
for(int i=0;i<ans.size();i++)
{
if(i==ans.size()-1)
printf(" %d ", ans[i]);
else
printf(" %d x", ans[i]);
}
cout<<endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZTx2ZWN0b3I+CiAKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKIAojZGVmaW5lIG1heG4gMTAwMDAwMDcKIAp2ZWN0b3I8aW50PlByaW1lcyhtYXhuKTsKdm9pZCBsZWFzdF9wcmltZV9mYWN0b3IoKQogewogCiAgICBQcmltZXNbMV09MTsKCQkJCQlmb3IoaW50IGk9MjtpPD1tYXhuO2krKykKCQkJCQl7CgkJCQkJCVByaW1lc1tpXT1pOwoJCQkJCX0KCQkJCQlmb3IoaW50IGk9NDtpPD1tYXhuO2krPTIpCgkJCQkJewoJCQkJCQlQcmltZXNbaV09MjsKCQkJCQl9CgkJCQkJZm9yKGludCBpPTM7aSppPD1tYXhuO2krKykKCQkJCQl7CgkJCQkJCWlmKFByaW1lc1tpXT09aSkKCQkJCQkJewoJCQkJCQkJZm9yKGludCBqPWkqaTtqPD1tYXhuO2orPTIqaSkKCQkJCQkJCXsKCQkJCQkJCQlpZihQcmltZXNbal09PWopCgkJCQkJCQkJICAgUHJpbWVzW2pdPWk7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