#include <bits/stdc++.h>
using namespace std;
double const pi = 3.1415926536;
int main() {
  int n;
  cin >> n;
  if (n > 1) cout << n << " ";
  while (n > 1) {
    int t = -1;
    for (int i = 2; i <= sqrt(n); i++) {
      if (n % i == 0) {
        t = i;
        break;
      }
    }
    if (t != -1) {
      n /= t;
      cout << n << " ";
    } else
      break;
  }
  cout << 1 << " ";
}
