#include <bits/stdc++.h>
using namespace std;
stack<pair<int, pair<int, int> > > s[2];
void push(int q, int z) {
  if (s[z].empty())
    s[z].push(make_pair(q, make_pair(q, q)));
  else
    s[z].push(make_pair(q, make_pair(min(s[z].top().second.first, q),
                                     max(s[z].top().second.second, q))));
}
void pop() {
  if (s[1].empty())
    while (!s[0].empty()) push(s[0].top().first, 1), s[0].pop();
  s[1].pop();
}
int diff() {
  int maxx;
  int minn;
  if (!s[0].empty())
    minn = s[0].top().second.first, maxx = s[0].top().second.second;
  else if (!s[1].empty())
    minn = s[1].top().second.first, maxx = s[1].top().second.second;
  if (!s[1].empty() && !s[0].empty())
    minn = min(s[0].top().second.first, s[1].top().second.first),
    maxx = max(s[0].top().second.second, s[1].top().second.second);
  return maxx - minn;
}
vector<pair<int, int> > result;
int a[100000];
int main() {
  int l = 0;
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) scanf("%d", &a[i]);
  for (int r = 0; r < n; r++) {
    push(a[r], 0);
    while (diff() > k && r >= l) pop(), l++;
    if (r >= l)
      if (result.empty() ||
          result.back().second - result.back().first < r - l) {
        result.clear();
        result.push_back(make_pair(l, r));
      } else if (!result.empty() &&
                 result.back().second - result.back().first == (r - l))
        result.push_back(make_pair(l, r));
  }
  printf("%d %d\n", result.back().second - result.back().first + 1,
         result.size());
  for (int i = 0; i < result.size(); i++)
    printf("%d %d\n", result[i].first + 1, result[i].second + 1);
  return 0;
}
