#include <bits/stdc++.h>
using namespace std;
int N, oper;
vector<pair<int, int> > vii;
vector<pair<int, int> > res;
bool cmp(const pair<int, int> &p1, const pair<int, int> &p2) {
  return p1.first < p2.first;
}
int main() {
  int N, oper;
  cin >> N >> oper;
  vii.resize(N);
  for (int i = 0; i < N; i++) {
    cin >> vii[i].first;
    vii[i].second = i + 1;
  }
  int step = 0;
  while (oper > 0) {
    sort(vii.begin(), vii.end());
    if (vii[0].first == vii[vii.size() - 1].first) break;
    if (vii[vii.size() - 1].first - vii[0].first > 1) {
      oper--;
      step++;
      vii[vii.size() - 1].first--;
      vii[0].first++;
      res.push_back(make_pair(vii[vii.size() - 1].second, vii[0].second));
    } else if (vii[vii.size() - 1].first - vii[0].first == 1)
      break;
  }
  sort(vii.begin(), vii.end());
  cout << vii[vii.size() - 1].first - vii[0].first;
  cout << " " << step << "\n";
  for (int i = 0; i < res.size(); i++)
    cout << res[i].first << " " << res[i].second << "\n";
  return 0;
}
