A = [int(a) for a in input().split()] if A[0] < A[1] and A[2] > A[3]: ans = "YES" else: ans = "NO" print(ans)