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