#include <iostream>
#include <cmath>
using namespace std;
int main()
{
unsigned long long n;
cin>>n;
for (unsigned long long i = 2; i < sqrt(n)+0.00001; ) {
if ( n % i == 0 ){
std::cout << i << ' ';
n /= i;
}
else{
++i;
}
}
if ( n > 1 )
std::cout << n;
return 0;
}