N = input()
rates = [int(x) for x in input().split()]
colors = [0,0,0,0,0,0,0,0]
target = 0

for rate in rates:
	if rate < 400:
		colors[0] = 1
	elif 400 <= rate < 800:
		colors[1] = 1
	elif 800 <= rate < 1200:
		colors[2] = 1
	elif 1200 <= rate < 1600:
		colors[3] = 1
	elif 1600 <= rate < 2000:
		colors[4] = 1
	elif 2000 <= rate < 2400:
		colors[5] = 1
	elif 2400 <= rate < 2800:
		colors[6] = 1
	elif 2800 <= rate < 3200:
		colors[7] = 1
	else:
		target += 1

non_target = sum(colors)
MAX = non_target + target

if non_target >= target:
	MIN = non_target
else:
	MIN = non_target + (target - non_target)

print(MIN,MAX)