//To debug :  g++ -g file.cpp -o code
//to flush output : fflush(stdout) or cout.flush()
//cout<<setprecision(p)<<fixed<<var
//use 1LL<<i to for 64 bit shifting , (ll)2 because by default 2 is ll

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,a,n) for(i=a;i<n;++i)
#define irep(i,n,a) for(i=n;i>a;--i)
#define mod 1000000007
#define pb push_back
#define big 9223372036854775807
#define big1 LONG_MAX
#define big2 ll_MAX
#define big3 1000000000
#define sma1 LONG_MIN
#define sma2 ll_MIN
#define sma3 -1000000000
#define mp make_pair
#define dub double
#define ivec vector<ll>
#define lvec vector<long long>
#define cvec vector<char>
#define svec vector<string>
#define mt make_tuple
#define MOD 998244353
#define ld long double
#define pi acos(-1.0)

#define SZ(x)  (ll)(x.size())

//comment the below if not required

/*
#define ss second.second
#define ff first.first
#define f first
#define s second
#define sf second.first
#define fs first.second
*/

#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

const ll N = 3e5+1;

const ll K = log2((ld)3e5)+1 ;

ll a[N],i,n,lg[N],k,dp[K][N],j,v,l,h,m,f,mar[N],res;

pair<ll,ll> p[N];

vector<ll> ans;

bool sort11(pair<ll,ll> &a ,pair<ll,ll> &b)
{

    return ((a.second-a.first) > (b.second-b.first));

}

int main()
{
    IOS;

    cin>>n;

    rep(i,1,n+1)
        cin>>a[i];

    for(i=1;i<=n;++i)
        lg[i] = log2((ld)i);

    k = log2((ld)n);

    for(j=1;j<=n;++j)
        dp[0][j] = a[j];

    for(i=1;i<=k;++i)
    {

        for(j=1;j<=n;++j)
        {
            v = 1<<i;

            v = j+v-1;

            if(v>n)
                break;

            v = j + 1<<(i-1) ;

            dp[i][j] = __gcd(dp[i-1][j],dp[i-1][v]);

        }

    }

    for(i=1;i<=n;++i)
    {
        //find maximum left and maximum right

        l = 1 , h = i;

        while(l<h)
        {
            m = (l+h)/2;

            //find gcd from m till h

            v = lg[h-m+1];

            v = __gcd(dp[v][m] , dp[v][h-(1<<v)+1]);

            if(a[i]==v)
            {
                h = m;
            }
            else
            {
                l = m+1;
            }

        }

        p[i].first = h;

        l = i , h = n;

        while(l<h)
        {
            m = (l+h)/2;

            if((l+1)==h)
            {
                m = h;
                f=1;
            }
            //find gcd from l till m

            v = lg[m-l+1];

            v = __gcd(dp[v][l] , dp[v][m-(1<<v)]);

            if(a[i]==v)
            {
                l = m;
            }
            else
            {
                h = m-1;
            }

        }

        p[i].second = l;

    }

    sort(p+1,p+1+n,sort11);

    res = p[1].second-p[1].first;

    ans.pb(p[1].first);

    mar[p[1].first]=1;

    for(i=2;i<=n;++i)
    {
        if((p[i].second-p[i].first) != (p[1].second-p[1].first))
            break;

        if(!mar[p[i].first])
        {
            mar[p[i].first]=1;

            ans.pb(p[i].first);

        }

    }

    cout<<SZ(ans)<<" "<<res<<"\n";

    for(auto u : ans)
            cout<<u<<" ";

    return 0;
}


//To debug :  g++ -g file.cpp -o code
//to flush output : fflush(stdout) or cout.flush()
//cout<<setprecision(p)<<fixed<<var
//use 1LL<<i to for 64 bit shifting , (ll)2 because by default 2 is ll

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define rep(i,a,n) for(i=a;i<n;++i)
#define irep(i,n,a) for(i=n;i>a;--i)
#define mod 1000000007
#define pb push_back
#define big 9223372036854775807
#define big1 LONG_MAX
#define big2 ll_MAX
#define big3 1000000000
#define sma1 LONG_MIN
#define sma2 ll_MIN
#define sma3 -1000000000
#define mp make_pair
#define dub double
#define ivec vector<ll>
#define lvec vector<long long>
#define cvec vector<char>
#define svec vector<string>
#define mt make_tuple
#define MOD 998244353
#define ld long double
#define pi acos(-1.0)

#define SZ(x)  (ll)(x.size())

//comment the below if not required

/*
#define ss second.second
#define ff first.first
#define f first
#define s second
#define sf second.first
#define fs first.second
*/

#define IOS std::ios::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)

const ll N = 3e5+1;

const ll K = log2(3e5)+1 ;

ll a[N],i,n,lg[N],k,dp[K][N],j,v,l,h,m,f,mar[N],res;

pair<ll,ll> p[N];

vector<ll> ans;

bool sort11(pair<ll,ll> &a ,pair<ll,ll> &b)
{

    return (a.second-a.first > b.second-b.first);

}

