N = gets.to_i
a = gets.split.map(&:to_i)

b = Array.new(8, false)
g = 0

a.each do |aa|
  if aa < 400
    b[0] = true
  elsif aa < 800
    b[1] = true
  elsif aa < 1200
    b[2] = true
  elsif aa < 1600
    b[3] = true
  elsif aa < 2000
    b[4] = true
  elsif aa < 2400
    b[5] = true
  elsif aa < 2800
    b[6] = true
  elsif aa < 3200
    b[7] = true
  else
    g += 1
  end
end

r1 = 0
b.each do |d|
  if d
    r1 += 1
  end
end

b.each_with_index do |d, i|
  break if g == 0

  unless d
    b[i] = true
    g -= 1
  end
end

r2 = 0
b.each do |d|
  if d
    r2 += 1
  end
end

puts "#{r1} #{r2}"