#include <bits/stdc++.h>
using namespace std;
int main() {
  long n, k, i, j, a[105];
  cin >> n >> k;
  for (i = 0; i < n; i++) cin >> a[i];
  vector<pair<long, long> > ans;
  vector<bool> u(105, false);
  while (k--) {
    i = max_element(a, a + n) - a;
    j = min_element(a, a + n) - a;
    if (a[i] == a[j] || u[j]) break;
    u[i] = true;
    a[i]--;
    a[j]++;
    ans.push_back({i, j});
  }
  cout << *max_element(a, a + n) - *min_element(a, a + n) << " " << ans.size()
       << "\n";
  for (auto it : ans) cout << it.first + 1 << " " << it.second + 1 << "\n";
  return 0;
}
