
def resolve():
    N=int(input())
    A=list(map(int,input().split()))
    ls=[False]*8
    cnt=0
    for i in A:

        if 1<=i<=399:
            ls[0]=True
        elif 400<=i<=799:
            ls[1]=True
        elif 800<=i<=1199:
            ls[2]=True
        elif 1200<=i<=1599:
            ls[3]=True
        elif 1600<=i<=1999:
            ls[4]=True
        elif 2000<=i<=2399:
            ls[5]=True
        elif 2400<=i<=2799:
            ls[6]=True
        elif 2800<=i<=3199:
            ls[7]=True
        else:
            cnt+=1


    if ls.count(False)<=cnt:
        maxval=8
    else:
        maxval=8-(ls.count(False)-cnt)

    print(ls.count(True), maxval)




resolve()