a1, a2, a3, a4 = map(int, input().split())

if a1 < a2 and a3 > a4:
    ans = "YES"
else:
    ans = "NO"

print(ans)