num = int(input())

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

dict = {"rainbow":0, "red":0, "orange":0, "yellow":0, "blue":0, "water":0, "green":0, "brown":0, "gray":0}
for i in rate:
    if i >= 3200:
        dict["rainbow"] += 1
    elif i >= 2800:
        dict["red"] = 1
    elif i >= 2400:
        dict["orange"]= 1
    elif i >= 2000:
        dict["yellow"] = 1
    elif i >= 1600:
        dict["blue"] += 1
    elif i >= 1200:
        dict["water"] = 1
    elif i >= 800:
        dict["green"] = 1
    elif i >= 400:
        dict["brown"] = 1
    elif i >= 0:
        dict["gray"] = 1

color = 0
rainbow = 0
for item, value in dict.items():
    if value > 0 and item != "rainbow":
        color += 1

color_min = color if color != 0 else 1
color_max = color if dict["rainbow"] == 0 else color + dict["rainbow"]

if color_max > 8:
    color_max = 8

print(color_min, color_max)
