n = gets.to_i
a = gets.split.map(&:to_i)
num = [0]*8
r = 0

8.times do |i|
  a.each do |j|
    num[i] += 1 if j>=r && j<r+400
  end
  r += 400
end

overs = a.count{|j| j>=3200}

ans = num.count{|i| i!=0}
ans += 1 if ans == 0 && overs > 0
puts "#{ans} #{ans+overs}"