#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int twrs[n];
  for (int i = 0; i < n; i++) cin >> twrs[i];
  int count = 0;
  int a[k], b[k];
  for (int j = 0; j < k; j++) {
    int max = twrs[0], maxpos = 0, min = twrs[0], minpos = 0;
    for (int i = 1; i < n; i++)
      if (max < twrs[i]) {
        max = twrs[i];
        maxpos = i;
      }
    for (int i = 1; i < n; i++)
      if (min > twrs[i]) {
        min = twrs[i];
        minpos = i;
      }
    if (max - min == 1 || max - min == 0) break;
    a[count] = maxpos + 1;
    b[count++] = minpos + 1;
    twrs[maxpos]--;
    twrs[minpos]++;
  }
  int max = twrs[0], maxpos = 0, min = twrs[0], minpos = 0;
  for (int i = 1; i < n; i++)
    if (max < twrs[i]) {
      max = twrs[i];
      maxpos = i;
    }
  for (int i = 1; i < n; i++)
    if (min > twrs[i]) {
      min = twrs[i];
      minpos = i;
    }
  cout << max - min << " " << count << endl;
  for (int i = 0; i < count; i++) cout << a[i] << " " << b[i] << endl;
  return 0;
}
