#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &x) {
  short f = 1;
  x = 0;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) x = (x << 3) + (x << 1) + (c ^ 48), c = getchar();
  x *= f;
}
long long n, x = 2;
int main() {
  read(n);
  while (n > 1 && x * x <= n)
    if (n % x)
      ++x;
    else
      cout << n << ' ', n /= x;
  if (n > 1) cout << n << ' ';
  cout << 1 << endl;
  return 0;
}
