n=int(input())
a=[int(i) for i in input().split()]

def check(n):
    if(n<400):
        color='ash'
    elif(n<800):
        color='brown'
    elif(n<1200):
        color='green'
    elif(n<1600):
        color='water'
    elif(n<2000):
        color='blue'
    elif(n<2400):
        color='yellow'
    elif(n<2800):
        color='orange'
    elif(n<3200):
        color='red'
    else:
        color='free'
    return color
ans=[]
use=[]
ans_num=0
for i in range(n):
    color=check(a[i])
    if(color not in ans or color=='free'):
        ans.append(color)
color_variation=['ash','brown','green','water','blue','yellow','orange','red']
for i in ans:
    if(i in color_variation):
        use.append(color_variation.pop(color_variation.index(i)))
if(ans.count('free')>=len(color_variation)):
    ans_num=len(color_variation)
else:
    ans_num=ans.count('free')
print(len(use),len(use)+ans_num)