#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int main() {
  int i, j, k, s, d, r, m, n;
  scanf("%d", &n);
  while (n > 0 && n % 2 == 0) {
    n /= 2;
    v.push_back(2);
  }
  for (i = 3; i <= n; i += 2) {
    while (n % i == 0) {
      v.push_back(i);
      n /= i;
      if (n == 0) break;
    }
  }
  vector<int> vc;
  int multiplie = 1;
  vc.push_back(multiplie);
  int l = v.size();
  for (i = 0; i < l; i++) {
    multiplie *= v[i];
    vc.push_back(multiplie);
  }
  l = vc.size();
  for (i = l - 1; i >= 0; i--) {
    printf("%d ", vc[i]);
  }
  return 0;
}
