#include <bits/stdc++.h>
using namespace std;
long long in() {
  long long a;
  scanf("%lld", &a);
  return a;
}
double din() {
  double a;
  scanf("%lf", &a);
  return a;
}
long long bigmod(long long b, long long p, long long md) {
  if (p == 0) return 1;
  if (p % 2 == 1) {
    return ((b % md) * bigmod(b, p - 1, md)) % md;
  } else {
    long long y = bigmod(b, p / 2, md);
    return (y * y) % md;
  }
}
long long gcd(long long a, long long b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
long long getRandom(long long a, long long b) {
  long long ret = (long long)rand() * (long long)rand();
  ret %= (b - a + 1);
  ret += a;
  return ret;
}
int main() {
  int n = in(), ar1[n + 5], ar2[n + 5];
  for (int i = 0; i < n; i++) {
    ar1[i] = in();
    if (i)
      ar2[i] = ar1[i] - ar1[i - 1];
    else
      ar2[i] = ar1[i];
  }
  vector<int> v;
  v.push_back(n);
  for (int i = 1; i < n; i++) {
    bool hobe = 1;
    for (int j = 0; j + i < n && hobe; j++) {
      if (ar2[j] != ar2[j + i]) hobe = 0;
    }
    if (hobe) v.push_back(i);
  }
  sort(v.begin(), v.end());
  printf("%lld\n", (long long)v.size());
  for (int i = 0; i < v.size(); i++) printf("%d ", v[i]);
  puts("");
}
