print((function (n) local p,q,t=tonumber(io.stdin:read(3+n):sub(3)),tonumber(io.stdin:read(2+n):sub(3)),10^n return t*(t-p)*q < p*(t-q)*q and "YES" or "NO" end)(5))