#include <bits/stdc++.h>
using namespace std;
const double Pi = acos(-1.0);
int main() {
  int N, K, h[100000];
  if (fopen("data.in", "r")) freopen("data.in", "r", stdin);
  scanf("%d", &N);
  scanf("%d", &K);
  for (int i = 0; i < N; i++) scanf("%d", &h[i]);
  vector<pair<int, pair<int, int> > > ans;
  multiset<int> window;
  for (int l = 0, r = 0; r < N; r++) {
    window.insert(h[r]);
    while (*window.rbegin() - *window.begin() > K)
      window.erase(window.find(h[l++]));
    ans.push_back(make_pair(window.size(), make_pair(l, r)));
  }
  sort(ans.begin(), ans.end());
  int maxlen = ans.size() ? ans.back().first : 0, num = 0;
  for (int i = 0; i < (int)ans.size(); i++)
    if (ans[i].first == maxlen) num++;
  printf("%d %d\n", maxlen, num);
  for (int i = 0; i < (int)ans.size(); i++)
    if (ans[i].first == maxlen)
      printf("%d %d\n", ans[i].second.first + 1, ans[i].second.second + 1);
  return 0;
}
