#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long double EPS = 1e-9;
long long int pow(long long int x, long long int y) {
  long long int res = 1;
  while (y) {
    if (y & 1) res = (res * x) % mod;
    y = y / 2, x = (x * x) % mod;
  }
  return res % mod;
}
const int N = 300100;
bool vis[N];
int a[N];
int n;
pair<long long int, long long int> dfs(int i) {
  int L, R;
  int f = i, l = i;
  while (f >= 0 && a[f] % a[i] == 0) {
    vis[f] = 1;
    L = f;
    f--;
  }
  while (l < n && a[l] % a[i] == 0) {
    vis[l] = 1;
    R = l;
    l++;
  }
  return make_pair(L, R - L);
}
void solve() {
  cin >> n;
  for (long long int i = 0; i < (n); ++i) cin >> a[i];
  int cnt = count(a, a + n, 1);
  if (cnt > 0) {
    cout << 1 << " " << n - 1 << '\n';
    cout << 1 << '\n';
    return;
  }
  vector<pair<int, int>> task(n);
  for (int i = 0; i < n; i++) {
    task[i] = make_pair(a[i], i);
  }
  sort((task).begin(), (task).end());
  long long int mx_val = 0;
  vector<int> Ls;
  for (int i = 0; i < n; i++) {
    if (!vis[task[i].second]) {
      vis[task[i].second] = 1;
      auto get = dfs(task[i].second);
      if (mx_val < get.second) {
        mx_val = get.second;
        Ls.clear();
        Ls.push_back(get.first);
      } else if (mx_val == get.second) {
        Ls.push_back(get.first);
      }
    }
  }
  cout << Ls.size() << " " << mx_val << '\n';
  sort((Ls).begin(), (Ls).end());
  for (auto l : Ls) {
    cout << l + 1 << " ";
  }
  cout << '\n';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int test_Cases = 1;
  while (test_Cases--) {
    solve();
  }
}
