a_,b_ = input().split(" ") a,b = int(a_),int(b_) powAB = pow(a,b) powBA = pow(b,a) if powAB == powBA: print("Yes") else: print("No")