m,f=gets.chomp.split(/\s/).map(&:to_i) puts (m+1) <= f ? "YES" : "NO" puts (m-f+1).abs