#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-8;
template <class T>
T abs(T a) {
  return a >= 0 ? a : -a;
}
template <class T>
T sqr(T a) {
  return a * a;
}
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <class T>
T mod(T a, T b) {
  return (a % b + b) % b;
}
template <class T>
T addmod(T a, T b, T c) {
  return (T)mod((long long)a + b, (long long)c);
}
template <class T>
T mulmod(T a, T b, T c) {
  return (T)mod((long long)a * b, (long long)c);
}
template <class T>
T powmod(T a, T b, T c) {
  return (T)mod(
      b ? mulmod(mod(sqr((long long)powmod(a, b >> 1, c)), (long long)c),
                 (b & 1LL) ? a : 1LL, (long long)c)
        : 1LL,
      (long long)c);
}
template <class T>
void maxe(T &a, T b) {
  a = max(a, b);
}
template <class T>
void mine(T &a, T b) {
  a = min(a, b);
}
template <class T>
void mode(T &a, T b) {
  a = mod(a, b);
}
template <class T>
void addmode(T &a, T b, T c) {
  a = addmod(a, b, c);
}
template <class T>
void mulmode(T &a, T b, T c) {
  a = mulmod(a, b, c);
}
template <class T>
void powmode(T &a, T b, T c) {
  a = powmod(a, b, c);
}
int iszero(double a) { return abs(a) <= eps; }
template <class T>
void geti(T &a) {
  a = 0;
  long long b = 1;
  char c = getchar();
  if (c == '-')
    b = -1;
  else
    a = c - 48;
  while ((c = getchar()) != ' ' && c != '\n') a = a * 10 + c - 48;
  a *= b;
}
void fileio_in_out() {
  freopen(".in", "r", stdin);
  freopen(".out", "w", stdout);
}
void fileio_txt() {
  freopen("input.txt", "r", stdin);
  freopen("output.txt", "w", stdout);
}
int arr[100005], n, k, cmx, cmn, s[100005];
struct segTree {
  int mx, mn;
} tree[1 << 18];
void insert(int cs, int in, int s, int e) {
  if (s == e) {
    tree[cs].mx = tree[cs].mn = arr[in];
    return;
  }
  int mid = (s + e) / 2;
  if (in <= mid)
    insert(2 * cs, in, s, mid);
  else
    insert(2 * cs + 1, in, mid + 1, e);
  tree[cs].mx = max(tree[2 * cs].mx, tree[2 * cs + 1].mx);
  tree[cs].mn = min(tree[2 * cs].mn, tree[2 * cs + 1].mn);
}
bool stop;
int ans;
bool ok(int mx, int mn) {
  int tmx = max(cmx, mx);
  int tmn = min(cmn, mn);
  if (tmx - tmn <= k) {
    cmx = tmx;
    cmn = tmn;
    return true;
  }
  return false;
}
void cal(int cs, int s1, int e1, int s, int e) {
  if (stop) return;
  int mid = (s + e) / 2;
  if (s1 == s && e1 == e) {
    if (ok(tree[cs].mx, tree[cs].mn))
      ans += (e - s + 1);
    else if (s == e) {
      stop = true;
    } else if (!stop) {
      if (ok(tree[2 * cs].mx, tree[2 * cs].mn)) {
        ans += (mid - s + 1);
        cal(2 * cs + 1, mid + 1, e, mid + 1, e);
      } else {
        cal(2 * cs, s, mid, s, mid);
        stop = true;
      }
    }
    return;
  }
  if (s1 <= mid) cal(2 * cs, s1, min(mid, e1), s, mid);
  if (e1 > mid) cal(2 * cs + 1, max(s1, mid + 1), e1, mid + 1, e);
}
int main() {
  cin >> n >> k;
  for (int i = 1; i < (n + 1); ++i) {
    cin >> arr[i];
    insert(1, i, 1, n);
  }
  int MX = 0, in = 0;
  for (int i = 1; i < (n + 1); ++i) {
    ans = 0;
    stop = false;
    cmx = cmn = arr[i];
    cal(1, i + 1, n, 1, n);
    if (ans + 1 > MX) {
      MX = ans + 1;
      in = 0;
      s[in++] = i;
    } else if (ans + 1 == MX)
      s[in++] = i;
  }
  cout << MX << " " << in << endl;
  for (int i = 0; i < (in); ++i) cout << s[i] << " " << s[i] + MX - 1 << endl;
  return 0;
}
