if __name__ == '__main__':

	#入力
	N = int(input())
	score_lst = [int(a) for a in input().split()]
	grade_lst = []
	for i in score_lst:
		grade = int(i / 400)
		if grade > 7:
			grade = 8
		grade_lst.append(grade)

	count = 0

	for i in range(0,8):
		if grade_lst.count(i) > 0:
			count += 1

	min_count = count
	max_count = count + grade_lst.count(8)

	print("{} {}".format(min_count,max_count))