N = int(input())
ARR = [int(s) for s in input().split(" ")]


def calculate(n, arr):
    colorNum = 8
    dict = {"gray": False, "brown": False, "green": False, "water": False, "blue": False, "yellow": False,
            "orange": False, "red": False}

    any = 0
    for ar in arr:
        if ar >= 1 and ar <= 399:
            dict.__setitem__("gray", True)
        elif ar >= 400 and ar <= 799:
            dict.__setitem__("brown", True)
        elif ar >= 800 and ar <= 1199:
            dict.__setitem__("green", True)
        elif ar >= 1200 and ar <= 1599:
            dict.__setitem__("water", True)
        elif ar >= 1600 and ar <= 1999:
            dict.__setitem__("blue", True)
        elif ar >= 2000 and ar <= 2399:
            dict.__setitem__("yellow", True)
        elif ar >= 2400 and ar <= 2799:
            dict.__setitem__("orange", True)
        elif ar >= 2800 and ar <= 3199:
            dict.__setitem__("red", True)
        else:
            any = any + 1

    already = sum(list(dict.values()))
    notYet = colorNum - already



    if any == 0:
        print("{} {}".format(already, already))
    else:
        ministValue = max(already,1)
        maxValue = min(already + any,colorNum)
        print("{} {}".format(ministValue,maxValue))


calculate(N, ARR)