#include <bits/stdc++.h>
using namespace std;
struct XX {
  int position;
  int zhi;
};
bool operator<(const XX &x, const XX &y) {
  if (x.zhi == y.zhi) {
    return x.position < y.position;
  }
  return x.zhi < y.zhi;
}
struct WW {
  int position;
  int zhi;
};
bool operator<(const WW &x, const WW &y) {
  if (x.zhi == y.zhi) {
    return x.position < y.position;
  }
  return x.zhi > y.zhi;
}
int ins[100100];
int ans[100100];
int n, k;
int flag;
int main() {
  while (scanf("%d%d", &n, &k) != EOF) {
    for (int i = 1; i <= n; i++) {
      scanf("%d", &ins[i]);
    }
    multiset<XX> Sx;
    multiset<WW> Sw;
    flag = 1;
    while (!Sx.empty()) Sx.erase(Sx.begin());
    while (!Sw.empty()) Sw.erase(Sw.begin());
    int num = 0;
    int maxx = 0;
    for (int i = 1; i <= n; i++) {
      XX p2;
      WW p1;
      p2.position = i;
      p2.zhi = ins[i];
      p1.position = i;
      p1.zhi = ins[i];
      Sx.insert(p2);
      Sw.insert(p1);
      num++;
      while (((*Sw.begin()).zhi - (*Sx.begin()).zhi) > k) {
        p1.position = flag;
        p2.position = flag;
        p1.zhi = ins[flag];
        p2.zhi = ins[flag];
        Sw.erase(p1);
        Sx.erase(p2);
        flag++;
        num--;
      }
      ans[i] = num;
      maxx = max(num, maxx);
    }
    int allnum = 0;
    for (int i = 1; i <= n; i++) {
      if (ans[i] == maxx) {
        allnum++;
      }
    }
    printf("%d %d\n", maxx, allnum);
    for (int i = 1; i <= n; i++) {
      if (ans[i] == maxx) {
        printf("%d %d\n", i - maxx + 1, i);
      }
    }
  }
  return 0;
}
