#include <bits/stdc++.h>
using namespace std;
inline int get() {
  int f = 0, v = 0;
  char ch;
  while (!isdigit(ch = getchar()))
    if (ch == '-') break;
  if (ch == '-')
    f = 1;
  else
    v = ch - '0';
  while (isdigit(ch = getchar())) v = v * 10 + ch - '0';
  if (f == 1)
    return -v;
  else
    return v;
}
const int maxn = 2000;
pair<int, int> op[maxn];
int n, K, a[maxn], tot = 0;
int main() {
  n = get(), K = get();
  for (int i = 1; i <= n; i++) a[i] = get();
  if (n == 1) {
    puts("0 0");
    return 0;
  }
  for (int t = 1; t <= K; t++) {
    int j = 1;
    for (int i = 2; i <= n; i++)
      if (a[j] < a[i]) j = i;
    int k = 1;
    for (int i = 2; i <= n; i++)
      if (a[k] > a[i]) k = i;
    if (a[j] == a[k]) break;
    if (a[j] - a[k] == 1) break;
    a[j]--, a[k]++;
    op[++tot] = make_pair(j, k);
  }
  int m1 = 100000000, m2 = 0;
  for (int i = 1; i <= n; i++) m1 = min(m1, a[i]), m2 = max(m2, a[i]);
  cout << m2 - m1 << " " << tot << endl;
  for (int i = 1; i <= tot; i++) printf("%d %d\n", op[i].first, op[i].second);
  return 0;
}
