const   fi='CL.inp';
        fo='CL.out';
var d:array[0..100]of longint;
        n,x,min,i:longint;

procedure nhap;
begin
        read(n);
        for i:=1 to n do
        begin
                read(x);
                case x of
                        1..399:d[1]:=1;
                        400..799:d[2]:=1;
                        800..1199:d[3]:=1;
                        1200..1599:d[4]:=1;
                        1600..1999:d[5]:=1;
                        2000..2399:d[6]:=1;
                        2400..2799:d[7]:=1;
                        2800..3199:d[8]:=1;
                        else inc(d[9]);
                        end;

        end;
end;

procedure xuly;
begin
        for i:=1 to 8 do
                if d[i]=1 then inc(min);

        if (min=0) and (d[9]>0) then write('1 ')
        else if (min=0) and (d[9]=0) then write('0 ')
        else write(min,' ');
        if (min+d[9])>8 then write('8')
        else write(min+d[9]);
end;

begin

                nhap;
                xuly;
end.