#include <bits/stdc++.h>
template <typename T>
T GCD(T a, T b) {
  return a ? GCD(b % a, a) : b;
}
template <typename T>
T LCM(T a, T b) {
  return (a * b) / GCD(a, b);
}
using ld = double;
using ll = long long int;
using ul = unsigned long long int;
using namespace std;
class BTowers {
 public:
  void solve(std::istream &in, std::ostream &out) {
    int n, k, step = 0;
    in >> n >> k;
    vector<pair<int, int>> v, heights;
    for (int i = 1; i < n + 1; i++) {
      int a;
      in >> a;
      heights.push_back(make_pair(a, i));
    }
    sort(heights.begin(), heights.end());
    while (k--) {
      int height = heights[n - 1].first;
      int lowest = heights[0].first;
      if (height - lowest == 0) break;
      step++;
      heights[0].first++;
      heights[n - 1].first--;
      v.push_back(make_pair(heights[n - 1].second, heights[0].second));
      sort(heights.begin(), heights.end());
    }
    int diff = heights[n - 1].first - heights[0].first;
    out << diff << ' ' << step << endl;
    for (auto data : v) out << data.first << ' ' << data.second << endl;
  }
};
int main() {
  std::ios_base::sync_with_stdio(0);
  std::cin.tie(nullptr);
  BTowers solver;
  std::istream &in(std::cin);
  std::ostream &out(std::cout);
  solver.solve(in, out);
  return 0;
}
