def whichcolor(n):
	if n < 3200:
		return n / 400
	else:
		return 8

def countzero(lst):
	cnt = 0
	for i in range(0, len(lst)):
		if lst[i] == 0:
			cnt += 1
	return cnt

n = int(raw_input())
inpt = map(int, raw_input().split())

color = [0, 0, 0, 0, 0, 0, 0, 0]
almighty = 0

for i in range(0, n):
	c = whichcolor(inpt[i])
	if c == 8:
		almighty += 1
	else:
		color[c] += 1

zro = countzero(color)
min = 8 - zro
if min == 0:
	min = 1
max = 8 - zro + almighty
if max > 8:
	max = 8
print str(min) + ' ' + str(max)
