#include <bits/stdc++.h>
using namespace std;
const int maxn = 100100;
long long arr[maxn], n, k;
class node {
 public:
  long long minv, maxv;
} tree[4 * maxn];
node mergef(node a, node b) {
  return {min(a.minv, b.minv), max(a.maxv, b.maxv)};
}
void build(int li = 1, int ri = n, int index = 1) {
  if (li == ri)
    tree[index].minv = tree[index].maxv = arr[li];
  else {
    int mid = (li + ri) / 2;
    build(li, mid, 2 * index);
    build(mid + 1, ri, 2 * index + 1);
    tree[index] = mergef(tree[2 * index], tree[2 * index + 1]);
  }
}
node query(int ql, int qr, int li = 1, int ri = n, int index = 1) {
  if (li > qr || ri < ql) return {LLONG_MAX, LLONG_MIN};
  if (li >= ql && ri <= qr)
    return tree[index];
  else {
    int mid = (li + ri) / 2;
    return mergef(query(ql, qr, li, mid, 2 * index),
                  query(ql, qr, mid + 1, ri, 2 * index + 1));
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
  }
  build();
  long long result = 0LL;
  for (int i = 1; i <= n; i++) {
    long long ind_l = i, ind_r = i;
    int l = 0, r = i + 1;
    while (r - l > 1) {
      int m = (l + r) / 2;
      node curr = query(m, i);
      if (curr.minv == arr[i] && curr.maxv <= arr[i] + k)
        r = m;
      else
        l = m;
    }
    ind_l = r;
    l = i - 1, r = n + 1;
    while (r - l > 1) {
      int m = (l + r) / 2;
      node curr = query(i, m);
      if (curr.minv == arr[i] && curr.maxv <= arr[i] + k)
        l = m;
      else
        r = m;
    }
    ind_r = l;
    result = max(result, ind_r - ind_l + 1);
  }
  vector<pair<int, int> > v;
  for (int i = 1; i <= n; i++) {
    if (i >= result) {
      if (query(i - result + 1, i).maxv - query(i - result + 1, i).minv <= k) {
        v.push_back({i - result + 1, i});
      }
    }
  }
  cout << result << " " << v.size() << "\n";
  for (auto i : v) {
    cout << i.first << " " << i.second << "\n";
  }
}
