d={"hai":0,"tya":0,"midori":0,"mizu":0,"ao":0,"ki":0,"dai":0,"aka":0,"sonota":0}
n=int(input())
a=list(map(int,input().split()))
for v in a:
    
    if v <400:
        d["hai"]+=1
    elif v<800:
        d["tya"]+=1
    elif v<1200:
        d["midori"]+=1
    elif v<1600:
        d["mizu"]+=1
    elif v<2000:
        d["ao"]+=1
    elif v<2400:
        d["ki"]+=1
    elif v<2800:
        d["dai"]+=1
    elif v<3200:
        d["aka"]+=1
    else:
        d["sonota"]+=1
#print(d.values)
l=list(d.values())

x=l.count(0)
#print(d["sonota"])
if x==0:
    print(8,8)
elif d["sonota"]==0:
    print(9-x,9-x)
else:
    M=min(d["sonota"]+8-x,8)
    m=max(1,8-x)
    print(m,M)