#include <bits/stdc++.h>
using namespace std;
int zeng[100005], hz, tz;
int jian[100005], hj, tj;
int a[100005];
vector<int> x, y;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", a + i);
  tz = tj = 1;
  zeng[0] = jian[0] = 1;
  hz = hj = 0;
  int mx = 1, last = 1;
  x.push_back(1);
  y.push_back(1);
  for (int i = 2; i <= n; i++) {
    while (tz > hz && a[zeng[tz - 1]] > a[i]) tz--;
    zeng[tz++] = i;
    while (tj > hj && a[jian[tj - 1]] < a[i]) tj--;
    jian[tj++] = i;
    while (a[jian[hj]] - a[zeng[hz]] > k) {
      if (jian[hj] < zeng[hz]) {
        hj++;
        last = max(last, jian[hj - 1] + 1);
      } else {
        hz++;
        last = max(last, zeng[hz - 1] + 1);
      }
    }
    if (i - last + 1 > mx) {
      mx = i - last + 1;
      x.clear();
      y.clear();
      x.push_back(last);
      y.push_back(i);
    } else if (i - last + 1 == mx) {
      x.push_back(last);
      y.push_back(i);
    }
  }
  printf("%d %d\n", mx, x.size());
  for (int i = 0; i < x.size(); i++) printf("%d %d\n", x[i], y[i]);
  return 0;
}
