(defun compute(lst)
  (let ((rates (loop for i from 0 to 7 collect 0))
        (over3200 0))
    (mapcar (lambda(a)
              (cond ((and (>= a   1) (<= a  399)) (incf (nth 0 rates)))
                    ((and (>= a 400) (<= a  799)) (incf (nth 1 rates)))
                    ((and (>= a 800) (<= a 1199)) (incf (nth 2 rates)))
                    ((and (>= a 1200) (<= a 1599)) (incf (nth 3 rates)))
                    ((and (>= a 1600) (<= a 1999)) (incf (nth 4 rates)))
                    ((and (>= a 2000) (<= a 2399)) (incf (nth 5 rates)))
                    ((and (>= a 2400) (<= a 2799)) (incf (nth 6 rates)))
                    ((and (>= a 2800) (<= a 3199)) (incf (nth 7 rates)))
                    (t (incf over3200)))) lst)
    (let ((n (reduce (lambda(acc x) (+ acc (if (zerop x) 0 1))) rates)))
      (format t "~A ~A~%" n (+ n over3200)))))

(defun test()
  (compute '(2100 2500 2700 2700))
  (compute '(1100 1900 2800 3200 3200))
  (compute '(800 810 820 830 840 850 860 870 880 890 900 910 920 930 940 950 960 970 980 990)))

(defun splitat (c line)
  (labels ((rec (line acc)
				(let ((pos (position-if (lambda(cc) (char= c cc)) line)))
				  (if pos
					  (rec (subseq line (1+ pos)) (cons (subseq line 0 pos) acc))
					(nreverse (cons line acc))))))
	(rec line nil)))
	;(splitat #\a "john mccarthy")
(defun readline (callback)
  (labels ((rec (i)
				(let ((line (read-line nil nil)))
				  (when (not (zerop (length line)))
					(funcall callback line i)
					(rec (1+ i))))))
	(rec 0)))
	;(readline (lambda(line i)))
(defun start()
  (let ((n 0)
        (lst nil))
    (readline (lambda(line i)
                (cond ((zerop i) (setf n (parse-integer line)))
                      (t (compute (mapcar #'parse-integer (splitat #\space line)))))))))
(start)