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