#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int i, n;
  cin >> n;
  int a[n + 1], l[n + 1], r[n + 1];
  stack<int> s;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    while (!s.empty() and (a[s.top()] % a[i] == 0)) s.pop();
    l[i] = (s.empty()) ? 0 : s.top() + 1;
    s.push(i);
  }
  while (!s.empty()) s.pop();
  for (i = n - 1; i >= 0; i--) {
    while (!s.empty() and (a[s.top()] % a[i] == 0)) s.pop();
    r[i] = (s.empty()) ? n - 1 : s.top() - 1;
    s.push(i);
  }
  while (!s.empty()) s.pop();
  int diff = -1;
  set<int> st;
  for (i = 0; i < n; i++) {
    if (r[i] - l[i] > diff) {
      st.clear();
      diff = r[i] - l[i];
    }
    if (r[i] - l[i] == diff) st.insert(l[i] + 1);
  }
  cout << st.size() << " " << diff << "\n";
  for (auto v : st) cout << v << " ";
  cout << "\n";
}
