RATE_RANGE = 400
TOTAL_COLOR_NUM = 8
MAX_RATE = 3200
N = input()
a = map(int, raw_input().split())
c = map(lambda x: x / RATE_RANGE if x < MAX_RATE else TOTAL_COLOR_NUM, a)

max_rate_num = len(filter(lambda x: x == TOTAL_COLOR_NUM, c))
uniq_c = set(c)
if TOTAL_COLOR_NUM in uniq_c:
  if len(uniq_c) == 1:
    print 1, 1
  elif len(uniq_c) == TOTAL_COLOR_NUM + 1:
    print TOTAL_COLOR_NUM, TOTAL_COLOR_NUM
  else:
    print len(uniq_c) - 1, min(TOTAL_COLOR_NUM, len(uniq_c) - 1 + max_rate_num)
else:
  print len(uniq_c), len(uniq_c)