L = list(map(int, input().split())) if L[0] < L[1] and L[2] > L[3]: print("YES") else: print("NO")