A,B=map(int,input().split())
import random
x=random.randint(10**60,10**61)
if pow(A,B,x)==pow(B,A,x):
    print("Yes")
else:
    print("No")