#include <bits/stdc++.h>
using namespace std;
const int INF = 1000000000;
const long long BINF = 1000000000000000000ll;
const int N = 101;
int n, k, a[N], mx = -1, mn = INF, mni = INF, idmx, idmn, ans, lul[N * 10];
pair<int, int> did[N * 10];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mx = max(mx, a[i]);
    mn = min(mn, a[i]);
  }
  if (mx == mn) {
    cout << "0 0";
    return 0;
  }
  for (int i = 1; i <= k; i++) {
    mx = -1, mn = INF;
    for (int j = 1; j <= n; j++) {
      if (a[j] > mx) {
        mx = a[j];
        idmx = j;
      }
      if (a[j] < mn) {
        mn = a[j];
        idmn = j;
      }
    }
    if (a[idmx] > 0) {
      a[idmx]--;
      a[idmn]++;
      did[i] = make_pair(idmx, idmn);
    }
    mx = -1, mn = INF;
    for (int j = 1; j <= n; j++) {
      mx = max(mx, a[j]);
      mn = min(mn, a[j]);
    }
    lul[i] = mx - mn;
  }
  for (int i = 1; i <= k; i++) {
    if (lul[i] < mni) {
      mni = lul[i];
      ans = i;
    }
  }
  cout << mni << " " << ans << endl;
  for (int i = 1; i <= ans; i++)
    cout << did[i].first << " " << did[i].second << endl;
  return 0;
}
