#include <bits/stdc++.h>
using namespace std;
int n, j, sum, ans, a[300001], b[300001], l[300001], r[300001];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    l[i] = i;
    while (a[l[i] - 1] % a[i] == 0 && l[i] > 1) {
      l[i] = l[l[i] - 1];
    }
  }
  for (int i = n; i > 0; i--) {
    r[i] = i;
    while (a[r[i] + 1] % a[i] == 0 && r[i] < n) {
      r[i] = r[r[i] + 1];
    }
  }
  for (int i = 1; i <= n; i++) {
    if (r[i] - l[i] >= ans) {
      if (r[i] - l[i] > ans) {
        ans = r[i] - l[i];
        sum = 1;
        b[1] = l[i];
      } else {
        if (b[sum] != l[i]) {
          sum++;
          b[sum] = l[i];
        }
      }
    }
  }
  cout << sum << ' ' << ans << endl;
  for (int i = 1; i <= sum; i++) cout << b[i] << ' ';
}
