#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  long long *a = new long long[n + 1];
  long long *x = new long long[n + 1];
  a[0] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    x[i] = a[i] - a[i - 1];
  }
  long long *kq = new long long[n + 1];
  int dem = 0;
  int j = 1;
  for (int k = 1; k <= n; k++) {
    if (k != 1) {
      int i = 1;
      int t = i + k;
      int flag = 1;
      while (t <= n) {
        if (x[i] != x[t]) {
          flag = 0;
          break;
        }
        t++;
        i++;
      }
      if (flag == 1) {
        dem++;
        kq[j++] = k;
      }
    } else {
      int flag = 1;
      for (int i = 2; i <= n; i++)
        if (x[i] != x[1]) {
          flag = 0;
          break;
        }
      if (flag == 1) {
        dem++;
        kq[j++] = k;
      }
    }
  }
  cout << j - 1 << endl;
  for (int i = 1; i <= j - 1; i++) cout << kq[i] << " ";
  return 0;
}
