#include <bits/stdc++.h>
using namespace std;
const int inf = 100000000;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> g(n);
  for (int i = 0; i < n; i++) {
    cin >> g[i];
  }
  int l, j;
  vector<int> ans;
  int mn = inf, mx = -inf, omx = -inf, omn = inf;
  while (k--) {
    mn = inf;
    mx = -inf;
    for (int i = 0; i < n; i++) {
      if (g[i] > mx) {
        mx = g[i];
        l = i;
      }
      if (g[i] < mn) {
        mn = g[i];
        j = i;
      }
    }
    if (mx == mn || mx - 1 == mn) break;
    omx = mx;
    omn = mn;
    ans.push_back(l + 1);
    ans.push_back(j + 1);
    g[l]--;
    g[j]++;
  }
  mn = inf;
  mx = -inf;
  for (int i = 0; i < n; i++) {
    if (g[i] > mx) {
      mx = g[i];
    }
    if (g[i] < mn) {
      mn = g[i];
    }
  }
  cout << mx - mn << " " << ans.size() / 2 << endl;
  for (int i = 0; i < ans.size(); i += 2) {
    cout << ans[i] << " " << ans[i + 1] << endl;
  }
}
