#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse4.1")
using namespace std;
int n;
vector<int> a;
bool read() {
  if (!(cin >> n)) return false;
  a = vector<int>(n + 1);
  for (int i = 0; i < (int)(n + 1); ++i)
    if (i) cin >> a[i];
  return true;
}
vector<int> solve() {
  vector<int> diff(n);
  for (int i = 0; i < (int)(n); ++i) diff[i] = a[i + 1] - a[i];
  vector<int> ans;
  for (int k = 0; k < (int)(n + 1); ++k)
    if (k) {
      bool ok = true;
      for (int pos = 0; pos < (int)(n); ++pos)
        if (pos >= k) ok &= (diff[pos] == diff[pos - k]);
      if (ok) ans.push_back(k);
    }
  return ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  while (read()) {
    auto ans = solve();
    sort((ans).begin(), (ans).end());
    cout << (int)(ans).size() << endl;
    for (int i = 0; i < (int)((int)(ans).size()); ++i)
      cout << ans[i] << " \n"[i + 1 == (int)(ans).size()];
  }
  return 0;
}
