#include <bits/stdc++.h>
using namespace std;
int n, a[300002], i, l, r, num, rl, ans[300002];
int main() {
  cin >> n;
  for (i = 1; i <= n; ++i) cin >> a[i];
  i = 1;
  while (i <= n) {
    l = i;
    r = i;
    while ((l >= 1) && (a[l] % a[i] == 0)) l--;
    while ((r <= n) && (a[r] % a[i] == 0)) r++;
    l++;
    r--;
    if (rl == r - l) {
      num++;
      ans[num] = l;
      i = r;
    }
    if (rl < r - l) {
      num = 1;
      rl = r - l;
      ans[num] = l;
      i = r;
    }
    i++;
  }
  cout << num << " " << rl << endl;
  for (i = 1; i <= num; ++i) cout << ans[i] << " ";
  cout << endl;
  return 0;
}
