#include <bits/stdc++.h>
using namespace std;
bool check(long long);
long long gcd(long long, long long);
long long getmin(long long, long long);
long long getgcd(long long, long long);
const long long MAXN = 3e5 + 15, LG = 20;
long long n;
long long a[MAXN];
long long mn[MAXN][LG], GCD[MAXN][LG];
int32_t main() {
  memset(mn, 63, sizeof(mn));
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) mn[i][0] = a[i], GCD[i][0] = a[i];
  for (long long j = 1; j < LG; j++)
    for (long long i = 0; i < n && i + (1 << j) <= n; i++) {
      mn[i][j] = min(mn[i][j - 1], mn[i + (1 << (j - 1))][j - 1]);
      GCD[i][j] = gcd(GCD[i][j - 1], GCD[i + (1 << (j - 1))][j - 1]);
    }
  long long lo = 1, hi = n + 1;
  while (lo + 1 < hi) {
    long long mid = (lo + hi) >> 1;
    if (check(mid))
      lo = mid;
    else
      hi = mid;
  }
  vector<long long> ans;
  for (long long i = 0; i + lo <= n; i++)
    if (getmin(i, lo) == getgcd(i, lo)) ans.push_back(i);
  cout << ans.size() << ' ' << lo - 1 << '\n';
  for (auto u : ans) cout << u + 1 << ' ';
  return cout << '\n', false;
}
long long gcd(long long x, long long y) { return (x ? gcd(y % x, x) : y); }
bool check(long long mid) {
  for (long long i = 0; i + mid <= n; i++) {
    if (getmin(i, mid) == getgcd(i, mid)) return true;
  }
  return false;
}
long long getmin(long long st, long long len) {
  long long c = log2(len);
  return min(mn[st][c], mn[st + len - (1 << c)][c]);
}
long long getgcd(long long st, long long len) {
  long long c = log2(len);
  return gcd(GCD[st][c], GCD[st + len - (1 << c)][c]);
}
