#include<bits/stdc++.h>
using namespace std;
int main(){
int i,j;
cin>>i;
for(j=2;j<=i;j++){
while(i%j==0){
cout<<j<<" ";
i=i/j;
}
}
return 0;
}
/**************************************************************
Problem: 1393
User: qaz123123
Language: C++
Result: Wrong Answer
****************************************************************/