#include <bits/stdc++.h>
using namespace std;
int check(int y) {
  int x = y / 2;
  while (!(y % x) == 0) {
    x--;
  }
  return x;
}
int main(int argc, const char* argv[]) {
  int num;
  vector<int> data;
  bool flag = true;
  cin >> num;
  data.push_back(num);
  while (flag) {
    if ((data.back() / 2) < 1) {
      flag = false;
    } else {
      data.push_back(check(data.back()));
    }
  }
  for (int i = 0; i < data.size(); i++) {
    cout << data[i] << " ";
  }
  return 0;
}
