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 k in d if d[k] and k != 8])
if not minn:
    minn = 1
    maxx = min(8, d[8])
else:
    maxx = min(8, d[8] + minn)
print minn, maxx