#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, a[N], b[N];
vector<int> ans;
bool check(int r) {
  int id = 1;
  for (int i = 1; i <= n; i++) {
    if (b[i] != b[id]) return 0;
    id++;
    if (id > r) id = 1;
  }
  return 1;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    b[i] = a[i] - a[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    if (check(i)) ans.push_back(i);
  }
  cout << ans.size() << "\n";
  for (int i : ans) cout << i << " ";
}
