#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> a, b;
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++)
    if (n % i == 0) a.push_back(i);
  int x = 0;
  reverse(a.begin(), a.end());
  b.push_back(a[0]);
  for (int i = 1; i < a.size(); i++) {
    if (a[x] % a[i] == 0) {
      b.push_back(a[i]);
      x = i;
    }
  }
  for (int i = 0; i < b.size(); i++) cout << b[i] << " ";
}
