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