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

color = set()
cnt = 0
for i in a:
  if 1 <= i <= 399:
    color.add("gray")
  elif 400 <= i <= 799:
    color.add("brown")
  elif 800 <= i <= 1199:
    color.add("green")
  elif 1200 <= i <= 1599:
    color.add("water")
  elif 1600 <= i <= 1999:
    color.add("blue")
  elif 2000 <= i <= 2399:
    color.add("yellow")
  elif 2400 <= i <= 2799:
    color.add("orange")
  elif 2800 <= i <= 3199:
    color.add("red")
  else:
    cnt += 1

print("%s %s" %(len(color), len(color) + cnt))