#include <bits/stdc++.h>
long long n, i;
using namespace std;
int main() {
  cin >> n;
  vector<long long> v;
  v.push_back(n);
  i = 2;
  while (i * i <= n) {
    while (n % i == 0) {
      n /= i;
      v.push_back(n);
    }
    ++i;
  }
  for (int i = 0; i < v.size(); i++) {
    if (v[i] != 1) cout << v[i] << " ";
  }
  cout << "1";
  return 0;
}
