import math A, B = [int(x) for x in input().split()] if A==B: print("Yes") # elif A**B == B**A: elif math.log(A)/A == math.log(B)/B: print("Yes") else: print("No")