#include <bits/stdc++.h>
using namespace std;
long long n, i, j, k, l, t = 1, flag = 0, m, a[100005];
vector<pair<long long, long long> > tree(400000);
map<long long, vector<pair<long long, long long> > > ans;
map<long long, vector<pair<long long, long long> > >::reverse_iterator it;
void build(int node, int low, int high) {
  if (low == high) {
    tree[node] = {a[low], a[low]};
    return;
  } else {
    int mid = (low + high) / 2;
    build(2 * node, low, mid);
    build(2 * node + 1, mid + 1, high);
    tree[node].first = max(tree[2 * node].first, tree[2 * node + 1].first);
    tree[node].second = min(tree[2 * node].second, tree[2 * node + 1].second);
    return;
  }
}
pair<long long, long long> query(int node, int low, int high, int l, int r) {
  if (low > r || high < l)
    return {-1e9, 1e9};
  else if (l <= low && r >= high)
    return tree[node];
  else {
    int mid = (low + high) / 2;
    pair<long long, long long> p1 = query(2 * node, low, mid, l, r);
    pair<long long, long long> p2 = query(2 * node + 1, mid + 1, high, l, r);
    return {max(p1.first, p2.first), min(p1.second, p2.second)};
  }
}
bool check(int l, int r) {
  pair<long long, long long> temp = query(1, 0, n - 1, l, r);
  return temp.first - temp.second <= k;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (i = 0; i < n; i++) cin >> a[i];
  build(1, 0, n - 1);
  for (i = 0; i < n; i++) {
    int high = n - 1, low = i, mid = (high + low) / 2;
    while (high - low > 1) {
      if (check(i, mid))
        low = mid;
      else
        high = mid;
      mid = (low + high) / 2;
    }
    if (check(i, high)) {
      ans[high - i + 1].push_back({i, high});
    } else
      ans[low - i + 1].push_back({i, low});
  }
  it = ans.rbegin();
  cout << it->first << " " << it->second.size() << endl;
  for (i = 0; i < it->second.size(); i++) {
    cout << it->second[i].first + 1 << " " << it->second[i].second + 1 << endl;
  }
  return 0;
}
