#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
map<long long, long long> ma;
long long n;
long long f(long long t, long long x, long long kol) {
  if (ma[x] == kol) return 0;
  ma[x] = kol;
  long long q = (n - x) / t;
  long long sum = ((x + x + q * t) * (q + x)) / 2;
  x = ((q + 1) * t + x - 1) % n + 1;
  return f(t, x, kol) + sum;
}
int main() {
  long long kol = 1;
  cin >> n;
  for (int i = 1; i <= sqrt(n); i++) {
    if (n % i == 0) {
      long long x = i, y = n / i;
      v.push_back(f(x, 1, ++kol));
      if (x != y) {
        v.push_back(f(y, 1, ++kol));
      }
    }
  }
  sort(v.begin(), v.end());
  for (long long i : v) {
    cout << i << ' ';
  }
}
