(defun main (&rest argv) (declare (ignorable argv)) (let* ((n (read)) (a (make-array n)) (p 0) (q 0)) (dotimes (i n) (setf (aref a i) (read))) (let ((b (floor (reduce #'+ a) (1- n)))) (dotimes (i n) (if (= 2 (- b (aref a i))) (incf p) (incf q)))) (format t "~d ~d~%" p q))) (main)