mod = 1000000007 eps = 10**-9 def main(): import sys input = sys.stdin.readline A = list(map(int, input().split())) if A[0] < A[1] and A[2] > A[3]: print("YES") else: print("NO") if __name__ == '__main__': main()