#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  vector<int> ans = {n};
  while (n > 1) {
    for (int i = 2; i <= n; i++)
      if (n % i == 0) {
        ans.push_back(n / i);
        n = (n / i);
        break;
      }
  }
  for (int i : ans) cout << i << ' ';
  cout << endl;
  return 0;
}
