#include <bits/stdc++.h>
using namespace std;
const long long N = 1e3 + 5;
long long arr[N];
class BLostArray {
 public:
  long long n;
  bool ok(long long k) {
    vector<long long> x(k);
    for (long long i = 0; i < k; i++) x[i] = arr[i + 1] - arr[i];
    for (long long i = k; i <= n - 1; i++)
      if (arr[i + 1] - arr[i] != x[i % k]) return false;
    return true;
  }
  void solve(std::istream& in, std::ostream& out) {
    in >> n;
    arr[0] = 0;
    for (long long i = 1; i <= n; i++) in >> arr[i];
    vector<long long> res;
    for (long long len = 1; len <= n; len++) {
      if (ok(len)) res.emplace_back(len);
    }
    out << res.size() << '\n';
    for (long long x : res) out << x << ' ';
  }
};
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  BLostArray solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
