import strutils, sets

proc input: string =
  while true:
    let tmp = readChar stdin
    if not isSpace tmp:
      safeAdd result, tmp
    elif tmp != '\r': break

let
  N = parseInt input()
var
  cnt = 0
  dic = initSet[int]()

for i in 1 .. N:
  let
    a_i = parseInt input()
    R = a_i div 400

  if a_i >= 3200:
    cnt += 1
  else:
    incl dic, R

echo max(1, dic.len), " ", min(8, dic.len + cnt)
