#include <bits/stdc++.h>
using namespace std;
int n, a[1009], x[1009], top, res, stk[1009], kt;
int main() {
  cin >> n;
  for (int i = 1; i < n + 1; i++) {
    cin >> a[i];
  }
  for (int k = 1; k < n + 1; k++) {
    kt = 0;
    for (int i = 1; i < k + 1; i++) {
      x[i - 1] = (a[i] - a[i - 1]);
    }
    for (int i = k + 1; i < n + 1; i++) {
      if ((a[i] - a[i - 1]) != x[(i - 1) % k]) kt = 1;
    }
    if (kt == 0) {
      res++;
      stk[res] = k;
    }
  }
  cout << res << endl;
  for (int i = 1; i < res + 1; i++) cout << stk[i] << ' ';
}
