#include <bits/stdc++.h>
using namespace std;
int a[100010], ct[100010];
int main() {
  int n, k;
  while (cin >> n >> k) {
    multiset<int> s;
    int cnt = 0, top = 0;
    int Max = 0;
    for (int i = 0; i <= n - 1; i++) {
      scanf("%d", &a[i]);
      s.insert(a[i]);
      while (*s.rbegin() - *s.begin() > k) s.erase(s.find(a[top++]));
      if (i - top + 1 == Max)
        ct[cnt++] = top;
      else if (i - top + 1 > Max) {
        Max = i - top + 1;
        cnt = 0;
        ct[cnt++] = top;
      }
    }
    cout << Max << " " << cnt << endl;
    for (int i = 0; i <= cnt - 1; i++) {
      cout << ct[i] + 1 << " " << ct[i] + Max << endl;
    }
  }
  return 0;
}