int main()
{
    IOS;

    cin>>n;

    rep(i,1,n+1)
        cin>>a[i];

    for(i=1;i<=n;++i)
        lg[i] = log2(i);

    k = log2(n);

    for(j=1;j<=n;++j)
        dp[0][j] = a[j];

    for(i=1;i<=k;++i)
    {

        for(j=1;j<=n;++j)
        {
            v = 1<<i;

            v = i+v-1;

            if(v>n)
                break;

            v = j + 1<<(i-1) ;

            dp[i][j] = __gcd(dp[i-1][j],dp[i-1][v]);

        }

    }

    for(i=1;i<=n;++i)
    {
        //find maximum left and maximum right

        l = 1 , h = i;

        while(l<h)
        {
            m = (l+h)/2;

            //find gcd from m till h

            v = lg[h-m+1];

            v = __gcd(dp[v][m] , dp[v][h-(1<<v)+1]);

            if(a[i]==v)
            {
                h = m;
            }
            else
            {
                l = m+1;
            }

        }

        p[i].first = h;

        l = i , h = n;

        while(l<h)
        {
            m = (l+h)/2;

            if((l+1)==h)
            {
                m = h;
                f=1;
            }
            //find gcd from l till m

            v = lg[m-l+1];

            v = __gcd(dp[v][l] , dp[v][m-(1<<v)]);

            if(a[i]==v)
            {
                l = m;
            }
            else
            {
                h = m-1;
            }

        }

        p[i].second = l;

    }

    sort(p+1,p+1+n,sort11);

    res = p[1].second-p[1].first;

    ans.pb(p[1].first);

    mar[p[1].first]=1;

    for(i=2;i<=n;++i)
    {
        if((p[i].second-p[i].first) != (p[1].second-p[1].first))
            break;

        if(!mar[p[i].first])
        {
            mar[p[i].first]=1;

            ans.pb(p[i].first);

        }

    }

    cout<<SZ(ans)<<" "<<res<<"\n";

    for(auto u : ans)
            cout<<u<<" ";

    return 0;
}


//created: 19:15:08 10/02/2020
#include <bits/stdc++.h>

using namespace std;

template<typename T>
class SparseTable {
public:
  typedef function<T(const T& a, const T& b)> U;
  SparseTable() { _lg = nullptr; a = nullptr; }
  SparseTable(const int& _n, const U& u) : n(_n), k(int(log2(n)) + 1) {
    a = new T*[n];
    for (int i =  0; i < n; ++i)
      a[i] = new T[k + 1];
    _lg = new int[n + 1];
    _lg[1] = 0;
    for (int i = 2; i <= n; ++i)
      _lg[i] = _lg[i / 2] + 1;
    unite = u;
  }
  void build(const vector<T>& f) {
    assert(n == int(f.size()));
    for (int i = 0; i < n; ++i)
      a[i][0] = f[i];
    for (int j = 1; j <= k; ++j)
      for (int i = 0; i + (1 << j) <= n; ++i) {
        a[i][j] = unite(a[i][j - 1], a[i + (1 << (j - 1))][j - 1]);
      }
  }
  T query(int l, int r, bool overlap = true) {
    T ans;
    bool first = true;
    if (overlap) {
      first = false;
      int j = _lg[r - l + 1];
      ans = unite(a[l][j], a[r - (1 << j) + 1][j]);
    }
    else {
      for (int j = k; j >= 0; --j) {
        if ((1 << j) <= r - l + 1) {
          if (first) ans = a[l][j];
          else ans = unite(ans, a[l][j]);
          first = false;
          l += (1 << j);
        }
      }
      assert(first == false);
    }
    return ans;
  }
  ~SparseTable() { }
private:
  int n, k, *_lg;
  T** a;
  U unite;
};

typedef pair<int, int> ii;
ii unite(const ii& a, const ii& b) {
  return ii(min(a.first, b.first), __gcd(a.second, b.second));
}

mt19937 mt_rand(chrono::steady_clock::now().time_since_epoch().count());

SparseTable<ii> st;
vector<ii> a;
int n;

bool check(int w, vector<int> &ans) {
  bool first = true;
  for (int i = 0; i < n - w; ++i) {
    ii q = st.query(i, i + w);
    if (q.first == q.second) {
      if (first) ans.clear();
      first = false;
      ans.push_back(i);
    }
  }
  return first == false;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  a = vector<ii>(n);
  for (ii &x : a) {
    cin >> x.first;
    x.second = x.first;
  }
  st = SparseTable<ii>(n, unite);
  st.build(a);
  int ll = 0, rr = n - 1, len = 0;
  vector<int> ans;
  while (ll <= rr) {
    int mid = (ll + rr) / 2;
    if (check(mid, ans)) {
      len = mid;
      ll = mid + 1;
    }
    else rr = mid - 1;
  }
  cout << ans.size() << ' ' << len << '\n';
  for (int v : ans)
    cout << v + 1 << ' ';
  return 0;
}


//created: 11:23:54 11/02/2020
#include <bits/stdc++.h>

using namespace std;

const int N = 3e5 + 5;
int n, a[N];
int l[N], r[N], d[N], top;

void build() {
  top = 0;
  d[0] = 0;
  for (int i = 1; i <= n; ++i) {
    while (top && a[d[top]] % a[i] == 0) --top;
    l[i] = d[top] + 1;
    d[++top] = i;
  }
  top = 0;
  d[0] = n + 1;
  for (int i = n; i >= 1; --i) {
    while (top && a[d[top]] % a[i] == 0) --top;
    r[i] = d[top] - 1;
    d[++top] = i;
  }
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; ++i)
    cin >> a[i];
  build();
  vector<int> ans;
  int len = 0;
  for (int i = 1; i <= n; ++i) {
    if (r[i] - l[i] > len) len = r[i] - l[i], ans.clear();
    if (r[i] - l[i] == len) ans.push_back(l[i]);
  }
  cout << ans.size() << ' ' << len << '\n';
  for (int v : ans)
    cout << v << ' ';
  return 0;
}


