#include <bits/stdc++.h>
using namespace std;
class segmentTree {
 public:
  int size;
  vector<int> v;
  segmentTree(vector<int> &data) {
    for (int i = 0;; ++i)
      if ((1 << i) >= 2 * data.size()) {
        size = (1 << i);
        break;
      }
    v.resize(size);
    for (int i = size / 2; i < size; ++i) {
      if (i - size / 2 < data.size())
        v[i] = data[i - size / 2];
      else
        v[i] = ((1 << 31) - 1);
    }
    for (int i = size / 2 - 1; i > 0; --i) v[i] = min(v[2 * i], v[2 * i + 1]);
  }
  int findmin(int l, int r) { return find(0, size / 2, l, r, 1); }
  int findmax(int l, int r) { return abs(find(0, size / 2, l, r, 1)); }
  int find(int L, int R, int l, int r, int pos) {
    if (L == l && R == r) return v[pos];
    int m = (L + R) / 2;
    if (m <= l) return find(m, R, l, r, 2 * pos + 1);
    if (m >= r) return find(L, m, l, r, 2 * pos);
    return min(find(L, m, l, m, 2 * pos), find(m, R, m, r, 2 * pos + 1));
  }
};
int main() {
  vector<int> data, data_minus;
  int x, n, k;
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &x);
    data.push_back(x);
    x *= -1;
    data_minus.push_back(x);
  }
  segmentTree minTree(data), maxTree(data_minus);
  int l = 1, r = n + 1;
  while (r - l > 1) {
    int m = (r + l) / 2;
    bool ok = false;
    for (int i = 0; i < n - m + 1; ++i) {
      if (maxTree.findmax(i, i + m) - minTree.findmin(i, i + m) <= k) {
        ok = true;
        break;
      }
    }
    if (ok)
      l = m;
    else
      r = m;
  }
  cout << l << ' ';
  vector<pair<int, int> > res;
  for (int i = 0; i < n - l + 1; ++i)
    if (maxTree.findmax(i, i + l) - minTree.findmin(i, i + l) <= k)
      res.push_back(make_pair(i + 1, i + l));
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); ++i)
    printf("%d %d\n", res[i].first, res[i].second);
  return 0;
}
