n=int(input())
a=list(map(int,input().split()))
a1=0
a2=0
a3=0
a4=0
a5=0
a6=0
a7=0
a8=0
wild=0
for i in range(n):
    if 0<=a[i]<=399:
        a1+=1
    elif 400<=a[i]<=799:
        a2+=1
    elif 800<=a[i]<=1199:
        a3+=1
    elif 1200<=a[i]<=1599:
        a4+=1
    elif 1600<=a[i]<=1999:
        a5+=1
    elif 2000<=a[i]<=2399:
        a6+=1
    elif 2400<=a[i]<=2799:
        a7+=1
    elif 2800<=a[i]<=3199:
        a8+=1
    else:
        wild+=1
ans=0
r=[]
r.append(a1)
r.append(a2)
r.append(a3)
r.append(a4)
r.append(a5)
r.append(a6)
r.append(a7)
r.append(a8)
for i in range(8):
    if r[i]!=0:
        ans+=1
print(ans,ans+wild)