A, B = gets.split.map &:to_i All_A = A + 1 if All_A <= B then puts "YES" else puts "NO" end puts (All_A - B).abs