#include <bits/stdc++.h>
using namespace std;
using namespace std;
pair<int, int> a[10005];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  int n, k, i, j, m;
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  vector<pair<int, int> > ans;
  for (i = 1; i <= k; i++) {
    sort(a + 1, a + n + 1);
    m = a[n].first - a[1].first;
    if (m == 0) break;
    a[1].first++;
    a[n].first--;
    m = abs(a[n].first - a[1].first);
    if (n > 2) {
      m = max(m, abs(a[n - 1].first - a[1].first));
      m = max(m, abs(a[n].first - a[2].first));
      m = max(m, abs(a[n - 1].first - a[2].first));
    }
    ans.push_back(make_pair(a[n].second, a[1].second));
  }
  cout << m << " " << ans.size() << '\n';
  for (i = 0; i < ans.size(); i++)
    cout << ans[i].first << " " << ans[i].second << '\n';
  return 0;
}
