p, q = io.read("*n", "*n") a = (1 - p)-- * q b = p * (1 - q)-- * q if(a < b) then print("YES") else print("NO") end