n = int(input())
l = list(map(int, input().split()))
found = set()
f = 0
for i in l:
  if i <= 399:
    found.add("灰色")
  elif i <= 799:
    found.add("茶色")
  elif i <= 1199:
    found.add("緑色")
  elif i <= 1599:
    found.add("水色")
  elif i <= 1999:
    found.add("青色")
  elif i <= 2399:
    found.add("黄色")
  elif i <= 2799:
    found.add("橙色")
  elif i <= 3199:
    found.add("赤色")
  else:
    f += 1
if len(found) == 0:
  print(1, 1)
elif len(found) + f > 8:
   print(len(found), 8)
else:
  print(len(found), len(found) + f)
