Var     n,g,b,l,c,d,y,o,r,u: Longint;
        a: Array[0..1005] Of Longint;

Procedure       Nhap;
Var     i: Longint;
Begin
Readln(n);
For i:=1 to n do
        Read(A[i]);
End;

Procedure       Xuly;
Var     i: Longint;
Begin
g:=0; b:=0; l:=0; c:=0; d:=0; y:=0; o:=0; r:=0; u:=0;
For i:=1 to n do
        Case a[i] of
                1..399: g:=1;
                400..799: b:=1;
                800..1199: l:=1;
                1200..1599: c:=1;
                1600..1999: d:=1;
                2000..2399: y:=1;
                2400..2799: o:=1;
                2800..3199: r:=1;
                3200..4800: Inc(u);
        End;
End;

Procedure       Xuat;
Begin
If u<2 Then Writeln(g+b+l+c+d+y+o+r+u)
Else    Writeln(g+b+l+c+d+y+o+r,' ',g+b+l+c+d+y+o+r+u);
End;

Begin
Nhap;
XuLy;
Xuat;
End.