#include <bits/stdc++.h>
using namespace std;
const int MAXN = 300000 + 100;
vector<int> v[MAXN];
int a[MAXN];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  int s, e;
  a[0] = 1000000000;
  a[n + 1] = 1000000000;
  for (int i = 1; i <= n; i++) {
    s = i;
    e = i;
    while (a[s] % a[i] == 0 && s >= 1) s--;
    while (a[e] % a[i] == 0 && e <= n) e++;
    i = e - 1;
    v[e - s - 2].push_back(s + 1);
  }
  int ans = 0;
  for (int i = n; 0 <= i; i--)
    if (v[i].size() != 0) {
      ans = i;
      break;
    }
  sort(v[ans].begin(), v[ans].end());
  v[ans].resize(unique(v[ans].begin(), v[ans].end()) - v[ans].begin());
  cout << v[ans].size() << " " << ans << endl;
  for (int i = 0; i < v[ans].size(); i++) cout << v[ans][i] << " ";
  cout << endl;
  return 0;
}
