#include <bits/stdc++.h>
using namespace std;
void solve(int n) {
  if (n == 1) {
    return;
  }
  for (int i = 2; i < n + 1; i++) {
    if (n % i == 0) {
      cout << n / i << endl;
      solve(n / i);
      break;
    }
  }
}
int main() {
  int n;
  cin >> n;
  cout << n << endl;
  ;
  solve(n);
  return 0;
}
