#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n;
  cin >> k;
  int a[n + 1];
  int b[n + 1];
  for (int i = 1; i < n + 1; ++i) {
    cin >> a[i];
    b[i] = a[i];
  }
  int l = 1, t = 1;
  for (int i = 1; i < n + 1; ++i) {
    if (a[i] >= a[t]) t = i;
    if (a[i] <= a[l]) l = i;
  }
  int diff = (a[t] - a[l]);
  int cnt = 0;
  while (diff >= 2 && cnt < k) {
    cnt++;
    a[l]++;
    a[t]--;
    l = 1;
    t = 1;
    for (int i = 1; i < n + 1; ++i) {
      if (a[i] >= a[t]) t = i;
      if (a[i] <= a[l]) l = i;
    }
    diff = (a[t] - a[l]);
  }
  cout << diff << " " << cnt << "\n";
  l = 1, t = 1;
  for (int i = 1; i < n + 1; ++i) {
    if (b[i] >= b[t]) t = i;
    if (b[i] <= b[l]) l = i;
  }
  diff = (b[t] - b[l]);
  cnt = 0;
  while (diff >= 2 && cnt < k) {
    cnt++;
    b[l]++;
    b[t]--;
    cout << t << " " << l << "\n";
    l = 1;
    t = 1;
    for (int i = 1; i < n + 1; ++i) {
      if (b[i] >= b[t]) t = i;
      if (b[i] <= b[l]) l = i;
    }
    diff = (b[t] - b[l]);
  }
  return 0;
}
