#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 1e6 + 1;
const int MOD = 1e9 + 7;
const int INF = 1e9;
const long long int LINF = 1e18;
const long long int N = 100001;
void snake_bite() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
}
void solve() {
  int n;
  cin >> n;
  vector<long int> a(n);
  vector<long int> diff(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (i == 0) {
      diff[i] = a[i];
      continue;
    }
    diff[i] = a[i] - a[i - 1];
  }
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    if (i == 0) continue;
    bool ok = true;
    int j;
    for (j = 0; j < n - i; j++) {
      if (diff[j] != diff[j + i]) {
        ok = false;
        break;
      }
    }
    if (ok) ans.push_back(i);
  }
  ans.push_back(n);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
int main() {
  snake_bite();
  long int t = 1;
  while (t--) {
    solve();
    cout << endl;
  }
}
