#include <bits/stdc++.h>
using namespace std;
int calc(int idx, vector<int> v);
int main() {
  int n;
  cin >> n;
  int l = (int)(sqrt(n) + 2);
  vector<bool> primes(n, true);
  primes[0] = false;
  for (int i = 1; i < l; i++) {
    if (!primes[i]) continue;
    int curr = i + 1;
    for (int j = curr; (j * curr) <= n; j++) {
      primes[(j * curr) - 1] = false;
    }
  }
  cout << n << ' ';
  for (int i = 0; i < n; i++) {
    if (!primes[i]) continue;
    while (n % (i + 1) == 0) {
      n /= (i + 1);
      cout << n << ' ';
    }
  }
  return 0;
}
