A=list(map(int,input().split()));print("YNEOS"[1-int(A[0]A[3])::2])