#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
long long a[N], tree[N * 3], tree1[N * 3];
int queryMin(int node, int b, int e, int i, int j) {
  if (i > e || j < b) return 1e9;
  if (b >= i && e <= j) return tree[node];
  int Left = node * 2;
  int Right = node * 2 + 1;
  int mid = (b + e) / 2;
  int p1 = queryMin(Left, b, mid, i, j);
  int p2 = queryMin(Right, mid + 1, e, i, j);
  return min(p1, p2);
}
void updateMin(int node, int b, int e, int i, int newvalue) {
  if (i > e || i < b) return;
  if (b >= i && e <= i) {
    tree[node] = newvalue;
    return;
  }
  int Left = node * 2;
  int Right = node * 2 + 1;
  int mid = (b + e) / 2;
  updateMin(Left, b, mid, i, newvalue);
  updateMin(Right, mid + 1, e, i, newvalue);
  tree[node] = min(tree[Left], tree[Right]);
}
int queryMax(int node, int b, int e, int i, int j) {
  if (i > e || j < b) return -1e9;
  if (b >= i && e <= j) return tree1[node];
  int Left = node * 2;
  int Right = node * 2 + 1;
  int mid = (b + e) / 2;
  int p1 = queryMax(Left, b, mid, i, j);
  int p2 = queryMax(Right, mid + 1, e, i, j);
  return max(p1, p2);
}
void updateMax(int node, int b, int e, int i, int newvalue) {
  if (i > e || i < b) return;
  if (b >= i && e <= i) {
    tree1[node] = newvalue;
    return;
  }
  int Left = node * 2;
  int Right = node * 2 + 1;
  int mid = (b + e) / 2;
  updateMax(Left, b, mid, i, newvalue);
  updateMax(Right, mid + 1, e, i, newvalue);
  tree1[node] = max(tree1[Left], tree1[Right]);
}
int main() {
  long long n, q, i, j = 0, temp, t, k, ans = 0, sum = 0, x, y, cnt = 0, m,
                     fg = 0, mx = 0, mx1 = 0, mn = 8000000000000000000,
                     mn1 = 8000000000000000000;
  cin >> n >> k;
  for (i = 1; i <= n; i++) cin >> a[i];
  vector<pair<int, int> > v;
  long long l = 1, r = 1;
  cnt = 0;
  for (; r <= n; r++) {
    updateMax(1, 1, n, r, a[r]);
    updateMin(1, 1, n, r, a[r]);
    int low = queryMin(1, 1, n, l, r);
    int high = queryMax(1, 1, n, l, r);
    cnt++;
    if (high - low <= k and cnt > mx) {
      mx = cnt;
      v.clear();
      v.push_back({l, r});
    } else if (high - low <= k and cnt >= mx) {
      mx = cnt;
      v.push_back({l, r});
    } else if (high - low > k) {
      while (1) {
        l++;
        low = queryMin(1, 1, n, l, r);
        high = queryMax(1, 1, n, l, r);
        cnt--;
        if (low - high <= k) break;
      }
      if (cnt > mx) {
        mx = cnt;
        v.clear();
        v.push_back({l, r});
      } else if (high - low <= k and cnt >= mx) {
        mx = cnt;
        v.push_back({l, r});
      }
    }
  }
  int sz = v.size();
  cout << mx << " " << sz << endl;
  for (int i = 0; i < sz; i++) {
    cout << v[i].first << " " << v[i].second << endl;
  }
  return 0;
}
