a1, a2, a3, a4 = map(int, open(0).read().split()) if a1 < a2 and a3 > a4: print("YES") else: print("NO")