def color(x):
  if(1 <= x and x <= 399):
    return "灰色"
  if(400 <= x and x <= 799):
    return "茶色"
  if(800 <= x and x <= 1199):
    return "緑色"
  if(1200 <= x and x <= 1599):
    return "水色"
  if(1600 <= x and x <= 1999):
    return "青色"
  if(2000 <= x and x <= 2399):
    return "黄色"
  if(2400 <= x and x <= 2799):
    return "橙色" 
  if(2800 <= x and x <= 3199):
    return "赤色"
  if(3200 <= x):
    return "free"

from collections import defaultdict
d = defaultdict(int)
n = int(input())
a = list(map(int, input().split()))
free = 0
for score in a:
  if color(score) == "free":
    free +=1
  else:
    d[color(score)] += 1
print(len(d), len(d) + free)

