#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, prev = 0;
  cin >> n;
  vector<int> V(n);
  for (int i = 0, temp; i < n; i++) {
    cin >> temp;
    V[i] = temp - prev;
    prev = temp;
  }
  vector<int> ans;
  for (int k = 1; k <= n; k++) {
    bool works = true;
    for (int i = 0; i < n and works; i++)
      if (V[i] != V[i % k]) works = false;
    if (works) ans.push_back(k);
  }
  cout << ans.size() << endl;
  for (auto x : ans) cout << x << " ";
  cout << endl;
  return 0;
}
