n=int(input())
a=list(map(int,input().split()))
nl=[0 for i in range(7)]
c=0
for i in range(len(a)):
    if a[i]>=2800:
        c+=1
    for j in range(7):
        if 400*j<=a[i] and a[i]<400*(j+1):
            nl[j]=1
print(sum(nl),sum(nl)+c)