#include <bits/stdc++.h>
using namespace std;
int n, amax, s;
int a[100005];
int b[100005];
int x[100005];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  x[0] = a[1];
  for (int i = 1; i <= n - 1; ++i) x[i] = a[i + 1] - a[i];
  vector<int> ans;
  for (int k = 1; k <= n; ++k) {
    bool ok = 1;
    for (int i = 1; i <= n; ++i) {
      b[i] = b[i - 1] + x[(i - 1) % k];
      if (b[i] != a[i]) {
        ok = 0;
        break;
      }
    }
    if (ok) ans.push_back(k);
  }
  printf("%d\n", ans.size());
  for (int i = 0; i <= (int)ans.size() - 1; ++i) printf("%d ", ans[i]);
  return 0;
}
