from collections import defaultdict
N = int(input())
A = list(map(int,input().split()))

dic = defaultdict(int)
for a in A:
    n = a//400
    if n > 7:
        dic[8] += 1
    else: dic[n] += 1

m = len(dic.keys())
if dic[8] > 0:
    m -= 1
    mi = m
    ma = min(8,m+dic[8])
else:
    mi = ma = m
print(mi,ma)