from collections import defaultdict
def main():
    N = int(input())
    p = [int(a) for a in input().split()]
    rate = defaultdict(int)
    for i in range(N):
        score = p[i]
        if 1 <= score <= 399:
            rate["GRAY"] += 1
        elif 400  <= score <= 799:
            rate["BROWN"] += 1
        elif 800  <= score <= 1199:
            rate["GREEN"] += 1
        elif 1200 <= score <= 1599:
            rate["LBLUE"] += 1
        elif 1600 <= score <= 1999:
            rate["BLUE"] += 1
        elif 2000 <= score <= 2399:
            rate["YELLOW"] += 1
        elif 2400 <= score <= 2799:
            rate["ORANGE"] += 1
        elif 2800 <= score <= 3199:
            rate["RED"] += 1
        elif 3200 <= score:
            rate["FREE"] += 1
    color = 0
    free  = 0
    for k, v in rate.items():
        if k != "FREE":
            if rate[k] > 0:
                color += 1
        else:
            free += rate[k]
    print(color , color + free)
main()