#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000007;
const int N = 500100;
vector<int> res, re;
int ans = -1, n, a[N], L[N], R[N], id[N], S[N], top;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++) {
    while (top > 0 && S[top] % a[i] == 0) top--;
    L[i] = id[top] + 1;
    S[++top] = a[i];
    id[top] = i;
  }
  top = 0;
  id[0] = n + 1;
  for (int i = n; i > 0; i--) {
    while (top > 0 && S[top] % a[i] == 0) top--;
    R[i] = id[top] - 1;
    S[++top] = a[i];
    id[top] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (ans < R[i] - L[i]) {
      ans = R[i] - L[i];
      res.clear();
      res.push_back(L[i]);
    } else if (ans == R[i] - L[i])
      res.push_back(L[i]);
  }
  sort(res.begin(), res.end());
  for (int i = 0; i < res.size(); i++)
    if (i == 0 || res[i] != res[i - 1]) re.push_back(res[i]);
  cout << re.size() << " " << ans << endl;
  for (int i = 0; i < re.size(); i++) cout << re[i] << " ";
}
