N = int(input())
s = input().split()
a = [0]*8
flex = 0
for i in range(N):
    if int(s[i]) >=3200 : 
        flex = flex+1
    elif int(s[i]) >= 2800:
        a[7] = a[7]+1
    elif int(s[i])>=2400:
        a[6] = a[6]+1
    elif int(s[i])>=2000:
        a[5] = a[5]+1
    elif int(s[i]) >= 1600:
        a[4] = a[4]+1
    elif int(s[i])>=1200:
        a[3] = a[3]+1
    elif int(s[i])>=800:
        a[2] = a[2]+1
    elif int(s[i])>=400:
        a[1] = a[1] + 1
    else:
        a[0] = a[0]+1

cnt = 0
for i in range(8):
    if a[i] > 0:
        cnt = cnt+1
#print(a)
if  cnt !=  0:
    print(str(cnt)+" "+str(cnt+flex))
else:
    print(str(0)+" "+str(flex))