#include <bits/stdc++.h>
using namespace std;
const int inf = 2000000000;
static inline int Rint() {
  struct X {
    int dig[256];
    X() {
      for (int i = '0'; i <= '9'; ++i) dig[i] = 1;
      dig['-'] = 1;
    }
  };
  static X fuck;
  int s = 1, v = 0, c;
  for (; !fuck.dig[c = getchar()];)
    ;
  if (c == '-')
    s = 0;
  else if (fuck.dig[c])
    v = c ^ 48;
  for (; fuck.dig[c = getchar()]; v = v * 10 + (c ^ 48))
    ;
  return s ? v : -v;
}
template <typename T>
static inline void cmax(T& a, const T& b) {
  if (b > a) a = b;
}
template <typename T>
static inline void cmin(T& a, const T& b) {
  if (b < a) a = b;
}
int data[1005];
int main() {
  int n = Rint();
  for (int i = (0); i < (n); ++i) data[i] = Rint();
  sort(data, data + n);
  int used = 2000000000, start = -1, d = -1;
  for (int i = 0; i <= 20000; ++i) {
    long long max_v = -200000000000000LL;
    long long min_v = 200000000000000LL;
    long long dec = 0;
    long long min_dec = -1;
    for (int j = 0; j < n; ++j, dec += i) {
      const long long t = data[j] - dec;
      if (t > max_v) max_v = t;
      if (t < min_v) {
        min_v = t;
        min_dec = dec;
      }
    }
    const long long diff = max_v - min_v;
    long long test = min_v + diff / 2;
    {
      long long d0 = test - min_v;
      long long d1 = max_v - test;
      d0 = max(d0, d1);
      if (d0 < used) {
        used = d0;
        start = test;
        d = i;
      }
    }
    {
      ++test;
      long long d0 = test - min_v;
      long long d1 = max_v - test;
      d0 = max(d0, d1);
      if (d0 < used) {
        used = d0;
        start = test;
        d = i;
      }
    }
  }
  printf("%d\n", used);
  printf("%d %d\n", start, d);
  return 0;
}
