#include <bits/stdc++.h>
using namespace std;
int arr[100010], cnt[1000010];
vector<pair<int, int> > ans;
set<int> S;
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  if (n == 1) {
    printf("1 1\n1 1");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
  }
  int a = 1;
  int l = 0, r = 0;
  while (l < n && r < n) {
    if (S.find(arr[r]) == S.end()) {
      S.insert(arr[r]);
      cnt[arr[r]]++;
    } else
      cnt[arr[r]]++;
    while (l<r&& * S.rbegin() - *S.begin()> k) {
      cnt[arr[l]]--;
      if (cnt[arr[l]] == 0) S.erase(arr[l]);
      l++;
    }
    if (r - l + 1 > a) {
      a = r - l + 1;
      ans.clear();
      ans.push_back(make_pair(l, r));
    } else if (r - l + 1 == a) {
      ans.push_back(make_pair(l, r));
    }
    r++;
  }
  printf("%d %d\n", a, (int)ans.size());
  for (int i = 0; i < (int)ans.size(); i++)
    printf("%d %d\n", ans[i].first + 1, ans[i].second + 1);
  return 0;
}
