#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, k;
  cin >> n >> k;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  vector<pair<long long, long long> > ans;
  long long cnt = 0;
  long long t = k;
  while (k > 0) {
    long long mx = 0, mn = 0;
    for (long long i = 0; i < n; i++) {
      if (a[i] > a[mx]) mx = i;
      if (a[i] < a[mn]) mn = i;
    }
    if (a[mx] == a[mn]) break;
    a[mx]--;
    a[mn]++;
    ans.push_back({mx + 1, mn + 1});
    k--;
  }
  long long mx = 0, mn = 0;
  for (long long i = 0; i < n; i++) {
    if (a[i] > a[mx]) mx = i;
    if (a[i] < a[mn]) mn = i;
  }
  cout << a[mx] - a[mn] << " " << ans.size() << "\n";
  for (auto i : ans) cout << i.first << " " << i.second << "\n";
  return 0;
}
