#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const int maxn = 1e5 + 5;
int n, k;
int a[maxn];
bool f(int x) {
  multiset<int> s;
  for (int i = 0; i < x; ++i) {
    s.insert(a[i]);
  }
  for (int i = x - 1; i <= n - 1; ++i) {
    int l = *(s.rbegin());
    int ss = *(s.begin());
    if (l - ss <= k) return 1;
    s.erase(s.find(a[i - x + 1]));
    if (i + 1 < n) s.insert(a[i + 1]);
  }
  return 0;
}
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 ans1 = 0, l = 1, r = n;
  while (l <= r) {
    int m = (l + r) / 2;
    if (f(m)) {
      ans1 = max(ans1, m);
      l = m + 1;
    } else
      r = m - 1;
  }
  cout << ans1 << " ";
  vector<pair<int, int> > v;
  multiset<int> s;
  for (int i = 0; i < ans1; ++i) {
    s.insert(a[i]);
  }
  for (int i = ans1 - 1; i <= n - 1; ++i) {
    l = *(s.rbegin());
    int ss = *(s.begin());
    if (l - ss <= k) {
      v.emplace_back(i - ans1 + 1, i);
    }
    s.erase(s.find(a[i - ans1 + 1]));
    if (i + 1 < n) s.insert(a[i + 1]);
  }
  cout << v.size() << endl;
  for (auto i : v) {
    cout << i.first + 1 << " " << i.second + 1 << endl;
  }
  return 0;
}
