#include <bits/stdc++.h>
using namespace std;
int main() {
  int a = 0;
  int b = 0;
  cin >> a >> b;
  int mass[1000];
  int massnumbers[1000];
  int mo[20000] = {0};
  int n = 0;
  for (int y = 0; y < a; y++) {
    cin >> mass[y];
    massnumbers[y] = y + 1;
  }
  bool g = false;
  int min = 100000000, minn = -1, max = -1, maxn = -1;
  for (int y = 0; y < b + 1; y++) {
    min = 100000000, minn = -1, max = -1, maxn = -1;
    for (int u = 0; u < a; u++) {
      if (mass[u] > max) {
        max = mass[u];
        maxn = u;
      }
      if (mass[u] < min) {
        min = mass[u];
        minn = u;
      }
    }
    if (y == b) {
      break;
    }
    if (min == max) {
      cout << "0"
           << " " << n / 2 << endl;
      g = true;
      for (int y = 0; y < n; y += 2)
        cout << mo[y] + 1 << " " << mo[y + 1] + 1 << endl;
      break;
    } else {
      mass[minn]++;
      mass[maxn]--;
      mo[n] = maxn;
      mo[n + 1] = minn;
      n += 2;
    }
  }
  if (g == false) {
    cout << max - min << " " << b << endl;
    for (int y = 0; y < n; y += 2) {
      cout << mo[y] + 1 << " " << mo[y + 1] + 1 << endl;
    }
  }
  return 0;
}
