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