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