n = int(input())
a = list(map(int,input().split()))
p =[0 for i in range(9)]
for i in a:
    if 1 <= i <= 399:
        p[0] = 1
    elif 400 <= i <= 799:
        p[1] = 1
    elif 800 <= i <= 1199:
        p[2] = 1
    elif 1200 <= i <= 1599:
        p[3] = 1
    elif 1600 <= i <= 1999:
        p[4] = 1
    elif 2000 <= i <= 2399:
        p[5] = 1
    elif 2400 <= i <= 2799:
        p[6] = 1
    elif 2800 <= i <= 3199:
        p[7] = 1
    elif 3200 <= i:
        p[8] += 1

cou = 0
for i in range(8):
    if p[i] == 1:
        cou += 1

if cou != 0 and cou + p[8] >= 8:
    print(str(cou) + " " + str(8))
elif cou == 0 and p[8] >= 8:
    print(str(1) + " " + str(8))
elif cou != 0 and cou + p[8] < 8:
    print(str(cou) + " " + str(cou + p[8]))
elif cou == 0 and p[8] < 8:
    print(str(1) + " " + str(p[8]))