#include <bits/stdc++.h>
using namespace std;
int a[1010];
int b[1000];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i + 1];
  }
  for (int i = 1; i <= n; i++) {
    b[i - 1] = a[i] - a[i - 1];
  }
  vector<int> ans;
  for (int k = 1; k <= n; k++) {
    int flag = true;
    for (int i = 0; i < n; i++) {
      if (i + k < n && b[i] != b[i + k]) flag = false;
    }
    if (flag) ans.push_back(k);
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
