man, woman = gets.chomp!.split(' ').map(&:to_i) puts (woman > man) ? 'YES':'NO' if woman > man puts woman - (man + 1) else puts (man + 1) - woman end