#include <bits/stdc++.h>
using namespace std;
int n, k;
int a[1000000];
vector<pair<int, int> > ans;
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= k; i++) {
    int high = 1, low = 1;
    for (int j = 2; j <= n; j++) {
      if (a[j] > a[high]) high = j;
      if (a[j] < a[low]) low = j;
    }
    if (high != low) {
      ans.push_back(make_pair(high, low));
      a[high]--;
      a[low]++;
    }
  }
  int high = 1, low = 1;
  for (int j = 2; j <= n; j++) {
    if (a[j] > a[high]) high = j;
    if (a[j] < a[low]) low = j;
  }
  int s = ans.size();
  cout << a[high] - a[low] << " " << s << endl;
  ;
  for (int i = 0; i <= s - 1; i++)
    cout << ans[i].first << " " << ans[i].second << endl;
  return 0;
}
