#include <bits/stdc++.h>
using namespace std;
int n;
int main() {
  scanf("%d", &n);
  for (int i = 2; i <= n; i++)
    while (n % i == 0) {
      printf("%d ", n);
      n /= i;
    }
  printf("1\n");
  return 0;
}
