#include <bits/stdc++.h>
using namespace std;
vector<long long> divisor(long long n) {
  vector<long long> ret;
  for (long long i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      ret.push_back(i);
      if (i != 1 && i * i != n) {
        ret.push_back(n / i);
      }
    }
  }
  sort(ret.begin(), ret.end());
  return ret;
}
int main() {
  int N;
  cin >> N;
  vector<long long> C = divisor(N);
  long long M = C.size();
  for (int i = 0; i < M; i++) cout << C.at(i) << ' ';
}
