from collections import defaultdict
n = int(input())
nums = [int(i) for i in input().split()]

d = defaultdict(int)
a = 0
for num in nums:
    if 1 <= num <= 399:
        d['ash'] += 1
    elif 400 <= num <= 799:
        d['brown'] += 1
    elif 800 <= num <= 1199:
        d['green'] += 1
    elif 1200 <= num <= 1599:
        d['water'] += 1
    elif 1600 <= num <= 1999:
        d['blue'] += 1
    elif 2000 <= num <= 2399:
        d['yellow'] += 1
    elif 2400 <= num <= 2799:
        d['orange'] += 1
    elif 2800 <= num <= 3199:
        d['red'] += 1
    else:
        a += 1
MIN = len(d)
if MIN == 0 and a > 0:
    MIN = 1
MAX = min(8, len(d) + a)
print(MIN, MAX)