n=int(input())
a_s=list(map(int,input().split()))
color_list=[0]*8
god=0
point_split=[1,400,800,1200,1600,2000,2400,2800,3200]
for a in a_s:
    for i in range(8):
        if point_split[i]<=a<point_split[i+1]:
            color_list[i]+=1
    if a >=3200:
        god+=1

ans=0
for color in color_list:
    if color:
        ans+=1
#print(color_list,ans)
if (ans+god)>=8:
    max=8
else:
    max=ans+god
if ans==0:
    min=1
else:
    min=ans

print(min,max)
