#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e3 + 5, INF = 1e9;
int n, a[MAXN] = {0}, x[MAXN];
bool used[MAXN];
set<int> ans;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &a[i]);
  }
  for (int k = 1; k <= n; ++k) {
    memset(used, 0, sizeof(bool) * k);
    bool f = true;
    for (int j = 1; j <= n; ++j) {
      if (!used[(j - 1) % k]) {
        x[(j - 1) % k] = a[j] - a[j - 1];
        used[(j - 1) % k] = true;
      } else {
        if (x[(j - 1) % k] != a[j] - a[j - 1]) {
          f = false;
          break;
        }
      }
    }
    if (f) {
      ans.insert(k);
    }
  }
  printf("%d\n", (int)ans.size());
  for (auto &i : ans) {
    printf("%d ", i);
  }
  printf("\n");
  return 0;
}
