#include <bits/stdc++.h>
long long int a[1000009];
using namespace std;
int main() {
  long long int i, j, n, k, t1, t, t2, s = 0, c;
  map<string, long long int> mp;
  map<string, long long int>::iterator it;
  vector<long long int> v;
  pair<char, long long int> p;
  list<long long int> l;
  string s1, s2;
  cin >> n;
  if (n == 1)
    cout << "1" << endl;
  else {
    v.push_back(n);
    v.push_back(1);
  label:
    for (i = n / 2; i >= 2; i--) {
      if (n % i == 0) {
        v.push_back(i);
        n = i;
        goto label;
      }
    }
    sort(v.begin(), v.end());
    for (i = v.size() - 1; i >= 0; i--) {
      if (i == 0)
        cout << v[i] << endl;
      else
        cout << v[i] << " ";
    }
  }
  return 0;
}
