n=int(input())
a=list(map(int, input().split()))

rt=[0]*8
rt8=0
for i in range(n):
    for j in range(0,8):
        if 400*j<=a[i] and a[i]<=399+400*j:
            rt[j]=1
    if a[i]>=3200:
        rt8=rt8+1
        
rtmin=max(1,sum(rt))
#rtmax=min(rtmin+rt8,8)
rtmax=rtmin+rt8

print(rtmin,rtmax)