N = int(input())
l = list(map(int,input().split()))

flag1 = True
flag2 = True
flag3 = True
flag4 = True
flag5 = True
flag6 = True
flag7 = True
flag8 = True

Max = 0
Min = 0

def plus():
	Max += 1
	Min += 1
	return 0

for value in l:
	if value < 400 and flag1 == True:
		flag1 = False
		Max += 1
		Min += 1
	elif value < 800 and flag2 == True:
		flag2 = False
		Max += 1
		Min += 1
	elif value < 1200 and flag3 == True:
		flag3 = False
		Max += 1
		Min += 1
	elif value < 1600 and flag4 == True:
		flag4 = False
		Max += 1
		Min += 1
	elif value < 2000 and flag5 == True:
		flag5 = False
		Max += 1
		Min += 1
	elif value < 2400 and flag6 == True:
		flag6 = False
		Max += 1
		Min += 1
	elif value < 2800 and flag7 == True:
		flag7= False
		Max += 1
		Min += 1
	elif value < 3200 and flag8 == True:
		flag8 = False
		Max += 1
		Min += 1
	else:
		Max += 1

print(str(Min) + " " + str(Max))
