#include <bits/stdc++.h>
#pragma comment(linker, "/stack:64000000")
using namespace std;
template <typename first>
inline first abs(const first& a) {
  return a < 0 ? -a : a;
}
template <typename first>
inline first sqr(const first& a) {
  return a * a;
}
const int INF = INT_MAX / 2;
const long double EPS = 1e-9;
const long double PI = 3.1415926535897932384626433832795;
const int N = 100 * 1000 + 13;
int n, k;
int a[N];
int tmax[4 * N], tmin[4 * N];
int sz = 0;
pair<int, int> ans[N];
int tsize = 1;
inline int getMin(int l, int r) {
  l += tsize;
  r += tsize;
  int ans = INF;
  while (l <= r) {
    if ((l & 1)) ans = min(ans, tmin[l]);
    if (!(r & 1)) ans = min(ans, tmin[r]);
    l = (l + 1) >> 1;
    r = (r - 1) >> 1;
  }
  return ans;
}
inline int getMax(int l, int r) {
  l += tsize;
  r += tsize;
  int ans = -INF;
  while (l <= r) {
    if ((l & 1)) ans = max(ans, tmax[l]);
    if (!(r & 1)) ans = max(ans, tmax[r]);
    l = (l + 1) >> 1;
    r = (r - 1) >> 1;
  }
  return ans;
}
inline bool check(int mid) {
  sz = 0;
  for (int i = 0; i < int(n - mid + 1); i++) {
    int minv = getMin(i, i + mid - 1);
    int maxv = getMax(i, i + mid - 1);
    if (maxv - minv <= k) ans[sz++] = make_pair((i), (i + mid - 1));
  }
  return sz > 0;
}
int main() {
  cin >> n >> k;
  for (int i = 0; i < int(n); i++) scanf("%d", &a[i]);
  while (tsize < n) tsize *= 2;
  for (int i = 0; i < int(tsize); i++)
    if (i < n)
      tmin[i + tsize] = tmax[i + tsize] = a[i];
    else {
      tmin[i] = INF;
      tmax[i] = -INF;
    }
  for (int i = tsize - 1; i >= 1; i--) {
    tmin[i] = min(tmin[((i) << 1)], tmin[(((i) << 1) + 1)]);
    tmax[i] = max(tmax[((i) << 1)], tmax[(((i) << 1) + 1)]);
  }
  int lf = 1, rg = n;
  while (rg != lf) {
    int mid = (lf + rg + 1) >> 1;
    if (!check(mid))
      rg = mid - 1;
    else
      lf = mid;
  }
  assert(check(lf));
  cout << lf << " " << sz << endl;
  for (int i = 0; i < int(sz); i++)
    printf("%d %d\n", ans[i].first + 1, ans[i].second + 1);
  return 0;
}
