def calc(n):
    n_list = list(range(399, 3300, 400))
    for i, j in enumerate(n_list):
        if (n < j) & (n >= j - 399):
            return str(i)
    else:
        return str(8)

import collections
n = int(input())
a = [int(i) for i in input().split()]
a_list = [calc(a_) for a_ in a]
l = collections.Counter(a_list)
if "8" in l.keys():
    min_ans = len(list(set(a_list))) - 1
else:
    min_ans = len(list(set(a_list)))    
ans = l["8"] + min_ans
max_ans = ans if ans < 8 else 8
t = " ".join([str(min_ans), str(max_ans)])
print(t)