#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int adad[n], def[n];
  vector<int> out;
  bool tf = true;
  for (int i = 0; i < n; i++) {
    cin >> adad[i];
  }
  def[0] = adad[0];
  for (int i = 1; i < n; i++) {
    def[i] = adad[i] - adad[i - 1];
  }
  for (int k = 1; k <= n; k++) {
    tf = true;
    for (int i = k; i < n; i++) {
      if (def[i % k] != def[i]) {
        tf = false;
      }
    }
    if (tf) {
      out.push_back(k);
    }
  }
  cout << out.size() << endl;
  for (int i = 0; i < out.size(); i++) {
    cout << out[i] << " ";
  }
}
