n = int(input())
a = list(map(int,input().split()))
gray = 0
brown = 0
green = 0
lightblue = 0
blue = 0
yellow = 0
orange = 0
red = 0
rainbow = 0
for i in range(n):
	if a[i]<=399:
		gray += 1
	elif a[i]<=799:
		brown += 1
	elif a[i]<=1199:
		green += 1
	elif a[i]<=1599:
		lightblue += 1
	elif a[i]<=1999:
		blue += 1
	elif a[i]<=2399:
		yellow += 1
	elif a[i]<=2799:
		orange += 1
	elif a[i]<=3199:
		red += 1
	else:
		rainbow += 1
counter = 0
max = 0
min = 0
if gray>=1:
	counter += 1
if brown>=1:
	counter += 1
if green>=1:
	counter += 1
if lightblue>=1:
	counter += 1
if blue>=1:
	counter += 1
if yellow>=1:
	counter += 1
if orange>=1:
	counter += 1
if red>=1:
	counter += 1
if counter >= 1 and (rainbow + counter)<=8:
	min = counter
	max = counter + rainbow
elif counter == 0:
	min = 1
	if rainbow <= 8:
		max = rainbow
	else:
		max = 8
else:
	min = counter
	max = 8
print('{0} {1}'.format(min,max))