#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[n + 1];
  arr[0] = 0;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  vector<int> ans;
  for (int k = 1; k <= n; k++) {
    int x[k + 1], pre = 0;
    bool b = 0;
    for (int i = 0; i < k; i++) {
      x[i] = arr[i + 1] - pre;
      pre = arr[i + 1];
    }
    int j = 0;
    for (int i = 1; i <= n; i++) {
      if (arr[i] != arr[i - 1] + x[j]) b = 1;
      j++;
      j %= k;
    }
    if (!b) ans.push_back(k);
  }
  cout << ans.size() << '\n';
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << ' ';
  return 0;
}
