n = int(input())
a = list(map(int, input().split()))

count = [0,0,0,0,0,0,0,0,0]

for i in a:

    count[0] += 1 if i in range(1, 400)     and count[0] == 0 else 0
    count[1] += 1 if i in range(400, 800)   and count[1] == 0 else 0
    count[2] += 1 if i in range(800, 1200)  and count[2] == 0 else 0
    count[3] += 1 if i in range(1200, 1600) and count[3] == 0 else 0
    count[4] += 1 if i in range(1600, 2000) and count[4] == 0 else 0
    count[5] += 1 if i in range(2000, 2400) and count[5] == 0 else 0
    count[6] += 1 if i in range(2400, 2800) and count[6] == 0 else 0
    count[7] += 1 if i in range(2800, 3200) and count[7] == 0 else 0

    count[8] += 1 if i >= 3200 else 0

print(sum(count[:-1]), sum(count))
