mod = 998244353 a, b = map(int,input().split()) if pow(a, b, mod) == pow(b, a, mod): print("Yes") else: print("No")