N = int(input())
a =[]
a = input().split()
flag=[False for i in range(8)]
count = 0

while a:
    tmp = int(a.pop())
    if(tmp<400):
        flag[0] = True
    elif(tmp<800):
        flag[1] = True
    elif(tmp<1200):
        flag[2] = True
    elif(tmp<1600):
        flag[3] = True
    elif(tmp<2000):
        flag[4] = True
    elif(tmp<2400):
        flag[5] = True
    elif(tmp<2800):
        flag[6] = True
    elif(tmp<3200):
        flag[7] = True
    else:
        count += 1

if True in flag:
    print(flag.count(True), flag.count(True)+count)
else:
    print(count,count)
    
