#include <bits/stdc++.h>
using namespace std;
int n, k;
int h[100000];
list<int> minq, maxq;
int maxlen;
int len[100000];
int main() {
  cin >> n >> k;
  int i, j;
  for (i = 0; i < n; i++) {
    cin >> h[i];
  }
  maxlen = 0;
  i = 0;
  int count = 0;
  for (j = 0; j < n; j++) {
    while ((!minq.empty()) && (minq.back() > h[j])) {
      minq.pop_back();
    }
    minq.push_back(h[j]);
    while ((!maxq.empty()) && (maxq.back() < h[j])) {
      maxq.pop_back();
    }
    maxq.push_back(h[j]);
    while ((maxq.front() - minq.front()) > k) {
      if (maxq.front() == h[i]) {
        maxq.pop_front();
      }
      if (minq.front() == h[i]) {
        minq.pop_front();
      }
      i++;
    }
    len[j] = j - i + 1;
    if (maxlen < len[j]) {
      maxlen = len[j];
      count = 1;
    } else if (maxlen == len[j]) {
      count++;
    }
  }
  cout << maxlen << ' ' << count << '\n';
  for (j = 0; j < n; j++) {
    if (len[j] == maxlen) {
      cout << j - maxlen + 2 << ' ' << j + 1 << '\n';
    }
  }
  return 0;
}
