#include <bits/stdc++.h>
using namespace std;
int main(){
	int i=2,n;
	cin>>n;
	while(n!=1)
	{
		if(n%i==0)
		{
			n=n/i;
			cout<<i<<" ";
		}
		else i++;
	}
	return 0;
	}

/**************************************************************
	Problem: 1234
	User: ljl2
	Language: C++
	Result: Accepted
	Time:12 ms
	Memory:2072 kb
****************************************************************/