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