#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, temp, j, len = 0;
  cin >> n;
  vector<int> arr(n), l(n), r(n), ans;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
    j = i - 1;
    while (j >= 0 && arr[j] % arr[i] == 0) j -= (l[j] + 1);
    l[i] = i - j - 1;
  }
  for (int i = n - 1; i >= 0; --i) {
    j = i + 1;
    while (j < n && arr[j] % arr[i] == 0) j += (r[j] + 1);
    r[i] = j - i - 1;
  }
  for (int i = 0; i < n; ++i) {
    if (l[i] + r[i] > len) {
      ans.clear();
      len = l[i] + r[i];
      ans.push_back(i - l[i]);
    } else if (l[i] + r[i] == len) {
      if (ans.size() == 0)
        ans.push_back(i - l[i]);
      else if (ans[ans.size() - 1] != i - l[i])
        ans.push_back(i - l[i]);
    }
  }
  cout << ans.size() << " " << len << "\n";
  for (int i = 0; i < ans.size(); ++i) cout << ans[i] + 1 << " ";
}
