#include <bits/stdc++.h>
typedef struct solution {
  int i;
  int j;
} sol;
int main() {
  int i, n, k, max, min, ans, steps = 0, imax, imin;
  sol answer[1000];
  scanf("%d%d", &n, &k);
  int a[n + 1];
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  while (steps <= k) {
    max = 0;
    min = 100000000;
    for (i = 1; i <= n; i++) {
      if (a[i] < min) {
        min = a[i];
        imin = i;
      }
      if (a[i] > max) {
        max = a[i];
        imax = i;
      }
    }
    ans = max - min;
    answer[steps].i = imax;
    answer[steps].j = imin;
    steps++;
    if (max == min || ans <= 1) break;
    a[imax]--;
    a[imin]++;
  }
  printf("%d %d\n", ans, steps - 1);
  for (i = 0; i < steps - 1; i++) printf("%d %d\n", answer[i].i, answer[i].j);
  return 0;
}
