n = gets.chomp.to_i
if n >= 2
ar = gets.chomp.split(" ").map(&:to_i)
else
    ar = gets.chomp.to_i
end
# randam = 0
# red = 0
# orange = 0
# yellow = 0
# bulue = 0
# water = 0
# green = 0
# cha = 0
# hai = 0
a = Array.new(8,0)
ar.each do |i|
    if i >= 3200
        a[0] += 1
    elsif i >= 2800
        a[1] += 1
    elsif i >= 2400
        a[2] += 1
    elsif i >= 1600
        a[3] += 1
    elsif i >= 1200
        a[4] += 1
    elsif i >= 800
        a[5] += 1
    elsif i >= 400
        a[6] += 1
    else
        a[7] += 1
    end
end
randam = a.shift
count = 0
a.each do |i|
    if i >= 1
    count += 1
    end
end
teisuu = [count + randam,8].min
print "#{count}" + " " + "#{teisuu}"