num = int(input())
list = [int(x) for x in input().split()]

count = 0
any = 0

color = []

for i in range(num):
    if 1 <= list[i] < 400:
        color.append("gray")
    elif 400 <= list[i] < 800:
        color.append("brown")
    elif 800 <= list[i] < 1200:
        color.append("green")
    elif 1200 <= list[i] < 1600:
        color.append("sky")
    elif 1600 <= list[i] < 2000:
        color.append("blue")
    elif 2000 <= list[i] < 2400:
        color.append("yellow")
    elif 2400 <= list[i] < 2800:
        color.append("orange")
    elif 2800 <= list[i] < 3200:
        color.append("red")
    else:
        color.append("any")



if "gray" in color:
    count += 1
else:
    None


if "brown" in color:
    count += 1
else:
    None


if "green" in color:
    count += 1
else:
    None


if "sky" in color:
    count += 1
else:
    None


if "blue" in color:
    count += 1
else:
    None


if "yellow" in color:
    count += 1
else:
    None


if "orange" in color:
    count += 1
else:
    None


if "red" in color:
    count += 1
else:
    None






print(count,count+color.count("any"))
