#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > ans;
int a[110];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  int minraz = 100000;
  int cnt = 0;
  int indexmin, indexmax;
  while (true) {
    if (cnt == k) break;
    int pbmin = 100000;
    int pbmax = -1;
    for (int i = 0; i < n; i++) {
      if (a[i] > pbmax) {
        pbmax = a[i];
        indexmax = i;
      }
      if (a[i] < pbmin) {
        pbmin = a[i];
        indexmin = i;
      }
    }
    if (pbmax == pbmin || indexmin == indexmax)
      break;
    else {
      if (a[indexmin] + 1 == a[indexmax]) break;
      ans.push_back(make_pair(indexmax + 1, indexmin + 1));
      a[indexmin]++;
      a[indexmax]--;
    }
    cnt++;
  }
  int defmin = 100000, defmax = -1;
  for (int i = 0; i < n; i++) {
    if (a[i] < defmin) defmin = a[i];
    if (a[i] > defmax) defmax = a[i];
  }
  minraz = defmax - defmin;
  cout << minraz << " " << cnt << '\n';
  for (int i = 0; i < ans.size(); i++)
    cout << ans[i].first << " " << ans[i].second << '\n';
  return 0;
}
