Program maxx;
var ocenka,sdal,nesdal,k,i:integer;
begin
writeln('введите кол-во оценок');
readln(k);
sdal:=0;
nesdal:=0;
for i:=1 to k do
begin
readln(ocenka);
if ocenka>2
then sdal:=sdal+1;
else nesdal:=nesdal+1;
end;
writeln(sdal);
writeln(nesdal);
end.