#include <bits/stdc++.h>
using namespace std;
int a[110];
vector<pair<int, int>> v;
int main() {
  long long n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  int i;
  for (i = 0; i < k; i++) {
    int ma = -1, mi = 1e6, indmi, indma;
    for (int j = 0; j < n; j++) {
      ma = max(ma, a[j]);
      if (ma == a[j]) indma = j;
    }
    for (int j = 0; j < n; j++) {
      mi = min(mi, a[j]);
      if (mi == a[j]) indmi = j;
    }
    if (ma - mi <= 1) break;
    a[indma]--;
    a[indmi]++;
    v.push_back(make_pair(indma + 1, indmi + 1));
  }
  int ma = -1, mi = 1e6, indmi, indma;
  for (int j = 0; j < n; j++) ma = max(ma, a[j]), indma = j;
  for (int j = 0; j < n; j++) mi = min(mi, a[j]), indmi = j;
  cout << ma - mi << " " << i << endl;
  for (int i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << endl;
  return 0;
}
