n = int(input())
a = sorted(list(map(int, input().split())))
Groups = []
cnt = 0

for k in range(1, 9):
    b = list(filter(lambda x: x < 400*k, a))
    if b:
        cnt += 1
    a = a[len(b):]
print(cnt, cnt+len(a))
    