input()
a = list(map(int, input().split()))
counter = [False] * 8
colorfulcounter = 0

for i in a:
    if 1 <= i <= 399:
        counter[0] = True
    elif 400 <= i <= 799:
        counter[1] = True
    elif 800 <= i <= 1199:
        counter[2] = True
    elif 1200 <= i <= 1599:
        counter[3] = True
    elif 1600 <= i <= 1999:
        counter[4] = True
    elif 2000 <= i <= 2399:
        counter[5] = True
    elif 2400 <= i <= 2799:
        counter[6] = True
    elif 2800 <= i <= 3199:
        counter[7] = True
    elif 3200 <= i:
        colorfulcounter += 1

print(max(sum(counter), colorfulcounter), end = " ")
print(sum(counter) + colorfulcounter)
