val = gets.chomp.split(" ").map(&:to_i) val[0] += 1 if val[0] == val[1] puts "YES" puts "0" elsif val[0] < val[1] puts "NO" puts val[1] - val[0] elsif val[0] > val[1] puts "NO" puts val[0] - val[1] end