a, b, c, d = map(int, input().split()) ans = "NO" if a < b and c > d: ans = "YES" print(ans)