N = int(input())
a = map(int,input().split())
color = [0,0,0,0,0,0,0,0,0]
for _a in a:
    if _a < 400:
        color[0] += 1
    elif _a < 800:
        color[1] += 1
    elif _a < 1200:
        color[2] += 1
    elif _a < 1600:
        color[3] += 1
    elif _a < 2000:
        color[4] += 1
    elif _a < 2400:
        color[5] += 1
    elif _a < 2800:
        color[6] += 1
    elif _a < 3200:
        color[7] += 1
    else:
        color[8] += 1
category = 0
for i in range(8):
    if color[i] != 0:
        category += 1
print(category,category + color[8])