import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

from collections import defaultdict

n = ni()
a = na()
dic = defaultdict(int)

def color(n):
    if n >= 1 and n <= 399:
        return "a"
    if n >= 400 and n <= 799:
        return "b"
    if n >= 800 and n <= 1199:
        return "c"
    if n >= 1200 and n <= 1599:
        return "d"
    if n >= 1600 and n <= 1999:
        return "e"
    if n >= 2000 and n <= 2399:
        return "f"
    if n >= 2400 and n <= 2799:
        return "g"
    if n >= 2800 and n <= 3199:
        return "h"
    return "z"

for i in range(n):
    dic[color(a[i])] += 1

tourist = 1 if "z" in dic else 0
print(len(dic.keys()) - tourist, min(8, len(dic.keys()) - tourist + dic["z"]))