#include <bits/stdc++.h>
using namespace std;
int MAX(int a, int b) { return (a > b) ? a : b; }
int MIN(int a, int b) { return (a < b) ? a : b; }
int ABS(int x) { return (x > 0) ? x : -x; }
int left(int x) { return (x << 1); }
int right(int x) { return (x << 1) + 1; }
int lsone(int x) { return (x & (-x)); }
int n, a[2000], diffA[2000];
vector<int> ans;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    diffA[i] = a[i];
    if (i) diffA[i] -= a[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    bool valid = true;
    for (int j = 0; j < i; j++) {
      for (int k = j; k < n; k += i) {
        if (diffA[k] != diffA[j]) valid = false;
      }
    }
    if (valid) {
      ans.push_back(i);
    }
  }
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    if (i) printf(" ");
    printf("%d", ans[i]);
  }
  printf("\n");
}
