def ratecolor(List):
    ratebar = [0]*8
    for r in List:
        if r>=1 and r<400:
            ratebar[0]=1
        elif r>=400 and r<800:
            ratebar[1]=1
        elif r>=800 and r<1200:
            ratebar[2]=1
        elif r>=1200 and r<1600:
            ratebar[3]=1
        elif r>=1600 and r<2000:
            ratebar[4]=1
        elif r>=2000 and r<2400:
            ratebar[5]=1
        elif r>=2400 and r<2800:
            ratebar[6]=1
        else:
            ratebar[7]=1
        
    l = len([i for i in ratebar if i==1])
    
    return l
    

N = int(input())
A = [int(i) for i in input().split(" ")]
_3200 = [i for i in A if i<3200]
Upper3200 = len([i for i in A if i>=3200])

n = ratecolor(_3200)

print("{} {}".format(n,n+Upper3200))