#include <bits/stdc++.h>
using namespace std;
long long a[1000000];
long long x[1000000];
vector<int> answer;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  a[0] = 0;
  for (int i = 0; i < n; i++) {
    x[i] = a[i + 1] - a[i];
  }
  for (int k = 1; k <= n; k++) {
    int p = 0;
    for (int i = 0; i < k; i++) {
      for (int y = i + k; y < n; y += k) {
        if (x[y] != x[y - k]) {
          p = -1;
          break;
        }
      }
      if (p == -1) break;
    }
    if (p != -1) {
      answer.push_back(k);
    }
  }
  cout << answer.size() << endl;
  for (int i = 0; i < answer.size(); i++) {
    cout << answer[i] << " ";
  }
}
