#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, k, temp;
  cin >> n >> k;
  bool done = false;
  vector<int> towers;
  vector<pair<int, int>> results;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    towers.push_back(temp);
  }
  for (i = 0; i < k; i++) {
    int min = 10000, max = 0, minInd = 0, maxInd = 0, diff = 0;
    for (int j = 0; j < n; j++) {
      if (towers[j] < min) {
        min = towers[j];
        minInd = j;
      }
      if (towers[j] > max) {
        max = towers[j];
        maxInd = j;
      }
    }
    if (min == max) {
      break;
    } else if ((max - min) <= 1) {
      break;
    } else {
      towers[minInd]++;
      towers[maxInd]--;
      pair<int, int> tempPair(maxInd, minInd);
      results.push_back(tempPair);
    }
  }
  int finalMin = 10000, finalMax = 0;
  for (int j = 0; j < n; j++) {
    if (towers[j] < finalMin) {
      finalMin = towers[j];
    }
    if (towers[j] > finalMax) {
      finalMax = towers[j];
    }
  }
  int difference = finalMax - finalMin;
  cout << difference << " " << i << endl;
  for (int l = 0; l < results.size(); l++) {
    cout << results[l].first + 1 << " " << results[l].second + 1 << endl;
  }
  return 0;
}