//created: 19:15:08 10/02/2020
#include <bits/stdc++.h>

using namespace std;

template<typename T>
class SparseTable {
public:
  typedef function<T(const T& a, const T& b)> U;
  SparseTable() { _lg = nullptr; a = nullptr; }
  SparseTable(const int& _n, const U& u) : n(_n), k(int(log2(n)) + 1) {
    a = new T*[n];
    for (int i =  0; i < n; ++i)
      a[i] = new T[k + 1];
    _lg = new int[n + 1];
    _lg[1] = 0;
    for (int i = 2; i <= n; ++i)
      _lg[i] = _lg[i / 2] + 1;
    unite = u;
  }
  void build(const vector<T>& f) {
    assert(n == int(f.size()));
    for (int i = 0; i < n; ++i)
      a[i][0] = f[i];
    for (int j = 1; j <= k; ++j)
      for (int i = 0; i + (1 << j) <= n; ++i) {
        a[i][j] = unite(a[i][j - 1], a[i + (1 << (j - 1))][j - 1]);
      }
  }
  T query(int l, int r, bool overlap = true) {
    T ans;
    bool first = true;
    if (overlap) {
      first = false;
      int j = _lg[r - l + 1];
      ans = unite(a[l][j], a[r - (1 << j) + 1][j]);
    }
    else {
      for (int j = k; j >= 0; --j) {
        if ((1 << j) <= r - l + 1) {
          if (first) ans = a[l][j];
          else ans = unite(ans, a[l][j]);
          first = false;
          l += (1 << j);
        }
      }
      assert(first == false);
    }
    return ans;
  }
  ~SparseTable() {
    delete[] _lg;
    for (int i = 0; i < n; ++i) delete[] a[i];
    delete[] a;
  }
private:
  int n, k, *_lg;
  T** a;
  U unite;
};

typedef pair<int, int> ii;
ii unite(const ii& a, const ii& b) {
  return ii(min(a.first, b.first), __gcd(a.second, b.second));
}

mt19937 mt_rand(chrono::steady_clock::now().time_since_epoch().count());

SparseTable<ii> *st;
vector<ii> a;
int n;

bool check(int w, vector<int> &ans) {
  bool first = true;
  for (int i = 0; i < n - w; ++i) {
    ii q = st->query(i, i + w, false);
    if (q.first == q.second) {
      if (first) ans.clear();
      first = false;
      ans.push_back(i);
    }
  }
  return first == false;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  a = vector<ii>(n);
  for (ii &x : a) {
    cin >> x.first;
    x.second = x.first;
  }
  st = new SparseTable<ii>(n, unite);
  st->build(a);
  int ll = 0, rr = n - 1, len = 0;
  vector<int> ans;
  while (ll <= rr) {
    int mid = (ll + rr) / 2;
    if (check(mid, ans)) {
      len = mid;
      ll = mid + 1;
    }
    else rr = mid - 1;
  }
  cout << ans.size() << ' ' << len << '\n';
  for (int v : ans)
    cout << v + 1 << ' ';
  return 0;
}


//created: 19:15:08 10/02/2020
#include <bits/stdc++.h>

using namespace std;

template<typename T>
class SparseTable {
public:
  using U = function<T(const T& a, const T& b)>;
  SparseTable() { _lg = nullptr; a = nullptr; }
  SparseTable(const int& _n, const U& u) : n(_n), k(int(log2(n)) + 1) {
    a = new T*[n];
    for (int i =  0; i < n; ++i)
      a[i] = new T[k + 1];
    _lg = new int[n + 1];
    _lg[1] = 0;
    for (int i = 2; i <= n; ++i)
      _lg[i] = _lg[i / 2] + 1;
    unite = u;
  }
  void build(const vector<T>& f) {
    assert(n == int(f.size()));
    for (int i = 0; i < n; ++i)
      a[i][0] = f[i];
    for (int j = 1; j <= k; ++j)
      for (int i = 0; i + (1 << j) <= n; ++i) {
        a[i][j] = unite(a[i][j - 1], a[i + (1 << (j - 1))][j - 1]);
      }
  }
  T query(int l, int r, bool overlap = true) {
    T ans;
    bool first = true;
    if (overlap) {
      first = false;
      int j = _lg[r - l + 1];
      ans = unite(a[l][j], a[r - (1 << j) + 1][j]);
    }
    else {
      for (int j = k; j >= 0; --j) {
        if ((1 << j) <= r - l + 1) {
          if (first) ans = a[l][j];
          else ans = unite(ans, a[l][j]);
          first = false;
          l += (1 << j);
        }
      }
      assert(first == false);
    }
    return ans;
  }
  ~SparseTable() { }
private:
  int n, k, *_lg;
  T** a;
  U unite;
};

using ii = pair<int, int>;
ii unite(const ii& a, const ii& b) {
  return ii(min(a.first, b.first), __gcd(a.second, b.second));
}

mt19937 mt_rand(chrono::steady_clock::now().time_since_epoch().count());

SparseTable<ii> st;
vector<ii> a;
int n;

