#include <bits/stdc++.h>
int main() {
  int n, k, r;
  int a[100];
  std::vector<std::array<int, 2> > v;
  std::scanf("%d%d", &n, &k);
  for (int i(0); i < n; ++i) std::scanf("%d", a + i);
  while (0 < k--) {
    int p = (int)(std::max_element(a, a + n) - a);
    int q = (int)(std::min_element(a, a + n) - a);
    if (a[p] - 1 < a[q] + 1) break;
    v.push_back({{p + 1, q + 1}});
    --a[p], ++a[q];
  }
  r = *std::max_element(a, a + n) - *std::min_element(a, a + n);
  std::printf("%d %lu\n", r, v.size());
  for (auto e : v) std::printf("%d %d\n", e[0], e[1]);
  return 0;
}
