#include <bits/stdc++.h>
using namespace std;
long long a[1010];
long long pref[1010];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
    pref[i] = a[i] + pref[i - 1];
  }
  vector<long long> ans;
  ans.clear();
  for (long long i = 1; i < n; i++) {
    long long now = a[i];
    bool ya = true;
    for (int j = i + 1; j <= n; j++) {
      long long mod = j % i;
      if (mod == 0) mod = i;
      if (now + a[mod] != a[j]) {
        ya = false;
        break;
      }
      if (mod == i) now = a[j];
    }
    if (ya) ans.push_back(i);
  }
  ans.push_back(n);
  cout << ans.size() << "\n";
  for (long long i = 0; i < ans.size(); i++) {
    if (i == 0)
      cout << ans[i];
    else
      cout << " " << ans[i];
  }
  cout << "\n";
}
