#include <bits/stdc++.h>
using namespace std;
int dx[8] = {0, 0, 1, -1, 1, 1, -1, -1};
int dy[8] = {1, -1, 0, 0, 1, -1, 1, -1};
template <typename T>
inline T BigMod(T A, T B) {
  T ret = 1;
  while (B) {
    if (B & 1) ret = (ret * A) % 1000000007;
    A = (A * A) % 1000000007;
    B = B >> 1;
  }
  return ret;
}
template <typename T>
inline T InvMod(T A, T M = 1000000007) {
  return BigMod(A, M - 2);
}
string tostring(long long int res) {
  if (!res) return "0";
  string curstr = "";
  while (res != 0) {
    long long int temp = (res % 10);
    curstr += ((char)temp + '0');
    res /= 10;
  }
  reverse(curstr.begin(), curstr.end());
  return curstr;
}
long long int toint(string ss) {
  long long int inss = 0;
  for (int i = 0; i < ss.size(); i++) {
    inss = (inss * 10) + ((int)(ss[i] - '0'));
  }
  return inss;
}
int n, k, ar[1003];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &ar[i]);
  ar[0] = 0;
  set<int> sst;
  for (int i = 1; i <= n; i++) {
    int temp = ar[i] - ar[i - 1];
    sst.insert(temp);
  }
  int fl = 0;
  vector<int> res;
  for (k = 1; k <= n; k++) {
    fl = 1;
    vector<int> st;
    for (int i = 1; i <= n; i++) {
      int temp = (ar[i] - ar[i - 1]);
      if (st.size() < k) {
        if (st.size() < k) st.push_back(temp);
      } else {
        int now = i % k;
        if (now == 0)
          now = st.size() - 1;
        else
          now--;
        temp = st[now] + ar[i - 1];
        if (temp != ar[i]) {
          fl = 0;
        }
      }
    }
    if (fl) res.push_back(k);
  }
  printf("%d\n", res.size());
  for (int i = 0; i < res.size(); i++) {
    if (!i)
      printf("%d", res[i]);
    else
      printf(" %d", res[i]);
  }
  printf("\n");
  return 0;
}
