#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
const int MAXN = 1000;
int n;
int a[MAXN + 1];
int d[MAXN];
int ret[MAXN], nret;
void solve() {
  for (int i = (0); i < (n); ++i) d[i] = a[i + 1] - a[i];
  nret = 0;
  for (int per = (1); per <= (n); ++per) {
    bool ok = true;
    for (int i = per; i < n; ++i)
      if (d[i] != d[i - per]) {
        ok = false;
        break;
      }
    if (ok) ret[nret++] = per;
  }
}
void run() {
  scanf("%d", &n);
  a[0] = 0;
  for (int i = (1); i <= (n); ++i) scanf("%d", &a[i]);
  solve();
  printf("%d\n", nret);
  for (int i = (0); i < (nret); ++i) {
    if (i != 0) printf(" ");
    printf("%d", ret[i]);
  }
  puts("");
}
int main() {
  run();
  return 0;
}
