#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int BIG = 1e9 + 555;
const int maxN = 100 * 100 + 9;
int n, k;
int a[maxN];
vector<pair<int, int> > ans;
int func() {
  return *max_element(a + 1, a + n + 1) - *min_element(a + 1, a + n + 1);
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  a[0] = 0;
  a[n + 1] = BIG;
  int L = 0;
  int fRes = func();
  while (k--) {
    int mx = 0, mn = n + 1;
    for (int i = 1; i <= n; i++) {
      if (a[i] > a[mx]) {
        mx = i;
      }
    }
    for (int i = 1; i <= n; i++) {
      if (i == mx) {
        continue;
      }
      if (a[i] < a[mn]) {
        mn = i;
      }
    }
    ans.push_back(make_pair(mx, mn));
    a[mx]--;
    a[mn]++;
    int foo = func();
    if (foo < fRes) {
      fRes = foo;
      L = ans.size();
    }
  }
  cout << fRes << ' ' << L << '\n';
  for (int i = 0; i < L; i++) {
    cout << ans[i].first << ' ' << ans[i].second << '\n';
  }
  return 0;
}
