#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3F3F3F3F;
const int N = 1000 + 35;
int n;
int a[N];
int x[N];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  vector<int> ans;
  for (int k = 1; k <= n; k++) {
    memset(x, INF, sizeof(x));
    bool flag = true;
    for (int i = 1; i <= n; i++) {
      int j = (i - 1) % k;
      if (x[j] == INF) {
        x[j] = a[i] - a[i - 1];
      } else {
        if (a[i] != a[i - 1] + x[j]) {
          flag = false;
        }
      }
    }
    if (flag) {
      ans.push_back(k);
    }
  }
  printf("%d\n", ans.size());
  for (int x : ans) {
    printf("%d ", x);
  }
  printf("\n");
  return 0;
}
