A, B = gets.split.map(&:to_i) ans = B-A-1 if ans < 0 puts 'NO' puts ans.abs else puts 'YES' puts 0 end