n = int(input())
rate = list(map(int,input().split()))
color = [0]*9
ratecolor = 0
free = 0
for i in range(n):
    for j in range(9):
        if(rate[i] <= j*400 + 399):
            if(color[j] == 0 and rate[i] < 3200):
                ratecolor += 1
            color[j] += 1
            break
# print(color)
print(ratecolor,min(ratecolor+color[-1],8))

