def solve(rates):
	colors = [0 for i in range(8)]
	f = 0
	for rate in rates:
		if rate>=1 and rate<400:
			colors[0] = 1
		elif rate>=400 and rate<800:
			colors[1] = 1
		elif rate>=800 and rate<1200:
			colors[2] = 1
		elif rate>=1200 and rate<1600:
			colors[3] = 1
		elif rate>=1600 and rate<2000:
			colors[4] = 1
		elif rate>=2000 and rate<2400:
			colors[5] = 1
		elif rate>=2400 and rate<2800:
			colors[6] = 1
		elif rate>=2800 and rate<3200:
			colors[7] = 1
		elif rate>=3200:
			f += 1

	ans_min = sum(colors)
	if ans_min+f>8:
		ans_max = 8
	else:
		ans_max = ans_min + f

	print(str(ans_min) + " " + str(ans_max))

		

N = int(input())
a = list(map(int, input().split()))
solve(a)