RATE_RANGE = 400
TOTAL_COLOR_NUM = 8
MAX_RATE = 3200
N = input()
a = map(int, raw_input().split())
# discretize rate (0 ~ 8)
rainbow_color_num = 0
kind_num = set()
for _a in a:
  if _a >= MAX_RATE:
    rainbow_color_num += 1
  else:
    kind_num.add(_a / RATE_RANGE)
print len(kind_num), min(TOTAL_COLOR_NUM, len(kind_num) + rainbow_color_num)