N = int(input())
A = list(map(int,input().split()))

sep = 400
flag = [False]*8
c = 0
for a in A:
    s = a//sep
    if s >= 8:
        c += 1
    else:
        flag[s] = True

min = flag.count(True)
max = min + c

print("{0} {1}".format(min,max))

