#include <bits/stdc++.h>
using namespace std;
set<pair<int, int> > s, b;
long long n, k;
int h[1000002];
int main() {
  cin >> n >> k;
  for (long long i = 0; i <= n - 1; i++) cin >> h[i];
  int p1 = 0, p2 = 0, a = 0;
  while (p2 < n) {
    if (!s.empty()) {
      s.erase(make_pair(h[p1], p1));
      p1++;
    }
    while (p2 < n && (s.empty() || (h[p2] - s.begin()->first <= k &&
                                    s.rbegin()->first - h[p2] <= k))) {
      s.insert(make_pair(h[p2], p2));
      p2++;
    }
    if (a <= s.size()) {
      if (a < s.size()) b.clear();
      b.insert(make_pair(p1, p2 - 1));
      a = s.size();
    }
  }
  cout << a << " " << b.size() << endl;
  for (set<pair<int, int> >::iterator i = b.begin(); i != b.end(); i++)
    cout << i->first + 1 << " " << i->second + 1 << endl;
  return 0;
}
