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

memo = {1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0}
over = 0

for a in A:
    if a < 400:
        memo[1] = 1
    elif a < 800:
        memo[2] = 1
    elif a < 1200:
        memo[3] = 1
    elif a < 1600:
        memo[4] = 1
    elif a < 2000:
        memo[5] = 1
    elif a < 2400:
        memo[6] = 1
    elif a < 2800:
        memo[7] = 1
    elif a < 3200:
        memo[8] = 1
    else:
        over += 1

default_color = 0
for key in memo:
    default_color += memo[key]

print(default_color, default_color+over)
