#include <bits/stdc++.h>
using namespace std;
const double PI = 3.1415926535897932;
struct triple {
  double x, y, a;
};
int gcd(int a, int b) { return (b == 0 ? a : gcd(b, a % b)); }
int main() {
  ios_base::sync_with_stdio(false);
  srand(time(NULL));
  int n, k, c = 0, minv = 100000, mini, maxv = 0, maxi;
  cin >> n >> k;
  vector<int> v(n);
  vector<pair<int, int> > ans;
  for (int i = 0; i < n; i++) {
    cin >> v[i];
    int fake = minv;
    minv = min(minv, v[i]);
    if (fake != minv) {
      mini = i;
    }
    fake = maxv;
    maxv = max(maxv, v[i]);
    if (fake != maxv) {
      maxi = i;
    }
  }
  while (maxv - minv > 1 && c < k) {
    c++;
    ans.push_back(pair<int, int>(maxi + 1, mini + 1));
    v[maxi]--;
    v[mini]++;
    minv = 100000;
    maxv = 0;
    for (int i = 0; i < n; i++) {
      int fake = minv;
      minv = min(minv, v[i]);
      if (fake != minv) {
        mini = i;
      }
      fake = maxv;
      maxv = max(maxv, v[i]);
      if (fake != maxv) {
        maxi = i;
      }
    }
  }
  cout << maxv - minv << " " << c << endl;
  for (int i = 0; i < c; i++) {
    cout << ans[i].first << " " << ans[i].second << endl;
  }
  return 0;
}
