#include <iostream>
#include <bits/stdc++.h>
using namespace std;
int main() {
long long n;
cin >> n;
for (int del = 2; del <= n; del++) {
while (n % del == 0) {
cout << del << " ";
n /= del;
}
}
return 0;
}