a=[] b=[] a=map(int,input().split()) b=map(int,input().split()) a.sort() b.sort() if a == b: print("No") else: print("Yes")