#include <bits/stdc++.h>
const long long MOD = 1e9 + 7;
using namespace std;
void solve(int n) {
  for (int i = n - 1; i >= 1; --i) {
    if (n % i == 0) {
      cout << i << " ";
      if (n == 1) {
        cout << endl;
        return;
      }
      return solve(i);
    }
  }
}
int main(void) {
  int n;
  cin >> n;
  cout << n << " ";
  solve(n);
}
