col = [400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 5000]
nums = [0 for _ in range(9)]
N = int(input())
a = list(map(int, input().split()))
for x in a:
    for i in range(9):
        if x < col[i]:
            nums[i] += 1
            break
cnt = 0
for i in range(8):
    if nums[i] > 0:
        cnt += 1
print(max(cnt, 1), min(cnt+nums[8], 8))