#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> v(n);
  for (int(i) = (0); (i) < (n); ++(i)) {
    cin >> v[i];
  }
  int maxi = 0;
  int start = 0;
  multiset<int> s;
  vector<pair<int, int> > final;
  for (int(i) = (0); (i) < (n); ++(i)) {
    s.insert(v[i]);
    int diff = *s.rbegin() - *s.begin();
    while (diff > k) {
      s.erase(s.find(v[start]));
      start++;
      diff = *s.rbegin() - *s.begin();
    }
    int sz = s.size();
    if (sz > maxi) {
      maxi = sz;
      final.clear();
      final.push_back(make_pair(start, i));
    } else if (sz == maxi) {
      final.push_back(make_pair(start, i));
    }
  }
  cout << maxi << " " << final.size() << endl;
  for (int(i) = (0); (i) < (final.size()); ++(i))
    cout << final[i].first + 1 << " " << final[i].second + 1 << endl;
}
