#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> t;
  vector<int> odp;
  t.resize(n + 1);
  t[0] = 0;
  for (int i = 1; i <= n; i++) {
    int a;
    cin >> a;
    t[i] = a;
  }
  for (int i = 1; i <= n; i++) {
    bool ok = true;
    for (int j = 1; j <= n - i; j++) {
      if ((t[j] - t[j - 1]) != (t[j + i] - t[j + i - 1])) {
        ok = false;
        break;
      }
    }
    if (ok == true) odp.push_back(i);
  }
  cout << odp.size() << "\n";
  for (int i = 0; i < odp.size(); i++) cout << odp[i] << " ";
  cout << "\n";
  return 0;
}
