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