#include using namespace std; using ll = long long; #define rep(i, s, t) for (ll i = s; i < (ll)(t); i++) #define all(x) begin(x), end(x) template bool chmin(T& x, T y) { return x > y ? (x = y, true) : false; } template bool chmax(T& x, T y) { return x < y ? (x = y, true) : false; } void solve() { int n; cin >> n; vector a(n); rep(i, 0, n) cin >> a[i]; sort(all(a)); auto qq = [&](int l, int r) { int sz = r - l; return (a[l + (sz - 1) / 2] + a[l + sz / 2]); }; ll q1 = qq(0, n / 2), q2 = qq(0, n), q3 = qq((n + 1) / 2, n); ll iqr = q3 - q1; int u = 0; rep(i, 0, n) { if (a[i] * 4 < q1 * 2 - 3 * iqr || a[i] * 4 > q3 * 2 + 3 * iqr) u++; } cout << (double)q1 / 2 << ' ' << (double)q2 / 2 << ' ' << (double)q3 / 2 << ' ' << u << '\n'; } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout << fixed << setprecision(15); int t = 1; // cin >> t; while (t--) solve(); }