#include <bits/stdc++.h>
int a[1200], sum, k, ans[12000];
int x[1200];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= n; ++i) {
    int flag = 1;
    for (int j = 0; j <= n; ++j) x[j] = 1e9 + 7;
    for (int j = 1; j <= n; ++j) {
      if (x[(j - 1) % i] == (1e9 + 7))
        x[(j - 1) % i] = a[j] - a[j - 1];
      else if (x[(j - 1) % i] != a[j] - a[j - 1]) {
        flag = 0;
        break;
      }
    }
    if (flag) {
      ans[++sum] = i;
    }
  }
  printf("%d\n", sum);
  for (int i = 1; i <= sum; ++i) {
    printf("%d ", ans[i]);
  }
  return 0;
}
