m, f = gets.split(' ').map(&:to_i) m += 1 if m <= f p "YES\n0" else p "NO\n#{m - f}" end