n = int(input())
a_list = list(map(int, input().split()))
r_list = [0]*9
for a in a_list:
	if a < 399:
		r_list[0] += 1
	elif a < 800:
		r_list[1] += 1
	elif a < 1200:
		r_list[2] += 1
	elif a < 1600:
		r_list[3] += 1
	elif a < 2000:
		r_list[4] += 1
	elif a < 2400:
		r_list[5] += 1
	elif a < 2800:
		r_list[6] += 1
	elif a < 3200:
		r_list[7] += 1
	else:
		r_list[8] += 1
min_count = 0
super_r = r_list.pop(-1)
for r in r_list:
	if r > 0:
		min_count += 1
max_count = super_r + min_count
if min_count == 0 and super_r > 0:
	min_count = 1
print(min_count, max_count)