#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      v.push_back(i);
      if (i == (n / i))
        continue;
      else
        v.push_back(n / i);
    }
  }
  sort(v.rbegin(), v.rend());
  vector<int> m;
  if (v.size() > 1) {
    m.push_back(v[0]);
    m.push_back(v[1]);
    for (int i = 2; i < v.size(); i++) {
      if (v[1] % v[i] == 0 && m.back() % v[i] == 0) m.push_back(v[i]);
    }
    for (int i = 0; i < m.size(); i++) cout << m[i] << " ";
  } else
    cout << v[0] << endl;
  return 0;
}
