const MaxN=1000;
var pos:array[0..MaxN] of longint;
    n,x,i,num,count,res:longint;

begin
    readln(n);
    for i:=1 to n do
    begin
        read(x);
        if x<3200 then
        begin
            res:=x div 100 div 4;
            inc(pos[res]);
        end
        else inc(num);
    end;
    for i:=1 to 8 do
        if pos[i]>0 then inc(count);
    if num+count>8 then Writeln(count,' ',8)
    else Writeln(count,' ',num+count);
end.
