print((function (f, s, t) return f(s)>=f(t) and "YES" or "NO" end)(function (s) local r = s:gsub("%.","") return tonumber(r) end, io.stdin:read("*l"), io.stdin:read("*l")))