#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int INF = 2e9 + 5;
int n, a[1010], b[1010];
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i] - (i > 0 ? a[i - 1] : 0);
  }
  vector<int> can;
  for (int i = 1; i <= n; i++) {
    bool good = true;
    for (int j = i; j < n; j++) {
      if (b[j] != b[j % i]) good = false;
    }
    if (good) can.push_back(i);
  }
  cout << can.size() << "\n";
  for (int x : can) cout << x << " ";
}
