#include <bits/stdc++.h>
using namespace std;
const int maxn = 111;
const int INF = (int)1e6;
int a[maxn];
pair<int, int> ans[1000 + 10];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  int mx = -INF, mi = INF;
  int lx, li;
  for (int i = 1; i <= n; i++) {
    if (mx < a[i]) {
      mx = a[i];
      lx = i;
    }
    if (mi > a[i]) {
      mi = a[i];
      li = i;
    }
  }
  int s = a[lx] - a[li], m = 0;
  for (int j = 0; j < k; j++) {
    int mx = -INF, mi = INF;
    int lx, li;
    for (int i = 1; i <= n; i++) {
      if (mx < a[i]) {
        mx = a[i];
        lx = i;
      }
      if (mi > a[i]) {
        mi = a[i];
        li = i;
      }
    }
    if (lx == li) break;
    a[lx]--;
    a[li]++;
    int l = lx, r = li;
    mx = -INF, mi = INF;
    for (int i = 1; i <= n; i++) {
      if (mx < a[i]) {
        mx = a[i];
        lx = i;
      }
      if (mi > a[i]) {
        mi = a[i];
        li = i;
      }
    }
    if ((a[lx] - a[li]) > s)
      break;
    else {
      s = a[lx] - a[li];
      ans[m++] = make_pair(l, r);
    }
  }
  printf("%d %d\n", s, m);
  for (int i = 0; i < m; i++) {
    printf("%d %d\n", ans[i].first, ans[i].second);
  }
  return 0;
}
