print((function (f) return f(io.stdin) and "YES" or "NO" end)(function (fh) local x,y,n,a,b=fh:read("*n"),fh:read("*n"),fh:read("*n"),fh:read("*n"),0 for i=2,n do b=fh:read("*n") if a*y>b*x then return false end a=b end return true end))