#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int ar[n];
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
  }
  int t[n];
  t[0] = ar[0];
  for (int i = 1; i < n; i++) {
    t[i] = ar[i] - ar[i - 1];
  }
  int k = 1, index = 0;
  int count = 1, flag;
  int p[1000];
  while (k < n) {
    flag = 1;
    for (int i = 0; i < n; i++) {
      if (t[i] == t[i % k]) {
        continue;
      } else {
        flag = -1;
        break;
      }
    }
    if (flag == 1) {
      p[index++] = k;
      count++;
    }
    k++;
  }
  cout << count << "\n";
  p[index++] = n;
  for (int i = 0; i < index; i++) {
    cout << p[i] << "\t";
  }
  return 0;
}
