other=[0,0,0,0,0,0,0,0]
red=0
n=int(input())
arr=list(map(int,input().split()))
for a in arr:
    if a<400:
        other[0]=1
    elif a<800:
        other[1]=1
    elif a<1200:
        other[2]=1
    elif a<1600:
        other[3]=1
    elif a<2000:
        other[4]=1
    elif a<2400:
        other[5]=1
    elif a<2800:
        other[6]=1
    elif a<3200:
        other[7]=1
    else:
        red+=1

print(sum(other),sum(other)+red)
