#include <bits/stdc++.h>
using namespace std;
long long v[100005] = {0};
int main() {
  long long n, k;
  cin >> n >> k;
  for (long long i = (long long)(1); i <= (long long)(n); i++) cin >> v[i];
  long long start = 1, ans = 0;
  multiset<long long> s;
  set<long long> val;
  for (long long end = (long long)(1); end <= (long long)(n); end++) {
    s.insert(v[end]);
    while (start<end&& * s.rbegin() - *s.begin()> k) {
      s.erase(s.find(v[start]));
      start++;
    }
    if (end - start + 1 > ans) {
      val.clear();
      ans = end - start + 1;
    }
    if (end - start + 1 == ans) val.insert(start);
  }
  cout << ans << ' ' << val.size() << '\n';
  for (long long x : val) cout << x << ' ' << x + ans - 1 << '\n';
}
