import collections

n = int(input())
ls = list(map(int, input().split()))

counter = collections.Counter()
for a in ls:
    counter[min(8, a // 400)] += 1
n_keys = len(counter.keys())
n8 = counter[8]
if n8 > 0:
    n_min = n_keys - 1
    n_max = n_min + n8
else:
    n_min = n_max = n_keys
print(n_min, n_max)