#include <bits/stdc++.h>
using namespace std;
struct tower {
  int num, val;
};
tower h[105];
int op[1005][2];
bool cmp(tower a, tower b) { return a.val < b.val; }
int main(void) {
  int n, k;
  scanf("%d %d", &n, &k);
  int maxx = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &h[i].val);
    maxx += h[i].val;
    h[i].num = i + 1;
  }
  int cnt = 0;
  for (int i = 0; i < k; i++, cnt++) {
    sort(h, h + n, cmp);
    if (h[n - 1].val <= maxx / n + (maxx % n == 0 ? 0 : 1) &&
        h[0].val >= maxx / n)
      break;
    h[n - 1].val--;
    h[0].val++;
    op[cnt][0] = h[n - 1].num;
    op[cnt][1] = h[0].num;
  }
  sort(h, h + n, cmp);
  printf("%d %d\n", h[n - 1].val - h[0].val, cnt);
  for (int i = 0; i < cnt; i++) printf("%d %d\n", op[i][0], op[i][1]);
  return 0;
}
