#include <bits/stdc++.h>
using namespace std;
vector<int> v, ans;
int main() {
  int n, i, j, k, s, d, r, m;
  cin >> n;
  m = 0;
  for (i = 0; i < n; i++) {
    cin >> r;
    v.push_back(r - m);
    m = r;
  }
  for (i = 1; i <= n; i++) {
    int f = 0;
    for (j = 0; j < n; j++) {
      if (v[j] != v[j % i]) f = 1;
    }
    if (!f) ans.push_back(i);
  }
  cout << ans.size() << endl;
  for (i = 0; i < ans.size(); i++) {
    if (i) cout << " ";
    cout << ans[i];
  }
  cout << endl;
  return 0;
}
