from bisect import bisect_right as br
a = range(400, 3201, 400)
minn, maxx = 0, 0
n, s = input(), map(int, raw_input().split())
d = {k: 0 for k in xrange(9)}
for e in s:
    d[br(a, e)] += 1
minn = sum([1 for v in d.values() if v])
maxx = minn
if d[8]:
    if minn > 1:
        minn -= 1
    if d[8] <= 8:
        maxx += (d[8] - 1)
    else:
        maxx += 7
print minn, maxx