#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 6;
long long int arr[2000005], brr[2000005], crr[2000005];
int MX(long long int arr[], long long int n) {
  long long int tmp = -1;
  long long int m;
  for (int i = 1; i <= n; i++) {
    if (arr[i] > tmp) {
      tmp = arr[i];
      m = i;
    }
  }
  return m;
}
int MN(long long int arr[], long long int n) {
  long long int tmp = 1e9;
  long long int nn;
  for (int i = 1; i <= n; i++) {
    if (arr[i] < tmp) {
      tmp = arr[i];
      nn = i;
    }
  }
  return nn;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, k, ans = 1e9;
  cin >> n >> k;
  vector<pair<int, int> > v;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  int mn, mx;
  while (k--) {
    mx = MX(arr, n);
    mn = MN(arr, n);
    arr[mn]++;
    arr[mx]--;
    if (mx == mn) break;
    v.push_back({mx, mn});
  }
  cout << arr[MX(arr, n)] - arr[MN(arr, n)] << " " << v.size() << "\n";
  for (int i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << "\n";
}
