n=int(input())
a=list(map(int,input().split()))
list=[0]*8
count=0
for i in range(n):
	if a[i]<400:
		list[0]=1
	elif a[i]<800:
		list[1]=1
	elif a[i]<1200:
		list[2]=1
	elif a[i]<1600:
		list[3]=1
	elif a[i]<2000:
		list[4]=1
	elif a[i]<2400:
		list[5]=1
	elif a[i]<2800:
		list[6]=1
	elif a[i]<3200:
		list[7]=1
	else:
		count+=1
color=list.count(1)

min_c=color
if min_c==0:
	min_c+=1
for j in range(0,8-color,1):
	if count==0:
		break
	color+=1
	count-=1
		
print(min_c,color)


