A,B=input().split() if A=='1.0000': print('Yes') exit() if B[0]=='-': print('No') exit() BB=int(B.replace('.','')) if B=='0.0000': print('Yes') exit() if A[-4:]!='0000': print('No') exit() A=int(float(A)//1) for i in range(2,5*10**4): s=i for j in range(2,10**5): s*=i if s>A: break elif s==A: if (BB*j)%10000==0: print('Yes') exit() print('No')