#include <bits/stdc++.h>
using namespace std;
const int maxn = 200500;
int h[maxn];
int n;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) cin >> h[i];
  set<pair<int, int> > in;
  vector<pair<int, int> > res;
  int best = 1;
  int l = 0;
  for (int r = 0; r < n; ++r) {
    in.insert({h[r], r});
    while (in.rbegin()->first - in.begin()->first > k) {
      in.erase({h[l], l});
      l++;
    }
    if (best < r - l + 1) {
      best = r - l + 1;
      res.clear();
    }
    if (best == r - l + 1) res.push_back({l + 1, r + 1});
  }
  cout << best << ' ' << (int)res.size() << '\n';
  for (auto x : res) cout << x.first << ' ' << x.second << '\n';
  return 0;
}
