#include <bits/stdc++.h>
using namespace std;
int dmax[100005][32], dmin[100005][32];
vector<int> eg;
struct point {
  int x, y;
  point(int _x, int _y) : x(_x), y(_y) {}
  point() {}
};
vector<point> ans;
void RMQ(const vector<int> &A) {
  int n = A.size();
  for (int i = 0; i < n; i++) dmin[i][0] = dmax[i][0] = A[i];
  for (int j = 1; (1 << j) <= n; j++)
    for (int i = 0; i + (1 << j) - 1 < n; i++) {
      dmin[i][j] = min(dmin[i][j - 1], dmin[i + (1 << (j - 1))][j - 1]);
      dmax[i][j] = max(dmax[i][j - 1], dmax[i + (1 << (j - 1))][j - 1]);
    }
}
int query_min(int L, int R) {
  int k = 0;
  while ((1 << (k + 1)) <= R - L + 1) k++;
  return min(dmin[L][k], dmin[R - (1 << k) + 1][k]);
}
int query_max(int L, int R) {
  int k = 0;
  while ((1 << (k + 1) <= R - L + 1)) k++;
  return max(dmax[L][k], dmax[R - (1 << k) + 1][k]);
}
int main() {
  int n, k;
  while (~scanf("%d%d", &n, &k)) {
    ans.clear();
    eg.clear();
    int x;
    for (int i = 0; i < n; i++) {
      scanf("%d", &x);
      eg.push_back(x);
    }
    RMQ(eg);
    int lg = -1;
    int L = 0, R = 0;
    while (R < eg.size()) {
      if (query_max(L, R) - query_min(L, R) <= k) {
        lg = max(lg, R - L + 1);
        ans.push_back(point(L + 1, R + 1));
        R++;
      } else {
        while (query_max(L, R) - query_min(L, R) > k) {
          L++;
        }
      }
    }
    int size = 0;
    for (int i = 0; i < ans.size(); i++) {
      if (ans[i].y - ans[i].x + 1 == lg) size++;
    }
    printf("%d %d\n", lg, size);
    for (int i = 0; i < ans.size(); i++) {
      if (ans[i].y - ans[i].x + 1 == lg) printf("%d %d\n", ans[i].x, ans[i].y);
    }
  }
  return 0;
}
