#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, k = 0;
  cin >> n;
  if (n > 1) cout << n << " ";
abc:
  k = 0;
  for (i = 2; i * i <= n; i++) {
    if (n % i == 0) {
      n = n / i;
      k = 1;
      cout << n << " ";
      goto abc;
    }
  }
  if (k == 0) cout << 1 << endl;
}
