#include <bits/stdc++.h>
using namespace std;
bool Check(int k, const vector<int> &x) {
  for (int i = 0; i < x.size(); ++i)
    if (x[i] != x[i % k]) return false;
  return true;
}
int main() {
  int n;
  cin >> n;
  vector<int> v(n + 1), x(n);
  v[0] = 0;
  for (int i = 1; i <= n; ++i) {
    cin >> v[i];
    x[i - 1] = v[i] - v[i - 1];
  }
  vector<int> rasp;
  for (int k = 1; k <= n; ++k)
    if (Check(k, x)) rasp.push_back(k);
  cout << rasp.size() << "\n";
  for (auto t : rasp) cout << t << " ";
  return 0;
}
