#include <bits/stdc++.h>
using namespace std;
const long long mx = 10000007;
const long long mod = 1e9 + 7;
const double pi = acos(-1);
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long n, k;
  cin >> n >> k;
  vector<pair<long long, long long>> v;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    v.push_back({x, (i + 1)});
  }
  sort(v.begin(), v.end());
  vector<pair<long long, long long>> ans;
  long long t = 0;
  while (v[n - 1].first - v[0].first > 0) {
    v[n - 1].first--;
    v[0].first++;
    t++;
    ans.push_back({v[n - 1].second, v[0].second});
    sort(v.begin(), v.end());
    if (t >= k) {
      break;
    }
  }
  cout << v[n - 1].first - v[0].first << " " << ans.size() << endl;
  for (long long i = 0; i < ans.size(); i++) {
    cout << ans[i].first << " " << ans[i].second << endl;
  }
  return 0;
}
