n=int(input())
a=list(map(int,input().split()))
ash=0
brown=0
green=0
lightblue=0
blue=0
yellow=0
orange=0
red=0
ans=0
for i in a:
    if i<=399:
        if ash==0:
            ash+=1
    elif 400<=i<=799:
        if brown==0:
            brown+=1
    elif 800<=i<=1199:
        if green==0:
            green+=1
    elif 1200<=i<=1599:
        if lightblue==0:
            lightblue+=1
    elif 1600<=i<=1999:
        if blue==0:
            blue+=1
    elif 2000<=i<=2399:
        if yellow==0:
            yellow+=1
    elif 2400<=i<=2799:
        if orange==0:
            orange+=1
    elif 2800<=i<=3199:
        if red==0:
            red+=1
    else:
        ans+=1
v=ash+brown+green+lightblue+blue+yellow+orange+red
print(v,v+ans)
