a, b, c, d = [int(v) for v in input().split()] if a < b and c > d: print("YES") else: print("NO")