program cogs126;
const
maxn=510;
var
total,i,j,n:longint;
x:extended;
a:array[1..maxn] of longint;
procedure kp(l,r:longint);
var
i,j,x,t:longint;
begin
i:=l; j:=r;
x:=a[(l+r) div 2];
repeat
while a[i]<x do inc(i);
while a[j]>x do dec(j);
if i<=j then
begin
t:=a[i]; a[i]:=a[j]; a[j]:=t;
inc(i); dec(j);
end;
until i>j ;
if i<r then kp(i,r);
if j>l then kp(l,j);
end;
begin
assign(input,'stats.in'); reset(input);
assign(output,'stats.out'); rewrite(output);
readln(n);
for i:=1 to n do
begin
readln(a[i]);
total:=total+a[i];
end;
x:=total/n;
writeln(x:0:6);
kp(1,n);
if n mod 2=0 then x:=((a[n div 2]+a[(n div 2)+1]))/2 else
x:=a[n div 2+1];
writeln(x:0:6);
close(input); close(output);
end.