#include <bits/stdc++.h>
using namespace std;
int x[1002];
int main() {
  int i, n, k, ak, tp, ap;
  long long int t, p, tmin, amin = 1000000000, ma, mi;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &x[i]);
  sort(x + 1, x + 1 + n);
  for (k = 0;; k++) {
    ma = -1000000000;
    mi = 1000000000;
    p = 1;
    for (i = 1; i <= n; i++) {
      t = x[i] - p;
      if (t >= ma) {
        ma = t;
        tp = i;
      }
      if (t <= mi) mi = t;
      p += k;
    }
    tmin = ma - mi - (ma - mi) / 2;
    if (amin > tmin) {
      amin = tmin;
      ap = tp;
      ak = k;
    } else if (amin < tmin)
      break;
  }
  cout << amin << endl << x[ap] - amin - (ap - 1) * ak << " " << ak << endl;
  return 0;
}
