#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, k;
  cin >> n >> k;
  multiset<pair<int, int>> ms;
  for (int i = 1; i <= n; i++) {
    int num;
    cin >> num;
    ms.insert({num, i});
  }
  vector<pair<int, int>> ans;
  while (k > 0) {
    auto f = ms.begin();
    auto l = --ms.end();
    if (f->first == l->first) {
      break;
    }
    pair<int, int> p1 = {f->first + 1, f->second};
    pair<int, int> p2 = {l->first - 1, l->second};
    ms.erase(f);
    ms.erase(l);
    k--;
    ms.insert(p1);
    ms.insert(p2);
    ans.push_back({p2.second, p1.second});
  }
  int m = ms.rbegin()->first - ms.begin()->first;
  cout << m << " " << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++)
    cout << ans[i].first << " " << ans[i].second << "\n";
}
