#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
pair<int, int> Ans[MAXN];
int Maxx[MAXN << 2], Minn[MAXN << 2], maxx, minn, n, k, Len, cnt;
inline int Read() {
  int x = 0, f = 0;
  char c = getchar();
  while (!isdigit(c)) {
    f |= c == '-';
    c = getchar();
  }
  while (isdigit(c)) {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return f ? -x : x;
}
inline void Write(const int &x) {
  if (x < 0) {
    putchar('-');
    Write(-x);
    return;
  }
  if (x > 9) {
    Write(x / 10);
  }
  putchar((x % 10) ^ 48);
  return;
}
inline void Build(int l, int r, int Node) {
  if (l ^ r) {
    int mid = (l + r) >> 1;
    Build(l, mid, Node << 1);
    Build(mid + 1, r, Node << 1 | 1);
    Maxx[Node] =
        ((Maxx[Node << 1]) < (Maxx[Node << 1 | 1]) ? (Maxx[Node << 1 | 1])
                                                   : (Maxx[Node << 1]));
    Minn[Node] =
        ((Minn[Node << 1]) > (Minn[Node << 1 | 1]) ? (Minn[Node << 1 | 1])
                                                   : (Minn[Node << 1]));
  } else {
    Maxx[Node] = Minn[Node] = Read();
  }
  return;
}
inline void Query(int l, int r, int L, int R, int Node) {
  if (!(l ^ L) and !(r ^ R)) {
    maxx = ((Maxx[Node]) < (maxx) ? (maxx) : (Maxx[Node]));
    minn = ((Minn[Node]) > (minn) ? (minn) : (Minn[Node]));
    return;
  }
  int mid = (l + r) >> 1;
  if (R <= mid) {
    Query(l, mid, L, R, Node << 1);
  } else if (L > mid) {
    Query(mid + 1, r, L, R, Node << 1 | 1);
  } else {
    Query(l, mid, L, mid, Node << 1);
    Query(mid + 1, r, mid + 1, R, Node << 1 | 1);
  }
  return;
}
inline void Binary_Search(int Now, int Left, int Right) {
  while (Left ^ Right) {
    maxx = -1, minn = 100000001;
    int mid = (Left + Right) >> 1;
    Query(1, n, Now, mid, 1);
    (maxx - minn > k) ? Right = mid : Left = mid + 1;
  }
  if (Left - Now > Len) {
    Len = Left - Now;
    Ans[cnt = 1] = make_pair(Now, Left - 1);
  } else if (Left - Now == Len) {
    Ans[++cnt] = make_pair(Now, Left - 1);
  }
  return;
}
signed main() {
  while (scanf("%d %d", &n, &k) != EOF) {
    Len = 0;
    cnt = 1;
    Build(1, n, 1);
    for (int i = 1; i <= n + 1; ++i) {
      Binary_Search(i, i, n + 1);
    }
    Write(Len), putchar(' '), Write(cnt), putchar('\n');
    for (int i = 1; i <= cnt; ++i) {
      Write(Ans[i].first), putchar(' '), Write(Ans[i].second), putchar('\n');
    }
  }
  return 0;
}
