var
a:array[1..2000]of real;
b,c,d:real;
i,n,j,x:integer;
begin
assign(input,'stats.in');
assign(output,'stats.out');
reset(input);
rewrite(output);
read(n);
for i:=1 to n do
begin
read(a[i]);
b:=b+a[i];
end;
b:=b/n;
for j:=1 to n do
for i:=1 to n do
if (a[i]<a[i+1])and(a[i+1]<>0) then begin
c:=a[i];
a[i]:=a[i+1];
a[i+1]:=c;
end;
if n mod 2=0 then begin
i:=n div 2;
d:=a[i]+a[i+1];
d:=d/2;
end
else
if n mod 2=1 then
begin
i:=n div 2;
i:=i+1;
d:=a[i];
end;
writeln(b:0:6);
writeln(d:0:6);
close(input);
close(output);
end.