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