(let* ((free 0)
       (entry (loop repeat (read)
                    with hash = (make-hash-table)
                    for i = (read) then (read)
                    do (cond ((<= 1 i 399) (setf (gethash 1 hash) t))
                             ((<= 400 i 799) (setf (gethash 2 hash) t))
                             ((<= 800 i 1199) (setf (gethash 3 hash) t))
                             ((<= 1200 i 1599) (setf (gethash 4 hash) t))
                             ((<= 1600 i 1999) (setf (gethash 5 hash) t))
                             ((<= 2000 i 2399) (setf (gethash 6 hash) t))
                             ((<= 2400 i 2799) (setf (gethash 7 hash) t))
                             ((<= 2800 i 3199) (setf (gethash 8 hash) t))
                             (t (incf free)))
                    finally (return (hash-table-count hash)))))
  (format t "~A ~A~%" (max 1 entry) (min 8 (+ entry free))))