#include <bits/stdc++.h>
using namespace std;
pair<long long, long long> st[5 * 100005];
long long arr[100005];
void build(long long p, long long l, long long r) {
  if (l == r) {
    st[p] = {arr[l], arr[l]};
    return;
  }
  long long mid = (l + r) / 2;
  build(2 * p, l, mid);
  build(2 * p + 1, mid + 1, r);
  st[p] = {min(st[2 * p].first, st[2 * p + 1].first),
           max(st[2 * p].second, st[2 * p + 1].second)};
}
pair<long long, long long> check(long long p, long long l, long long r,
                                 long long i, long long j) {
  if (i > r || j < l) return {1000000007, 0};
  if (i <= l and r <= j) return st[p];
  pair<long long, long long> x;
  long long mid = (l + r) / 2;
  x = check(2 * p, l, mid, i, j);
  pair<long long, long long> y = check(2 * p + 1, mid + 1, r, i, j);
  x.first = min(x.first, y.first);
  x.second = max(x.second, y.second);
  return x;
}
void solve() {
  long long n, k;
  cin >> n >> k;
  for (long long i = 0; i < n; i++) cin >> arr[i];
  for (long long i = 0; i < 5 * 100005; i++) st[i] = {1000000007, 0};
  build(1, 0, n - 1);
  long long sol = 0;
  map<long long, vector<pair<long long, long long> > > mp;
  for (long long i = 0; i < n; i++) {
    long long start = i, end = n - 1;
    while (start <= end) {
      long long mid = (start + end) / 2;
      pair<long long, long long> r = check(1, 0, n - 1, i, mid);
      if (r.second - r.first <= k) {
        sol = max(sol, mid - i + 1);
        mp[mid - i + 1].push_back({i + 1, mid + 1});
        start = mid + 1;
      } else
        end = mid - 1;
    }
  }
  cout << sol << " " << mp[sol].size() << "\n";
  for (long long i = 0; i < mp[sol].size(); i++) {
    cout << mp[sol][i].first << " " << mp[sol][i].second << "\n";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) solve();
  return 0;
}
