#include <bits/stdc++.h>
using namespace std;
FILE *in = stdin;
int N, K, a[100000], ans[100000][2], nans;
class monotone {
 public:
  int A[100000], B[100000], C[100000], sa, ea, sb, eb, sc, ec;
  void make() { sa = sb = sc = ea = eb = ec = 0; }
  void add(int x) {
    A[ea++] = x;
    while (eb > sb && B[eb - 1] > x) eb--;
    B[eb++] = x;
    while (ec > sc && C[ec - 1] < x) ec--;
    C[ec++] = x;
  }
  void pop() {
    if (B[sb] == A[sa]) sb++;
    if (C[sc] == A[sa]) sc++;
    sa++;
  }
  int max() { return C[sc]; }
  int min() { return B[sb]; }
};
int main() {
  fscanf(in, "%d%d", &N, &K);
  for (int q = 0; q < N; q++) {
    fscanf(in, "%d", &a[q]);
  }
  int e = 0, res = 0;
  nans = 0;
  monotone H;
  H.make();
  for (int s = 0; s < N; s++) {
    if (s == e) {
      H.add(a[s]);
      e++;
    }
    while (e < N && H.max() - H.min() <= K) {
      H.add(a[e]);
      e++;
    }
    bool bad = bool((H.max() - H.min()) > K);
    if (e - s - bad > res) {
      res = e - s - bad;
      ans[0][0] = s + 1;
      ans[0][1] = e - bad;
      nans = 1;
    } else if (e - s - bad == res) {
      ans[nans][0] = s + 1;
      ans[nans][1] = e - bad;
      nans++;
    }
    H.pop();
  }
  printf("%d %d\n", res, nans);
  for (int q = 0; q < nans; q++) {
    printf("%d %d\n", ans[q][0], ans[q][1]);
  }
  return 0;
}
