a = [int(x) for x in input().split()] print("YES" if a[0] < a[1] and a[2] > a[3] else "NO")