#include <bits/stdc++.h>
using namespace std;
long long const delta = 1000000007;
long long par[(long long)1e5 + 8];
long long segmax[4 * (long long)1e5 + 8];
long long segmin[4 * (long long)1e5 + 8];
long long t;
void update(long long n, long long x) {
  n += t;
  segmax[n] = x;
  segmin[n] = x;
  for (long long i = n / 2; i >= 1; i /= 2) {
    segmax[i] = max(segmax[i], max(segmax[2 * i], segmax[(2 * i) + 1]));
    segmin[i] = min(segmin[2 * i], segmin[(2 * i) + 1]);
  }
}
long long minq(long long a, long long b) {
  a += t;
  b += t;
  long long temp = (long long)1e12 + 8;
  while (a <= b) {
    if (a % 2 == 1) temp = min(temp, segmin[a++]);
    if (b % 2 == 0) temp = min(temp, segmin[b--]);
    a /= 2;
    b /= 2;
  }
  return temp;
}
long long maxq(long long a, long long b) {
  a += t;
  b += t;
  long long temp = 0;
  while (a <= b) {
    if (a % 2 == 1) temp = max(temp, segmax[a++]);
    if (b % 2 == 0) temp = max(temp, segmax[b--]);
    a /= 2;
    b /= 2;
  }
  return temp;
}
int main() {
  std::ios::sync_with_stdio(0);
  ;
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  t = n;
  while ((t & (-t)) != t) t++;
  long long a[n];
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
    update(i, a[i]);
  }
  long long t = 0;
  vector<long long> ans;
  long long l, r, mid;
  for (long long i = 0; i < n; i++) {
    l = i;
    r = n - 1;
    mid = l + ((r - l) / 2);
    while (r - l > 1) {
      mid = l + ((r - l) / 2);
      if (maxq(i, mid) - minq(i, mid) > k)
        r = mid;
      else
        l = mid;
    }
    par[i] = i;
    t = max(t, (long long)1);
    if (maxq(i, l) - minq(i, l) <= k) {
      par[i] = max(par[i], l);
      t = max(t, l - i + 1);
    }
    if (maxq(i, mid) - minq(i, mid) <= k) {
      par[i] = max(par[i], mid);
      t = max(t, mid - i + 1);
    }
    if (maxq(i, r) - minq(i, r) <= k) {
      par[i] = max(par[i], r);
      t = max(t, r - i + 1);
    }
  }
  for (long long i = 0; i < n; i++) {
    if (par[i] - i + 1 == t) ans.push_back(i);
    ;
  }
  cout << t << " " << ans.size() << endl;
  for (long long i = 0; i < ans.size(); i++) {
    cout << ans[i] + 1 << " " << par[ans[i]] + 1 << endl;
  }
  return 0;
}
