a, b = gets.chomp.split.map(&:to_i) if a<=b puts 'YES' puts 0 else puts 'NO' puts b-a end