#include <bits/stdc++.h>
using namespace std;
const int N = 3 * 1000 * 100 + 5, inf = 1000 * 1000 + 5;
vector<int> ans, q;
int g[N][20][2], a[N], have[N], fl[N];
int gcd(int a, int b) {
  while (a) {
    int t = a;
    b %= a;
    a = b;
    b = t;
  }
  return b;
}
int main() {
  int n, i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    g[i][0][0] = a[i];
    g[i][0][1] = a[i];
  }
  fl[1] = 0;
  for (i = 2; i < N; i++) {
    fl[i] = fl[i / 2] + 1;
  }
  for (j = 1; j <= fl[n]; j++) {
    for (i = 1; i <= n - (1 << j) + 1; i++) {
      g[i][j][0] = gcd(g[i][j - 1][0], g[i + (1 << (j - 1))][j - 1][0]);
      g[i][j][1] = min(g[i][j - 1][1], g[i + (1 << (j - 1))][j - 1][1]);
    }
  }
  int low, high, mid, c;
  low = 0;
  high = n + 1;
  while (high - low > 1) {
    mid = (high + low) / 2;
    c = fl[mid];
    q.clear();
    int mn = inf, gc = 1;
    for (i = 1; i <= n - mid + 1; i++) {
      mn = min(g[i][c][1], g[i + mid - (1 << c)][c][1]);
      gc = gcd(g[i][c][0], g[i + mid - (1 << c)][c][0]);
      if (mn == gc) {
        q.push_back(i);
      }
    }
    if ((int(q.size()))) {
      low = mid;
      ans = q;
    } else {
      high = mid;
    }
  }
  printf("%d %d\n", (int(ans.size())), low - 1);
  for (i = 0; i < (int(ans.size())); i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
