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