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

        if i<3200:
            ls[i//400]=True
        else:
            cnt += 1


    if ls.count(True)==0:
        if cnt==0:
            minval=0
        else:
            minval=1
    else:
        minval=ls.count(True)
    if ls.count(False) <= cnt:
        maxval = 8
    else:
        maxval = 8 - (ls.count(False) - cnt)

    print(minval, maxval)


resolve()