include <bits/stdc++.h>

using namespace std;
int main(){
long n;
while(cin>>n){
string res;
int i=2;
while(i<=n){
if(n%i==0){
res=res+to_string(i)+' ';
n=n/i;
}
else{
i++;
if(i%2==0){
i++;
}
}
}
cout<<res<<endl;
}
return 0;
}