#include<fstream>
#include<iostream>
using namespace std;
ifstream fi("BAI1_16.inp");
ofstream fo("BAI1_16.out");
int main()
{
	int n,u;
	fi>>n;
	int m=n;
	for(int i=2;i*i<=m;i++)
	{
		if(n==i)
		{
			u=i;
			break;
		}
		while(n%i==0)
		{
			u=i;
			n=n/i;
			cout<<n<<endl;
		}
	}
	fo<<u;
	fi.close();
	fo.close();
}
