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