import random A,B = map(int, input().split()) mod = random.randint(10**30, 10**31) if pow(A,B,mod)==pow(B,A,mod): print('Yes') else: print('No')