N =int(input())
scores = [min(int(i)//400, 8) for i in input().split()]
d = [0]*9
for s in scores:
    d[s] = d[s] + 1
print(d)
m = max(1, [bool(i) for i in d[:8]].count(True))
M = m+d[8]
print('{} {}'.format(m, M))