#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int>> seg;
int n, k, h[100100], L, R;
multiset<int> cnt;
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> h[i];
  }
  int l = 0;
  for (int i = 0; i < n; i++) {
    cnt.insert(h[i]);
    while (*cnt.rbegin() - *cnt.begin() > k) {
      cnt.erase(cnt.find(h[l++]));
    }
    if (R - L < i - l) {
      seg.clear();
      seg.push_back({l + 1, i + 1});
      R = i;
      L = l;
    } else if (R - L == i - l) {
      seg.push_back({l + 1, i + 1});
    }
  }
  cout << R - L + 1 << " " << seg.size() << endl;
  for (int i = 0; i < seg.size(); i++) {
    cout << seg[i].first << " " << seg[i].second << endl;
  }
}
