#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x) {
  x = 0;
  char ch = getchar();
  long long f = 1;
  while (!isdigit(ch)) {
    if (ch == '-') f *= -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  x *= f;
}
template <typename T, typename... Args>
void read(T &first, Args &...args) {
  read(first);
  read(args...);
}
template <typename T>
void write(T arg) {
  T x = arg;
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x > 9) {
    write(x / 10);
  }
  putchar(x % 10 + '0');
}
template <typename T, typename... Ts>
void write(T arg, Ts... args) {
  write(arg);
  if (sizeof...(args) != 0) {
    putchar(' ');
    write(args...);
  }
}
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
const int N = 2e5 + 5;
int n, k;
int a[N], maxn[N][32], minn[N][32];
void getST() {
  for (int i = 1; i <= n; ++i) maxn[i][0] = minn[i][0] = a[i];
  for (int j = 1; (1 << j) <= n; ++j)
    for (int i = 1; i + (1 << j) - 1 <= n; ++i) {
      maxn[i][j] = max(maxn[i][j - 1], maxn[i + (1 << (j - 1))][j - 1]);
      minn[i][j] = min(minn[i][j - 1], minn[i + (1 << (j - 1))][j - 1]);
    }
}
int RMQMax(int l, int r) {
  int k = log2(r - l + 1);
  return max(maxn[l][k], maxn[r - (1 << k) + 1][k]);
}
int RMQMin(int l, int r) {
  int k = log2(r - l + 1);
  return min(minn[l][k], minn[r - (1 << k) + 1][k]);
}
vector<pair<int, int> > ve;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  int len = -1;
  for (int i = 1; i <= n; i++) cin >> a[i];
  getST();
  for (int i = 1; i <= n; i++) {
    int l = i, r = n + 1;
    while (l < r) {
      int mid = (l + r) >> 1;
      if (RMQMax(i, mid) - RMQMin(i, mid) > k)
        r = mid;
      else
        l = mid + 1;
    }
    if (l - i > len) {
      ve.clear();
      len = l - i;
      ve.push_back(make_pair(i, l - 1));
    } else if (l - i == len)
      ve.push_back(make_pair(i, l - 1));
  }
  cout << len << ' ' << ve.size() << endl;
  for (auto it : ve) cout << it.first << ' ' << it.second << endl;
}
