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