#include <bits/stdc++.h>
using namespace std;
long long n, arr[300010], lft[300010], rgt[300010], mx = 0, cnt = 0;
stack<long long> s1, s2;
set<long long> st;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  for (int i = 0; i < n; i++) lft[i] = -1, rgt[i] = n;
  for (int i = 0; i < n; i++) {
    while (!s1.empty() && (arr[i] % arr[s1.top()])) rgt[s1.top()] = i, s1.pop();
    s1.push(i);
  }
  for (int i = n - 1; i >= 0; i--) {
    while (!s2.empty() && (arr[i] % arr[s2.top()])) lft[s2.top()] = i, s2.pop();
    s2.push(i);
  }
  for (int i = 0; i < n; i++) mx = max(mx, rgt[i] - lft[i] - 2);
  for (int i = 0; i < n; i++)
    if (rgt[i] - lft[i] - 2 == mx) st.insert(lft[i] + 2);
  cout << st.size() << " " << mx << "\n";
  for (auto u : st) cout << u << " ";
  return 0;
}
