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