#include <bits/stdc++.h>
using namespace std;
int main() {
  if (fopen("input.txt", "r")) {
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
  }
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  vector<int> h(n);
  for (int i = 0; i != n; ++i) {
    cin >> h[i];
  }
  int maxLen = 1;
  vector<pair<int, int>> segments;
  multiset<int> books;
  books.insert(h[0]);
  int il = 0, ir = 0;
  while (true) {
    auto back = books.end();
    --back;
    if (*back - *books.begin() <= k) {
      if (ir - il + 1 > maxLen) {
        maxLen = ir - il + 1;
        segments.clear();
        segments.push_back({il, ir});
      } else if (ir - il + 1 == maxLen) {
        segments.push_back({il, ir});
      }
      ++ir;
      if (ir == n) break;
      books.insert(h[ir]);
    } else {
      books.erase(books.lower_bound(h[il]));
      ++il;
    }
  }
  cout << maxLen << ' ' << segments.size() << '\n';
  for (auto p : segments) {
    cout << p.first + 1 << ' ' << p.second + 1 << '\n';
  }
  return 0;
}
