n = gets.to_i a = gets.split.map(&:to_i) x = 2 * n - a.sum / (2 * (n - 1)) y = n - x puts "#{x} #{y}"