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