n = int(input())

color = [0] * 8
pro = 0
for ai in map(int, input().split()):
    if 1 <= ai <= 399:
        color[0] = 1
    elif 400 <= ai <= 799:
        color[1] = 1
    elif 800 <= ai <= 1199:
        color[2] = 1
    elif 1200 <= ai <= 1599:
        color[3] = 1
    elif 1600 <= ai <= 1999:
        color[4] = 1
    elif 2000 <= ai <= 2399:
        color[5] = 1
    elif 2400 <= ai <= 2799:
        color[6] = 1
    elif 2800 <= ai <= 3199:
        color[7] = 1
    else:
        pro += 1

colSum = sum(color)
if colSum == 0 and pro > 0:
    print(1,min(8,pro))
else:
    print(colSum, min(colSum + pro, 8))
