#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  vector<long long> a(n), ans, x;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 1; i <= n; ++i) {
    x = vector<long long>(i, (long long)-1e18);
    bool f = true, g = true;
    for (int j = 0; j < n && f; ++j) {
      if ((x[(j) % i] != (long long)-1e18 &&
           x[(j) % i] != a[j] - (j == 0 ? 0 : a[j - 1])))
        f = false;
      else
        x[(j) % i] = a[j] - (j == 0 ? 0 : a[j - 1]);
    }
    if (f) {
      for (int j = 0; j < n; ++j) {
        g = g && (x[i] != (long long)-1e18);
      }
      if (g) ans.push_back(i);
    }
  }
  cout << (int)ans.size() << endl;
  for (int i = 0; i < (int)ans.size(); ++i) cout << ans[i] << " ";
  return 0;
}
