#include <bits/stdc++.h>
using namespace std;
const double g = 9.8;
const double pi = acos(-1.0);
const int N = 3e3 + 10;
const int M = 1e5 + 10;
const int K = 6;
const int bs = 1331;
const int INF = 1e9 + 10;
int now;
int n;
vector<int> ans;
int a[N];
int x[N];
int vis[N];
bool ok() {
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; ++i) {
    if (vis[(i - 1) % now]) {
      int pos = (i - 1) % now;
      if (a[i] - a[i - 1] != x[pos]) return 0;
    } else {
      x[(i - 1) % now] = a[i] - a[i - 1];
      vis[(i - 1) % now] = 1;
    }
  }
  return 1;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (now = 1; now <= n; ++now) {
    if (ok()) ans.push_back(now);
  }
  cout << ans.size() << endl;
  for (auto v : ans) {
    cout << v << ' ';
  }
}
