#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, prev;
  cin >> n;
  vector<int> v;
  prev = n;
  v.push_back(n);
  for (i = n - 1; i >= 1; i--) {
    if (n % i == 0 && prev % i == 0) {
      v.push_back(i);
      prev = i;
    }
  }
  for (i = 0; i < v.size(); i++) cout << v[i] << " ";
  return 0;
}
