#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  cout << n;
  while (n > 1) {
    for (int i = n / 2; i >= 1; i--) {
      if (n % i == 0) {
        n = i;
        cout << " " << n;
        break;
      }
    }
  }
  cout << endl;
  return 0;
}
