#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
using namespace std;
signed main() {
  long long i, n;
  cin >> n;
  set<long long> ans;
  ans.insert((1 + n) * n / 2);
  ans.insert(1);
  for (i = 2; i <= sqrt(n) + 1; i++) {
    if (n % i == 0) {
      long long x = n / i, k = i;
      long long y = (n - 1 + k - 1) / k;
      long long sum = y + (y - 1) * (y)*k / 2;
      sum += ((x - y + 1) + (y + x) * (x - y + 1) * k / 2) % n;
      sum--;
      ans.insert(sum);
      x = i, k = n / i;
      y = (n - 1 + k - 1) / k;
      sum = y + (y - 1) * (y)*k / 2;
      sum += ((x - y + 1) + (y + x) * (x - y + 1) * k / 2) % n;
      sum--;
      ans.insert(sum);
    }
  }
  for (auto cur : ans) {
    cout << cur << " ";
  }
  cout << '\n';
  return 0;
}
