from collections import Counter

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

da = [ai//400 for ai in aa if ai<3200]
over = sum([ai>=3200 for ai in aa])

c = Counter(da)

min_v = len(c)
max_v = min(8,(min_v+over))

print(min_v,max_v)