import strutils
import sequtils

var rate = [0, 0, 0, 0, 0, 0, 0, 0, 0]

var _ = readLine(stdin).parseInt()
var a = readLine(stdin).split().map(parseInt)

for i in a:
  if i >= 3200:
    rate[8] += 1
  else:
    rate[i div 400] += 1

var
  color_cnt: int = 0
for i in 0..7:
  if rate[i] != 0:
    color_cnt += 1

if color_cnt == 0:
  echo 1, " ", color_cnt
else:
  echo color_cnt, " ", color_cnt + rate[8]