#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j, m, k, pd, size = 0;
  cin >> n;
  pd = n;
  long long int a[n + 1], x[n], period[n];
  a[0] = 0;
  for (i = 1; i < n + 1; i++) {
    cin >> a[i];
    x[i - 1] = a[i] - a[i - 1];
  }
  for (i = 1; i < n; i++) {
    bool flag = true;
    for (j = 1; i * j < n; j++) {
      if (x[j * i] != x[0]) {
        flag = false;
        break;
      }
    }
    if (flag == false) continue;
    pd = i;
    for (m = 1; m < pd; m++) {
      for (j = 1; j * pd + m < n; j++) {
        if (x[j * pd + m] != x[m]) {
          flag = false;
          break;
        }
      }
      if (flag == false) break;
    }
    if (flag == true) {
      period[size++] = pd;
    }
  }
  cout << size + 1 << endl;
  for (i = 0; i < size; i++) cout << period[i] << " ";
  cout << n;
}
