#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
multiset<int> cal;
vector<pair<int, int> > q;
int a[maxn];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int j = 0;
  int ans = -1;
  for (int i = 0; i < n; i++) {
    cal.insert(a[i]);
    while (*cal.rbegin() - *cal.begin() > k) {
      cal.erase(cal.find(a[j++]));
    }
    if (i - j + 1 > ans) {
      ans = i - j + 1;
      q.clear();
    }
    if (i - j + 1 == ans) {
      q.push_back(make_pair(j + 1, i + 1));
    }
  }
  printf("%d %d\n", ans, q.size());
  for (int i = 0; i < q.size(); i++) {
    cout << q[i].first << ' ' << q[i].second << endl;
  }
  return 0;
}
