#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n];
  for (int i = 0; i < n; i++) cin >> arr[i];
  int cnt[n];
  cnt[0] = arr[0];
  for (int i = 1; i < n; i++) {
    cnt[i] = arr[i] - arr[i - 1];
  }
  vector<int> ans;
  for (int i = 1; i < n; i++) {
    int c = 0;
    for (int j = 0; j + i < n; j++) {
      if (cnt[j] != cnt[j + i]) {
        c++;
        break;
      }
    }
    if (c == 0) ans.push_back(i);
  }
  ans.push_back(n);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
