#include <bits/stdc++.h>
using namespace std;
int Lg[100005], Mn[100005][21], Mx[100005][21];
int N, K;
int a[100005];
void init() {
  for (int i = 2, k = 2; i <= N; Lg[i] += Lg[i - 1], i++)
    if (i == k) Lg[i]++, k *= 2;
  for (int i = 1; i <= N; i++) Mx[i][0] = Mn[i][0] = a[i];
  for (int k = 1; k <= 20; k++)
    for (int i = 1; i + (1 << k) - 1 <= N; i++)
      Mx[i][k] = max(Mx[i][k - 1], Mx[i + (1 << (k - 1))][k - 1]),
      Mn[i][k] = min(Mn[i][k - 1], Mn[i + (1 << (k - 1))][k - 1]);
}
int Query(int l, int r) {
  int d = Lg[r - l + 1];
  return max(Mx[l][d], Mx[r - (1 << d) + 1][d]) -
         min(Mn[l][d], Mn[r - (1 << d) + 1][d]);
}
int ans1, ans2;
int s1[100005], s2[100005], r2[100005];
int main() {
  scanf("%d%d", &N, &K);
  for (int i = 1; i <= N; i++) scanf("%d", &a[i]);
  init();
  for (int i = 1; i <= N; i++) {
    int l = i, r = N, pos;
    while (l <= r) {
      int mid = l + r >> 1;
      if (Query(i, mid) > K)
        r = mid - 1;
      else
        l = mid + 1, pos = mid;
    }
    r2[i] = pos;
    ans1 = max(ans1, pos - i + 1);
  }
  for (int i = 1; i <= N; i++)
    if (r2[i] - i + 1 == ans1) ans2++;
  printf("%d %d\n", ans1, ans2);
  for (int i = 1; i <= N; i++)
    if (r2[i] - i + 1 == ans1) printf("%d %d\n", i, r2[i]);
}
