#include <bits/stdc++.h>
using namespace std;
const int maxn = 3e5 + 7;
const int minn = -0x3f3f3f;
int arr[maxn];
int main() {
  int n, ans_t = minn, r, l;
  scanf("%d", &n);
  vector<int> ans;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (arr[i] == 1) {
      printf("1 %d\n", n - 1);
      printf("1\n");
      return 0;
    } else {
      for (l = i; l >= 1 && arr[l] % arr[i] == 0; l--)
        ;
      for (r = i; r <= n && arr[r] % arr[i] == 0; r++)
        ;
      int len = (r - 1) - (l + 1);
      if (len > ans_t) {
        ans_t = len;
        ans.clear();
      }
      if (len == ans_t) {
        ans.push_back(l + 1);
      }
      i = r - 1;
    }
  }
  int leng = ans.size();
  printf("%d %d\n", leng, ans_t);
  for (int i = 0; i < leng; i++) {
    if (i == 0) {
      printf("%d", ans[i]);
    } else
      printf(" %d", ans[i]);
  }
  printf("\n");
}
