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