#include <bits/stdc++.h>
using namespace std;
int n;
int a[300005];
map<int, vector<int> > mp;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int ans = 0;
  for (int i = 0; i < n;) {
    int L = i, R = i;
    int d = a[i];
    while (L > 0 && a[L - 1] % d == 0) L--;
    while (R < n - 1 && a[R + 1] % d == 0) R++;
    mp[R - L].push_back(L + 1);
    ans = max(ans, R - L);
    i = R + 1;
  }
  cout << mp[ans].size() << ' ' << ans << '\n';
  for (int i = 0; i < mp[ans].size(); i++) {
    cout << mp[ans][i] << ' ';
  }
  cout << '\n';
}
