n = int(input())
a = list(map(int,input().split()))
p = [0] * 8
q = 0
for i in a:
    if i // 400 >= 8:
        q += 1
    else:
        p[i//400] += 1
pp = 0
for qqqq in p:
    if qqqq != 0:
        pp += 1
print(pp, pp + q)
