#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n + 10];
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  arr[0] = 0;
  int dif[n + 10];
  for (int i = 1; i <= n; i++) {
    dif[i] = arr[i] - arr[i - 1];
  }
  int cnt = 0;
  vector<int> res;
  for (int sz = 1; sz <= n; sz++) {
    int t = (n / sz);
    if (sz * t != n) t++;
    int flag = 1;
    for (int i = 1; i < t; i++) {
      for (int j = (sz * i) + 1, k = 1; j <= (sz * (i + 1)) && j <= n;
           j++, k++) {
        if (dif[j] != dif[k]) {
          flag = 0;
          goto A;
        }
      }
    }
  A:
    if (flag) {
      cnt++;
      res.push_back(sz);
    }
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) {
    cout << res[i] << " ";
  }
}
