A=[*map(int,input().split())] B=[*map(int,input().split())] f=lambda z:z[1]>max(z[0],z[2])or z[1]1: return "Yes" A[i],B[j]=B[j],A[i] return "No" print(g())