integer N
integer,allocatable,dimension(:)::A
integer color(8),over
read*,N
allocate(A(N))
read*,A
color=0;over=0
do i=1,N
  select case (A(i))
    case(1:399)
      color(1)=1
    case(400:799)
      color(2)=1
    case(800:1199)
      color(3)=1
    case(1200:1599)
      color(4)=1
    case(1600:1999)
      color(5)=1
    case(2000:2399)
      color(6)=1
    case(2400:2799)
      color(7)=1
    case(2800:3199)
      color(8)=1
    case default
      over=over+1
  end select
end do
print"(i0,A,i0)",merge(sum(color),1,sum(color)/=0.or.over==0)," ",sum(color)+over
end