n=int(input())
a=list(map(int,input().split()))
gray=[]
brown=[]
green=[]
skyblue=[]
blue=[]
yellow=[]
orange=[]
red=[]
for i in range(1,3200):
    if 0<i<400:
        gray.append(i)
    elif 399<i<800:
        brown.append(i)
    elif 799<i<1200:
        green.append(i)
    elif 1299<i<1600:
        skyblue.append(i)
    elif 1599<i<2000:
        blue.append(i)
    elif 1999<i<2400:
        yellow.append(i)
    elif 2399<i<2800:
        orange.append(i)
    else:
        red.append(i)
collor=[gray,brown,green,skyblue,blue,yellow,orange,red]
ans0=0
for i in range(len(collor)):
    if len(set(collor[i])&set(a))!=0:
        ans0+=1
cnt=0
for x in a:
    if x>=3200:
        cnt+=1
print(ans0,ans0+cnt)
