N = int(input())
a = list(map(int, input().split()))
num = 0
for i in range(8):
  for j in range(N):
    if 400*i <= a[j] and a[j] < 400*(i+1):
      num += 1
      break
num_max = num
for k in a:
  if k >= 3200 and num < 8:
    num_max += 1
if min(a) >= 3200:
  num = 1
ans = [str(num), str(num_max)]
print(" ".join(ans))