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