#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> x(n);
  int prev_a = 0;
  for (int i = 0, a; i < n; ++i) {
    cin >> a;
    x[i] = a - prev_a;
    prev_a = a;
  }
  vector<int> l;
  for (int i = 1; i <= n; ++i) {
    bool isPos = true;
    for (int j = i; j < n; ++j) {
      if (x[j] != x[j % i]) {
        isPos = false;
        break;
      }
    }
    if (isPos) l.push_back(i);
  }
  cout << l.size() << '\n';
  for (int i = 0; i < l.size(); ++i) {
    cout << l[i] << ' ';
  }
  cout << endl;
  return 0;
}
