def main(): A, B, C, D = map(int, input().split(" ")) if A < B and C > D: print("YES") else: print("NO") if __name__ == "__main__": main()