n = int(input())
a = list(map(int, input().split()))
color = []
free = 0
for x in a:
    if x < 400:
        if "g" not in color: color.append("g")
    elif x < 800:
         if "b" not in color: color.append("b")
    elif x < 1200:
        if "gr" not in color: color.append("gr")
    elif x < 1600:
        if "bl1" not in color: color.append("bl1")
    elif x < 2000:
        if "bl2" not in color: color.append("bl2")
    elif x < 2400:
        if "y" not in color: color.append("y")
    elif x < 2800:
        if "o" not in color: color.append("o")
    elif x < 3200:
        if "r" not in color: color.append("r")
    else: free += 1
print(len(color), len(color) + free)