N = int(input())
a = list(map(int, input().split()))

def color(n):
    if n < 400:
        return 0
    elif n < 800:
        return 1
    elif n < 1200:
        return 2
    elif n < 1600:
        return 3
    elif n < 2000:
        return 4
    elif n < 2400:
        return 5
    elif n < 2800:
        return 6
    elif n < 3200:
        return 7
    else:
        return 8

clr = list(map(color, a))
n = len(set(clr))
if 8 not in clr:
    print('{} {}'.format(n, n))
else:
    free_cnt = clr.count(8)
    min_n = max(n-1, 1)
    max_n = min(n+free_cnt-1, 8)
    print('{} {}'.format(min_n, max_n))
