human_count = int(input())
rates = [int(n) for n in input().split(" ")]
color_dic = {"GRAY":False, "BROWN":False, "GREEN":False, "LITEBLUE":False, "BLUE":False, "YELLOW":False, "ORANGE":False, "RED":False, "FREE":0}

for rate in rates:
    if rate < 400:
        color_dic["GRAY"] = True
    elif rate < 800:
        color_dic["BROWN"] = True
    elif rate < 1200:
        color_dic["GREEN"] = True
    elif rate < 1600:
        color_dic["LITEBLUE"] = True
    elif rate < 2000:
        color_dic["BLUE"] = True
    elif rate < 2400:
        color_dic["YELLOW"] = True
    elif rate < 2800:
        color_dic["ORANGE"] = True
    elif rate < 3200:
        color_dic["RED"] = True
    else:
        color_dic["FREE"] += 1
color_count_min = list(color_dic.values()).count(True)
if color_count_min == 0:
    color_count_min = 1
color_count_max = color_count_min + color_dic["FREE"]
print("{} {}".format(color_count_min, color_count_max))
