#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n != 1) {
    cout << n << " ";
    while (n != 1) {
      int t = n / 2;
      if (n % t == 0 && t != 1)
        cout << t << " ";
      else {
        while (n % t != 0) {
          t--;
          if (t == 1) break;
        }
        if (n % t == 0 && t != 1) cout << t << " ";
      }
      n = t;
    }
    cout << 1 << endl;
  } else
    cout << 1 << endl;
  return 0;
}
