#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int flag = 0;
  cout << n << " ";
  if (n == 1) return 0;
  while (n != 1) {
    flag = 0;
    for (int i = 2; i * i <= n; i++) {
      if (n % i == 0) {
        cout << n / i << " ";
        n = n / i;
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      cout << "1" << endl;
      return 0;
    }
  }
  if (flag == 0) {
    cout << "1";
  }
  cout << endl;
}
