def solve(N, As):
    colors = set()
    allcount = 0
    for a in As:
        color = "ALL"
        if a < 400:
            color = "Gray"
        elif a < 800:
            color = "cha"
        elif a < 1200:
            color = "green"
        elif a < 1600:
            color = "lblue"
        elif a < 2000:
            color = "blue"
        elif a < 2400:
            color = "yellow"
        elif a < 2800:
            color = "orange"
        elif a < 3200:
            color = "red"

        if color != "ALL":
            colors.add(color)
        else:
            allcount += 1

    return len(colors), min(len(colors) + allcount, 8)


if __name__ == "__main__":
    N = int(input())
    As = map(int, input().split(" "))
    min, max = solve(N, As)
    print(min, max)
