#include <bits/stdc++.h>
using namespace std;
int prom;
int main() {
  int n;
  cin >> n;
  vector<int> a(0);
  a.push_back(n);
  for (int i = n - 1; i >= 1; i--) {
    bool q = true;
    for (int j = 0; j < (int)a.size(); j++)
      if (a[j] % i != 0) q = false;
    if (q) a.push_back(i);
  }
  for (int i = 0; i < (int)a.size() - 1; i++) cout << a[i] << " ";
  cout << a[(int)a.size() - 1];
  return 0;
}
