N = int(input())
a = list(map(int, input().split()))
lis = [0,0,0,0,0,0,0,0]
for i in a:
    if i<400:
        lis[0] = 1
    elif i<800:
        lis[1] = 1
    elif i<1200:
        lis[2] = 1
    elif i<1600:
        lis[3] = 1
    elif i<2000:
        lis[4] = 1
    elif i<2400:
        lis[5] = 1
    elif i<2800:
        lis[6] = 1
    else:
        lis[7] += 1
if lis[7] == 0:
    print(lis.count(1), lis.count(1))
elif lis[0:6].count(1) < lis[7]:
    n = lis[7]
    if lis[7]>(6-lis[0:6].count(1)):
        print(lis[0:6].count(1)+(lis[7]-lis[0:6].count(1)), lis[0:6].count(1)+(6-lis[0:6].count(1))+1)
    else:
        print(lis[0:6].count(1)+(lis[7]-lis[0:6].count(1)),lis[0:6].count(1)+lis[7])
else:
    n = lis[7]
    print(lis[0:6].count(1)-n, lis[0:6].count(1)+n)