from collections import Counter

N = int(input())
A = [int(_) // 400 if int(_) < 3199 else 8 for _ in input().split()]

min_counter = Counter(A)
if 8 in min_counter.keys():
    min_counter.pop(8)
maximum = 0
max_counter = Counter(A)
if max_counter[8] >= 8:
    maximum = 8
else:
    if 8 in max_counter.keys():
        maximum = max_counter[8]
        max_counter.pop(8)
    maximum += len(max_counter)
minimum = len(min_counter)
print(minimum, maximum)