#include <bits/stdc++.h>
using namespace std;
void _add(int &a, int b) { a = (a + b) % 1000000007; }
void _sub(int &a, int b) { a = (a + 1000000007 - b) % 1000000007; }
void _mul(int &a, int b) { a = (long long)a * b % 1000000007; }
void _max(int &a, int b) { a = max(a, b); }
void _min(int &a, int b) { a = min(a, b); }
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long pw(long long a, long long b) {
  long long res(1);
  while (b) {
    if (b & 1) res = res * a % 1000000007;
    a = a * a % 1000000007;
    b >>= 1;
  }
  return res;
}
long long pwM(long long a, long long b, long long mod) {
  long long res(1);
  while (b) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
    b >>= 1;
  }
  return res;
}
const int infi = 2147483647;
const long long infl = 9223372036854775807ll;
const double PI = 3.14159265358979323846;
int n, m, k, q;
int a[100010];
int x[100010];
vector<int> res;
int main() {
  scanf("%d", &n);
  for (int i = 1, lim = n; i <= lim; ++i) scanf("%d", &a[i]);
  for (int i = n, lim = 1; i >= lim; --i) a[i] -= a[i - 1];
  for (int k = 1, lim = n; k <= lim; ++k) {
    int ok = 1;
    for (int i = 1, lim = n; i <= lim; ++i) {
      if (i <= k) {
        x[i - 1] = a[i];
      } else {
        if (a[i] != x[(i - 1) % k]) ok = 0;
      }
    }
    if (ok) res.push_back(k);
  }
  printf("%d", (res.size())), putchar('\n');
  for (auto x : res) printf("%d", (x)), putchar(' ');
  putchar('\n');
  return 0;
}
