#include <bits/stdc++.h>
using namespace std;
const int MN = 3e5 + 5;
int n, a[MN], ans, lt[MN], cnt;
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; i++) scanf("%d", a + i);
  for (register int i = 1; i <= n; i++) {
    if (a[i] == 1) return 0 * printf("1 %d\n1\n", n - 1);
    register int p1 = i, p2 = i;
    while (p1 > 1 && a[p1 - 1] % a[i] == 0) p1--;
    while (p2 < n && a[p2 + 1] % a[i] == 0) p2++;
    if (p2 - p1 > ans)
      ans = p2 - p1, lt[cnt = 1] = p1;
    else if (p2 - p1 == ans)
      lt[++cnt] = p1;
    i = p2;
  }
  printf("%d %d\n", cnt, ans);
  for (register int i = 1; i <= cnt; i++) printf("%d ", lt[i]);
  return 0;
}
