var n,x,i,dem:longint;
    A:array [1..9] of longint;
begin
readln(n);
for i:=1 to n do
        begin
        read(x);
        case x of
                1..399 : inc(A[1]);
                400..799 : inc(A[2]);
                800..1199 : inc(A[3]);
                1200..1599 : inc(A[4]);
                1600..1999 : inc(A[5]);
                2000..2399 : inc(A[6]);
                2400..2799 : inc(A[7]);
                2800..3199 : inc(A[8]);
                3200..4800 : inc(A[9]);
        end;
        end;
for i:=1 to 8 do
        if A[i] <> 0 then inc(dem);
write(dem,' ');
if (A[9] <> 0) and (dem<8) then
        begin
        if A[9]<8 then
                dem:=dem+A[9]
            else
                dem:=dem+8;
        end;
write(dem);
end.
