N=int(input())
A=list(map(int,input().split()))
B=[]
C=[]
for i in A:
    if i<=399:
        B.append(1)
    elif i<=799:
        B.append(2)
    elif i<=1199:
        B.append(3)
    elif i<=1599:
        B.append(4)
    elif i<=1999:
        B.append(5)
    elif i<=2399:
        B.append(6)
    elif i<=2799:
        B.append(7)
    elif i<=3199:
        B.append(8)
    else:
        C.append(1)

D=set(B)
minans=len(D)
if C:
    if len(C)+minans<=8:
        maxans=len(C)+minans
    else:
        maxans=8
else:
    maxans=minans
    
print(minans, maxans)