#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int inf = 1e9;
long long powm(long long a, long long p, long long m) {
  long long r = 1 % m;
  while (p) {
    if (p & 1) r = r * a % m;
    p >>= 1;
    a = a * a % m;
  }
  return r;
}
int main() {
  int n, k, a[100];
  scanf("%d%d", &n, &k);
  for (int i = 0; i < (n); ++i) scanf("%d", a + i);
  vector<pair<int, int> > ans;
  for (; k; --k) {
    int i = min_element(a, a + n) - a;
    int j = max_element(a, a + n) - a;
    if (a[j] - a[i] <= 1) break;
    a[i]++;
    a[j]--;
    ans.push_back(make_pair(j + 1, i + 1));
  }
  printf("%d %d\n", *max_element(a, a + n) - *min_element(a, a + n),
         (int)ans.size());
  for (int i = 0; i < ans.size(); ++i)
    printf("%d %d\n", ans[i].first, ans[i].second);
  return 0;
}
