const input = require('fs').readFileSync('/dev/stdin', 'utf8')

const [num, array] = input.split('\n')
const newArray = Array.from(
  new Set(array.split(' ').map((num) => Math.floor(num / 400)))
)
const colorForced = newArray.filter((n) => n < 8).length
const freeColor = array.split(' ').filter((n) => n >= 3200).length

let min = newArray.filter((n) => n < 8).length
min = min === 0 ? 1 : min
const diff = 8 - min > freeColor ? freeColor : 8 - min
const max = min + diff

console.log(`${min} ${max}`)
