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

gray = 0
brown = 0
green = 0
water = 0
blue = 0
yellow = 0
orange = 0
red = 0
god = 0

for i in a:
  if i > 1 and i < 400:
    gray += 1
  if i > 399 and i < 800:
    brown += 1
  if i > 799 and i < 1200:
    green += 1
  if i > 1199 and i < 1600:
    water += 1
  if i > 1599 and i < 2000:
    blue += 1
  if i > 1999 and i < 2400:
    yellow += 1
  if i > 2399 and i < 2800:
    orange += 1
  if i > 2799 and i < 3200:
    red += 1
  if i >= 3200:
    god += 1

l = [gray, brown, green, water, blue, yellow, orange, red]
count = 0
for i in l:
  if i > 0:
    count += 1

print(str(count) + " " + str(count + god))