#include <bits/stdc++.h>
using namespace std;
int N, K, res;
vector<pair<int, int> > stk;
int minseg[(1 << 19)], maxseg[(1 << 19)];
void insert(int tar, int val, int pos, int L, int R) {
  minseg[pos] = min(minseg[pos], val);
  maxseg[pos] = max(maxseg[pos], val);
  if (L == R)
    return;
  else {
    int mid = (L + R) / 2;
    if (tar <= mid)
      insert(tar, val, pos << 1, L, mid);
    else
      insert(tar, val, (pos << 1) | 1, mid + 1, R);
  }
}
pair<int, int> dfs(int A, int B, int pos, int L, int R) {
  if (A == L && B == R) return make_pair(minseg[pos], maxseg[pos]);
  int M = (L + R) / 2;
  if (B <= M)
    return dfs(A, B, pos << 1, L, M);
  else if (A > M)
    return dfs(A, B, (pos << 1) | 1, M + 1, R);
  else {
    pair<int, int> X = dfs(A, M, pos << 1, L, M),
                   Y = dfs(M + 1, B, (pos << 1) | 1, M + 1, R);
    return make_pair(min(X.first, Y.first), max(X.second, Y.second));
  }
}
void display(int pos = 1, int L = 0, int R = N - 1) {
  printf("[%d~%d]: min = %d, max = %d\n", L, R, minseg[pos], maxseg[pos]);
  if (L == R) return;
  int M = (L + R) / 2;
  display(pos << 1, L, M);
  display((pos << 1) | 1, M + 1, R);
}
int main(int argc, char **argv) {
  cin >> N >> K;
  for (int i = (0); i < ((1 << 19)); ++i) minseg[i] = 1 << 29, maxseg[i] = -1;
  for (int i = (0); i < (N); ++i) {
    int j;
    scanf("%d", &j);
    insert(i, j, 1, 0, N - 1);
  }
  res = 0;
  for (int i = (0); i < (N); ++i) {
    int lo = 0, hi = N - i - 1;
    while (lo <= hi) {
      int mid = (lo + hi) / 2;
      pair<int, int> Q = dfs(i, i + mid, 1, 0, N - 1);
      if (abs(Q.second - Q.first) <= K) {
        if (res < mid + 1) {
          res = mid + 1;
          stk.clear();
          stk.push_back(make_pair(i + 1, i + mid + 1));
        } else if (res == mid + 1) {
          stk.push_back(make_pair(i + 1, i + mid + 1));
        }
        lo = mid + 1;
      } else
        hi = mid - 1;
    }
  }
  printf("%d %d\n", res, stk.size());
  for (int i = (0); i < (stk.size()); ++i)
    printf("%d %d\n", stk[i].first, stk[i].second);
  return 0;
}
