n = int( input() );
a = input().split(" ");
flag = [0]*8;
count_pro = 0;
for i in range(n) :
	if int(a[i]) < 3200 :
		flag[int(int(a[i])/400)] = 1;
	else :
		count_pro = count_pro + 1;
if count_pro > 8 - sum(flag) :
	print(sum(flag),8);
elif count_pro < 8 - sum(flag) and count_pro > 0 :
	print(sum(flag),sum(flag)+count_pro);
else :
	print(sum(flag),sum(flag));