#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e3 + 7;
int a[N], b[N];
int n;
vector<int> ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  for (int i = 1; i <= n; i++) {
    b[0] = a[1];
    for (int j = 1; j < i; j++) {
      b[j] = a[j + 1] - a[j];
    }
    int ok = 1;
    for (int j = i; j < n; j++) {
      ok &= (a[j + 1] == b[j % i] + a[j]);
    }
    if (ok) {
      ans.push_back(i);
    }
  }
  printf("%d\n", ans.size());
  for (int to : ans) {
    printf("%d ", to);
  }
}
