#include <bits/stdc++.h>
using namespace std;
int a[111111];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  deque<int> mn, mx;
  int aa = 0;
  vector<pair<int, int> > ps;
  int last = -1;
  for (int i = 0; i < n; i++) {
    int x;
    scanf("%d", &x);
    a[i] = x;
    while (!mn.empty() && x < mn.back()) {
      mn.pop_back();
    }
    mn.push_back(x);
    while (!mx.empty() && x > mx.back()) {
      mx.pop_back();
    }
    mx.push_back(x);
    while (mx.front() - mn.front() > k) {
      ++last;
      if (mn.front() == a[last]) {
        mn.pop_front();
      }
      if (mx.front() == a[last]) {
        mx.pop_front();
      }
    }
    int clen = i - last;
    if (clen > aa) {
      aa = clen;
      ps.clear();
    }
    if (clen == aa) {
      ps.push_back({last + 1, i});
    }
  }
  cout << aa << " " << ps.size() << "\n";
  for (auto& i : ps) {
    cout << i.first + 1 << " " << i.second + 1 << "\n";
  }
  return 0;
}
