A = [int(i) for i in input().strip().split(' ')] print(['NO', 'YES'][A[0] < A[1] and A[2] > A[3]])