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

l = {}
for a in A:
	k = a // 400
	k = min(k, 8)
	if k not in l:
		l[k] = 1
	else:
		l[k] += 1
#print(l)
print(max(1, len(l) - 1), max(1, len(l) - 1 + l[8] if 8 in l else 0))
