#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e3 + 10;
int a[maxn];
int b[maxn];
int c[maxn];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = a[i] - a[i - 1];
  }
  int flag = 0;
  int k = 0;
  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;
}
