N = int(input())
A = [int(i) for i in input().split()]
col = [0] * 8
red = 0
minn = 0
maxx = 0

for i in A:
    if i <= 399:
        col[0] = 1
    elif i <= 799:
        col[1] = 1
    elif i <= 1199:
        col[2] = 1
    elif i <= 1599:
        col[3] = 1
    elif i <= 1999:
        col[4] = 1
    elif i <= 2399:
        col[5] = 1
    elif i <= 2799:
        col[6] = 1
    elif i <= 3199:
        col[7] = 1
    else:
        red += 1
if red == 0:
    minn = sum(col)
    maxx = sum(col)
elif red >= 1 and sum(col) == 0:
    minn = 1
    maxx = min(8, red)
else:
    minn = sum(col)
    maxx = min(8, sum(col)+red)

print(minn, maxx)