n = int(input())
a = list(map(int, input().split()))
rate_list = [0] * 8

for i in a:
    if i < 400:
        rate_list[0] += 1
    elif i < 800:
        rate_list[1] += 1
    elif i < 1200:
        rate_list[2] += 1
    elif i < 1600:
        rate_list[3] += 1
    elif i < 2400:
        rate_list[4] += 1
    elif i < 2800:
        rate_list[5] += 1
    elif i < 3200:
        rate_list[6] += 1
    else:
        rate_list[7] += 1

count = 0
for i in range(7):
    if rate_list[i] > 0:
        count += 1

count2 = count
count2 += rate_list[7]

print(count, min(8, count2))