#include <bits/stdc++.h>
using namespace std;
int inline read() {
  int num = 0, neg = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') neg = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    num = (num << 3) + (num << 1) + c - '0';
    c = getchar();
  }
  return num * neg;
}
const int maxn = 100010;
int n, k, a[maxn], Max, ans;
multiset<int> s;
queue<int> que;
int main() {
  n = read();
  k = read();
  for (int i = 1; i <= n; i++) a[i] = read();
  if (n == 1) {
    printf("%d %d\n%d %d\n", 1, 1, 1, 1);
    return 0;
  }
  int l = 1;
  s.insert(a[1]);
  for (int i = 2; i <= n; i++) {
    s.insert(a[i]);
    while (i - l + 1 >= 2 && *s.rbegin() - *s.begin() > k && l < i)
      s.erase(s.find(a[l])), l++;
    if (i - l + 1 == ans) {
      que.push(i);
    }
    if (i - l + 1 > ans) {
      ans = i - l + 1;
      while (!que.empty()) que.pop();
      que.push(i);
    }
  }
  if (ans != 1)
    printf("%d %d\n", ans, que.size());
  else
    printf("%d %d\n%d %d\n", ans, n, 1, 1);
  while (!que.empty())
    printf("%d %d\n", que.front() - ans + 1, que.front()), que.pop();
  return 0;
}
