#include <bits/stdc++.h>
using namespace std;
const int maxN = 5000 + 321;
int main() {
  ios::sync_with_stdio(0);
  int n;
  cin >> n;
  cout << n << ' ';
  while (n > 1)
    for (int i = n - 1; i > 0; i--) {
      if (n % i == 0) {
        cout << i << ' ';
        n = i;
        break;
      }
    }
  cout << endl;
  return 0;
}
