#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 12;
inline int read() {
  int x = 0;
  char c = getchar();
  while (!isdigit(c)) c = getchar();
  while (isdigit(c)) {
    x = (x << 3) + (x << 1) + c - '0';
    c = getchar();
  }
  return x;
}
inline void print(int x) {
  if (x > 9) print(x / 10);
  putchar(x % 10 + '0');
}
int n, a[N], l[N], r[N], maxl, cnt, p[N];
int main() {
  n = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  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 >= 1; 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] > maxl) {
      maxl = r[i] - l[i];
      p[cnt = 1] = l[i];
    } else if (r[i] - l[i] == maxl && p[cnt] != l[i])
      p[++cnt] = l[i];
  print(cnt);
  putchar(' ');
  print(maxl);
  putchar('\n');
  for (int i = 1; i <= cnt; i++) print(p[i]), putchar(' ');
  return 0;
}
