#include <bits/stdc++.h>
using namespace std;
int a[1005];
int n;
bool is(int k) {
  for (int i = 0; i < n; i++)
    if (a[i] != a[i % k]) return false;
  return true;
}
int main() {
  cin >> n;
  int lst = -1, cnt = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = n - 1; i >= 1; i--) a[i] -= a[i - 1];
  vector<int> ans;
  for (int i = 1; i <= n; i++) {
    if (is(i)) ans.push_back(i);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  return 0;
}
