#include <bits/stdc++.h>
using namespace std;
long long n;
int32_t main() {
  scanf("%lld", &n);
  vector<long long> v(n), w(n);
  for (long long i = 0; i < n; i++) scanf("%lld", &v[i]);
  for (long long i = 1; i < n; i++) {
    w[i] = v[i] - v[i - 1];
  }
  w[0] = v[0];
  swap(v, w);
  vector<long long> ans;
  for (long long k = 1; k <= n; k++) {
    vector<long long> x(k);
    for (long long i = 0; i < n; i++) {
      x[i % k] = v[i];
    }
    bool can = true;
    for (long long i = 0; i < n; i++) {
      if (x[i % k] != v[i]) can = false;
    }
    if (can) ans.push_back(k);
  }
  printf("%lld\n", (long long)ans.size());
  for (auto p : ans) {
    printf("%lld ", p);
  }
}
