#include <bits/stdc++.h>
using namespace std;
int n, a[1010], b[1010];
vector<int> v;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    if (i == 0)
      b[i] = a[i];
    else
      b[i] = a[i] - a[i - 1];
  }
  for (int k = 1, j; k <= n; k++) {
    for (j = 1; j < n; j++) {
      if (a[j - 1] + b[j % k] != a[j]) break;
    }
    if (j == n) v.push_back(k);
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << endl;
}
