#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9 + 7;
int main() {
  int n;
  cin >> n;
  vector<long long> a(n);
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<long long> x(n), ans;
  x[0] = a[0];
  for (int i = 1; i < n; ++i) x[i] = a[i] - a[i - 1];
  for (int k = 1; k < n; ++k) {
    bool f = 1;
    for (int j = 0; f && j + k < n; j++)
      if (x[j + k] != x[j]) f = 0;
    if (f) ans.push_back(k);
  }
  ans.push_back(n);
  cout << ans.size() << endl;
  for (int i : ans) cout << i << " ";
  return 0;
}
