#include <bits/stdc++.h>
using namespace std;
const int nStackSize = 100001;
struct stPeriod {
  int nS;
  int nE;
};
struct stQueue {
  int v[nStackSize];
  int nStart;
  int nEnd;
  stQueue() {
    nStart = 0;
    nEnd = 0;
  }
  void clear() {
    nStart = 0;
    nEnd = 0;
  }
  int GetFront(void) {
    if (nStart == nEnd) return 0x7fffffff;
    return v[nStart];
  }
  int GetBack(void) {
    if (nStart == nEnd) return 0x7fffffff;
    if (nEnd == 0)
      return v[nStackSize - 1];
    else
      return v[nEnd - 1];
  }
  int GetSize(void) { return (nEnd - nStart + nStackSize) % nStackSize; }
  void pop_front(void) {
    if (nStart == nEnd) return;
    ++nStart;
    nStart = nStart % nStackSize;
  }
  void pop_back(void) {
    if (nStart == nEnd) return;
    --nEnd;
    nEnd = (nEnd + nStackSize) % nStackSize;
  }
  void push_back(int x) {
    if ((nEnd + 1) % nStackSize == nStart) return;
    v[nEnd] = x;
    nEnd = (nEnd + 1) % nStackSize;
  }
};
int h[nStackSize];
int nN;
int nK;
vector<stPeriod> vPeriods;
int nMaxLen;
stQueue lHighs, lLows;
int main(void) {
  scanf("%d %d", &nN, &nK);
  for (int i = 0; i < nN; ++i) scanf("%d", h + i);
  int nLowLen = 0;
  int nHighLen = nN;
  int nNowLen = nN;
  while (true) {
    vPeriods.clear();
    lHighs.clear();
    lLows.clear();
    int nStart = 0;
    int nEnd;
    for (nEnd = 0; nEnd < nNowLen; ++nEnd) {
      while (lHighs.GetSize() > 0 && h[lHighs.GetBack()] <= h[nEnd])
        lHighs.pop_back();
      lHighs.push_back(nEnd);
      while (lLows.GetSize() > 0 && h[lLows.GetBack()] >= h[nEnd])
        lLows.pop_back();
      lLows.push_back(nEnd);
    }
    if (h[lHighs.GetFront()] - h[lLows.GetFront()] <= nK) {
      stPeriod p;
      p.nS = nStart;
      p.nE = nEnd - 1;
      vPeriods.push_back(p);
    }
    for (; nEnd < nN; ++nEnd) {
      if (lHighs.GetFront() == nStart) lHighs.pop_front();
      if (lLows.GetFront() == nStart) lLows.pop_front();
      ++nStart;
      while (lHighs.GetSize() > 0 && h[lHighs.GetBack()] <= h[nEnd])
        lHighs.pop_back();
      lHighs.push_back(nEnd);
      while (lLows.GetSize() > 0 && h[lLows.GetBack()] >= h[nEnd])
        lLows.pop_back();
      lLows.push_back(nEnd);
      if (h[lHighs.GetFront()] - h[lLows.GetFront()] <= nK) {
        stPeriod p;
        p.nS = nStart;
        p.nE = nEnd;
        vPeriods.push_back(p);
      }
    }
    if (vPeriods.size() > 0)
      nLowLen = nNowLen;
    else
      nHighLen = nNowLen;
    if (nHighLen == nLowLen || nHighLen == nLowLen + 1) {
      nMaxLen = nLowLen;
      if (vPeriods.size() > 0) break;
    }
    nNowLen = (nHighLen + nLowLen) / 2;
  }
  printf("%d %d\n", nMaxLen, vPeriods.size());
  for (int i = 0; i < (int)vPeriods.size(); ++i)
    printf("%d %d\n", vPeriods[i].nS + 1, vPeriods[i].nE + 1);
  return 0;
}
