program main
implicit none
integer :: i, j, k, l
integer :: n, b(8)
integer , allocatable :: a(:)

read(*,*) n
allocate( a(n) )
read(*,*) a
a = a/400 + 1 
b = 0
k = 0
do i = 1, n
   do j = 1, 8
      if( b(j) == 0 ) then
         if( a(i) == j ) then
            b(j) = 1
         end if
      end if
   end do
   if( a(i) .ge. 9 ) then
     k = k + 1
   end if
end do
l = sum(b)
write(*,'(i0,a1,i0)') max(l,1), ' ',min(k+l,8)

end program main
