#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll loops")
using namespace std;
const long long int MOD = 1e9 + 7;
const long long int INF = 1e18;
vector<long long int> v(1007);
long long int n;
bool ok(long long int c) {
  for (int i = 0; i + c < n; ++i)
    if (v[i + 1] - v[i] != v[i + c + 1] - v[i + c]) return false;
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (long long int i = 1; i < n + 1; i++) cin >> v[i];
  vector<long long int> final;
  for (long long int i = 1; i < n + 1; i++)
    if (ok(i)) final.push_back(i);
  cout << final.size() << "\n";
  for (long long int i = 0; i < final.size(); i++) cout << final[i] << " ";
  return 0;
}
