#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int t[105] = {};
  for (int i = 0; i < n; i++) cin >> t[i];
  vector<int> x, y;
  int r = 0;
  for (int I = 0; I < k; I++) {
    pair<int, int> h, g;
    h.first = 0, h.second = t[0];
    g.first = 0, g.second = t[0];
    for (int i = 0; i < n; i++) {
      if (t[i] > h.second) {
        h.first = i;
        h.second = t[i];
      }
      if (t[i] < g.second) {
        g.first = i;
        g.second = t[i];
      }
    }
    r = h.second - g.second;
    if (h.second - g.second > 1) {
      x.push_back(h.first + 1);
      y.push_back(g.first + 1);
      t[h.first]--;
      t[g.first]++;
    } else {
      break;
    }
  }
  int p = 9999999, w = 0;
  for (int i = 0; i < n; i++) {
    p = min(p, t[i]);
    w = max(w, t[i]);
  }
  r = w - p;
  cout << r << " " << x.size() << endl;
  for (int i = 0; i < x.size(); i++) {
    cout << x[i] << " " << y[i] << endl;
  }
  return 0;
}
