#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;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiAKaW50IG1haW4oKQp7Cgl1bnNpZ25lZCBsb25nIGxvbmcgbjsKICBjaW4+Pm47CiAgICAKCWZvciAodW5zaWduZWQgbG9uZyBsb25nIGkgPSAyOyBpIDwgc3FydChuKSswLjAwMDAxOyApCXsKCQlpZiAoIG4gJSBpID09IDAgKXsKCQkJc3RkOjpjb3V0IDw8IGkgPDwgJyAnOwoJCQluIC89IGk7CgkJfQoJCWVsc2V7CgkJCSsraTsKCQl9Cgl9CglpZiAoIG4gPiAxICkKCQlzdGQ6OmNvdXQgPDwgbjsKICAgIHJldHVybiAwOwp9