#include <bits/stdc++.h>
using namespace std;
template <typename T>
void chmin(T &x, const T &y) {
  if (x > y) x = y;
}
template <typename T>
void chmax(T &x, const T &y) {
  if (x < y) x = y;
}
int read() {
  char c;
  while ((c = getchar()) < '-')
    ;
  if (c == '-') {
    int x = (c = getchar()) - '0';
    while ((c = getchar()) >= '0') x = x * 10 + c - '0';
    return -x;
  }
  int x = c - '0';
  while ((c = getchar()) >= '0') x = x * 10 + c - '0';
  return x;
}
const int N = 1e5 + 5;
struct que {
  pair<int, int> q[N];
  int h, t;
  void push(const pair<int, int> &x) {
    while (h <= t && x.second > q[t].second) --t;
    q[++t] = x;
  }
  int get(int l) {
    while (q[h].first < l) ++h;
    return q[h].second;
  }
};
que zheng, fu;
int a[N];
int main() {
  int n = read(), k = read();
  for (int i = 1; i <= n; ++i) a[i] = read();
  a[n + 1] = 1e9;
  static int q[N];
  int ans = -1, top = 0;
  int j = 0;
  for (int i = 1; i <= n; ++i) {
    while (j < i || zheng.get(i) + fu.get(i) <= k) {
      ++j;
      zheng.push(make_pair(j, a[j]));
      fu.push(make_pair(j, -a[j]));
    }
    if (j - i > ans) {
      ans = j - i;
      q[top = 1] = i;
    } else if (j - i == ans)
      q[++top] = i;
  }
  printf("%d %d\n", ans, top);
  for (int i = 1; i <= top; ++i) printf("%d %d\n", q[i], q[i] + ans - 1);
}
