#include <bits/stdc++.h>
using namespace std;
void cass() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const int N = 1e5 + 3;
int n, k, a[N];
int Min[N][20], Max[N][20], res, num;
void read() {
  cin >> n >> k;
  for (int i = (1); i <= (n); ++i) cin >> a[i];
}
int RMQ_max(int i, int j) {
  int k = (int)log2(j - i + 1);
  return max(Max[i][k], Max[j - (1 << k) + 1][k]);
}
int RMQ_min(int i, int j) {
  int k = (int)log2(j - i + 1);
  return min(Min[i][k], Min[j - (1 << k) + 1][k]);
}
void RMQ_prepare() {
  int clgt = log2(n);
  for (int i = (1); i <= (n); ++i) Min[i][0] = Max[i][0] = a[i];
  for (int j = (1); j <= (clgt); ++j)
    for (int i = (1); i <= (n); ++i) {
      if (i + (1 << j) - 1 > n) continue;
      Min[i][j] = min(Min[i][j - 1], Min[i + (1 << (j - 1))][j - 1]);
      Max[i][j] = max(Max[i][j - 1], Max[i + (1 << (j - 1))][j - 1]);
    }
}
void sol() {
  RMQ_prepare();
  int lo = 1, hi = n;
  while (lo <= hi) {
    int mid = lo + hi >> 1;
    bool ok = false;
    int cur = 0;
    for (int i = (1); i <= (n - mid + 1); ++i)
      if (RMQ_max(i, i + mid - 1) - RMQ_min(i, i + mid - 1) <= k) {
        cur++;
        ok = true;
      }
    if (ok)
      res = mid, num = cur, lo = mid + 1;
    else
      hi = mid - 1;
  }
  cout << res << ' ' << num << '\n';
  for (int i = (1); i <= (n - res + 1); ++i)
    if (RMQ_max(i, i + res - 1) - RMQ_min(i, i + res - 1) <= k)
      cout << i << ' ' << i + res - 1 << '\n';
}
int main() {
  cass();
  read();
  sol();
}
