#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) {
  while ((a) && (b))
    if (a > b)
      a %= b;
    else
      b %= a;
  return a + b;
}
const int N = 500000;
int n, m, b[N], a[N], c[N];
int Min(int l, int r) {
  int mini = a[l];
  int i, L, R;
  L = l / m;
  R = r / m;
  if (L == R)
    for (i = l; i <= r; i++) mini = min(a[i], mini);
  else {
    L++;
    R--;
    for (i = L; i <= R; i++) mini = min(mini, c[i]);
    L *= m;
    for (i = l; i < L; i++) mini = min(mini, a[i]);
    R = (R + 1) * m;
    for (i = R; i <= r; i++) mini = min(a[i], mini);
  }
  return mini;
}
void print(int l, int r) {
  int i, L, R;
  L = l / m;
  R = r / m;
  if (L == R)
    for (i = l; i <= r; i++) cout << a[i] << " ";
  else {
    L++;
    R--;
    for (i = L; i <= R; i++) cout << b[i] << "* ";
    L *= m;
    for (i = l; i < L; i++) cout << a[i] << " " << i << "\n";
    R = (R + 1) * m;
    for (i = R; i <= r; i++) cout << a[i] << " " << i << endl;
  }
  cout << "\n------------------------------\n";
}
bool ch(int l, int r) {
  int mini = Min(l, r);
  int i, L, R;
  L = l / m;
  R = r / m;
  if (L == R) {
    for (i = l; i <= r; i++)
      if (a[i] % mini) return 0;
  } else {
    L++;
    R--;
    for (i = L; i <= R; i++)
      if (b[i] % mini != 0) return 0;
    L *= m;
    for (i = l; i < L; i++)
      if (a[i] % mini != 0) return 0;
    R = (R + 1) * m;
    for (i = R; i <= r; i++)
      if (a[i] % mini != 0) return 0;
  }
  return 1;
}
bool ch2(int len) {
  if (len > n) return 0;
  for (int i = 0; i <= n - len; i++)
    if (ch(i, i + len - 1)) return 1;
  return 0;
}
vector<int> rez;
int main() {
  int i, l, r, mid;
  cin >> n;
  m = (int)(sqrt(n + .0));
  for (i = 0; i < n; i++) {
    cin >> a[i];
    if (i % m == 0) {
      b[i / m] = a[i];
      c[i / m] = a[i];
    } else {
      b[i / m] = gcd(a[i], b[i / m]);
      c[i / m] = min(c[i / m], a[i]);
    }
  }
  l = 1;
  r = n;
  while (l < r) {
    mid = (l + r + 1) / 2;
    if (ch2(mid))
      l = mid;
    else
      r = mid - 1;
  }
  for (i = 0; i <= n - l; i++)
    if (ch(i, i + l - 1)) rez.push_back(i + 1);
  cout << rez.size() << " " << l - 1 << endl;
  for (i = 0; i < rez.size(); i++) cout << rez[i] << " ";
  return 0;
}
