#include <bits/stdc++.h>
using namespace std;
int n, a[300005], st[2][300005][21], ans[300005], cnt;
inline int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
void rmq() {
  for (int i = 1; i <= n; i++) st[0][i][0] = st[1][i][0] = a[i];
  for (int j = 1; j <= 20; j++) {
    for (int i = 1; i <= n - (1 << j) + 1; i++) {
      st[0][i][j] = min(st[0][i][j - 1], st[0][i + (1 << (j - 1))][j - 1]);
      st[1][i][j] = gcd(st[1][i][j - 1], st[1][i + (1 << (j - 1))][j - 1]);
    }
  }
}
bool querry(int l, int r) {
  int k = log2(r - l + 1);
  return min(st[0][l][k], st[0][r - (1 << k) + 1][k]) ==
         gcd(st[1][l][k], st[1][r - (1 << k) + 1][k]);
}
int check(int m) {
  int cur = 0;
  for (int i = 1; i + m <= n; i++) {
    if (querry(i, i + m)) ans[++cur] = i;
  }
  return cur;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  rmq();
  int l = 0, r = n;
  while (l < r) {
    int mid = (l + r) >> 1, p;
    p = check(mid);
    if (p) {
      l = mid + 1;
      cnt = p;
    } else
      r = mid;
  }
  if (!check(l)) l--;
  printf("%d %d\n", cnt, l);
  for (int i = 1; i <= cnt; i++) printf("%d ", ans[i]);
  return 0;
}
