n = gets.to_i xs = gets.split.map(&:to_i) ys = xs.map {|e| e + 2 } d = Hash.new(0) ys.each {|e| d[e] += 1 } crane = d[d.keys.max] turtle = n - crane puts "#{crane} #{turtle}"