a,b = map(int,input().split()) if a == b: print("Yes") exit() if min(a, b) <= 40 and a ** b == b ** a: print("Yes") else: print("No")