N = gets.to_i
A = gets.split.map(&:to_i).sort

r = [1, 400, 800, 1200, 1600, 2000, 2400, 2800, 3200, 10000]
R = r.zip(r.map{|i| i - 1}.drop(1)).take(9).map{|x, y| (x..y)}

inds = A.map{|a| R.index{|x| x === a}}
red = inds.count{|x| 7 < x}
cmin = inds.select{|x| x < 8}.uniq.size
puts [cmin, cmin + red].join(" ")

