#include <bits/stdc++.h>
template <typename t>
inline t sqr(const t x) {
  return x * x;
}
const int maxn = 100000 + 5;
int n, k;
int h[maxn];
std::map<int, int> hh;
int low = 0;
int intSize = 1;
int maxSize = 1;
std::vector<std::pair<int, int> > ans;
int main() {
  assert(std::cin && std::cout);
  std::ios_base::sync_with_stdio(false);
  std::cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    std::cin >> h[i];
  }
  hh[h[0]] = 1;
  ans.push_back(std::make_pair(0, 0));
  for (int i = 1; i < n; ++i) {
    ++hh[h[i]];
    ++intSize;
    while ((--hh.end())->first - hh.begin()->first > k) {
      int dh = h[low++];
      --intSize;
      if (--hh[dh] == 0) hh.erase(dh);
    }
    if (intSize > maxSize) {
      maxSize = intSize;
      ans.clear();
      ans.push_back(std::make_pair(low, i));
    } else if (intSize == maxSize) {
      ans.push_back(std::make_pair(low, i));
    }
  }
  std::cout << maxSize << ' ' << ans.size() << '\n';
  for (int i = 0; i < (int)ans.size(); ++i) {
    std::cout << ans[i].first + 1 << ' ' << ans[i].second + 1 << '\n';
  }
  return 0;
}
