reet = [1,399,400,799,800,1199,1200,1599,1600,1999,2000,2399,2400,2799,2800,3199]
n = int(input())
alist = list(map(int, input().split()))

dorei = []
osama = []
for a in alist:
    for i in range(len(reet)-1):
        osamaflag = True
        if (reet[i] <= a < reet[i+1]):
            dorei.append(i)
            osamaflag = False
            break
    if osamaflag:
        osama.append(50)

max_ = len(set(dorei))
while (max_ < 8) and (len(osama) != 0):
    max_ += 1
    osama.pop()

min_ = len(set(dorei))
print(min_, max_)