#include <bits/stdc++.h>
using namespace std;
void rec(int n) {
  if (n == 1) return;
  int x = n;
  x--;
  while (n % x != 0) x--;
  cout << x << " ";
  return rec(x);
}
int main() {
  int n;
  cin >> n;
  cout << n << " ";
  rec(n);
  return 0;
}
