n=int(input())
L=list(map(int,input().split()))
L.sort()
tmp=0
cnt=0
min_c=0
max_c=0

for i in range(n):
	if L[i] <= 399:
		cnt+=1
		tmp=i
		break

for i in range(tmp,n):
	if L[i] > 399 and L[i] <= 799:
		cnt+=1
		tmp=i
		break

for i in range(tmp,n):
	if L[i] > 799 and L[i] <= 1199:
		cnt+=1
		tmp=i
		break
		
for i in range(tmp,n):
	if L[i] > 1199 and L[i] <= 1599:
		cnt+=1
		tmp=i
		break
		
for i in range(tmp,n):
	if L[i] > 1599 and L[i] <= 1999:
		cnt+=1
		tmp=i
		break

for i in range(tmp,n):
	if L[i] > 1999 and L[i] <= 2399:
		cnt+=1
		tmp=i
		break
		
for i in range(tmp,n):
	if L[i] > 2399 and L[i] <= 2799:
		cnt+=1
		tmp=i
		break

for i in range(tmp,n):
	if L[i] > 2799 and L[i] <= 3199:
		cnt+=1
		tmp=i
		break
		
min_c=cnt
max_c=cnt

for i in range(tmp,n):
	if L[i] >= 3200:
		max_c=cnt+len(L[i:])
		if min_c==0:
			min_c+=1
		break
		
print(min_c)
print(min(8,max_c))