#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  long long i = 2;
  while (n > 1) {
    cout << n << " ";
    while (n % i != 0) {
      i++;
    }
    n /= i;
  }
  cout << 1;
  return 0;
}
