#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int n, a[N];
vector<int> v, curr;
bool check() {
  int sz = curr.size();
  for (int i = 1, cnt = 0; i <= n; i++) {
    if (curr[cnt] != a[i] - a[i - 1]) return 0;
    cnt = (cnt + 1) % sz;
  }
  return 1;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 1; i <= n; i++) {
    curr.push_back(a[i] - a[i - 1]);
    if (check()) v.push_back(i);
  }
  printf("%d\n", v.size());
  for (auto x : v) printf("%d ", x);
}
