#include <bits/stdc++.h>
using namespace std;
long long int BinaryExponentiation(long long int base, long long int power) {
  long long int res = 1, mod = 1000000007;
  while (power > 0) {
    if (power % 2) {
      res = (res * base) % mod;
      power--;
    } else {
      power /= 2;
      base = (base * base) % mod;
    }
  }
  return res;
}
bool palindrome(string a) {
  long long int h = a.size() - 1;
  long long int l = 0;
  while (h > 1) {
    if (a[l++] != a[h--]) {
      return false;
    }
  }
  return true;
}
int main() {
  long long int n, i, j, flag = 0;
  cin >> n;
  vector<long long int> v(n + 1), b(n), ans;
  v[0] = 0;
  for (i = 1; i <= n; i++) {
    cin >> v[i];
  }
  for (i = 0; i < n; i++) {
    b[i] = v[i + 1] - v[i];
  }
  for (i = 1; i <= n; i++) {
    flag = 0;
    for (j = 0; j + i < n; j++) {
      if (b[j] != b[j + i]) {
        flag = 1;
        break;
      }
    }
    if (flag == 0) {
      ans.push_back(i);
    }
  }
  cout << ans.size() << endl;
  for (i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
