#include <bits/stdc++.h>
using namespace std;
int dat[1001] = {0};
int diff[1001] = {0};
vector<int> ans;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> dat[i];
  }
  diff[0] = dat[0];
  for (int i = 1; i < n; i++) {
    diff[i] = dat[i] - dat[i - 1];
  }
  for (int size = 1; size <= n; size++) {
    int sw = 0;
    for (int block_num = 0;; block_num++) {
      for (int i = 0; i < size; i++) {
        if (block_num * size + i >= n) {
          ans.push_back(size);
          sw = 1;
          break;
        }
        if (diff[block_num * size + i] != diff[i]) {
          sw = 1;
          break;
        }
      }
      if (sw == 1) break;
    }
  }
  cout << ans.size() << "\n";
  for (auto it : ans) cout << it << " ";
}
