#include <bits/stdc++.h>
using namespace std;
using LL = long long;
const int N = 1024;
int a[N];
int n;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n;
  int x[n];
  for (int i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  vector<int> res;
  for (int k = 1; k <= n; ++k) {
    memset(x, -1, sizeof(x));
    for (int j = 0; j < n; ++j) {
      x[j] = INT32_MAX;
    }
    bool ok = true;
    for (int i = 0; i < n; ++i) {
      int v = a[i + 1] - a[i];
      if (x[i % k] != INT32_MAX && x[i % k] != v) {
        ok = false;
        break;
      }
      x[i % k] = v;
    }
    if (ok) res.push_back(k);
  }
  cout << res.size() << "\n";
  for (auto v : res) {
    cout << v << " ";
  }
  return 0;
}
