#include <bits/stdc++.h>
using namespace std;
int n, k, flag, a[1005], b[1005], c[1005];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", a + i);
    b[i] = a[i] - a[i - 1];
  }
  for (int i = 1; i <= n; ++i) {
    flag = 1;
    for (int j = i + 1; j <= n; ++j)
      if (b[j] != b[j - i]) {
        flag = 0;
        break;
      }
    if (flag) c[++k] = i;
  }
  printf("%d\n", k);
  for (int i = 1; i <= k; ++i) printf("%d ", c[i]);
  return 0;
}
