#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, tk, k;
  cin >> n >> k;
  multiset<pair<int, int> > st;
  vector<pair<int, int> > vc;
  for (int i = 0; i < n; i++) {
    cin >> tk;
    st.insert({tk, i + 1});
  }
  if (!(st.rbegin()->first - st.begin()->first)) return 0 * puts("0 0");
  while (k-- && st.rbegin()->first - st.begin()->first > 1) {
    int mx = st.rbegin()->first;
    int mn = st.begin()->first;
    int f = st.rbegin()->second;
    int s = st.begin()->second;
    st.erase(*st.rbegin());
    st.erase(*st.begin());
    st.insert({mx - 1, f});
    st.insert({mn + 1, s});
    vc.push_back({f, s});
  }
  cout << st.rbegin()->first - st.begin()->first << " " << vc.size() << "\n";
  if (vc.size()) {
    for (int i = 0; i < vc.size(); i++)
      cout << vc[i].first << " " << vc[i].second << "\n";
  }
}
