N=int(input())
a=list(map(int,input().split()))
gray=0
brown=0
green=0
water=0
blue=0
yellow=0
orange=0
red=0
other=0
for i in a:
    if 1<=i<=399:
        gray+=1
    elif 400<=i<=799:
        brown+=1
    elif 800<= i <=1199:
        green+= 1
    elif 1200<= i <=1599:
        water+= 1
    elif 1600<= i <=1999:
        blue+= 1
    elif 2000<= i <=2399:
        yellow+= 1
    elif 2400<= i <=2799:
        orange+= 1
    elif 2800<= i <=3199:
        red+= 1
    elif 3200<= i:
        other+= 1

tmp=[gray,brown,green,water,blue,yellow,orange,red]
variety=sum(x>0 for x in tmp)

minimum=variety
maximum=variety+other
if maximum>8:
    maximum=8
if minimum==0:
    minimum==1
print(str(minimum)+' '+str(maximum))

