#include <bits/stdc++.h>
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807;
int main() {
  int n, k, a[100010];
  cin >> n >> k;
  for (int i = 0; i < n; ++i) cin >> a[i];
  int l = 0;
  int r = 1;
  set<pair<int, int> > st;
  st.insert(make_pair(a[0], 0));
  int maxa = 1;
  vector<pair<int, int> > res;
  res.push_back(make_pair(0, 0));
  while (r < n) {
    st.insert(make_pair(a[r], r));
    r++;
    set<pair<int, int> >::iterator it1 = st.begin(), it2 = st.end();
    it2--;
    while (l < r && abs(it1->first - it2->first) > k) {
      st.erase(make_pair(a[l], l));
      l++;
      it1 = st.begin();
      it2 = st.end();
      it2--;
    }
    if (maxa == r - l)
      res.push_back(make_pair(l, r - 1));
    else if (r - l > maxa) {
      maxa = r - l;
      res.clear();
      res.push_back(make_pair(l, r - 1));
    }
  }
  cout << maxa << " " << res.size() << endl;
  for (int i = 0; i < int((res).size()); ++i)
    cout << res[i].first + 1 << " " << res[i].second + 1 << endl;
  return 0;
}
