a1,a2,a3,a4, = list(input().split()) if a1 < a2: if a3 > a4: print ("YES") else: print("NO")