def c_ColorfulLeaderboard(N, A):
    from collections import defaultdict
    color = defaultdict(int)
    other = 0  # レート3200以上の選手の数
    for a in A:
        if 1 <= a <= 399:
            color['gray'] += 1
        elif 400 <= a <= 799:
            color['brown'] += 1
        elif 800 <= a <= 1199:
            color['green'] += 1
        elif 1200 <= a <= 1599:
            color['skyblue'] += 1
        elif 1600 <= a <= 1999:
            color['blue'] += 1
        elif 2000 <= a <= 2399:
            color['yellow'] += 1
        elif 2400 <= a <= 2799:
            color['orange'] += 1
        elif 2800 <= a <= 3199:
            color['red'] += 1
        elif 3200 <= a:
            other += 1
    if len(color) == 0:
        if other >= 1:
            minimum = 1
    else:
        minimum = len(color)
    maximum = min(len(color) + other, 8)
    return '{} {}'.format(minimum, maximum)

N=int(input())
A=[int(i) for i in input().split()]
print(c_ColorfulLeaderboard(N, A))