#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, -1, 1};
long long n, k;
vector<pair<long long, long long> > v;
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    long long x;
    cin >> x;
    v.push_back(make_pair(x, i));
  }
  int i = 0, j = n - 1;
  vector<pair<long long, long long> > resp;
  int mini = 0x3F3F3F3F;
  while (k--) {
    sort(v.begin(), v.end());
    mini = v[j].first - v[i].first;
    if (mini < 1) break;
    resp.push_back(make_pair(v[i].second, v[j].second));
    v[j].first--;
    v[i].first++;
  }
  sort(v.begin(), v.end());
  mini = v[j].first - v[i].first;
  cout << mini << " " << resp.size() << endl;
  for (int i = 0; i < resp.size(); ++i)
    cout << resp[i].second + 1 << " " << resp[i].first + 1 << endl;
  return 0;
}
