n = gets.chomp.to_i a = gets.chomp.split(" ").map(&:to_i) sum = a.inject(:+) kame = ((n * 4) - sum) / 2 turu = n - kame puts "#{turu} #{kame}"