#include <bits/stdc++.h>
using namespace std;
int A[100005];
pair<int, int> T[262150];
void build_segment(int v, int l, int r) {
  if (l == r)
    T[v] = pair<int, int>(A[l], A[l]);
  else {
    build_segment(((v) << 1), l, (l + r) / 2),
        build_segment((((v) << 1) | 1), (l + r) / 2 + 1, r);
    T[v] =
        pair<int, int>(min(T[((v) << 1)].first, T[(((v) << 1) | 1)].first),
                       max(T[((v) << 1)].second, T[(((v) << 1) | 1)].second));
  }
}
void build_ST(int n) { build_segment(1, 0, n - 1); }
pair<int, int> query(int v, int l, int r, int i, int j) {
  if (r < i || l > j) return pair<int, int>(2147483647, -2147483647);
  if (l >= i && r <= j) return T[v];
  pair<int, int> r1 = query(((v) << 1), l, (l + r) / 2, i, j),
                 r2 = query((((v) << 1) | 1), (l + r) / 2 + 1, r, i, j);
  return pair<int, int>(min(r1.first, r2.first), max(r1.second, r2.second));
}
bool is_valid_soln(int n, int maxD, int len) {
  int i;
  pair<int, int> r;
  for (i = 0; i + len - 1 < n; ++i) {
    r = query(1, 0, n - 1, i, i + len - 1);
    if (r.second - r.first <= maxD) break;
  }
  return i + len - 1 < n;
}
int bin_search(int n, int maxD, int low, int high) {
  int mid, soln = low - 1;
  while (low <= high) {
    mid = (low + high) / 2;
    if (is_valid_soln(n, maxD, mid))
      soln = mid, low = mid + 1;
    else
      high = mid - 1;
  }
  return soln;
}
void solve(int n, int maxD) {
  int len, i;
  pair<int, int> r;
  vector<int> soln;
  vector<int>::iterator p;
  build_ST(n);
  len = bin_search(n, maxD, 1, n);
  for (i = 0; i + len - 1 < n; ++i) {
    r = query(1, 0, n - 1, i, i + len - 1);
    if (r.second - r.first <= maxD) soln.push_back(i + 1);
  }
  printf("%d %d\n", len, soln.size());
  for (p = soln.begin(); p != soln.end(); ++p)
    printf("%d %d\n", *p, *p + len - 1);
}
int main() {
  int n, k, i;
  scanf("%d %d", &n, &k);
  for (i = 0; i < n; ++i) scanf("%d", A + i);
  solve(n, k);
  return 0;
}
