#include <bits/stdc++.h>
using namespace std;
int arr[101];
vector<pair<int, int> > res;
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    cin >> arr[i];
  }
  int mmax1 = 0, mmin1 = 100009;
  for (int i = 0; i < k; ++i) {
    int mmax = 0, mmin = 100009, index_mmin, index_mmax;
    for (int j = 0; j < n; ++j) {
      if (mmax < arr[j]) {
        mmax = arr[j];
        index_mmax = j;
      }
      if (mmin > arr[j]) {
        mmin = arr[j];
        index_mmin = j;
      }
    }
    if (mmax == mmin) break;
    ++arr[index_mmin];
    --arr[index_mmax];
    res.push_back({index_mmax + 1, index_mmin + 1});
  }
  for (int i = 0; i < n; ++i) {
    mmax1 = max(mmax1, arr[i]);
    mmin1 = min(mmin1, arr[i]);
  }
  cout << mmax1 - mmin1 << " " << res.size() << '\n';
  for (int i = 0; i < res.size(); ++i)
    cout << res[i].first << " " << res[i].second << '\n';
}
