#include <bits/stdc++.h>
int main() {
  int n, k, i, a[101], b[1001][2], cnt = 0, max, min, maxin, minin, j;
  scanf("%d%d", &n, &k);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (i = 0; i < k; i++) {
    min = 100000, max = 0;
    for (j = 1; j <= n; j++) {
      if (a[j] < min) {
        min = a[j];
        minin = j;
      }
      if (a[j] > max) {
        max = a[j];
        maxin = j;
      }
    }
    if (max - min >= 2) {
      a[maxin]--;
      a[minin]++;
      b[cnt][0] = maxin;
      b[cnt][1] = minin;
      cnt++;
    } else
      break;
  }
  min = 100000, max = 0;
  for (j = 1; j <= n; j++) {
    if (a[j] < min) {
      min = a[j];
      minin = j;
    }
    if (a[j] > max) {
      max = a[j];
      maxin = j;
    }
  }
  printf("%d %d\n", max - min, cnt);
  for (i = 0; i < cnt; i++) {
    printf("%d %d\n", b[i][0], b[i][1]);
  }
}
