#include <bits/stdc++.h>
using namespace std;
struct s {
  int x, id;
};
bool cmp(s a, s b) { return a.x < b.x; }
int main() {
  int n, k, cnt = 0;
  cin >> n >> k;
  s l[10000];
  vector<int> f, t;
  for (int i = 0; i < (int)(n); ++i) {
    cin >> l[i].x;
    l[i].id = i;
  }
  for (int i = 0; i < (int)(k); ++i) {
    sort(l, l + n, cmp);
    if (l[n - 1].x - 1 > l[0].x) {
      cnt++;
      f.push_back(l[n - 1].id), t.push_back(l[0].id);
      l[n - 1].x--;
      l[0].x++;
    }
  }
  sort(l, l + n, cmp);
  cout << l[n - 1].x - l[0].x << " " << cnt << endl;
  for (int i = 0; i < (int)(cnt); ++i) {
    cout << f[i] + 1 << " " << t[i] + 1 << endl;
  }
}
