a, b = gets.split.map(&:to_i) if a < b puts "YES" p b - a - 1 else puts "NO" p a - b+ 1 end