n = int(input())
a = list(map(int,input().split()))
a7=[]
cnt8=0
for i in range(n):
    #0<=x<=7,8以上
    x = a[i]//400
    if x>=8:
        cnt8 += 1
    else:
        a7.append(x)
a7 = list(set(a7))
if len(a7)>=1:
    mina = len(a7)
else:
    mina = 1
maxa = min(8,len(a7)+cnt8)
print(mina,maxa)
