#include using namespace std; //型に気を付けよう //a=0x61=97 '0'=0x30=48 #define rep(i,n) for(int i=0;i pairii; typedef vector veci; const double pi=3.1415926535; const ll mod=1000000007; //桁数指定 cout << fixed << setprecision(2) long long gcd(long long a, long long b) {//最大公約数 while(1) { if(a < b) swap(a, b); if(!b) break; a %= b; } return a; } int main() { ll a,b; cin>>a>>b; ll g=gcd(a,b); b/=g;int i=0,j=0; while(!(i)){ i=b%2; if(!i)b/=2; } while(!(j)){ j=b%5; if(!j)b/=5; } if(b==1)cout<<"Yes"<