input()
a = [int(num) for num in input().split()]
colors = [0 for i in range(8)]
alpha = 0
for i in a:
    if i<400:
        colors[0]=1
    elif i<800:
        colors[1]=1
    elif i<1200:
        colors[2]=1
    elif i<1600:
        colors[3]=1
    elif i<2000:
        colors[4]=1
    elif i<2400:
        colors[5]=1
    elif i<2800:
        colors[6]=1
    elif i<3200:
        colors[7]=1
    else:
        alpha += 1
min = colors.count(1)
max = colors.count(1) + alpha
if max>8:
    max = 8
print(str(min)+' '+str(max))