#include<bits/stdc++.h>
using namespace std;
int main(){
    int n,i,m;
    cin>>n;
    for(i=2;i<=n;i++){
         while(n%i==0){
             n=n/i;
             cout<<i<<" ";
         }
    }
}
/**************************************************************
	Problem: 1234
	User: linzihang
	Language: C++
	Result: Accepted
	Time:6 ms
	Memory:2072 kb
****************************************************************/