uses crt;
var n,i,s,t,j,max:longint;a,b:array[1..100] of longint;tbc:real;
function snt(n:longint):boolean;
var j:longint;
begin
for j:=2 to trunc(sqrt(n)) do
if n mod j=0 then exit(false);
exit(n>1);
end;
begin
readln(N);
for i:=1 to n do
begin
read (a[i]);
if snt(a[i])=true then
begin
j:=j+1;
b[j]:=a[i];
end;
end;
t:=b[1];
max:=b[1];
for i:=2 to j do
begin
if b[i]>max then max:=b[i];
t:=t+b[i];
write(b[i]:4);
end;
tbc:=t/j;
writeln(S);
writeln(tbc);
writeln(max);
readln;
end.