#include <bits/stdc++.h>
using namespace std;
const int maxn = 1000;
bool poss(vector<int> &v, int n, int k) {
  vector<int> w(k);
  w[0] = v[0];
  for (int i = 1; i < k; ++i) w[i] = v[i] - v[i - 1];
  int prev = 0;
  for (int i = 0; i < (n); ++i) {
    prev += w[i % k];
    if (prev != v[i]) return false;
  }
  return true;
}
void solve() {
  int n;
  cin >> n;
  vector<int> v(n);
  for (int i = 0; i < (n); ++i) cin >> v[i];
  vector<int> ans;
  for (int i = 1; i <= n; ++i)
    if (poss(v, n, i)) ans.push_back(i);
  cout << ans.size() << "\n";
  for (int i = 0; i < (ans.size()); ++i) cout << ans[i] << " ";
}
int main() {
  ios::sync_with_stdio(0);
  int t = 1;
  while (t--) solve();
  return 0;
}
