#include <bits/stdc++.h>
using namespace std;
const int N = 100 * 1001;
int n, k, a[N];
vector<int> cnt[N];
multiset<int> s;
bool solve(int m) {
  for (int i = 0; i < m; i++) s.insert(a[i]);
  if (*--s.end() - *s.begin() <= k) cnt[m].push_back(1);
  for (int i = 1; i <= n - m; i++) {
    s.insert(a[m + i - 1]);
    s.erase(s.find(a[i - 1]));
    if (*--s.end() - *s.begin() <= k) {
      cnt[m].push_back(i + 1);
    }
  }
  s.clear();
  return cnt[m].size();
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  int l = 0, r = n + 1;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (solve(mid))
      l = mid;
    else
      r = mid;
  }
  cout << l << " " << cnt[l].size() << "\n";
  for (auto x : cnt[l]) cout << x << " " << x + l - 1 << "\n";
}
