#include <bits/stdc++.h>
using namespace std;
const int N = int(3e5), mod = int(1e9) + 7;
int n, a[N], x[N];
vector<int> ans;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    x[i - 1] = a[i] - a[i - 1];
  }
  for (int k = 1; k <= n; k++) {
    bool b = 0;
    for (int i = 0; i < n; i++) {
      if (x[i] != x[i % k]) b = 1;
    }
    if (!b) {
      ans.push_back(k);
    }
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
