gets list = gets.split.map(&:to_i) ma = list.max mi = list.min t = 0 k = 0 if ma == mi if ma == (list.size - 1) * 4 t = list.size else k = list.size end else list.each do |i| if i == ma t += 1 else k += 1 end end end puts [k, t].join(" ")