#include <bits/stdc++.h>
using namespace std;
set<pair<long long int, long long int> > s;
vector<pair<long long int, long long int> > v;
long long int a[100010];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  long long int i, j, mymin = 0, ans = 0;
  pair<long long int, long long int> p1, p2;
  set<pair<long long int, long long int> >::iterator it1, it2;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    s.insert(make_pair(a[i], -i));
    while (1) {
      it1 = s.begin();
      it2 = s.end();
      it2--;
      p1 = *it1;
      p2 = *it2;
      if (abs(p1.first - p2.first) > k) {
        s.erase(s.find(make_pair(a[mymin], -mymin)));
        mymin++;
      } else
        break;
    }
    if (ans == ((long long int)s.size())) {
      v.push_back(make_pair((i - ((long long int)s.size()) + 1), i));
    } else if (((long long int)s.size()) > ans) {
      ans = s.size();
      v.clear();
      v.push_back(make_pair((i - ((long long int)s.size()) + 1), i));
    }
  }
  long long int len = v.size();
  cout << ans << " " << len << '\n';
  for (i = 0; i < len; i++) {
    cout << (v[i].first + 1) << " " << (v[i].second + 1) << '\n';
  }
  return 0;
}
