#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  long long vec[1005];
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
  }
  long long lul[1005];
  for (int i = 0; i < n; i++) {
    if (i == 0)
      lul[i] = vec[i];
    else
      lul[i] = vec[i] - vec[i - 1];
  }
  long long res[10005];
  int cnt = 0;
  for (int i = 1; i <= n; i++) {
    int lol = 0;
    int curr = 0;
    for (int j = 0; j < n; j++) {
      int rem = j % i;
      int val = curr + lul[rem];
      if (val != vec[j]) {
        lol = 1;
        break;
      }
      curr = val;
    }
    if (lol == 0) res[cnt++] = i;
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) {
    cout << res[i] << " ";
  }
  cout << endl;
  return 0;
}