bool check(int w, vector<int> &ans) {
  bool first = true;
  for (int i = 0; i < n - w; ++i) {
    ii q = st.query(i, i + w);
    if (q.first == q.second) {
      if (first) ans.clear();
      first = false;
      ans.push_back(i);
    }
  }
  return first == false;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  a = vector<ii>(n);
  for (ii &x : a) {
    cin >> x.first;
    x.second = x.first;
  }
  st = SparseTable<ii>(n, unite);
  st.build(a);
  int ll = 0, rr = n - 1, len = 0;
  vector<int> ans;
  while (ll <= rr) {
    int mid = (ll + rr) / 2;
    if (check(mid, ans)) {
      len = mid;
      ll = mid + 1;
    }
    else rr = mid - 1;
  }
  cout << ans.size() << ' ' << len << '\n';
  for (int v : ans)
    cout << v + 1 << ' ';
  return 0;
}


//created: 11:23:54 11/02/2020
#include <bits/stdc++.h>

using namespace std;

const int N = 3e5 + 5;
int n, a[N];
int l[N], r[N], d[N], top;

void build() {
  top = 0;
  d[0] = 0;
  for (int i = 1; i <= n; ++i) {
    while (top && a[d[top]] % a[i] == 0) --top;
    l[i] = d[top] + 1;
    d[++top] = i;
  }
  top = 0;
  d[0] = n + 1;
  for (int i = n; i >= 1; --i) {
    while (top && a[d[top]] % a[i] == 0) --top;
    r[i] = d[top] - 1;
    d[++top] = i;
  }
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; ++i)
    cin >> a[i];
  build();
  vector<int> ans;
  int len = 0;
  for (int i = 1; i <= n; ++i) {
    if (r[i] - l[i] > len) len = r[i] - l[i], ans.clear();
    if (r[i] - l[i] == len) ans.push_back(i);
  }
  cout << ans.size() << ' ' << len << '\n';
  for (int v : ans)
    cout << v << ' ';
  return 0;
}


//created: 19:15:08 10/02/2020
#include <bits/stdc++.h>

using namespace std;

template<typename T>
class SparseTable {
public:
  typedef function<T(const T& a, const T& b)> U;
  SparseTable() { _lg = nullptr; a = nullptr; }
  SparseTable(const int& _n, const U& u) : n(_n), k(int(log2(n)) + 1) {
    a = new T*[n];
    for (int i =  0; i < n; ++i)
      a[i] = new T[k + 1];
    _lg = new int[n + 1];
    _lg[1] = 0;
    for (int i = 2; i <= n; ++i)
      _lg[i] = _lg[i / 2] + 1;
    unite = u;
  }
  void build(const vector<T>& f) {
    assert(n == int(f.size()));
    for (int i = 0; i < n; ++i)
      a[i][0] = f[i];
    for (int j = 1; j <= k; ++j)
      for (int i = 0; i + (1 << j) <= n; ++i) {
        a[i][j] = unite(a[i][j - 1], a[i + (1 << (j - 1))][j - 1]);
      }
  }
  T query(int l, int r, bool overlap = true) {
    T ans;
    bool first = true;
    if (overlap) {
      first = false;
      int j = _lg[r - l + 1];
      ans = unite(a[l][j], a[r - (1 << j) + 1][j]);
    }
    else {
      for (int j = k; j >= 0; --j) {
        if ((1 << j) <= r - l + 1) {
          if (first) ans = a[l][j];
          else ans = unite(ans, a[l][j]);
          first = false;
          l += (1 << j);
        }
      }
      assert(first == false);
    }
    return ans;
  }
  ~SparseTable() {
    delete[] _lg;
    for (int i = 0; i < n; ++i) delete[] a[i];
    delete[] a;
  }
private:
  int n, k, *_lg;
  T** a;
  U unite;
};

typedef pair<int, int> ii;
ii unite(const ii& a, const ii& b) {
  return ii(min(a.first, b.first), __gcd(a.second, b.second));
}

mt19937 mt_rand(chrono::steady_clock::now().time_since_epoch().count());

SparseTable<ii> *st;
vector<ii> a;
int n;

bool check(int w, vector<int> &ans) {
  bool first = true;
  for (int i = 0; i < n - w; ++i) {
    ii q = st->query(i, i + w);
    if (q.first == q.second) {
      if (first) ans.clear();
      first = false;
      ans.push_back(i);
    }
  }
  return first == false;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  a = vector<ii>(n);
  for (ii &x : a) {
    cin >> x.first;
    x.second = x.first;
  }
  st = new SparseTable<ii>(n, unite);
  st->build(a);
  int ll = 0, rr = n - 1, len = 0;
  vector<int> ans;
  while (ll <= rr) {
    int mid = (ll + rr) / 2;
    if (check(mid, ans)) {
      len = mid;
      ll = mid + 1;
    }
    else rr = mid - 1;
  }
  cout << ans.size() << ' ' << len << '\n';
  for (int v : ans)
    cout << v + 1 << ' ';
  return 0;
}


//created: 11:23:54 11/02/2020
#include <bits/stdc++.h>

using namespace std;

const int N = 3e5 + 5;
int n, a[N];
int l[N], r[N], d[N], top;

