#include<iostream>
using namespace std;
int main(){
int a[] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,59,61,71,73,79,83};
long long b;
cin>>b;
int i = 0;
while(1){
if((b % a[i])==0){
cout<<a[i]<<" ";
b = b / a[i];
if(b == 1) break;
}
else
i++;
}
return 0;
}
#include <iostream>
using namespace std;
void getResult(long int input)
{
for (int i=2;i<=input;i++)
{
while((0==input%i)&&input!=0)
{
cout<<i<<" ";
input=input/i;
}
}
}
int main()
{
int a;
cin>>a;
getResult(a);
return 0;
}