#include <bits/stdc++.h>
using namespace std;
int n, k;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> k;
  vector<pair<int, int> > v(n), ans;
  for (int i = 0; i < n; ++i) cin >> v[i].first, v[i].second = i;
  while (k--) {
    sort(v.begin(), v.end());
    if (v.back().first - v[0].first > 1)
      --v.back().first, ++v[0].first,
          ans.push_back({v.back().second, v[0].second});
  }
  sort(v.begin(), v.end());
  cout << v.back().first - v[0].first << ' ' << ans.size() << '\n';
  for (auto it : ans) cout << it.first + 1 << ' ' << it.second + 1 << '\n';
  return 0;
}
