#include <bits/stdc++.h>
using namespace std;
long long M = 100000007;
int x[1005];
bool Virg[1005];
int a[1005];
vector<int> Ans;
int rest[1005];
void Clean() {
  for (int i = 0; i < 1003; i++) {
    x[i] = 0;
    Virg[i] = true;
  }
}
int main() {
  int n;
  cin >> n;
  cin >> a[0];
  rest[0] = a[0];
  for (int i = 1; i < n; i++) {
    cin >> a[i];
    rest[i] = a[i] - a[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    Clean();
    x[0] = rest[0];
    bool ok = true;
    Virg[0] = false;
    for (int j = 1; j < n; j++) {
      int index = (j) % i;
      if (Virg[index]) {
        x[index] = rest[j];
        Virg[index] = false;
      }
      if (x[index] != rest[j]) {
        ok = false;
        break;
      }
    }
    if (ok) {
      Ans.push_back(i);
    }
  }
  cout << Ans.size() << '\n';
  for (int i = 0; i < Ans.size() - 1; i++) {
    cout << Ans[i] << " ";
  }
  cout << Ans[Ans.size() - 1] << '\n';
  return 0;
}
