#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, w = 0;
  char ch = getchar();
  while (!isdigit(ch)) w |= ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + ch - '0', ch = getchar();
  return w ? -x : x;
}
int n, lo[1030300], f[20][1030300], a[1030300], ans[1030300], ans1, tot;
int gcd(int a, int b) { return b ? gcd(b, a % b) : a; }
int query(int l, int r) {
  int s = lo[r - l + 1];
  return gcd(f[s][l], f[s][r - (1 << s) + 1]);
}
void w(int x) {
  if (x < 0) putchar('-'), x = -x;
  if (!x) return;
  w(x / 10);
  putchar(x % 10 + 48);
}
void write(int x) {
  if (x == 0) {
    putchar('0');
    return;
  }
  w(x);
}
void writesp(int x) {
  write(x);
  putchar(' ');
}
signed main() {
  n = read();
  lo[0] = -1;
  for (int i = 1; i <= n; ++i) lo[i] = lo[i >> 1] + 1, f[0][i] = a[i] = read();
  for (int j = 1; j <= 19; ++j)
    for (int i = 1; i + (1 << j) - 1 <= n; ++i)
      f[j][i] = gcd(f[j - 1][i], f[j - 1][i + (1 << j - 1)]);
  for (int i = 1; i <= n; ++i) {
    int l = 1, r = i, lto = 1, rto = 1;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (query(i - mid + 1, i) % a[i] == 0)
        l = mid + 1, lto = mid;
      else
        r = mid - 1;
    }
    l = 1, r = n - i + 1;
    while (l <= r) {
      int mid = (l + r) >> 1;
      if (query(i, i + mid - 1) % a[i] == 0)
        l = mid + 1, rto = mid;
      else
        r = mid - 1;
    }
    if (lto + rto - 1 == ans1) ans[++tot] = i - lto + 1;
    if (lto + rto - 1 > ans1) {
      ans1 = lto + rto - 1;
      tot = 1;
      ans[1] = i - lto + 1;
    }
  }
  sort(ans + 1, ans + 1 + tot);
  tot = unique(ans + 1, ans + 1 + tot) - ans - 1;
  writesp(tot);
  write(ans1 - 1);
  putchar('\n');
  for (int i = 1; i <= tot; ++i) writesp(ans[i]);
  return 0;
}
