#include <bits/stdc++.h>
using namespace std;
int n, h[1010];
int best = 2 * 10005, start, bestStep;
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> h[i];
  sort(h, h + n);
  for (int step = 0; step <= 2 * 10005; step++) {
    int hi = -h[0], lo = -h[0];
    for (int i = 1; i < n; i++) {
      int diff = step * i - h[i];
      hi = max(hi, diff);
      lo = min(lo, diff);
    }
    int d = (hi - lo + 1) / 2;
    if (d < best) {
      best = d;
      bestStep = step;
      start = d - hi;
    }
  }
  cout << best << '\n' << start << ' ' << bestStep;
}
