#include <bits/stdc++.h>
using namespace std;
long long int pmin, pmax, mx, mn;
void find(long long int a[], long long int n) {
  int j;
  pmin = pmax = 0;
  mx = -1;
  mn = 1e6;
  for (j = 1; j <= n; j++) {
    if (a[j] > mx) {
      mx = a[j];
      pmax = j;
    }
    if (a[j] < mn) {
      mn = a[j];
      pmin = j;
    }
  }
}
int main() {
  vector<pair<long long int, long long int> > v;
  long long int n, i, k, d = 1e9, a[105];
  cin >> n >> k;
  for (i = 1; i <= n; i++) cin >> a[i];
  for (i = 1; i <= k; i++) {
    find(a, n);
    if (mx - mn <= d && pmax != pmin) {
      d = mx - mn;
      v.push_back(make_pair(pmax, pmin));
      a[pmax]--;
      a[pmin]++;
    } else
      break;
  }
  sort(a + 1, a + n + 1);
  cout << a[n] - a[1] << " " << v.size() << endl;
  for (i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << endl;
  v.clear();
  return 0;
}
