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