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