#include <bits/stdc++.h>
using namespace std;
int le[400000], ri[400000], a[400000], b[400000], vis[400000];
int main() {
  int n, i, t, ans, p, tot;
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  ri[n] = n;
  for (i = n - 1; i >= 1; i--) {
    t = i + 1;
    while (t <= n && a[t] % a[i] == 0) {
      t = ri[t] + 1;
    }
    t--;
    ri[i] = t;
  }
  le[1] = 1;
  for (i = 2; i <= n; i++) {
    t = i - 1;
    while (t >= 1 && a[t] % a[i] == 0) {
      t = le[t] - 1;
    }
    t++;
    le[i] = t;
  }
  ans = -1;
  tot = 0;
  for (i = 1; i <= n; i++) {
    if (ri[i] - le[i] > ans) {
      ans = ri[i] - le[i];
      tot = 1;
      b[tot] = le[i];
    } else if ((ri[i] - le[i]) == ans) {
      tot++;
      b[tot] = le[i];
    }
  }
  for (i = 1; i <= n; i++) vis[i] = 0;
  for (i = 1; i <= tot; i++) vis[b[i]] = 1;
  tot = 0;
  for (i = 1; i <= n; i++)
    if (vis[i] == 1) tot++;
  cout << tot << " " << ans << endl;
  for (i = 1; i <= n; i++)
    if (vis[i] == 1) {
      cout << i;
      tot--;
      if (tot > 0) cout << " ";
    }
  i = 1;
}
