N =int(input())
scores = [int(i)//400 for i in input().split()]
d = [0]*10
for s in scores:
    if s > 7:
        s = 8
    d[s] = d[s] + 1
if any(d[:8]):
    m = [bool(i) for i in d[:8]].count(True)
else:
    m = 1
M = min(8, m+d[8])
print(m, M)