var a:array[0..10] of longint;
    i,n,kq,thieu,max,sl,x:longint;
function min(a,b:longint):longint;
    begin
        if a>B then exit(b) else exit(a);
    end;
begin
//assign(input,'a.inp');reset(input);
//assign(output,'a.out');rewrite(output);
readln(n);
for i:=1 to n do
    begin
        read(x);
        if (x>=1) and (x<=399) then inc(a[1]);
        if (x>=400) and (x<=799) then inc(a[2]);
        if (x>=800) and (x<=1199) then inc(a[3]);
        if (x>=1200) and (x<=1599) then inc(a[4]);
        if (x>=1600) and (x<=1999) then inc(a[5]);
        if (x>=2000) and (x<=2399) then inc(a[6]);
        if (x>=2400) and (x<=2799) then inc(a[7]);
        if (x>=2800) and (x<=3199) then inc(a[8]);
        if x>=3200 then inc(sl);
    end;
for i:=1 to 8 do
    begin
        if a[i]>0 then inc(kq);
        if a[i]=0 then inc(thieu);
    end;
max:=kq+min(thieu,sl);
writeln(kq,' ',max);
end.
