import numpy as np
N = int(input())
a = list(map(int, input().split()))

d = np.arange(0, 3600, 400)
c = []

for i in range(N):
	for j in range(len(d)-1):
		if d[j] <= a[i] < d[j + 1]:
			c.append(j)
	if a[i] >= 3200:
		c.append(8)

import collections
s_c=collections.Counter(c)

s_val, s_count=zip(*s_c.most_common())
nana_ika = [x for x in s_val if x < 8]

if not 8 in s_val:
	print(len(nana_ika), len(nana_ika))

else:
	print(len(nana_ika), min(s_c[8]+len(nana_ika), 8))
