#include <bits/stdc++.h>
using namespace std;
bool vis[105];
int main() {
  int n, k;
  cin >> n >> k;
  vector<pair<int, int>> vect;
  int arr[n + 1];
  for (int i = 1; i <= n; i++) cin >> arr[i];
  for (int i = 0; i < k; i++) {
    int minn = 100000, maxx = -1, a, b;
    for (int j = 1; j <= n; j++) {
      if (arr[j] < minn) {
        minn = arr[j];
        b = j;
      }
      if (arr[j] > maxx) {
        maxx = arr[j];
        a = j;
      }
    }
    if (vis[b] == false && arr[a] > arr[b]) {
      arr[a]--;
      arr[b]++;
      vect.push_back({a, b});
      vis[a] = true;
    }
  }
  int maxx = -1, minn = 100000;
  for (int i = 1; i <= n; i++) {
    minn = min(minn, arr[i]);
    maxx = max(maxx, arr[i]);
  }
  cout << maxx - minn << " " << vect.size() << endl;
  for (int i = 0; i < vect.size(); i++)
    cout << vect[i].first << " " << vect[i].second << endl;
  return 0;
}
