from collections import defaultdict
n = int(input())
A=[int(i)//400 for i in input().split()]
dd = defaultdict(int)
t=0
for i in A:
    if i>=8:
        t+=1
        continue
    else:
        dd[i]+=1
print(max(len(dd), 1),min(len(dd)+t, 8))
