n = gets.to_i
A = gets.split.map(&:to_i)

rate = {}
rate['gray'] = false
rate['brown'] = false
rate['green'] = false
rate['light_blue'] = false
rate['blue'] = false
rate['yellow'] = false
rate['orage'] = false
rate['red'] = false

free = 0
A.each do |a|
  case a
  when 1..399
    rate['gray'] = true
  when 400..799
    rate['brown'] = true
  when 800..1199
    rate['green'] = true
  when 1200..1599
    rate['light_blue'] = true
  when 1600..1999
    rate['blue'] = true
  when 2000..2399
    rate['yellow'] = true
  when 2400..2799
    rate['orage'] = true
  when 2800..3199
    rate['red'] = true
  else
    free += 1
  end
end

num = rate.count {|k, v| v}

min = num + [free-num, 0].max
max = num + free

puts "#{min} #{max}"
