n=int(input())
a=list(map(int,input().split()))
b=[0]*8
c=[i for i in a if i>=3200]
M=0
for i in a:
    if i<=399:
        b[0]=1
    elif 400<=i<=799:
        b[1]=1
    elif 800<=i<=1199:
        b[2]=1
    elif 1200<=i<=1599:
        b[3]=1
    elif 1600<=i<=1999:
        b[4]=1
    elif 2000<=i<=2399:
        b[5]=1
    elif 2400<=i<=2799:
        b[6]=1
    elif 2800<=i<=3199:
        b[7]=1
    else:
        if len(c)>=b.count(0):
            M=8
        else:
            M=b.count(1)+len(c)
if a[-1]<=3199:
    M=b.count(1)
m=b.count(1)
print(m,M)