m, f = gets.split(' ').map(&:to_i) rest = f - (m + 1) # 1 is Yasuo rest >= 0 ? puts('YES') : puts('NO') puts rest.abs