#include <bits/stdc++.h>
using namespace std;
const int maxn = 3 * 100000 + 5;
int a[maxn];
bool vis[maxn];
int ret[maxn];
int pnt[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; i++)
    if (!vis[i]) {
      for (int j = i + 1; j <= n; j++)
        if (a[j] % a[i] == 0)
          vis[j] = 1;
        else {
          i = j - 1;
          break;
        }
    }
  memset(ret, 0, sizeof(ret));
  int ans = 0, cnt = 0;
  for (int i = n; i >= 1; i--)
    if (vis[i])
      cnt++;
    else {
      for (int j = i; j >= 1; j--)
        if (a[j] % a[i] == 0) {
          cnt++;
          if (j == 1) {
            pnt[i] = 1;
            break;
          }
        } else {
          pnt[i] = j + 1;
          break;
        }
      ans = max(ans, cnt - 1);
      ret[i] = cnt - 1;
      cnt = 0;
    }
  int num = 0;
  for (int i = 1; i <= n; i++)
    if (ans == ret[i]) num++;
  printf("%d %d\n", num, ans);
  int p = 0;
  for (int i = 1; i <= n; i++)
    if (ans == ret[i]) printf("%d ", pnt[i]);
  printf("\n");
  return 0;
}
