#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> nums(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &nums[i]);
  }
  int maxm = 0;
  vector<pair<int, int> > cur;
  deque<int> maxm_q, minm_q;
  int l = 0, r = 0;
  maxm_q.push_back(l);
  minm_q.push_back(l);
  while (l <= r && r < n) {
    if (abs(nums[maxm_q.front()] - nums[minm_q.front()]) <= k) {
      if (r - l + 1 > maxm) {
        cur.clear();
        maxm = r - l + 1;
        cur.push_back(make_pair(l + 1, r + 1));
      } else if (r - l + 1 == maxm) {
        cur.push_back(make_pair(l + 1, r + 1));
      }
      r++;
      if (r < n) {
        while (!maxm_q.empty() && nums[r] > nums[maxm_q.back()])
          maxm_q.pop_back();
        maxm_q.push_back(r);
        while (!minm_q.empty() && nums[r] < nums[minm_q.back()])
          minm_q.pop_back();
        minm_q.push_back(r);
      }
    } else {
      if (!maxm_q.empty() && maxm_q.front() == l) maxm_q.pop_front();
      if (!minm_q.empty() && minm_q.front() == l) minm_q.pop_front();
      l++;
    }
  }
  cout << maxm << ' ' << cur.size() << endl;
  for (int i = 0; i < cur.size(); i++)
    printf("%d %d\n", cur[i].first, cur[i].second);
  return 0;
}
