L = [["A", 1, 399],
	["B", 400, 799],
	["C", 800, 1199],
	["D", 1200, 1599],
	["E", 1600, 1999],
	["F", 2000, 2399],
	["G", 2400, 2799],
	["H", 2800, 3199],
    ["I", 3200, 4800]]

N = int(input())
P = [int(i) for i in input().split()]
C = []

cnt_I = 0
for i in P:
  if i >= 3200:
    cnt_I += 1
  for c, m, x in L:
      if m <= i and i <= x:
        C.append(c)
        break

if "I" in C:
  mx = len(set(C)) - 1 + cnt_I
  mn = len(set(C)) - 1
else:
  mx = len(set(C))
  mn = len(set(C))

print(mn, mx)