N = int(input())
A = list(map(int,input().split()))
exc = []
ls = []
for a in A:
    if a < 3200:
        ls.append(a)
    else:
        exc.append(a)
rates = [list(range(1,400))]+[list(range(400*i,400*i+399)) for i in range(1, 8)]
vars = [False]*8
for r in ls:
    for j in range(8):
        if r in rates[j]:
            vars[j] = True
if ls == []:
    print(1, len(exc))
else:
    ans = vars.count(True)
    if exc == []:
        print(ans, ans)
    else:
        print(ans, ans+len(exc))