#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<pair<int, int> > t(n);
  for (int i = 0; i < n; i++) {
    cin >> t[i].first;
    t[i].second = i + 1;
  }
  int f = 0;
  vector<pair<int, int> > result;
  while (f < k) {
    sort(t.begin(), t.end());
    if (t[n - 1].first == t[0].first) break;
    t[n - 1].first--;
    t[0].first++;
    f++;
    result.push_back(make_pair(t[n - 1].second, t[0].second));
  }
  sort(t.begin(), t.end());
  cout << t[n - 1].first - t[0].first << " " << result.size() << endl;
  for (int i = 0; i < result.size(); i++) {
    cout << result[i].first << " " << result[i].second << endl;
  }
  return 0;
}
