A,B=input().split() if A=='1.0000': print('Yes') exit() BB=int(B.replace('.','')) if B=='0.0000': print('Yes') exit() if A[-4:]!='0000': print('No') exit() A=int(A.replace('.',''))//10000 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 and BB>0: print('Yes') exit() print('No')