#include <bits/stdc++.h>
using namespace std;
const int N = 300300;
const int K = 21;
int GCD(int x, int y) { return y ? GCD(y, x % y) : x; }
int a[N];
int sp1[N][K];
int sp2[N][K];
map<int, set<int> > Ans;
int main() {
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  for (int i = 1; i <= n; i++) sp1[i][0] = a[i];
  for (int k = 1; k < K; k++)
    for (int i = 1; i + (1 << k) - 1 <= n; i++)
      sp1[i][k] = GCD(sp1[i][k - 1], sp1[i + (1 << (k - 1))][k - 1]);
  reverse(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) sp2[i][0] = a[i];
  for (int k = 1; k < K; k++)
    for (int i = 1; i + (1 << k) - 1 <= n; i++)
      sp2[i][k] = GCD(sp2[i][k - 1], sp2[i + (1 << (k - 1))][k - 1]);
  reverse(sp2 + 1, sp2 + n + 1);
  reverse(a + 1, a + n + 1);
  for (int i = 1; i <= n; i++) {
    int x1 = i;
    for (int k = K - 1; ~k; k--)
      if (x1 + (1 << k) - 1 <= n && sp1[x1][k] % a[i] == 0) x1 += 1 << k;
    int x2 = i;
    for (int k = K - 1; ~k; k--)
      if (x2 - (1 << k) + 1 >= 1 && sp2[x2][k] % a[i] == 0) x2 -= 1 << k;
    Ans[x1 - x2 - 2].insert(x2 + 1);
  }
  cout << Ans.rbegin()->second.size() << " " << Ans.rbegin()->first << endl;
  for (int x : Ans.rbegin()->second) printf("%d ", x);
}
