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