#include <bits/stdc++.h>
using namespace std;
int n;
int a[1055];
int x[1055];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  vector<int> res;
  for (int k = 1; k <= n; k++) {
    memset(x, 0, sizeof(x));
    x[0] = a[1];
    for (int i = 2; i <= k; i++) {
      x[i - 1] = a[i] - a[i - 1];
    }
    bool bad = false;
    for (int i = k + 1; i <= n; i++) {
      int id = (i - 1) % k;
      if (a[i] - a[i - 1] != x[id]) {
        bad = true;
      }
    }
    if (!bad) res.push_back(k);
  }
  cout << res.size() << endl;
  for (auto u : res) printf("%d\n", u);
  return 0;
}
