#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, d, i, step, ans;
  pair<int, int> a[107];
  vector<int> x, y;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> d;
    a[i] = make_pair(d, i + 1);
  }
  sort(a, a + n);
  if (n == 1) {
    cout << 0 << " " << 0 << endl;
    return 0;
  }
  ans = a[n - 1].first - a[0].first;
  step = 0;
  for (i = 1; i <= k; i++) {
    a[n - 1].first--;
    a[0].first++;
    x.push_back(a[n - 1].second);
    y.push_back(a[0].second);
    sort(a, a + n);
    if ((a[n - 1].first - a[0].first) < ans) {
      ans = a[n - 1].first - a[0].first;
      step = i;
    }
  }
  cout << ans << " " << step << endl;
  for (i = 0; i < step; i++) cout << x[i] << " " << y[i] << endl;
  return 0;
}
