#include <bits/stdc++.h>
using namespace std;
deque<int> Min;
deque<int> Max;
int n, k;
vector<int> Occ;
int arr[123456];
int BS(int L, int R, bool F) {
  int ans = (L + R) / 2;
  if (R - L <= 1 && F) {
    return ans;
  }
  Occ.clear();
  bool flag = 0;
  if (ans == 1) flag = 1;
  for (int i = 0; i < n; i++) {
    int curr = arr[i];
    while (!Min.empty() && Min.front() <= i - ans) {
      Min.pop_front();
    }
    while (!Min.empty() && arr[Min.back()] >= curr) {
      Min.pop_back();
    }
    Min.push_back(i);
    int lower = arr[Min.front()];
    while (!Max.empty() && Max.front() <= i - ans) {
      Max.pop_front();
    }
    while (!Max.empty() && arr[Max.back()] <= curr) {
      Max.pop_back();
    }
    Max.push_back(i);
    int upper = arr[Max.front()];
    if (ans <= i + 1 && upper - lower <= k) {
      flag = 1;
      Occ.push_back(i + 2 - ans);
    }
  }
  Max.clear();
  Min.clear();
  if (flag && F)
    return BS(ans, R, F);
  else if (F)
    return BS(L, ans, F);
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> arr[i];
  int ans = BS(1, n + 1, 1);
  BS(ans, ans, 0);
  cout << ans << " " << Occ.size() << endl;
  for (int i = 0; i < Occ.size(); i++) {
    cout << Occ[i] << " " << Occ[i] + ans - 1 << endl;
  }
  return 0;
}
