#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, int> a, pair<int, int> b) {
  if (a.first < b.first)
    return true;
  else if (a.first == b.first && a.second < b.second)
    return true;
  else
    return false;
}
int main() {
  int n, k, x;
  scanf("%d %d", &n, &k);
  vector<pair<int, int> > v;
  for (int i = (0); i < (n); i++) {
    scanf("%d", &x);
    v.push_back(make_pair(x, i + 1));
  }
  vector<pair<int, int> > ans;
  int cnt = 0, l, r;
  while (k > 0) {
    sort(v.begin(), v.end(), comp);
    l = v[0].first;
    r = v[n - 1].first;
    if (l == r)
      break;
    else {
      v[0].first++;
      v[n - 1].first--;
      ans.push_back(make_pair(v[n - 1].second, v[0].second));
      k--;
      cnt++;
    }
  }
  sort(v.begin(), v.end(), comp);
  l = v[0].first;
  r = v[n - 1].first;
  cout << r - l << " " << cnt << endl;
  for (int i = (0); i < (cnt); i++)
    cout << ans[i].first << " " << ans[i].second << endl;
  return 0;
}
