#include <bits/stdc++.h>
using namespace std;
void File() {
  freopen("output.txt", "w", stdout);
  freopen("input.txt", "r", stdin);
}
void fast() {
  ios::sync_with_stdio(NULL);
  cout.tie(NULL);
  cin.tie(NULL);
}
int main() {
  fast();
  int n;
  cin >> n;
  vector<int> ans;
  ans.push_back(n);
  while (n != 1) {
    for (int i = n - 1; i >= 1; i--) {
      if (n % i == 0) {
        n = i;
        ans.push_back(i);
        break;
      }
    }
  }
  for (int i = 0; i < ((int)((ans).size())); i++) cout << ans[i] << " ";
  return 0;
}
