#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n;
  cin >> n;
  vector<long long int> a(n + 1, 0), ans;
  for (long long int i = 1; i <= n; ++i) cin >> a[i];
  for (long long int k = 1; k <= n; ++k) {
    bool ok = true;
    vector<pair<long long int, bool>> x(k, {0, true});
    for (long long int i = 1; i <= n; ++i) {
      if (x[(i - 1) % k].second) {
        x[(i - 1) % k].first = a[i] - a[i - 1];
        x[(i - 1) % k].second = false;
      } else if (a[i] - a[i - 1] != x[(i - 1) % k].first) {
        ok = false;
        break;
      }
    }
    if (ok) ans.push_back(k);
  }
  cout << ans.size() << '\n';
  for (auto &i : ans) cout << i << ' ';
  return 0;
}
