def kado(A): if A[1]A[0] and A[1]>A[2]: return 1 return 0 A=list(map(int,input().split())) B=list(map(int,input().split())) for i in range(3): for j in range(3): A[i],B[j]=B[j],A[i] if kado(A)==1 and kado(B)==1: print("Yes") exit() else: A[i],B[j]=B[j],A[i] print("No")