void build() {
  top = 0;
  d[0] = 0;
  for (int i = 1; i <= n; ++i) {
    while (top && a[d[top]] % a[i] == 0) --top;
    l[i] = d[top] + 1;
    d[++top] = i;
  }
  top = 0;
  d[0] = n + 1;
  for (int i = n; i >= 1; --i) {
    while (top && a[d[top]] % a[i] == 0) --top;
    r[i] = d[top] - 1;
    d[++top] = i;
  }
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin >> n;
  for (int i = 1; i <= n; ++i)
    cin >> a[i];
  build();
  set<int> ans;
  int len = 0;
  for (int i = 1; i <= n; ++i) {
    if (r[i] - l[i] > len) len = r[i] - l[i], ans.clear();
    if (r[i] - l[i] == len) ans.insert(l[i]);
  }
  cout << ans.size() << ' ' << len << '\n';
  for (int v : ans)
    cout << v << ' ';
  return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
vi v(N);
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83617) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    if(v[0] == 832421){
        watch(arr[83617][0]);
        watch(v[83617]);
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
        if((r-l) == 83620){
            watch(i);
        }
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

int main()
{
    int i = 0, j = 0, cs = 0, in;
    int n; cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    vii ans;
    int curr = -1, MX = 0;
    for(i = 0; i < n; i++){
        if(i <= curr) continue;
        int l = i, r = i;
        while(l > 0 && v[l-1] % v[i] == 0) l--;
        while(r < n - 1 && v[r+1] % v[i] == 0) r++;
        ans.pb({r-l, l});
        curr = r;
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < ans.size(); i++) if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    sort(all(para));
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
vi v(N);
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83617) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    if(v[0] == 832421){
        watch(arr[83616][0]);
        watch(arr[83617][0]);
        watch(arr[83618][0]);
        watch(v[83616]);
        watch(v[83617]);
        watch(v[83618]);
    }
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    if(v[0] == 832421){
        watch(arr[83616][0]);
        watch(arr[83617][0]);
        watch(arr[83618][0]);
        watch(v[83616]);
        watch(v[83617]);
        watch(v[83618]);
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
        if((r-l) == 83620){
            watch(i);
        }
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83618) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    if(v[0] == 832421){
        cout << lol+1 << endl;
        watch(v[lol]);
        int k = (int)log2(lol+1);
        watch(__gcd(arr[0][k], arr[lol - (1<<k) + 1][k]));
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][25];
vi v(N);
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            int x = arr[i][j-1], y = arr[i+(1<<(j-1))][j-1];
            arr[i][j] = __gcd(x,y);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(vr == 83618){
            watch(mid);
            watch(gcd);
            watch(val);
        }
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    if(v[0] == 832421){
        cout << lol+1 << endl;
        watch(v[lol]);
        int k = (int)log2(lol+1);
        watch(__gcd(arr[0][k], arr[lol - (1<<k) + 1][k]));
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83618) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
        if((r-l) == 83620){
            cout << i << endl;
        }
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    if(v[0] == 832421){
        watch(MX);
        cout << lol+1 << endl;
        watch(v[lol]);
        int k = (int)log2(lol+1);
        watch(__gcd(arr[0][k], arr[lol - (1<<k) + 1][k]));
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83618) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        if(i == 83618){
            watch(l);
            watch(r);
        }
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    if(v[0] == 832421){
        watch(MX);
        cout << lol+1 << endl;
        watch(v[lol]);
        int k = (int)log2(lol+1);
        watch(__gcd(arr[0][k], arr[lol - (1<<k) + 1][k]));
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    if(v[0] == 832421) cout << lol+1 << endl;
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
vi v(N);
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83617) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    if(v[0] == 832421){
        watch(arr[83616][0]);
        watch(arr[83617][0]);
        watch(arr[83618][0]);
        watch(v[83616]);
        watch(v[83617]);
        watch(v[83618]);
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
        if((r-l) == 83620){
            watch(i);
        }
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    if(v[0] == 832421){
        cout << lol+1 << endl;
        watch(v[lol]);
        int k = (int)log2(lol+1);
        watch(__gcd(arr[0][k], arr[lol - (1<<k) + 1][k]));
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    if(v[0] == 832421) cout << i+1 << endl;
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = log(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = log(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
vi v(N);
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        if(v[0] == 832421){
            watch(j);
            watch(arr[83617][0]);
        }
        for(i = 0; i + (1<<j) - 1 < n; i++){
            int x = arr[i][j-1], y = arr[i+(1<<(j-1))][j-1];
            arr[i][j] = __gcd(x,y);
            if(j==0) fu;
        }
    }
    if(v[0] == 832421){
        watch(arr[83616][0]);
        watch(arr[83617][0]);
        watch(arr[83618][0]);
        watch(v[83616]);
        watch(v[83617]);
        watch(v[83618]);
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83617) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
        if((r-l) == 83620){
            watch(i);
        }
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    if(v[0] == 832421){
        cout << lol+1 << endl;
        watch(v[lol]);
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83617) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    if(v[0] == 832421){
        watch(arr[83617][0]);
        watch(v[83617]);
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
        if((r-l) == 83620){
            watch(i);
        }
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    if(v[0] == 832421){
        cout << lol+1 << endl;
        watch(v[lol]);
        int k = (int)log2(lol+1);
        watch(__gcd(arr[0][k], arr[lol - (1<<k) + 1][k]));
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(vr == 83617) watch(mid);
        if(vr == 83617 && mid == vr){
            watch(gcd);
            watch(k);
            watch(arr[mid][k]);
            watch(arr[ vr - (1<<k) + 1 ][k]);
        }
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83617) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
        if((r-l) == 83620){
            watch(i);
        }
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int M = ceil(log(100));
int arr[M];

int main()
{
    int i = 0, j = 0, cs = 0, in;
    watch(M);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(vr == 83617) watch(mid);
        if(vr == 83617 && mid == vr) watch(gcd);
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83617) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
        if((r-l) == 83620){
            watch(i);
        }
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
vi v(N);
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        if(v[0] == 832421) watch(j);
        for(i = 0; i + (1<<j) - 1 < n; i++){
            int x = arr[i][j-1], y = arr[i+(1<<(j-1))][j-1];
            arr[i][j] = __gcd(x,y);
            if(j==0) fu;
        }
    }
    if(v[0] == 832421){
        watch(arr[83616][0]);
        watch(arr[83617][0]);
        watch(arr[83618][0]);
        watch(v[83616]);
        watch(v[83617]);
        watch(v[83618]);
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
vi tree(4*N);
int n;
vi v(N);

void build(int node, int l, int r){
    if(l == r){
        tree[node] = v[l];
        return;
    }
    int mid = l + r >> 1;
    build(node*2, l, mid);
    build(node*2+1, mid+1, r);
    tree[node] = __gcd(tree[node*2], tree[node*2+1]);
}

int gcd(int node, int l, int r, int x, int y){
    if(x > r || y < l) return 0;
    if(l == x && r == y){
        return tree[node];
    }
    int mid = l + r >> 1;
    return __gcd(gcd(node*2, l, mid, x, min(mid,y)), gcd(node*2+1,mid+1,r,max(x,mid+1), y));
}

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int g = gcd(1, 0, n-1, mid, vr);
        if(g == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int g = gcd(1, 0, n-1, vl,mid);
        if(g == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    int i = 0, j = 0, cs = 0, in;
    speed;
    cin>>n;
    for(i = 0; i < n; i++) cin>>v[i];
    build(1, 0, n-1);
    vii ans;
    int MX = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i, v[i]);
        int r = rightbs(i, v[i]);
        ans.pb({r-l,l});
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
vi v(N);
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83617) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    if(v[0] == 832421){
        watch(arr[0][0]);
        watch(arr[83617][0]);
        watch(v[83617]);
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
        if((r-l) == 83620){
            watch(i);
        }
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
vi tree(4*N);
int n;
vi v(N);

void build(int node, int l, int r){
    if(l == r){
        tree[node] = v[l];
        return;
    }
    int mid = l + r >> 1;
    build(node*2, l, mid);
    build(node*2+1, mid+1, r);
    tree[node] = __gcd(tree[node*2], tree[node*2+1]);
}

int gcd(int node, int l, int r, int x, int y){
    if(x > r || y < l) return 0;
    if(l == x && r == y){
        return tree[node];
    }
    int mid = l + r >> 1;
    return __gcd(gcd(node*2, l, mid, x, min(mid,y)), gcd(node*2+1,mid+1,r,max(x,mid+1), y));
}

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int g = gcd(1, 0, n-1, mid, vr);
        if(g == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int g = gcd(1, 0, n-1, vl,mid);
        if(g == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    int i = 0, j = 0, cs = 0, in;
    speed;
    cin>>n;
    for(i = 0; i < n; i++) cin>>v[i];
    build(1, 0, n-1);
    vii ans;
    int MX = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i, v[i]);
        int r = rightbs(i, v[i]);
        ans.pb({r-l,l});
        MX = max(MX, r-l);
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83618) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    vi v(n);
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            arr[i][j] = __gcd(arr[i][j-1], arr[i+(1<<(j-1))][j-1]);
        }
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        if(i == 83618){
            watch(l);
            watch(r);
        }
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
    }
    watch(MX);
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    if(v[0] == 832421){
        cout << lol+1 << endl;
        watch(v[lol]);
        int k = (int)log2(lol+1);
        watch(__gcd(arr[0][k], arr[lol - (1<<k) + 1][k]));
    }
    return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
typedef vector<ll> vll;

#define PI (2*acos(0.0))
#define eps 1e-9
#define pb push_back
#define endl "\n"
#define watch(x) cout << (#x) << " is " << (x) << endl;
#define show(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi] << " "; cout << endl;
#define showpair(v) for(int fi = 0; fi < v.size(); fi++) cout << v[fi].first << " " << v[fi].second << endl;
#define ff first
#define ss second
#define fu cout << "lol" << endl;
#define precision(n) cout << fixed << setprecision(n);
#define lb lower_bound
#define up upper_bound
#define vscan for(i = 0;i<n;i++){cin>>in; v.pb(in);}
#define all(a) a.begin(), a.end()
#define min3(a,b,c) min(a,min(b,c))
#define max3(a,b,c) max(a,max(b,c))
#define mem(a,val) memset(a,val,sizeof(a))
#define loop(i,n) for(i = 0; i < n; i++)
#define TC() ull T; cin>>T; while(T--)
#define IN(x) {scanf("%d",&x);}
#define LL(x) {scanf("%lld",&x);}
#define CC(x) {scanf("%c",&x);}
#define pfl(x) printf("%d\n",x)
#define pfll(x) printf("%lld\n",x)
#define newl puts("")
#define space printf(" ")
#define MOD 1000000007
#define speed ios_base::sync_with_stdio(false); cin.tie(NULL);

const int N = 4e5;
int arr[N][14];
vi v(N);
int n;

int leftbs(int vr, int val){
    int l = 0, r = vr;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(vr-mid+1);
        int gcd = __gcd( arr[mid][k], arr[vr - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            r = mid-1;
        }
        else l = mid+1;
    }
    if(vr == 83617) watch(ret);
    return ret;
}

int rightbs(int vl, int val){
    int l = vl, r = n-1;
    int ret = -1;
    while(l <= r){
        int mid = l + r >> 1;
        int k = (int)log2(mid - vl + 1);
        int gcd = __gcd( arr[vl][k], arr[mid - (1<<k) + 1][k] );
        if(gcd == val){
            ret = mid;
            l = mid+1;
        }
        else r = mid-1;
    }
    return ret;
}

int main()
{
    speed;
    int i = 0, j = 0, cs = 0, in;
    cin>>n;
    for(i = 0; i < n; i++) cin>>v[i];
    for(i = 0; i < n; i++) arr[i][0] = v[i];
    for(j = 1; (1<<j) <= n; j++){
        for(i = 0; i + (1<<j) - 1 < n; i++){
            int x = arr[i][j-1], y = arr[i+(1<<(j-1))][j-1];
            arr[i][j] = __gcd(x,y);
            if(j==0) fu;
        }
    }
    if(v[0] == 832421){
        watch(arr[83616][0]);
        watch(arr[83617][0]);
        watch(arr[83618][0]);
        watch(v[83616]);
        watch(v[83617]);
        watch(v[83618]);
    }
    int MX = 0;
    vii ans;
    int lol = 0;
    for(i = 0; i < n; i++){
        int l = leftbs(i,v[i]);
        int r = rightbs(i,v[i]);
        ans.pb({r-l, l});
        if(r-l > MX) lol = i;
        MX = max(MX, r-l);
        if((r-l) == 83620){
            watch(i);
        }
    }
    vi para;
    for(i = 0; i < n; i++){
        if(ans[i].ff == MX) para.pb(ans[i].ss+1);
    }
    sort(all(para));
    para.erase(unique(all(para)), para.end());
    cout << para.size() << " " << MX << endl;
    show(para);
    return 0;
}


// J

#define _CRT_SECURE_NO_DEPRECATE
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cassert>
using namespace std;

const int MAXN = 100;

int a[MAXN + 1][MAXN + 1];

int bad1[] = {1, 1, 2, 2, 3};
int bad2[] = {2, 3, 2, 1, 1};

int main()
{
	int n, m;
	scanf ("%d %d", &n, &m);
	assert (1 <= n && n <= MAXN);
	assert (1 <= m && m <= MAXN);
	for (int i = 0; i < 5; ++i) {
		if (n == bad1[i] && m == bad2[i]) {
			printf ("-1");
			return 0;
		}
	}
	if (n == 1 && m == 1) {
		printf ("1");
		return 0;
	}
	if (n == 1 && m == 4) {
		printf ("3 1 4 2");
		return 0;
	}
	if (n == 4 && m == 1) {
		printf ("3\n1\n4\n2");
		return 0;
	}

	// ����� ������������� ��� ������
	bool needTrans = false;
	if (m <= 2) {
		int t = n;
		n = m;
		m = t;
		needTrans = true;
	}

	if (n == 1) {
		int i = 0;
		for (int cur = 1; cur <= m; cur += 2) {
			a[0][i] = cur;
			++i;
		}
		for (int cur = 2; cur <= m; cur += 2) {
			a[0][i] = cur;
			++i;
		}
	}
	else {
		int cur = 1;
		for (int k = 0; k < n/2; ++k) {
			int i = 2*k;
			for (int j = 0; j < m; ++j) {
				a[i + j%2][j] = cur++;
			}
			for (int j = 0; j < m; ++j) {
				a[i + 1 - j%2][j] = cur++;
			}
		}
		if (n % 2 == 1) {
			int i = n-1;
			for (int j = 0; j < m; ++j) {
				a[i][j] = cur++;
				if (j % 2 == 1) {
					int t = a[i-1][j];
					a[i-1][j] = a[i][j];
					a[i][j] = t;
				}
			}
		}
	}

	if (needTrans) {
		for (int i = 0; i < m; ++i) {
			for (int j = 0; j < n; ++j) {
				printf ("%d ", a[j][i]);
			}
			printf ("\n");
		}
	}
	else {
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < m; ++j) {
				printf ("%d ", a[i][j]);
			}
			printf ("\n");
		}
	}

	return 0;
}


// J

#define _CRT_SECURE_NO_DEPRECATE
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cassert>
using namespace std;

const int MAXN = 100;

int a[MAXN + 1][MAXN + 1];

int bad1[] = {1, 1, 1, 2, 2, 3, 4};
int bad2[] = {2, 3, 4, 2, 1, 1, 1};

int main()
{
	int n, m;
	scanf ("%d %d", &n, &m);
	assert (1 <= n && n <= MAXN);
	assert (1 <= m && m <= MAXN);
	for (int i = 0; i < 7; ++i) {
		if (n == bad1[i] && m == bad2[i]) {
			printf ("-1");
			return 0;
		}
	}
	if (n == 1 && m == 1) {
		printf ("1");
		return 0;
	}

	// ����� ������������� ��� ������
	bool needTrans = false;
	if (m <= 2) {
		int t = n;
		n = m;
		m = t;
		needTrans = true;
	}

	if (n == 1) {
		int i = 0;
		for (int cur = 1; cur <= m; cur += 2) {
			a[0][i] = cur;
			++i;
		}
		for (int cur = 2; cur <= m; cur += 2) {
			a[0][i] = cur;
			++i;
		}
	}
	else {
		int cur = 1;
		for (int k = 0; k < n/2; ++k) {
			int i = 2*k;
			for (int j = 0; j < m; ++j) {
				a[i + j%2][j] = cur++;
			}
			for (int j = 0; j < m; ++j) {
				a[i + 1 - j%2][j] = cur++;
			}
		}
		if (n % 2 == 1) {
			int i = n-1;
			for (int j = 0; j < m; ++j) {
				a[i][j] = cur++;
				if (j % 2 == 1) {
					int t = a[i-1][j];
					a[i-1][j] = a[i][j];
					a[i][j] = t;
				}
			}
		}
	}

	if (needTrans) {
		for (int i = 0; i < m; ++i) {
			for (int j = 0; j < n; ++j) {
				printf ("%d ", a[j][i]);
			}
			printf ("\n");
		}
	}
	else {
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < m; ++j) {
				printf ("%d ", a[i][j]);
			}
			printf ("\n");
		}
	}

	return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int n,m;
    cin >> n >> m;
    bool norm = true;
    if(n>m) {
        swap(n, m);
        norm = false;
    }

    int mn = m*n;
    int mat[100][100];

    if(n==1 && m<4) {
        cout << -1;
        return 0;
    }

    if(n==2 && m==2) {
        cout << -1;
        return 0;
    }

    if(n>=2 && m>=3) {
        int t=1;
        for(int i=0; i<n; ++i)
            for(int j=0; j<m; ++j) {
                mat[i][j] = t;
                t+=2;
                if(t > mn)
                    t = (t & 1) ? 4 : 2;
            }
    }

    if(n==1) {
        int t=1;
        int j=0;
        for(; j<m && t<=m; ++j, t+=2)
            mat[0][j] = t;
        t = (mn & 1) ? mn-1 : mn;
        for(; j<m && t>=1; ++j, t-=2)
            mat[0][j] = t;
    }

    if(norm)
        for(int i=0; i<n; ++i) {
            for(int j=0; j<m; ++j)
                cout << mat[i][j] << ' ';
            cout << endl;
        }
    else
        for(int i=0; i<m; ++i) {
            for(int j=0; j<n; ++j)
                cout << mat[j][i] << ' ';
            cout << endl;
        }

    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int n,m;
    cin >> n >> m;
    bool norm = true;
    if(n>m) {
        swap(n, m);
        norm = false;
    }

    int mn = m*n;
    int mat[100][100];

    if(n==1 && m<4 || m==2) {
        cout << -1;
        return 0;
    }

    if(n>=2 && m>=3) {
        int t=1;
        for(int i=0; i<n; ++i)
            for(int j=0; j<m; ++j) {
                if(t > mn)
                    t = (t & 1) ? (mat[i-1][j]==1?4:2) : 2;
                mat[i][j] = t;
                t+=2;
            }
    }

    if(n==1) {
        if(m==4) {
            mat[0][0] = 2;
            mat[0][1] = 4;
            mat[0][2] = 1;
            mat[0][3] = 3;
        } else {
            int t=1;
            int j=0;
            for(; j<m; ++j, t+=2) {
                if(t>mn) t = 2;
                mat[0][j] = t;
            }
        }
    }

    if(norm)
        for(int i=0; i<n; ++i) {
            for(int j=0; j<m; ++j)
                cout << mat[i][j] << ' ';
            cout << endl;
        }
    else
        for(int i=0; i<m; ++i) {
            for(int j=0; j<n; ++j)
                cout << mat[j][i] << ' ';
            cout << endl;
        }

    return 0;
}


