#include <bits/stdc++.h>
using namespace std;
static int rowNbr[] = {-1, -1, -1, 0, 0, 1, 1, 1};
static int colNbr[] = {-1, 0, 1, -1, 1, -1, 0, 1};
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
long long int power(long long int base, long long int p) {
  long long int ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base);
    base = (base * base);
    p /= 2;
  }
  return ans;
}
long long int modPower(long long int base, long long int p, long long int mod) {
  long long int ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base) % mod;
    base = (base * base) % mod;
    p /= 2;
  }
  return ans;
}
long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
bool isPrime[1000005];
void sieve() {
  isPrime[0] = isPrime[1] = 1;
  for (int i = 2; i * i <= 1000000; i++) {
    if (isPrime[i] == 0) {
      if (i * 1LL * i <= 1000000) {
        for (int j = i * i; j <= 1000000; j += i) isPrime[j] = 1;
      }
    }
  }
}
int main() {
  int n;
  cin >> n;
  int a[n + 5];
  a[0] = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i + 1];
  }
  int b[n + 5];
  vector<int> ans;
  for (int k = 1; k <= n; ++k) {
    int i;
    for (i = 0; i < k; ++i) {
      b[i] = a[i + 1] - a[i];
    }
    for (i; i < n; ++i)
      if (a[i + 1] != a[i] + b[i % k]) goto f;
    ans.push_back(k);
  f:;
  }
  cout << ans.size() << endl;
  for (auto i : ans) cout << i << " ";
  return 0;
}
