n=int(input())
x=input().split()
y=0
while y<n:
    x[y]=int(x[y])
    y+=1
other=0
gray=0
brown=0
green=0
cyan=0
blue=0
yellow=0
orange=0
red=0
for i in x:
    if i<=399:
        gray=1
    elif i<=799:
        brown=1
    elif i<=1199:
        green=1
    elif i<=1599:
        cyan=1
    elif i<=1999:
        blue=1
    elif i<=2399:
        yellow=1
    elif i<=2799:
        orange=1
    elif i<=3199:
        red=1
    else:
        other+=1
mi=gray+brown+green+cyan+blue+yellow+orange+red
ma=other+mi
print(mi,ma)