#include <bits/stdc++.h>
using namespace std;
long long pwr(long long a, long long b, long long mod) {
  a %= mod;
  if (a < 0) a += mod;
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % mod;
    a = (a * a) % mod;
    b /= 2;
  }
  return ans;
}
long long pwr(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans *= a;
    a *= a;
    b /= 2;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  while (b) {
    long long temp = a;
    a = b;
    b = temp % b;
  }
  return a;
}
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long modularInverse(long long a, long long m) {
  assert(false);
  return pwr(a, m - 2, m);
}
const int mod = 1000000007;
int ar[101];
int n;
int getMin() { return min_element(ar, ar + n) - ar; }
int getMax() { return max_element(ar, ar + n) - ar; }
int main() {
  std::ios::sync_with_stdio(false);
  int k;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) cin >> ar[i];
  int op = 0;
  vector<pair<int, int> > ops;
  while (k--) {
    int a = getMin();
    int b = getMax();
    if (ar[a] == ar[b]) break;
    ops.push_back(pair<int, int>(b, a));
    ar[b]--;
    ar[a]++;
    ++op;
  }
  int a = getMin();
  int b = getMax();
  cout << ar[b] - ar[a] << " ";
  cout << op << endl;
  for (int i = 0; i < ops.size(); ++i) {
    cout << ops[i].first + 1 << " " << ops[i].second + 1 << endl;
  }
}
