#include <bits/stdc++.h>
using namespace std;
int main() {
  multimap<int, int> mp;
  vector<pair<int, int> > vp;
  int n, k;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    int temp;
    cin >> temp;
    mp.insert(make_pair(temp, i));
  }
  int j = 1;
  pair<int, int> minval, maxval;
  multimap<int, int>::iterator it1, it2;
  while (j <= k) {
    it1 = mp.begin();
    it2 = mp.end();
    it2--;
    minval = *(it1);
    maxval = *(it2);
    if ((maxval.first - minval.first) <= 1) {
      break;
    }
    mp.erase(it1);
    mp.erase(it2);
    mp.insert(make_pair(minval.first + 1, minval.second));
    mp.insert(make_pair(maxval.first - 1, maxval.second));
    vp.push_back(make_pair(maxval.second, minval.second));
    j++;
  }
  it1 = mp.begin();
  it2 = mp.end();
  it2--;
  minval = *(it1);
  maxval = *(it2);
  cout << maxval.first - minval.first << " " << vp.size() << endl;
  for (int i = 0; i < vp.size(); i++)
    cout << vp[i].first << " " << vp[i].second << endl;
  return 0;
}
