# frozen_string_literal: true def solve a, b = AB.transpose (b - a).uniq end N = gets.to_i AB = N.times.map { gets.chomp.split } puts solve