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