local a = io.read("*n")
local b = io.read("*n")

function odd(num)
	if num%2 == 0 then
		return false
	else
		return true
	end
end

if odd(a) and odd(b) then
	if math.abs(a - b) > 1 then
		print("YES")
	else
		print("NO")
	end
else
	print("NO")
end