#include <bits/stdc++.h>
std::vector<int> x;
int arr[1005], gg[1005];
int main() {
  int n, i, i2, maxx = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
    gg[i] = arr[i] - arr[i - 1];
  }
  for (i = 1; i <= n; i++) {
    for (i2 = 1; i2 + i <= n; i2++) {
      if (gg[i2] != gg[i2 + i]) goto fail;
    }
    x.push_back(i);
  fail:
    1;
  }
  printf("%d\n", x.size());
  for (i = 0; i < x.size(); i++) printf("%d ", x[i]);
  return 0;
}
