#include <bits/stdc++.h>
using namespace std;
const long long inf = 1e9, mod = 1e9 + 7;
long long arr[300005], l[300005], r[300005];
int main() {
  int n, len = 0;
  std::vector<int> v;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  l[1] = 1;
  r[n] = 1;
  for (int i = 1; i <= n; i++) {
    int j = i - 1;
    while (j > 0 and arr[j] % arr[i] == 0) j -= l[j];
    if (j == 0)
      l[i] = i;
    else
      l[i] = i - j;
  }
  for (int i = n - 1; i > 0; i--) {
    int j = i + 1;
    while (j <= n and arr[j] % arr[i] == 0) j += r[j];
    if (j == n + 1)
      r[i] = n - i + 1;
    else
      r[i] = j - i;
  }
  for (int i = 1; i <= n; i++) {
    if (l[i] + r[i] - 1 > len) {
      v.clear();
      len = l[i] + r[i] - 1;
      v.push_back(i - l[i] + 1);
    } else if (l[i] + r[i] - 1 == len) {
      if (v.size() == 0 or (v.size() > 0 and v[v.size() - 1] != i - l[i] + 1))
        v.push_back(i - l[i] + 1);
    }
  }
  cout << v.size() << " " << len - 1 << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  return 0;
}
