program colorful_leaderboard
  implicit none
  integer :: n, a(100), i, c(0:8), r, m
  a = 0
  c = 0
  read(*,*) n
  read(*,*) a(1:n)
  do i = 1, n
    r = a(i)/400
    if (r.gt.8) r = 8
    c(r) = c(r) + 1
  end do
  m = 0
  do i = 0, 7
    if (c(i).gt.0) m = m + 1
  end do
  if (m.eq.0) then
    write(*,'(i0,x,i0)') 1, min(8,c(8))
  else
    write(*,'(i0,x,i0)') m, min(8,m+c(8))
  end if
  stop
end program colorful_leaderboard