#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, 0, -1, 0, -1, 1, -1, 1};
int dy[] = {0, 1, 0, -1, -1, 1, 1, -1};
const double eps = 1e-6;
const int N = 2e5 + 2;
void moha() {}
vector<int> v;
vector<int> f, x;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n + 1];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  v.push_back(a[0] - 0);
  for (int i = 1; i < n; i++) {
    v.push_back(a[i] - a[i - 1]);
  }
  int j = 1;
  while (j) {
    if (j >= n) {
      break;
    }
    x = vector<int>();
    for (int i = 0; i < j; i++) {
      x.push_back(v[i]);
    }
    bool t = 1;
    for (int i = j; i < n; i++) {
      if (v[i] != x[i % j]) {
        t = 0;
        break;
      }
    }
    if (t) {
      f.push_back(j);
    }
    j++;
  }
  f.push_back(n);
  sort(f.begin(), f.end());
  cout << f.size() << endl;
  for (int i = 0; i < f.size(); i++) {
    cout << f[i] << " ";
  }
  return 0;
}
