#include <bits/stdc++.h>
using namespace std;
pair<int, int> re[12345];
int tot;
int va[123];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int mx, mn;
  mx = 0;
  mn = 10000;
  int posmn, posmx;
  for (int i = 0; i < n; i++) {
    scanf("%d", &va[i]);
    mn = min(va[i], mn);
    mx = max(va[i], mx);
  }
  for (int i = 0; i < m; i++) {
    mn = 10001;
    mx = -1;
    for (int j = 0; j < n; j++) {
      if (mx < va[j]) {
        mx = va[j];
        posmx = j;
      }
      if (mn > va[j]) {
        mn = va[j];
        posmn = j;
      }
    }
    if (mn + 1 >= mx)
      break;
    else {
      va[posmx]--;
      va[posmn]++;
      re[tot++] = make_pair(posmx, posmn);
    }
  }
  mn = 10001;
  mx = -1;
  for (int j = 0; j < n; j++) {
    if (mx < va[j]) {
      mx = va[j];
    }
    if (mn > va[j]) {
      mn = va[j];
    }
  }
  printf("%d %d\n", mx - mn, tot);
  for (int i = 0; i < tot; i++) {
    printf("%d %d\n", re[i].first + 1, re[i].second + 1);
  }
  return 0;
}
