n = int(input())

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

colors = [0,0,0,0,0,0,0,0,0]

count = 0

def check(x):
	if 1<=x<=399:
		colors[0] += 1
	elif 400<=x<=799:
		colors[1] += 1
	elif 800<=x<=1199:
		colors[2] += 1
	elif 1200<=x<=1599:
		colors[3] += 1
	elif 1600<=x<=1999:
		colors[4] += 1
	elif 2000<=x<=2399:
		colors[5] += 1
	elif 2400<=x<=2799:
		colors[6] += 1
	elif 2800<=x<=3199:
		colors[7] += 1
	elif 3200<=x:
		colors[8] += 1

for i in a:
	check(i)

for i in range(8):
	if colors[i] == 0:
		count += 1

color_min = 8 - count
color_max = min(color_min+colors[8],8)

if color_min==0 and colors[8]!=0:
	color_min = 1

print(color_min,color_max)