#include <bits/stdc++.h>
using namespace std;
int a[123], o[1005], oo[1005], t;
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < k; i++) {
    int x = min_element(a, a + n) - a, y = max_element(a, a + n) - a;
    if (a[x] == a[y])
      break;
    else {
      o[t] = x;
      oo[t] = y;
      t++;
      a[x]++;
      a[y]--;
    }
  }
  cout << (*max_element(a, a + n)) - (*min_element(a, a + n)) << ' ' << t
       << endl;
  for (int i = 0; i < t; i++) cout << oo[i] + 1 << ' ' << o[i] + 1 << endl;
  return 0;
}
