#include <bits/stdc++.h>
using namespace std;
int n, k, arr[105];
vector<int> a, b;
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 0; i < n; ++i) scanf("%d", arr + i);
  while (k--) {
    int mx = -1e9, mn = 1e9, aidx, bidx;
    for (int i = 0; i < n; ++i)
      if (arr[i] > mx) mx = arr[i], aidx = i;
    for (int i = 0; i < n; ++i)
      if (i != aidx && arr[i] < mn) mn = arr[i], bidx = i;
    if (mx - mn <= 1) break;
    --arr[aidx], ++arr[bidx];
    a.push_back(aidx + 1), b.push_back(bidx + 1);
  }
  sort(arr, arr + n);
  printf("%d %d\n", arr[n - 1] - arr[0], a.size());
  for (int i = 0; i < a.size(); ++i) printf("%d %d\n", a[i], b[i]);
  return 0;
}
