#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
int a[100000 + 10], b[100000 + 10], c[100000 + 10];
int main() {
  multiset<int> s;
  int n, k;
  scanf("%d%d", &n, &k);
  int m = 0;
  int max = 0, num = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    s.insert(a[i]);
    while (*s.rbegin() - *s.begin() > k) {
      s.erase(s.find(a[m++]));
    }
    if (i - m + 1 == max) {
      b[num] = m;
      c[num++] = i;
    } else if (i - m + 1 > max) {
      num = 0;
      b[num] = m;
      c[num++] = i;
      max = i - m + 1;
    }
  }
  printf("%d %d\n", max, num);
  for (int i = 0; i < num; i++) printf("%d %d\n", b[i] + 1, c[i] + 1);
  return 0;
}