#include <iostream>

using namespace std;

int main()
{
    int n,m;
    cin >> n >> m;
    bool norm = true;
    if(n>m) {
        swap(n, m);
        norm = false;
    }

    int mn = m*n;
    int mat[100][100];

    if(n==1 && m<4) {
        cout << -1;
        return 0;
    }

    if(n==2 && m==2) {
        cout << -1;
        return 0;
    }

    if(n>=2 && m>=3) {
        int t=1;
        for(int i=0; i<n; ++i)
            for(int j=0; j<m; ++j) {
                mat[i][j] = t;
                t+=2;
                if(t > mn)
                    t = (t & 1) ? 6 : 2;
            }
    }

    if(n==1) {
        int t=1;
        int j=0;
        for(; j<m && t<=m; ++j, t+=2)
            mat[0][j] = t;
        t = (mn & 1) ? mn-1 : mn;
        for(; j<m && t>=1; ++j, t-=2)
            mat[0][j] = t;
    }

    if(norm)
        for(int i=0; i<n; ++i) {
            for(int j=0; j<m; ++j)
                cout << mat[i][j] << ' ';
            cout << endl;
        }
    else
        for(int i=0; i<m; ++i) {
            for(int j=0; j<n; ++j)
                cout << mat[j][i] << ' ';
            cout << endl;
        }

    return 0;
}


# include <bits/stdc++.h>
using namespace std;
int main() {
	int n, m;
	scanf("%d%d", &n, &m);
	if (n * m == 2 || m * n == 3 || (m == 2 && n == 2))
		printf("-1\n");
	else {
		int l1 = (m * n + 1) / 2;
		int l2 = m * n;
		for (int i = 0; i < n; ++i) {
			for (int j = 0; j < m; ++j) {
				if ((i + j) % 2)
					printf("%d ", l2--);
				else
					printf("%d ", l1--);
			}
			printf("\n");
		}
	}
}