#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
struct fastIO {
  fastIO() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cout << fixed << setprecision(12);
  }
} fio;
template <typename... T>
void read(T&... args) {
  ((cin >> args), ...);
}
bool ok(vector<long long> in, long long d) {
  long long n = in.size() - 1;
  for (long long i = 0; i + d < n; ++i)
    if (in[i + 1] - in[i] != in[i + d + 1] - in[i + d]) return false;
  return true;
}
void test_case() {
  long long n;
  cin >> n;
  vector<long long> v(n + 1), ans;
  for (long long i = 1; i < n + 1; i++) cin >> v[i];
  for (long long i = 1; i < n + 1; i++) {
    if (ok(v, i)) ans.push_back(i);
  }
  cout << ans.size() << "\n";
  for (auto i : ans) cout << i << " ";
  cout << "\n";
  ;
}
int32_t main() {
  long long T = 1;
  while (T--) {
    test_case();
  }
  return 0;
}
