#include <bits/stdc++.h>
using namespace std;
struct node {
  int from, to;
} q[10000];
int main() {
  int n, k;
  int a[1000];
  int he = 0, average, s = 0;
  int l = 0;
  memset(q, 0, sizeof(q));
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  while (k--) {
    int pos1, pos2;
    int MAX = -1, MIN = 10000000;
    for (int i = 0; i < n; i++) {
      if (a[i] > MAX) {
        MAX = a[i];
        pos1 = i;
      }
      if (a[i] < MIN) {
        MIN = a[i];
        pos2 = i;
      }
    }
    if (MAX - MIN <= 1) break;
    q[l].from = pos1;
    q[l++].to = pos2;
    a[pos1] -= 1;
    a[pos2] += 1;
  }
  int MAX = -1, MIN = 10000000;
  for (int i = 0; i < n; i++) {
    if (a[i] > MAX) {
      MAX = a[i];
    }
    if (a[i] < MIN) {
      MIN = a[i];
    }
  }
  printf("%d %d\n", MAX - MIN, l);
  for (int i = 0; i < l; i++) printf("%d %d\n", q[i].from + 1, q[i].to + 1);
  return 0;
}
