#include <bits/stdc++.h>
using namespace std;
int FASTBUFFER;
int n, i, Now, tot, Ans, s, a[500005], succ[500005], nextt[500005];
int main() {
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  succ[1] = 1;
  for (i = 2; i <= n; i++) {
    if (a[i - 1] == a[i])
      succ[i] = succ[i - 1];
    else {
      Now = i - 1;
      while (Now > 0 && a[Now] % a[i] == 0) Now = succ[Now] - 1;
    }
    succ[i] = Now + 1;
  }
  nextt[n] = n;
  for (i = n - 1; i >= 1; i--) {
    if (a[i + 1] == a[i])
      nextt[i] = nextt[i - 1];
    else {
      Now = i + 1;
      while (Now <= n && a[Now] % a[i] == 0) Now = nextt[Now] + 1;
    }
    nextt[i] = Now - 1;
  }
  for (i = 1; i <= n; i++)
    if (nextt[i] - succ[i] > Ans) Ans = nextt[i] - succ[i];
  for (i = 1; i <= n; i++)
    if (nextt[i] - succ[i] == Ans) a[++tot] = succ[i];
  sort(a + 1, a + tot + 1);
  for (i = 1; i <= tot; i++)
    if (a[i] != a[i - 1]) s++;
  printf("%d %d\n", s, Ans);
  for (i = 1; i <= tot; i++)
    if (a[i] != a[i - 1]) printf("%d ", a[i]);
  printf("\n");
  return 0;
}
