#include <bits/stdc++.h>
using namespace std;
int h[100005], tree[2][100005], arr[100005];
void update(int idx, int i, int val) {
  while (idx < 100005) {
    tree[i][idx] = i == 0 ? min(tree[i][idx], val) : max(tree[i][idx], val);
    idx += (idx & -idx);
  }
}
int query(int idx, int i) {
  int num = i == 0 ? 1e9 : -1e9;
  while (idx > 0) {
    num = i == 0 ? min(tree[i][idx], num) : max(tree[i][idx], num);
    idx -= (idx & -idx);
  }
  return num;
}
int main() {
  int n, k, cnt = 0, num = 0;
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++) scanf("%d", &h[i]);
  for (int i = 1; i <= n; i++) {
    tree[0][i] = 1e9;
    tree[1][i] = -1e9;
  }
  for (int i = n; i > 0; i--) {
    update(i, 0, h[i]);
    update(i, 1, h[i]);
    int low, high;
    low = i, high = n + 1;
    while (low < high) {
      int mid = (low + high) / 2;
      if (query(mid, 1) - query(mid, 0) <= k) {
        low = mid + 1;
      } else {
        high = mid;
      }
    }
    arr[i] = low - i;
    if (arr[i] > num) {
      num = arr[i];
      cnt = 1;
    } else if (arr[i] == num) {
      cnt++;
    }
  }
  printf("%d %d\n", num, cnt);
  for (int i = 1; i <= n; i++) {
    if (arr[i] == num) printf("%d %d\n", i, i + num - 1);
  }
  return 0;
}
