#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, n, b, c = 0, d = 0;
  cin >> n;
  cout << n << "  ";
  for (int i = n / 2; i > 0; i--) {
    if (n % i == 0) {
      cout << i << "  ";
      n = i;
    }
  }
  return 0;
}
