#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1001;
long long n, a[MAXN], p[MAXN], q = 0;
vector<long long> vec;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n;
  for (long long i = 0; i < n; i++) {
    cin >> p[i];
    a[i] = p[i] - q;
    q = p[i];
  }
  for (long long i = 1; i < n; i++) {
    bool r = 1;
    for (long long j = i; j < n; j++) {
      if (a[j] != a[j - i]) r = 0;
    }
    if (r) {
      vec.push_back(i);
    }
  }
  vec.push_back(n);
  cout << vec.size() << endl;
  for (long long i : vec) {
    cout << i << " ";
  }
  cout << endl;
  return 0;
}
