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