#include <bits/stdc++.h>
using namespace std;
bool vis[1010];
int main() {
  int i, j, k;
  int n, m, t;
  scanf("%d", &n);
  vector<int> vec(n + 1), a(n + 1);
  a[0] = 0;
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  vec[0] = a[0];
  for (i = 1; i <= n; i++) vec[i] = a[i] - a[i - 1];
  set<int> ans;
  ans.insert(n);
  for (k = n - 1; k >= 1; k--) {
    memset(vis, 0, sizeof(vis));
    bool f = true;
    for (i = 1; i <= n; i++) {
      if (!vis[i]) {
        vis[i] = 1;
        for (j = i + k; j <= n; j += k) {
          if (vec[i] != vec[j]) {
            f = false;
            break;
          }
          vis[j] = 1;
        }
      }
    }
    if (f) ans.insert(k);
  }
  printf("%d", ans.size());
  printf("\n");
  ;
  for (int e : ans) printf("%d", e), printf("%s", " ");
  return 0;
}
