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