program sample
    implicit none
  
    integer(8) :: i,j,m,n,a(8),b,c
    integer(8),allocatable :: x(:),y(:)
  
    read(*,*) n
    allocate(x(n))
    read(*,*)x
    c=0
    a(:)=0
    do i=1,n
        b=x(i)/400+1
        if (b<9)then
            a(b)=a(b)+1
        else
            c=c+1
        end if
    end do
    b=0
    do i=1,8
        if(a(i)==0)then
            b=b+1
        end if
    end do
    b=8-b
    if (b+c>8)then
        c=8
    else
        c=b+c
    end if
    write(*,'(i1,x,i1)')b,c
    stop
end program sample
  

