n = int(input())
a = list(map(int,input().split()))
color = [0 for i in range(9)]
for i in range(n):
	if a[i]<=399:
		color[0] += 1
	elif a[i]<=799:
		color[1] += 1
	elif a[i]<=1199:
		color[2] += 1
	elif a[i]<=1599:
		color[3] += 1
	elif a[i]<=1999:
		color[4] += 1
	elif a[i]<=2399:
		color[5] += 1
	elif a[i]<=2799:
		color[6] += 1
	elif a[i]<=3199:
		color[7] += 1
	else:
		color[8] += 1
counter = 0
for i in range(8):
	if color[i] != 0:
		counter += 1
if color[8] == 0:
	print(counter,counter)
else:
	if counter == 0:
		if color[8] >= 8:
			print('1 8')
		else:
			print('1 {0}'.format(color[8]))
	else:
		if color[8] + counter >= 8:
			print('{0} 8'.format(counter))
		else:
			print(counter,color[8]+counter)