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