#include <bits/stdc++.h>
using namespace std;
int a[1010];
int b[1010];
int c[1010];
int main() {
  int n;
  cin >> n;
  cin >> a[1];
  c[1] = a[1];
  for (int i = 2; i <= n; i++) {
    cin >> a[i];
    c[i] = a[i] - a[i - 1];
  }
  int ans = 0;
  for (int i = 1; i <= n; i++) {
    int flag = 0;
    for (int x = 1; x + i <= n; x++)
      if (c[x] != c[x + i]) {
        flag = 1;
      }
    if (!flag) {
      ans++;
      b[ans] = i;
    }
  }
  cout << ans << endl;
  for (int i = 1; i <= ans; i++) {
    cout << b[i] << " ";
  }
  cout << endl;
  return 0;
}
