#include <bits/stdc++.h>
using namespace std;
const int max_n = 1e5 + 15;
const int oo = 0x3f3f3f3f;
int n, k, maxi, niz[max_n];
vector<int> ret;
multiset<int> s;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> niz[i];
  for (int i = 0, j = -1; i < n; i++) {
    while (j + 1 < n && max((s.size() ? *s.rbegin() : -oo), niz[j + 1]) -
                                min((s.size() ? *s.begin() : oo), niz[j + 1]) <=
                            k)
      s.insert(niz[++j]);
    if (j - i + 1 >= maxi) {
      if (j - i + 1 > maxi) ret.clear();
      maxi = j - i + 1;
      ret.push_back(i + 1);
    }
    s.erase(s.find(niz[i]));
  }
  cout << maxi << " " << ret.size() << endl;
  for (int i = 0; i < ret.size(); i++)
    cout << ret[i] << " " << ret[i] + maxi - 1 << endl;
  return 0;
}
