#include <bits/stdc++.h>
using namespace std;
const long long inf = (1ll << 61);
const int mod = (1e9 + 7);
const int MX = 1009;
int n, a[MX], x[MX];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  set<int> s;
  for (int j = 1; j <= n; j++) {
    bool b = 1;
    for (int i = 1; i <= j; i++) {
      x[i - 1] = a[i] - a[i - 1];
    }
    for (int i = 1; i <= n; i++) {
      if (a[i] == (x[(i - 1) % j] + a[i - 1]))
        continue;
      else
        b = 0;
    }
    if (b) s.insert(j);
  }
  cout << s.size() << endl;
  for (auto pp : s) cout << pp << " ";
}
