(define n (read))
(let ((memo (make-vector 10 0))
      (over3200 0))

  (let loop ((i n))
    (when (not (zero? i))
      (let ((a (read)))
        (if (>= a 3200)
          (set! over3200 (+ over3200 1))
          (vector-set! memo (quotient a 400) 1))
        (loop (- i 1)))))
  (let ((base-ptn
         (let loop ((i 7))
           (cond
             ((< i 0) 0)
             ((zero? (vector-ref memo i)) (loop (- i 1)))
             (else  (+ 1 (loop (- i 1))))))))
    (display (max base-ptn 1))
    (display " ")
    (display (min (+ base-ptn over3200) 8))
    (newline)))
