#include <bits/stdc++.h>
const int inf = INT_MAX;
const int mod = 1e9 + 7;
const int maxn = 1e5 + 111;
using namespace std;
int n, k, a[maxn], ans;
pair<int, int> t[4 * maxn];
vector<pair<int, int> > v;
void build(int v, int tl, int tr) {
  if (tl == tr) {
    t[v].first = a[tl];
    t[v].second = a[tl];
    return;
  }
  int tm = (tl + tr) >> 1;
  build(v * 2, tl, tm);
  build(v * 2 + 1, tm + 1, tr);
  t[v].first = min(t[v * 2].first, t[v * 2 + 1].first);
  t[v].second = max(t[v * 2].second, t[v * 2 + 1].second);
}
int mn(int v, int tl, int tr, int l, int r) {
  if (tl > r || l > tr)
    return inf;
  else if (tl >= l && tr <= r)
    return t[v].first;
  int tm = (tl + tr) >> 1;
  return min(mn(v * 2, tl, tm, l, r), mn(v * 2 + 1, tm + 1, tr, l, r));
}
int mx(int v, int tl, int tr, int l, int r) {
  if (tl > r || l > tr)
    return 0;
  else if (tl >= l && tr <= r)
    return t[v].second;
  int tm = (tl + tr) >> 1;
  return max(mx(v * 2, tl, tm, l, r), mx(v * 2 + 1, tm + 1, tr, l, r));
}
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  build(1, 1, n);
  int l = 1, r = n;
  while (l <= r) {
    int mid = (l + r) >> 1;
    bool ch = false;
    for (int i = 1, j = mid; j <= n; i++, j++) {
      int x = mn(1, 1, n, i, j);
      int y = mx(1, 1, n, i, j);
      if (y - x <= k) {
        ch = true;
        break;
      }
    }
    if (!ch)
      r = mid - 1;
    else {
      ans = mid;
      l = mid + 1;
    }
  }
  for (int i = 1, j = ans; j <= n; i++, j++) {
    int x = mn(1, 1, n, i, j);
    int y = mx(1, 1, n, i, j);
    if (y - x <= k) {
      v.push_back({i, j});
    }
  }
  cout << ans << " " << (int)v.size() << endl;
  for (int i = 0; i < (int)v.size(); i++)
    cout << v[i].first << " " << v[i].second << endl;
}
