#include <bits/stdc++.h>
int tmin[4 * 100100];
int tmax[4 * 100100];
int a[100100];
using namespace std;
int build(int a[], int v, int tl, int tr) {
  if (tl == tr) {
    tmin[v] = a[tl];
    tmax[v] = a[tl];
  } else {
    int tm = (tr - tl) / 2 + tl;
    build(a, v * 2, tl, tm);
    build(a, v * 2 + 1, tm + 1, tr);
    tmin[v] = min(tmin[v * 2], tmin[v * 2 + 1]);
    tmax[v] = max(tmax[v * 2], tmax[v * 2 + 1]);
  }
  return 0;
}
int getMin(int v, int tl, int tr, int l, int r) {
  if (l > r) return INT_MAX;
  if (tl == l && tr == r) {
    return tmin[v];
  } else {
    int tm = (tr - tl) / 2 + tl;
    int m1 = getMin(v * 2, tl, tm, l, min(tm, r));
    int m2 = getMin(v * 2 + 1, tm + 1, tr, max(tm + 1, l), r);
    return min(m1, m2);
  }
}
int getMax(int v, int tl, int tr, int l, int r) {
  if (l > r) return 0;
  if (tl == l && tr == r) {
    return tmax[v];
  } else {
    int tm = (tr - tl) / 2 + tl;
    int m1 = getMax(v * 2, tl, tm, l, min(tm, r));
    int m2 = getMax(v * 2 + 1, tm + 1, tr, max(tm + 1, l), r);
    return max(m1, m2);
  }
}
int check(int aa, int nm, int k) {
  for (int i = 0; i < nm - aa; i++) {
    int max = getMax(1, 0, nm - 1, i, i + aa);
    int min = getMin(1, 0, nm - 1, i, i + aa);
    if (max - min <= k) {
      return 1;
    }
  }
  return 0;
}
int main() {
  int n;
  cin >> n;
  int k;
  cin >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int l = -1;
  int r = n - 1;
  build(a, 1, 0, n - 1);
  while (r - l > 0) {
    int tm = (r - l) / 2 + l + 1;
    if (check(tm, n, k)) {
      l = tm;
    } else {
      r = tm - 1;
    }
  }
  cout << l + 1 << " ";
  vector<int> lf;
  for (int i = 0; i < n - l; i++) {
    int max = getMax(1, 0, n - 1, i, i + l);
    int min = getMin(1, 0, n - 1, i, i + l);
    if (max - min <= k) {
      lf.push_back(i);
    }
  }
  cout << lf.size() << endl;
  for (int i = 0; i < lf.size(); i++) {
    cout << lf[i] + 1 << " " << lf[i] + l + 1 << endl;
  }
  return 0;
}
