#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cout << fixed;
  cout.precision(10);
  int n, k;
  cin >> n >> k;
  multiset<pair<int, int> > st;
  for (int i = 0; i < n; i++) {
    int a;
    cin >> a;
    st.insert(make_pair(a, i + 1));
  }
  if (n == 1) {
    cout << "0 0" << endl;
    return 0;
  }
  vector<pair<int, int> > solution;
  while (k--) {
    auto first = st.begin();
    auto last = st.end();
    last--;
    if ((*first).first + 1 < (*last).first) {
      pair<int, int> a, b;
      a = *first;
      b = *last;
      solution.emplace_back((*last).second, (*first).second);
      st.erase(a);
      st.erase(b);
      a.first++;
      b.first--;
      st.insert(a);
      st.insert(b);
    }
  }
  auto it = st.end();
  it--;
  cout << (*it).first - (*st.begin()).first << " ";
  cout << solution.size() << endl;
  for (auto i : solution) {
    cout << i.first << " " << i.second << endl;
  }
  return 0;
}
