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