import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    n=int(input())
    ll=list(map(int,input().split()))
    l=[0]*9
    for i in ll:
        if i<400:
            l[0]+=1
        elif i<800:
            l[1]+=1
        elif i<1200:
            l[2]+=1
        elif i<1600:
            l[3]+=1
        elif i<2000:
            l[4]+=1
        elif i<2400:
            l[5]+=1
        elif i<2800:
            l[6]+=1
        elif i<3200:
            l[7]+=1
        else:
            l[8]+=1
    cnt=0
    for j in l[:8]:
        if j!=0:
            cnt+=1
    print(cnt,cnt+l[8])
resolve()