#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  map<long long, int> mp;
  for (int i = 1; i * i <= n; i++) {
    if (n % i == 0) {
      long long ans, ans1 = 0;
      long long d1 = i, d2 = n / i;
      for (long long j = 1; j <= n; j += d2) ans1 += j;
      ans = (d2 * (d2 + 1) / 2) * i + d2 - n;
      mp[ans]++;
      mp[ans1]++;
    }
  }
  for (auto x : mp) printf("%lld ", x.first);
  return 0;
}
