#include <bits/stdc++.h>
using namespace std;
int a[1000 + 20];
int x[1000 + 20];
vector<int> s;
int main() {
  int k = 0;
  int n;
  cin >> n;
  for (int i = 1; i < n + 1; i++) cin >> a[i];
  for (int i = 1; i < n + 1; i++) x[i - 1] = a[i] - a[i - 1];
  for (int i = 1; i < n + 1; i++) {
    bool tst = 1;
    for (int j = 1; j < n + 1; j++) {
      if (x[j - 1] != x[(j - 1) % i]) {
        tst = 0;
        break;
      }
    }
    if (tst) s.push_back(i);
  }
  cout << s.size() << endl;
  for (int i = 0; i < s.size(); i++) cout << s[i] << " ";
  return 0;
}
