#include <bits/stdc++.h>
using namespace std;
int n;
int vis[200050];
int dp[200050];
void solve() {
  int n = 0;
  cin >> n;
  vector<int> ans;
  ans.push_back(n);
  if (n == 1) {
    cout << "1";
    return;
  }
  if (n % 2 == 0) {
    int j = n / 2;
    ans.push_back(j);
    for (int i = n / 2 - 1; i >= 1; i--) {
      if (j % i == 0) {
        ans.push_back(i);
        j = i;
      }
    }
  } else {
    int j = n;
    for (int i = n / 2 + 1; i >= 1; i--) {
      if (j % i == 0) {
        ans.push_back(i);
        j = i;
      }
    }
  }
  for (auto x : ans) {
    cout << x << " ";
  }
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
  return 0;
}
