#include <bits/stdc++.h>
using namespace std;
int const N = 300300;
int n, a[N], nxt[N], pre[N];
bool ok[N];
int main() {
  int pos;
  scanf("%d", &n);
  for (int i = 1; i <= (n); ++i) scanf("%d", &a[i]);
  for (int i = (n); i >= 1; --i) {
    pos = i;
    while (pos + 1 <= n && a[pos + 1] % a[i] == 0) {
      pos = nxt[pos + 1];
    }
    nxt[i] = pos;
  }
  for (int i = 1; i <= (n); ++i) {
    pos = i;
    while (pos - 1 >= 1 && a[pos - 1] % a[i] == 0) {
      pos = pre[pos - 1];
    }
    pre[i] = pos;
  }
  int ret = 0, rec = 0;
  for (int i = 1; i <= (n); ++i) ret = max(ret, nxt[i] - pre[i]);
  for (int i = 1; i <= (n); ++i)
    if (nxt[i] - pre[i] == ret) ok[pre[i]] = 1;
  for (int i = 1; i <= (n); ++i) rec += ok[i];
  printf("%d %d\n", rec, ret);
  for (int i = 1; i <= (n); ++i)
    if (ok[i]) printf("%d ", i);
  puts("");
  return 0;
}
