#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    vector<int> vec(n + 1);
    for (int i = 1; i <= n; i++) {
      cin >> vec[i];
    }
    vector<int> diff(n + 1);
    for (int i = 1; i <= n; i++) {
      diff[i] = vec[i] - vec[i - 1];
    }
    int v = diff[1];
    vector<int> res;
    for (int i = n; i >= 2; i--) {
      bool can = 1;
      for (int j = i; j <= n; j++) {
        if (diff[j] != diff[1 + (j - i)]) {
          can = 0;
          break;
        }
      }
      if (can) res.push_back(i - 1);
    }
    reverse(res.begin(), res.end());
    res.push_back(n);
    cout << res.size() << endl;
    for (int i = 0; i < res.size(); i++) {
      if (i) cout << ' ';
      cout << res[i];
    }
    cout << endl;
  }
  return 0;
}
