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