#include <bits/stdc++.h>
using namespace std;
set<long long> s;
set<long long>::iterator it;
map<char, long long> mp;
pair<long long, long long> p[1000], p1[1000];
int main() {
  long long i, j, f = 0, k, l, m, n, t, a[300001], x, c = 1, y, z = 1, type, q,
                  b[300001], ans = 1000000000000;
  double s2 = 1000000000, sum;
  string s;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> p[i].first;
    p[i].second = i + 1;
  }
  sort(p, p + n);
  for (i = 0; i < k; i++) {
    p1[i].first = p[n - 1].second;
    p1[i].second = p[0].second;
    if (p[n - 1].first - p[0].first < ans) {
      y = i;
      ans = p[n - 1].first - p[0].first;
    }
    p[0].first++;
    p[n - 1].first--;
    sort(p, p + n);
  }
  if (ans > p[n - 1].first - p[0].first) {
    y = k;
    ans = p[n - 1].first - p[0].first;
  }
  cout << ans << " " << y << endl;
  for (i = 0; i < y; i++) cout << p1[i].first << " " << p1[i].second << endl;
  return 0;
}
