n = int(raw_input())
rate = map(int, raw_input().split())
num = [0]*9

cunt = 0
for item in rate:
    if item < 3200:
        if item < 400:
            num[0] = 1
        elif item < 800:
            num[1] = 1
        elif item < 1200:
            num[2] = 1
        elif item < 1600:
            num[3] = 1
        elif item < 2000:
            num[4] = 1
        elif item < 2400:
            num[5] = 1
        elif item < 2800:
            num[6] = 1
        elif item < 3200:
            num[7] = 1
    else:
        num[8] += 1
print sum(num[:-1]), sum(num)
