#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int a[3005];
int x[3005];
vector<int> v;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    x[i] = a[i] - a[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    bool b = 1;
    for (int j = 1; j <= n; j++) {
      if (i + j <= n && x[j] != x[j + i]) b = 0;
    }
    if (b) v.push_back(i);
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
}
