A, B, C, D = map(int, input().split()) if A < B and C > D: print('YES') else: print('NO')