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

def color(n):
    if n < 400:
        return 'hai'
    elif n < 800:
        return 'cha'
    elif n < 1200:
        return 'midori'
    elif n < 1600:
        return 'mizu'
    elif n < 2000:
        return 'ao'
    elif n < 2400:
        return 'ki'
    elif n < 2800:
        return 'ore'
    elif n < 3200:
        return 'aka'
    else:
        return 'f'

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