#include <bits/stdc++.h>
using namespace std;
int a[1000];
int max(int a, int b) { return a > b ? a : b; }
int min(int a, int b) { return a < b ? a : b; }
pair<int, int> cross(pair<int, int> a, pair<int, int> b) {
  return pair<int, int>(max(a.first, b.first), min(a.second, b.second));
}
pair<int, int> solve(int n, int w) {
  for (int d = 0; d <= 20000; d++) {
    pair<int, int> r = pair<int, int>(a[0] - w, a[0] + w);
    for (int i = 1; i < n; i++) {
      int t = a[i] - i * d;
      r = cross(r, pair<int, int>(t - w, t + w));
    }
    if (r.first <= r.second) return pair<int, int>(r.first, d);
  }
  return pair<int, int>(0, -1);
}
int main() {
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  sort(a, a + n);
  int l = -1, r = 10000000;
  while (r - l > 1) {
    int mid = (l + r) / 2;
    if (solve(n, mid).second != -1)
      r = mid;
    else
      l = mid;
  }
  pair<int, int> ans = solve(n, r);
  printf("%d\n", r);
  printf("%d %d\n", ans.first, ans.second);
  return 0;
}
