input_line_1 = raw_input()
input_line_2 = raw_input()
#N = int(input_line_1)
array = []
count_2 = 0
for i in input_line_2.split(" "):
	point = int(i)/400
	if point < 8:
		if point not in array:
			array.append(point)
	else:
		count_2 += 1

max_point = min(len(array) + count_2, 8)
min_pount = max(len(array), count_2)

print min_pount, " ", max_point