n = int(input())
a = [int(i) for i in input().split()]
x,y = set(),0
for i in a:
	num = (i-i%400)//400
	if num>=8:
		num = 8
		y += 1
	x.add(num)
if len(x) != 1:
	if 8 in x:
		x.remove(8)
	print(len(x),len(x)+y)
else:
	print(1,1)