#include <bits/stdc++.h>
using namespace std;
typedef unsigned long long ull;
const int INF = (1 << 29);
const int MAX = 200009;
int main() {
  int n, m, k, x;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  while (cin >> n >> k) {
    vector<int> V(n);
    vector<pair<int, int> > res;
    for (int i = (0); i < n; i++) cin >> V[i];
    int i, ans = 0;
    for (i = 1; i <= k + 1; i++) {
      int sidx, snum = INF;
      int bidx, bnum = -1;
      for (int j = 0; j < n; j++) {
        if (V[j] < snum) {
          sidx = j;
          snum = V[j];
        }
        if (V[j] > bnum) {
          bnum = V[j];
          bidx = j;
        }
      }
      if (i == k + 1) {
        ans = (bnum - snum);
        break;
      }
      if (snum == bnum) break;
      if (abs(snum - bnum) == 1) {
        ans = 1;
        break;
      }
      res.push_back(make_pair(sidx, bidx));
      V[sidx]++;
      V[bidx]--;
    }
    cout << ans << " " << (int)res.size() << endl;
    for (int i = (0); i < (int)res.size(); i++) {
      cout << res[i].second + 1 << " " << res[i].first + 1 << endl;
    }
  }
  return 0;
}
