#include <bits/stdc++.h>
using namespace std;
int ne1[100100], ne2[100100], a[100100], st[100100], sn;
vector<int> ra, rb;
int rd;
int n, k;
void check(int l, int r, int first, int second) {
  int d = r - l;
  if (rd < d) {
    ra.clear();
    rb.clear();
    rd = d;
  }
  if (rd == d) {
    ra.push_back(l);
    rb.push_back(r);
  }
}
int main(void) {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  st[sn++] = n;
  for (int i = n - 1; i >= 0; i--) {
    while (sn && a[st[sn - 1]] > a[i]) sn--;
    ne1[i] = st[sn - 1];
    st[sn++] = i;
  }
  sn = 0;
  st[sn++] = n;
  a[n] = 1000000000;
  for (int i = n - 1; i >= 0; i--) {
    while (sn && a[st[sn - 1]] < a[i]) sn--;
    ne2[i] = st[sn - 1];
    st[sn++] = i;
  }
  int l = -1, r = -1, ia = 0, ib = 0;
  while (l + 1 < n) {
    l++;
    if (r < l) r = l;
    if (ia < l) ia = l;
    if (ib < l) ib = l;
    while (ne1[ia] <= r) ia = ne1[ia];
    while (ne2[ib] <= r) ib = ne2[ib];
    check(l, r, ia, ib);
    while (r + 1 < n) {
      int ta = ia;
      int tb = ib;
      while (ne1[ta] <= r + 1) ta = ne1[ta];
      while (ne2[tb] <= r + 1) tb = ne2[tb];
      if (a[tb] - a[ta] > k) break;
      ia = ta, ib = tb;
      r++;
      check(l, r, ia, ib);
    }
  }
  printf("%d %d\n", rd + 1, ra.size());
  for (int i = 0; i < (int)ra.size(); i++)
    printf("%d %d\n", ra[i] + 1, rb[i] + 1);
  return 0;
}
