#include <bits/stdc++.h>
using namespace std;
long long ar[1000005];
int main() {
  long long n;
  cin >> n;
  long long i = 1;
  ar[0] = n;
  while (n > 1 && n % 2 == 0) {
    n /= 2;
    ar[i++] = n;
  }
  if (n > 1) {
    long long sq = sqrt(n) + 1;
    bool fl = false;
    for (long long j = 2; j <= sq; j++)
      if (n % j == 0) {
        ar[i++] = n / j;
        n = n / j;
        j = 2;
        if (ar[i - 1] == 1) fl = true;
        if (n <= 1) break;
      }
    if (fl == false) ar[i++] = 1;
  }
  for (long long j = 0; j < i; j++) {
    cout << ar[j];
    if (j != i - 1) cout << " ";
  }
  cout << endl;
  return 0;
}
