#include <bits/stdc++.h>
using namespace std;
bool comp(const pair<long long, long long> &a,
          const pair<long long, long long> &b) {
  if (a.first == b.first) return a.second < b.second;
  return a.first > b.first;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  vector<long long> a(n + 1), ans, tp, st;
  a[0] = 0;
  for (long long i = 1; i < n + 1; i += 1) {
    cin >> a[i];
    tp.push_back(a[i] - a[i - 1]);
  }
  if (n == 1) {
    cout << 1 << endl << 1;
    return 0;
  }
  int cnt = 0;
  for (long long i = 0; i < n; i++) {
    st.push_back(tp[i]);
    int p = 0, flag = 0;
    for (long long j = i + 1; j < n; j += 1) {
      if (tp[j] != st[p]) {
        flag = 1;
        break;
      }
      p = (p + 1) % st.size();
    }
    if (!flag) {
      cnt++;
      ans.push_back(st.size());
    }
  }
  cout << cnt << endl;
  for (auto i : ans) cout << i << " ";
  return 0;
}
