#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
const long long INF = 1e9;
inline long long pwr(long long base, long long n, long long m) {
  long long ans = 1;
  while (n > 0) {
    if (n % 2 == 1) ans = (ans * base) % m;
    base = (base * base) % m;
    n /= 2;
  }
  return ans;
}
const int N = 3e5 + 10;
int a[N], l[N], r[N], n;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    l[i] = i;
    int j = i - 1;
    while (j >= 0 && a[j] % a[i] == 0) {
      l[i] = l[j];
      j = l[i] - 1;
    }
  }
  for (int i = n - 1; i >= 0; i--) {
    r[i] = i;
    int j = i + 1;
    while (j < n && a[j] % a[i] == 0) {
      r[i] = r[j];
      j = r[i] + 1;
    }
  }
  int mx = 0;
  for (int i = 0; i < n; i++) mx = max(r[i] - l[i], mx);
  set<int> res;
  for (int i = 0; i < n; i++) {
    if (r[i] - l[i] == mx) res.insert(l[i]);
  }
  cout << res.size() << " " << mx << "\n";
  for (auto i : res) cout << i + 1 << " ";
  return 0;
}
