#include <bits/stdc++.h>
using namespace std;
template <class T, class S>
ostream& operator<<(ostream& os, const pair<T, S>& v) {
  return os << "(" << v.first << ", " << v.second << ")";
}
template <class T>
ostream& operator<<(ostream& os, const vector<T>& v) {
  os << "[";
  for (int i = int(0); i <= int((static_cast<int>((v).size())) - 1); ++i) {
    if (i) os << ", ";
    os << v[i];
  }
  return os << "]";
}
template <class T>
bool setmax(T& _a, T _b) {
  if (_b > _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
bool setmin(T& _a, T _b) {
  if (_b < _a) {
    _a = _b;
    return true;
  }
  return false;
}
template <class T>
T gcd(T _a, T _b) {
  return _b == 0 ? _a : gcd(_b, _a % _b);
}
int main() {
  ios_base::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  vector<int> a(n);
  for (int& x : a) cin >> x;
  multiset<int> s;
  int ansv = 0;
  vector<pair<int, int> > ansp;
  int i = 0;
  for (int j = int(0); j <= int((n)-1); ++j) {
    s.insert(a[j]);
    while (*s.rbegin() - *s.begin() > k) {
      s.erase(s.find(a[i++]));
    }
    if (setmax(ansv, j - i + 1)) {
      ansp.clear();
    }
    if (ansv == j - i + 1) {
      ansp.push_back(make_pair(i, j));
    }
  }
  cout << ansv << " " << ansp.size() << endl;
  for (const auto& p : ansp) {
    cout << p.first + 1 << " " << p.second + 1 << endl;
  }
  return 0;
}
