#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  long long i = k;
  vector<pair<int, int>> vec(n);
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    cin >> vec[i].first;
    vec[i].second = i + 1;
  }
  sort(vec.begin(), vec.end());
  int far2 = vec[n - 1].first - vec[0].first;
  if (far2 == 0) {
    cout << "0 0" << endl;
    return 0;
  }
  while (k != 0) {
    if (vec[n - 1].first - vec[0].first <= 1)
      break;
    else {
      vec[n - 1].first--;
      vec[0].first++;
      int x = vec[n - 1].second;
      int y = vec[0].second;
      k--;
      ans.push_back(x);
      ans.push_back(y);
    }
    sort(vec.begin(), vec.end());
  }
  cout << vec[n - 1].first - vec[0].first << ' ' << i - k << endl;
  for (int i = 0; i < ans.size(); i += 2)
    cout << ans[i] << ' ' << ans[i + 1] << endl;
}
