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

import collections

count = collections.defaultdict(int)
for a in A:
    if 1 <= a <= 399:
        count['gray'] += 1
    elif 400 <= a <= 799:
        count['brown'] += 1
    elif 800 <= a <= 1199:
        count['green'] += 1
    elif 1200 <= a <= 1599:
        count['mizu'] += 1
    elif 1600 <= a <= 1999:
        count['blue'] += 1
    elif 2000 <= a <= 2399:
        count['yellow'] += 1
    elif 2400 <= a <= 2799:
        count['daidai'] += 1
    elif 2800 <= a <= 3199:
        count['brown'] += 1
    else:
        count['other'] += 1

if 'other' not in count:
    min_count = len(count)
elif 'other' in count and len(count) == 1:
    min_count = 1
else:
    min_count = len(count) - 1


if 'other' in count:
    max_count = min(8, len(count)-1 + count['other'])
else:
    max_count = len(count)

print(min_count, max_count)