#include <bits/stdc++.h>
using namespace std;
struct ciag {
  int a1, r;
};
ciag Licz(vector<int>& a, int d) {
  for (int a1 = a[0] - d; a1 <= a[0] + d; ++a1) {
    int D = max(a1, a[1] - d) - a1;
    int G = (a[1] + d) - a1;
    bool niepuste = true;
    if (D > G) niepuste = false;
    for (int i = 1; i < a.size(); ++i) {
      if (!niepuste) break;
      int Dr = max(a1, (a[i] - d)) - a1;
      if (Dr % i != 0)
        Dr = Dr / i + 1;
      else
        Dr = Dr / i;
      int Gr = (a[i] + d) - a1;
      Gr = Gr / i;
      if (Dr > Gr) niepuste = false;
      D = max(D, Dr);
      G = min(G, Gr);
      if (D > G) niepuste = false;
    }
    if (niepuste) return {a1, D};
  }
  return {-1, -1};
}
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  sort(a.begin(), a.end());
  int l = 0, p = 10000, s, odp = -1;
  ciag c;
  while (l <= p) {
    s = (l + p) / 2;
    ciag x = Licz(a, s);
    if (x.r != -1) {
      odp = s;
      c = x;
      p = s - 1;
    } else
      l = s + 1;
  }
  cout << odp << endl;
  cout << c.a1 << " " << c.r;
  return 0;
}
