#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, k;
  cin >> n;
  vector<long long> v, v1, v2;
  v1.push_back(0);
  for (i = 0; i < n; i++) {
    cin >> j;
    v.push_back(j - v1[i]);
    v1.push_back(j);
  }
  long long ans = 0;
  for (i = 1; i <= n; i++) {
    k = 0;
    bool flag = true;
    long long sum = 0;
    for (j = 1; j < v1.size(); j++) {
      sum += v[k % i];
      k = (k + 1) % i;
      if (sum != v1[j]) {
        flag = false;
        break;
      }
    }
    if (flag) {
      ans++;
      v2.push_back(i);
    }
  }
  cout << ans << endl;
  for (i = 0; i < v2.size(); i++) cout << v2[i] << " ";
  return 0;
}
