#include <bits/stdc++.h>
using namespace std;
const int NMAX = 1005;
int N;
int a[NMAX];
int x[NMAX];
vector<int> sols;
bool check(int k) {
  for (int i = 1; i <= N; ++i) {
    if (a[i] != x[(i - 1) % k] + a[i - 1]) {
      return false;
    }
  }
  return true;
}
void solve(int k) {
  for (int i = 0; i < k; ++i) {
    x[i] = a[i + 1] - a[i];
  }
  if (check(k)) {
    sols.push_back(k);
  }
}
int main() {
  cin >> N;
  a[0] = 0;
  for (int i = 1; i <= N; ++i) {
    cin >> a[i];
  }
  for (int k = 1; k <= N; ++k) {
    solve(k);
  }
  cout << sols.size() << '\n';
  for (int i = 0; i < sols.size(); ++i) {
    cout << sols[i] << " ";
  }
  return 0;
}
