def solve():
    n = int(input())
    A = list(map(int, input().split(" ")))
    colors = [False] * 8
    meta = 0
    for a in A:
        if 1 <= a <= 399:
            colors[0] = True
        elif 400 <= a <= 799:
            colors[1] = True
        elif 800 <= a <= 1199:
            colors[2] = True
        elif 1200 <= a <= 1599:
            colors[3] = True
        elif 1600 <= a <= 1999:
            colors[4] = True
        elif 2000 <= a <= 2399:
            colors[5] = True
        elif 2400 <= a <= 2799:
            colors[6] = True
        elif 2800 <= a <= 3199:
            colors[7] = True
        else:
            meta += 1

    cnt = 0
    for c in colors:
        if c == True:
            cnt += 1

    print(cnt, cnt + meta)


solve()