#include <bits/stdc++.h>
using namespace std;
using ll = long long int;
map<ll, ll> mp1, mp;
vector<pair<ll, pair<ll, ll> > > vpp1;
vector<pair<ll, ll> > vp, vp1;
vector<ll> v, v1, v2, fin;
map<pair<ll, ll>, bool> mbb;
map<ll, bool> mb;
ll a, b, c, n, d, e, f, ta, sum = 0, cnt = 0, m, l, req, sz, maxi, k;
bool sortbysec(const pair<pair<ll, ll>, ll> &a,
               const pair<pair<ll, ll>, ll> &b) {
  return (a.second < b.second);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  vector<ll> ans;
  v.clear();
  cin >> n;
  ll arr[n + 10], brr[n + 10];
  ll sum = 0;
  ll reff;
  ll x;
  memset(arr, 0, sizeof arr);
  memset(brr, 0, sizeof brr);
  for (ll i = 1; i <= n; i++) {
    cin >> arr[i];
    brr[i - 1] = arr[i] - arr[i - 1];
  }
  for (ll i = 0; i < n; i++) {
    if (i == 0)
      reff = brr[i];
    else {
      ll x = brr[i];
      if (x == reff) v.push_back(i);
    }
  }
  ll l = v.size();
  for (ll i = 0; i < l; i++) {
    bool flag = 0;
    ll len = v[i];
    for (ll j = 0; j < n; j++) {
      if (brr[j % len] != brr[j]) flag = 1;
    }
    if (flag == 0) ans.push_back(len);
  }
  sort(ans.begin(), ans.end());
  l = ans.size();
  if (l) {
    if (ans[l - 1] != n) ans.push_back(n);
  } else
    ans.push_back(n);
  cout << ans.size() << endl;
  for (ll i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
