#include <bits/stdc++.h>
using namespace std;
int a[2000], x[2000], n, ans[2000], cnt = 0;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  a[0] = 0;
  for (int k = 1; k <= n; k++) {
    memset(x, -0x3f, sizeof(x));
    bool flag = true;
    for (int i = 1; i <= n; i++)
      if (x[(i - 1) % k] == -1044266559) {
        x[(i - 1) % k] = a[i] - a[i - 1];
      } else if (x[(i - 1) % k] == a[i] - a[i - 1])
        continue;
      else {
        flag = false;
        break;
      }
    if (flag) ans[++cnt] = k;
  }
  printf("%d\n", cnt);
  for (int i = 1; i <= cnt; i++) printf("%d ", ans[i]);
  return 0;
}
