#include <bits/stdc++.h>
using namespace std;
int h[100005];
vector<pair<int, int> > v;
deque<int> dqmin, dqmax;
int main() {
  int n, k, stop = -1, res = 0;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &h[i]);
    while (dqmin.size() && h[i] < h[dqmin.back()]) dqmin.pop_back();
    while (dqmax.size() && h[i] > h[dqmax.back()]) dqmax.pop_back();
    dqmin.push_back(i);
    dqmax.push_back(i);
    while (h[dqmax.front()] - h[dqmin.front()] > k) {
      stop = min(dqmin.front(), dqmax.front());
      if (dqmin.front() == stop)
        dqmin.pop_front();
      else
        dqmax.pop_front();
    }
    if (res < i - stop) {
      res = i - stop;
      v.clear();
    }
    if (res == i - stop) v.push_back(make_pair(stop + 2, i + 1));
  }
  printf("%d %d\n", res, v.size());
  for (int i = 0; i < v.size(); i++) printf("%d %d\n", v[i].first, v[i].second);
}
