N = gets.to_i A = gets.split.map(&:to_i).sort x, y = 0, 0 A.each do |a| y += 1 if a < A.last end if y == 0 if (A.last / (N - 1)) % 4 == 0 y = N else x = N end else x = N - y end puts "#{x} #{y}"