n = int(input())
v = list(map(int, input().split()))
c = [0] * 9
for i in range(0, n):
  if v[i] >= 3200:
    c[8] += 1
  else:
    c[v[i]//400] += 1
a = 0
for i in range(0, 8):
  if c[i] > 0:
    a += 1
print(a, min(a, a+c[8]))