#include <bits/stdc++.h>
int n, k, h[100000];
int a, b, r[100000];
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < (int)(n); i++) scanf("%d", h + i);
  std::multiset<int> s;
  int t = 0;
  for (int i = 0; i < (int)(n); i++) {
    s.insert(h[i]);
    while ((*s.rbegin() - *s.begin()) > k) s.erase(s.find(h[t++]));
    if (i - t + 1 > a) {
      a = i - t + 1;
      r[0] = t;
      b = 1;
    } else if (i - t + 1 == a) {
      r[b++] = t;
    }
  }
  printf("%d %d\n", a, b);
  for (int i = 0; i < (int)(b); i++) printf("%d %d\n", r[i] + 1, r[i] + a);
  return 0;
}
