var a:array[1..40] of integer;
i, j, cou, coumax, amax: integer;
begin
coumax:=0;
for i:=1 to 40 do
readln(a[i]);
for i:=1 to 40 do begin
cou:=0;
for j:=1 to 40 do
if(a[i]=a[j]) then inc(cou);
if(cou>coumax) then begin
coumax:=cou;
amax:=a[i];
end;
writeln(amax, ' is the most repeated value');
end.
var a1, temp, cou, i, sum:integer;
begin
read(a1);
if (a1>=0) then cou:=1 else cou:=0;
if (cou>0) then sum:=a1 else sum:=0;
for i:=2 to 40 do begin
read(temp);
if (temp>0) and (temp mod a1=0) then begin
inc(cou);
inc(sum,temp);
end;
end;
writeln(sum/cou)
end.