#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 10;
int a[N], b[N];
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  vector<int> ans;
  for (int i = 1; i <= n; i++) {
    b[i] = a[i] - a[i - 1];
  }
  for (int i = 1; i <= n; i++) {
    int flag = 0;
    for (int j = 1; i + j <= n; j++) {
      if (b[j] != b[i + j]) {
        flag++;
        break;
      }
    }
    if (!flag) {
      ans.push_back(i);
    }
  }
  cout << ans.size() << endl;
  for (auto i : ans) cout << i << " ";
  return 0;
}
