a,b=map(int,input().split()) if pow(a,b,(1<<61)-1)==pow(b,a,(1<<61)-1): print("Yes") else: print("No")