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>0:
        ans+=1

if ans+god>9:
    max=8
else:
    max=ans+god
if ans>0:
    min=ans
else:
    min=0

print(min,max)
