#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, ok;
  cin >> n >> k;
  ok = k;
  vector<pair<int, int> > v;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(make_pair(x, i + 1));
  }
  sort(v.begin(), v.end());
  int sum = 0;
  for (int i = 0; i < v.size(); i++) sum += v[i].first;
  vector<pair<int, int> > ans;
  while (k) {
    if (v[0].first == v[n - 1].first ||
        (v[0].first + 1 == v[n - 1].first &&
         int(sum / n) * 10 != (sum / float(n)) * 10))
      break;
    v[n - 1].first--;
    v[0].first++;
    ans.push_back(make_pair(v[n - 1].second, v[0].second));
    sort(v.begin(), v.end());
    k--;
  }
  int mi = 123456789;
  int ma = -1;
  for (int i = 0; i < n; i++) {
    mi = min(mi, v[i].first);
    ma = max(ma, v[i].first);
  }
  cout << ma - mi << " " << ok - k << endl;
  for (int i = 0; i < ans.size(); i++)
    cout << ans[i].first << " " << ans[i].second << endl;
  return 0;
}
