n=input();a=sorted(map(int,input().split()))
result = []
free_color = 0
for i in a:
  if i < 400:
    result.append('灰色')
  elif i < 800:
    result.append('茶色')
  elif i < 1200:
    result.append('緑色')
  elif i < 1600:
    result.append('水色')
  elif i < 2000:
    result.append('青色')
  elif i < 2400:
    result.append('黄色')
  elif i < 2800:
    result.append('橙色')
  elif i < 3200:
    result.append('赤色')
  else:
    free_color += 1
print(len(set(result)), 8 if len(set(result))+free_color >= 8 else len(set(result))+free_color)