#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  long long int n;
  scanf("%lld", &n);
  vector<long long int> v(n + 1);
  v[0] = 0;
  for (long long int i = 1; i <= n; ++i) {
    scanf("%lld", &v[i]);
  }
  vector<long long int> v1;
  for (long long int i = 1; i <= n; ++i) {
    v1.push_back(v[i] - v[i - 1]);
  }
  vector<long long int> ans;
  for (long long int i = 0; i < v1.size(); ++i) {
    bool flag = true;
    for (long long int j = i + 1; j < v1.size(); j += i + 1) {
      long long int c = 0;
      for (long long int k = j; k < j + i + 1 && k < v1.size(); ++k) {
        if (v1[c] != v1[k]) {
          flag = false;
        }
        c++;
      }
    }
    if (flag) {
      ans.push_back(i + 1);
    }
  }
  long long int size = ans.size();
  printf("%lld\n", size);
  for (long long int i = 0; i < ans.size(); ++i) {
    cout << ans[i] << " ";
  }
  return 0;
}
