#include <bits/stdc++.h>
using namespace std;
const int INF = 1000 * 1000 * 100 + 10;
const int MAXN = 110100;
int a[MAXN], mini[4 * MAXN], maxi[4 * MAXN];
vector<pair<int, int> > answer[MAXN * 2];
void build(int s = 0, int e = 1e5 + 10, int id = 1) {
  if (e - s < 2) {
    maxi[id] = a[s];
    return;
  }
  int mid = (s + e) / 2;
  build(s, mid, 2 * id + 0);
  build(mid, e, 2 * id + 1);
  maxi[id] = max(maxi[2 * id + 0], maxi[2 * id + 1]);
}
void build2(int s = 0, int e = 1e5 + 10, int id = 1) {
  if (e - s < 2) {
    mini[id] = a[s];
    return;
  }
  int mid = (s + e) / 2;
  build2(s, mid, 2 * id + 0);
  build2(mid, e, 2 * id + 1);
  mini[id] = min(mini[2 * id + 0], mini[2 * id + 1]);
}
int get1(int l, int r, int s = 0, int e = 1e5 + 10, int id = 1) {
  if (e <= l or r <= s) {
    return 0;
  }
  if (s >= l and e <= r) {
    return maxi[id];
  }
  int mid = (s + e) / 2;
  return max(get1(l, r, s, mid, 2 * id + 0), get1(l, r, mid, e, 2 * id + 1));
}
int get2(int l, int r, int s = 0, int e = 1e5 + 10, int id = 1) {
  if (e <= l or r <= s) {
    return INF;
  }
  if (s >= l and e <= r) {
    return mini[id];
  }
  int mid = (s + e) / 2;
  return min(get2(l, r, s, mid, 2 * id + 0), get2(l, r, mid, e, 2 * id + 1));
}
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < 4 * MAXN; i++) {
    mini[i] = INF;
  }
  build();
  build2();
  int r = 0;
  int l = 0;
  int ind = 0;
  while (l < n) {
    int now1 = get1(l, r + 1);
    int now2 = get2(l, r + 1);
    if (abs(now1 - now2) <= k) {
      answer[r - l + 1].push_back(make_pair(l, r));
      ind = max(ind, r - l + 1);
      if (r < n - 1) {
        r++;
      } else {
        l++;
      }
    } else {
      if (l == r) {
        r++;
      } else {
        l++;
      }
    }
  }
  cout << ind << ' ' << answer[ind].size() << endl;
  for (int i = 0; i < answer[ind].size(); i++) {
    cout << answer[ind][i].first + 1 << ' ' << answer[ind][i].second + 1
         << endl;
  }
}
