(defun solver (&aux rate colornum min max)
  (let ((n (read)) (color (list 0 0 0 0 0 0 0 0)) (black 0) (colorful 0))
    (loop repeat n do
          (setf rate (read))
          (cond ((<=   1  rate  399) (setf (nth 0 color) 1))
                ((<=  400 rate  799) (setf (nth 1 color) 1))
                ((<=  800 rate 1199) (setf (nth 2 color) 1))
                ((<= 1200 rate 1599) (setf (nth 3 color) 1))
                ((<= 1600 rate 1999) (setf (nth 4 color) 1))
                ((<= 2000 rate 2399) (setf (nth 5 color) 1))
                ((<= 2400 rate 2799) (setf (nth 6 color) 1))
                ((<= 2800 rate 3199) (setf (nth 7 color) 1))
                ((<= 3200 rate) (incf colorful) (setf black 1))))
    (setf colornum (apply #'+ color))
    (cond ((<  colorful colornum) (setf min colornum) (setf max (+ colornum colorful)))
          ((>= colorful colornum) (setf min (+ colornum black)) (setf max (+ colornum colorful))))
    (format t "~A ~A~%" min max)))

(solver)