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