#include <bits/stdc++.h>
using namespace std;
struct sg {
  int l, r, mini, maxi;
} seg[300008];
int arr[100008], n, k;
void build(int dir, int l, int r) {
  seg[dir].l = l;
  seg[dir].r = r;
  if (seg[dir].l == seg[dir].r) {
    seg[dir].maxi = seg[dir].mini = arr[seg[dir].l];
    return;
  }
  build(dir * 2, l, (l + r) / 2);
  build(dir * 2 + 1, (l + r) / 2 + 1, r);
  seg[dir].maxi = max(seg[dir * 2].maxi, seg[dir * 2 + 1].maxi);
  seg[dir].mini = min(seg[dir * 2].mini, seg[dir * 2 + 1].mini);
}
int largest = 0;
pair<int, int> ans[100008];
int ansLimit = 0;
struct es {
  int ans, mini, maxi;
  es() {}
  es(int a, int m, int ma) {
    ans = a;
    mini = m;
    maxi = ma;
  }
};
int depth(int dir, int acumMin, int acumMax) {
  if (seg[dir].l == seg[dir].r) return seg[dir].l;
  if (max(acumMax, seg[dir * 2].maxi) - min(acumMin, seg[dir * 2].mini) > k)
    return depth(dir * 2, acumMin, acumMax);
  else
    return depth(dir * 2 + 1, min(acumMin, seg[dir * 2].mini),
                 max(acumMax, seg[dir * 2].maxi));
}
es query(int dir, int l, int acumMin, int acumMax) {
  if (seg[dir].r < l) return es(0, INT_MAX, INT_MIN);
  if (l <= seg[dir].l) {
    if (max(acumMax, seg[dir].maxi) - min(acumMin, seg[dir].mini) > k)
      return es(depth(dir, acumMin, acumMax), min(acumMin, seg[dir].mini),
                max(acumMax, seg[dir].maxi));
    else
      return es(0, min(acumMin, seg[dir].mini), max(acumMax, seg[dir].maxi));
  }
  es first = query(dir * 2, l, acumMin, acumMax);
  if (first.ans) return first;
  return query(dir * 2 + 1, l, min(acumMin, first.mini),
               max(acumMax, first.maxi));
}
void calc() {
  for (int beg = 1; beg < n; beg++) {
    int firstGreaterThanK = query(1, beg, INT_MAX, INT_MIN).ans;
    int proposal = firstGreaterThanK - beg;
    if (proposal >= largest) {
      ans[proposal > largest ? ansLimit = 1 : ++ansLimit] =
          make_pair(beg, firstGreaterThanK - 1);
      largest = proposal;
    }
  }
}
void print() {
  cout << largest << " " << ansLimit << "\n";
  for (int i = 1; i <= ansLimit; i++) {
    cout << ans[i].first << " " << ans[i].second << "\n";
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  arr[++n] = INT_MAX;
  build(1, 1, n);
  calc();
  print();
  return 0;
}
