#include <bits/stdc++.h>
using namespace std;
long long max(long long a, long long b) {
  if (a > b) return a;
  return b;
}
long long min(long long a, long long b) { return a + b - max(a, b); }
long long mod(long long a, long long b) {
  if (a > b)
    return a - b;
  else
    return b - a;
}
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
bool possible(long long k, long long arr[], long long n) {
  for (long long i = 1; i <= n; i++) {
    if (i + k <= n) {
      long long ele = arr[i] - arr[i - 1];
      long long ele1 = arr[i + k] - arr[i + k - 1];
      if (ele != ele1) return false;
    }
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long n;
  cin >> n;
  long long arr[n + 5];
  arr[0] = 0;
  for (long long i = 1; i <= n; i++) cin >> arr[i];
  vector<long long> ans;
  for (long long i = 1; i <= n; i++) {
    if (possible(i, arr, n)) ans.push_back(i);
  }
  cout << ans.size() << "\n";
  for (auto it : ans) cout << it << " ";
}
