#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, h[100000];
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> h[i];
  map<int, int> m;
  vector<pair<int, int> > res;
  int curSize = 1;
  int l = 0;
  int sz = 1;
  m[h[0]]++;
  res.push_back(pair<int, int>(0, 0));
  for (int r = 1; r < n; r++) {
    m[h[r]]++;
    curSize++;
    while (l < r && m.rbegin()->first - m.begin()->first > k) {
      m[h[l]]--;
      if (m[h[l]] == 0) {
        m.erase(m.find(h[l]));
      }
      l++;
      curSize--;
    }
    if (curSize == sz) {
      res.push_back(pair<int, int>(l, r));
    } else if (curSize > sz) {
      res.clear();
      sz = curSize;
      res.push_back(pair<int, int>(l, r));
    }
  }
  cout << sz << " " << res.size() << endl;
  for (int i = 0; i < res.size(); i++) {
    cout << res[i].first + 1 << " " << res[i].second + 1 << endl;
  }
  return 0;
}
