N  = int(input())
using = [0 for _ in range(9)]
def color(i):
    i = int(i)
    if i < 400:
        return 0
    elif i< 800:
        return 1
    elif i<1200:
        return 2
    elif i<1600:
        return 3
    elif i<2000:
        return 4
    elif i<2400:
        return 5
    elif i<2800:
        return 6
    elif i<3200:
        return 7
    else:
        return 8
L = list(map(color, input().split()))
for x in L:
    using[x] += 1
val = using.pop(-1)
if list(filter(lambda x:x!=0,using)) == []:
    print(1,min(8,val))
    quit()
else:
    minimum = len(list(filter(lambda x:x!=0,using)))
    maximum = min (8, minimum + val)
    print(minimum,maximum)