#include <bits/stdc++.h>
using namespace std;
ifstream f("oo.in");
int i, a[100002], n, k;
int res[100002], m;
int tall, small, mini, maxi;
int main() {
  cin >> n >> k;
  for (i = 1; i <= n; ++i) cin >> a[i];
  for (int kk = 1; kk <= k; ++kk) {
    maxi = -1;
    mini = 5000000;
    for (i = 1; i <= n; ++i) {
      if (a[i] > maxi) maxi = a[i], tall = i;
      if (a[i] < mini) mini = a[i], small = i;
    }
    if (a[tall] == a[small] || tall == small) break;
    a[tall]--;
    a[small]++;
    res[++m] = tall;
    ++m;
    res[m] = small;
  }
  maxi = -1;
  mini = 5000000;
  for (i = 1; i <= n; ++i) {
    if (a[i] > maxi) maxi = a[i];
    if (a[i] < mini) mini = a[i];
  }
  cout << (maxi - mini) << " " << m / 2;
  cout << '\n';
  for (i = 1; i <= m; i += 2, cout << '\n') cout << res[i] << " " << res[i + 1];
  return 0;
}
