N = int(input())
a = list(map(int, input().split()))
s = []
k = 0
l = 0

for i in range(N):
	if a[i] <= 399:
		s.append('a')
	elif a[i] <= 799:
		s.append('b')
	elif a[i] <= 1199:
		s.append('c')
	elif a[i] <= 1599:
		s.append('d')
	elif a[i] <= 1999:
		s.append('e')
	elif a[i] <= 2399:
		s.append('f')
	elif a[i] <= 2799:
		s.append('g')
	elif a[i] <= 3199:
		s.append('h')
	else:
		k += 1

if s.count("a") != 0:
	l += 1

if s.count("b") != 0:
	l += 1
	
if s.count("c") != 0:
	l += 1

if s.count("d") != 0:
	l += 1

if s.count("e") != 0:
	l += 1
	
if s.count("f") != 0:
	l += 1

if s.count("g") != 0:
	l += 1

if s.count("h") != 0:
	l += 1
	
m = k + l

if l == 0:
	if m < 8:
		print(1,m)
	else:
		print(1,8)
else:
	if m < 8:
		print(l,m)
	else:
		print(l,8)