N=int(input())
gray=0
brown=0
green=0
cyan=0
blue=0
yellow=0
dai=0
red=0
chan=0
A=input().split()
for i in range(N):
    a=int(A[i])
    if a<400:
        gray=1    
    elif a<800:
        brown=1
    elif a<1200:
        green=1   
    elif a<1600:
        cyan=1
    elif a<2000:
        blue=1
    elif a<2400:
        yellow=1
    elif a<2800:
        dai=1
    elif a<3200:
        red=1    
    else:
        chan=chan+1
min=gray+brown+green+cyan+blue+yellow+dai+red
if chan==0:
   print(str(min)+' '+str(min))
elif chan!=0 and min<7:
   max=min+chan
   if max>=8:
      max=8
   if min==0:
       min=1
   print(str(min)+' '+str(max))
else:
    print(str(8)+' '+str(8))