#include <bits/stdc++.h>
using namespace std;
int n;
vector<int> V;
bool solve(int k) {
  vector<int> aux(k, -1e9);
  for (int i = 1; i <= n; ++i) {
    if (aux[i % k] == -1e9)
      aux[i % k] = V[i] - V[i - 1];
    else if (aux[i % k] != V[i] - V[i - 1])
      return false;
  }
  return true;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  V = vector<int>(n + 1);
  for (int i = 1; i <= n; ++i) cin >> V[i];
  vector<int> ans;
  for (int i = 1; i <= n; ++i) {
    if (solve(i)) ans.push_back(i);
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] << " ";
  cout << "\n";
  return 0;
}
