#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> v1(1, 1);
  if (n == 1) {
    cout << n;
    return 0;
  }
  for (int i = 2; i <= n / 2; i++) {
    int l = v1.size();
    if (n % i == 0) {
      int flag = 0;
      for (int j = 0; j < l; j++) {
        if (i % v1[j] != 0) {
          flag = 1;
          break;
        }
      }
      if (flag == 0)
        v1.push_back(i);
      else
        continue;
    } else
      continue;
  }
  cout << n << " ";
  for (int i = v1.size() - 1; i >= 0; i--) cout << v1[i] << " ";
  return 0;
}
