#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, k, ok;
  cin >> n >> k;
  ok = k;
  vector<pair<int, int> > vect(n), vect2;
  for (int i = 1; i <= n; i++) {
    cin >> vect[i - 1].first;
    vect[i - 1].second = i;
  }
  while (k > 0) {
    sort(vect.begin(), vect.end());
    if (vect[vect.size() - 1].first < vect[0].first + 2)
      break;
    else {
      vect[0].first = vect[0].first + 1;
      vect[vect.size() - 1].first = vect[vect.size() - 1].first - 1;
      k--;
      vect2.push_back(make_pair(vect[vect.size() - 1].second, vect[0].second));
    }
  }
  sort(vect.begin(), vect.end());
  cout << vect[vect.size() - 1].first - vect[0].first << " " << ok - k << endl;
  for (int i = 0; i < vect2.size(); i++) {
    cout << vect2[i].first << " " << vect2[i].second << endl;
  }
}
