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