#include <iostream>
using namespace std;

 void getResult(long int input)
{
	for (int i=2;i<=input;i++)
	{
		while((0==input%i)&&input!=0)
		{
			cout<<i<<" ";
			input=input/i;
		}
	}
    
}

 int main()
 {
	 int a;
	 cin>>a;
	 getResult(a);
	 return 0;
 }