#include <bits/stdc++.h>
using namespace std;
int A[1001], X[1000];
bool known[1000];
vector<int> k_values;
int main() {
  int n, i, k, index, expected;
  scanf("%d", &n);
  A[0] = 0;
  for (i = 1; i <= n; ++i) scanf("%d", &A[i]);
  for (k = 1; k <= n; ++k) {
    memset(known, 0, sizeof known);
    for (i = 1; i <= n; ++i) {
      index = (i - 1) % k;
      expected = A[i] - A[i - 1];
      if (!known[index]) {
        X[index] = expected;
        known[index] = true;
      } else if (X[index] != expected)
        break;
    }
    if (i > n) {
      for (i = 0; i < k; ++i)
        if (!known[i]) break;
      if (i == k) k_values.push_back(k);
    }
  }
  printf("%d\n", k_values.size());
  for (vector<int>::iterator it = k_values.begin(); it != k_values.end(); ++it)
    printf("%d ", *it);
  return 0;
}
