n = int(input())
a = list(map(int, input().split()))
a.sort()
l = [x//400 if x//400 <= 7 else 8 for x in a]
p = [0]*8
for i in l:
    if i < 8:
        p[i] = 1
if p.count(0) == 8:
    pmin = 1
    pmax = pmin + min(l.count(8)-1,p.count(0)-1)
else:
    pmin = sum(p) if sum(p) != 0 else 1
    pmax = pmin + min(l.count(8),p.count(0))
print(pmin, pmax)