#include <bits/stdc++.h>
using namespace std;
const int MAX = 102;
struct item {
  int h, idx;
};
bool cmp(const item& a, const item& b) {
  if (a.h == b.h)
    return a.idx < b.idx;
  else
    return a.h < b.h;
}
int n, k;
int a[MAX];
pair<int, int> P[1024];
int main() {
  cin >> n >> k;
  for (int i = 0, _n = (n); i < _n; ++i) {
    cin >> a[i];
  }
  int max_id, min_id, z = 0;
  while (k > 0) {
    int maxi = -1, mini = INT_MAX;
    for (int i = 0, _n = (n); i < _n; ++i) {
      if (a[i] > maxi) {
        maxi = a[i];
        max_id = i;
      }
      if (a[i] < mini) {
        mini = a[i];
        min_id = i;
      }
    }
    if (max_id == min_id) break;
    P[z++] = make_pair(max_id, min_id);
    a[max_id]--;
    a[min_id]++;
    k--;
  }
  int maxi = -1, mini = INT_MAX;
  for (int i = 0, _n = (n); i < _n; ++i) {
    if (a[i] > maxi) {
      maxi = a[i];
    }
    if (a[i] < mini) {
      mini = a[i];
    }
  }
  cout << maxi - mini << " " << z << endl;
  for (int i = 0, _n = (z); i < _n; ++i) {
    cout << P[i].first + 1 << " " << P[i].second + 1 << endl;
  }
  return 0;
}
