N = int(input())
As = list(map(int, input().split()))

over_count = 0
gray = 0
brawn = 0
green = 0
lightblue = 0
blue = 0
yellow = 0
orange = 0
red = 0

for a in As:
  if 1 <= a <= 399:
    gray = 1
  elif 400 <= a <= 799:
    brawn = 1
  elif 800 <= a <= 1199:
    green = 1
  elif 1200 <= a <= 1599:
    lightblue = 1
  elif 1600 <= a <= 1999:
    blue = 1
  elif 2000 <= a <= 2399:
    yellow = 1
  elif 2400 <= a <= 2799:
    orange = 1
  elif 2800 <= a <= 3199:
    red = 1
  elif a >= 3200:
    over_count += 1
    
min_count = gray + brawn + green + lightblue + blue + yellow + orange + red
max_count = min_count + over_count

print("{} {}".format(min_count, max_count))

