A,B=map(int,input().split()) s="No" if A==B: s="Yes" elif A+B<10000: if A**B==B**A: s="Yes" print(s)