A = list(map(int,input().split())) print(['YES', 'NO'][0 if A[0] < A[1] and A[2] > A[3] else 1])