import os

n = int(input())
alist = [int(i) for i in input().split()]

set = set()
arfa = 0

for a in alist:
    if a<=399:
        set.add(1)
    elif a<=799:
        set.add(2)
    elif a<=1199:
        set.add(3)
    elif a<=1599:
        set.add(4)
    elif a<=1999:
        set.add(5)
    elif a<=2399:
        set.add(6)
    elif a<=2799:
        set.add(7)
    elif a<=3199:
        set.add(8)
    else:
        arfa += 1
max = len(set)+arfa

if len(set)==0:
    set.add(9)
if len(set)+arfa>8:
    print(len(set),end = " ")
    print(8)
else:
    print(len(set),end = " ")
    print(max)
