A1,A2,A3,A4 = map(int, input().split()) if A1 < A2 and A3 > A4: print('YES') else: print('NO')