#include<bits/stdc++.h>
using namespace std;
int main(){
	int x,n,c,s;
	cin>>x;
	n=x;
	for(c=2;c<=x-1;c++){
		if(n%c==0){
			cout<<c<<endl;
			n=n/c;
			while(n%c==0){
				cout<<c<<endl;
				n=n/c;
			}	
		}
	}
}

/**************************************************************
	Problem: 1080
	User: tangkaixuan
	Language: C++
	Result: Accepted
	Time:7 ms
	Memory:2072 kb
****************************************************************/