male_num, female_num = gets.split.map(&:to_i) puts male_num < female_num ? "YES" : "NO" if female_num > male_num puts female_num - (male_num + 1) else puts (male_num + 1) - female_num end