#Python

N = input()
A = map(int, raw_input().split())

#print A
i=0
free_color_counts=0
colors=[]
while i<N:
	if A[i]>=1 and A[i]<=399:
		c='Hai'
		colors.append(c)
	elif A[i]>=400 and A[i]<=799:
		c='Cha'
		colors.append(c)
	elif A[i]>=800 and A[i]<=1199:
		c='Midori'
		colors.append(c)
	elif A[i]>=1200 and A[i]<=1599:
		c='Mizu'
		colors.append(c)
	elif A[i]>=1600 and A[i]<=1999:
		c='Ao'
		colors.append(c)
	elif A[i]>=2000 and A[i]<=2399:
		c='Ki'
		colors.append(c)
	elif A[i]>=2400 and A[i]<=2799:
		c='Dai'
		colors.append(c)
	elif A[i]>=2800 and A[i]<=3199:
		c='Aka'
		colors.append(c)
	elif A[i]>=3200:
		free_color_counts+=1

	i+=1


#print colors
#print list(set(colors))

if len(list(set(colors)))==0:
	print 1,
	print free_color_counts
else:
	print len(list(set(colors))),
	print len(list(set(colors)))+ free_color_counts
