# import random
# def randomnum(n):
#     num = []
#     for i in range(n):
#         num.append(random.randint(1,4800))
#     return num
n = int(input())
rate = list(map(int,input().split()))
# n = random.randint(1,15)
# rate = randomnum(n)
color = [0]*9
ratecolor = 0
for i in range(n):
    for j in range(9):
        if(rate[i] < j*400 + 400):
            if(color[j] == 0 and rate[i] < 3200):
                ratecolor += 1
            color[j] += 1
            break
# print(color,n)
print(ratecolor,ratecolor+color[-1])