#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1001;
int n;
int a[MAXN];
int diff[MAXN];
int aC, A[MAXN];
bool check(int k) {
  bool ret = true;
  for (int i = k; i < n - 1; ++i) {
    ret &= (diff[i] == diff[i - k]);
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  ++n;
  a[0] = 0;
  for (int i = 1; i < n; ++i) {
    cin >> a[i];
    diff[i - 1] = a[i] - a[i - 1];
  }
  aC = 0;
  for (int k = 1; k <= n - 1; ++k) {
    if (check(k)) {
      A[aC] = k;
      ++aC;
    }
  }
  cout << aC << endl;
  for (int i = 0; i < aC; ++i) {
    cout << A[i] << " ";
  }
  return 0;
}
