#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, coins = 0;
  cin >> n;
  for (int i = n; i > 0; i--) {
    if (!coins && n % i == 0)
      coins = n;
    else if (n % i == 0 && coins != 0 && coins % i == 0)
      cout << coins << " ", coins = i;
  }
  cout << 1 << endl;
  return 0;
}
