program abc064c
  logical :: color(0:7) = .false.
  integer :: n
  integer,dimension(:),allocatable :: a
  read *, n
  allocate(a(n))
  read *, a
  color(pack(a,a<3200)/400) = .true.
  print *, count(color), count(color)+count(a>=3200)
end program abc064c
