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