def rank(n):
    n = int(n)
    if n < 400:
        return 'a'
    if n < 800:
        return 'b'
    if n < 1200:
        return 'c'
    if n < 1600:
        return 'd'
    if n < 2000:
        return 'e'
    if n < 2400:
        return 'f'
    if n < 2800:
        return 'g'
    if n < 3200:
        return 'h'
    else:
        return 'x'


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

normal = [i for i in a if i != 'x']
ans_max = min(8, len(set(normal)) + a.count('x'))
if len(normal) == 0:
    ans_min = 1
else:
    ans_min = len(set(normal))
print(ans_min, ans_max)