#include <bits/stdc++.h>
using namespace std;
int a[300001], lans[300001];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  int ans = 0;
  lans[0] = 0;
  for (int i = 0; i < n;) {
    int j = i - 1, k = i + 1;
    while (j >= 0 && a[j] % a[i] == 0) j--;
    while (k < n && a[k] % a[i] == 0) k++;
    if (k - j - 2 > ans) {
      ans = k - j - 2;
      lans[0] = 1;
      lans[1] = j + 1;
    } else if (k - j - 2 == ans)
      lans[++lans[0]] = j + 1;
    i = k;
  }
  cout << lans[0] << ' ' << ans << endl;
  for (int i = 1; i <= lans[0]; i++) cout << lans[i] + 1 << ' ';
  cout << endl;
  return 0;
}
